diff --git a/docs/content/en/docs/operator-manual/piped/configuration-reference.md b/docs/content/en/docs/operator-manual/piped/configuration-reference.md index bfadaf2d7e..cd4333617d 100644 --- a/docs/content/en/docs/operator-manual/piped/configuration-reference.md +++ b/docs/content/en/docs/operator-manual/piped/configuration-reference.md @@ -30,7 +30,7 @@ spec: | repositories | [][Repository](/docs/operator-manual/piped/configuration-reference/#repository) | List of Git repositories this piped will handle | No | | chartRepositories | [][ChartRepository](/docs/operator-manual/piped/configuration-reference/#chartrepository) | List of Helm chart repositories that should be added while starting up | No | | cloudProviders | [][CloudProvider](/docs/operator-manual/piped/configuration-reference/#cloudprovider) | List of cloud providers can be used by this piped | No | -| analysisProviders | [][CloudProvider](/docs/operator-manual/piped/configuration-reference/#analysisprovider) | List of analysis providers can be used by this piped | No | +| analysisProviders | [][AnalysisProvider](/docs/operator-manual/piped/configuration-reference/#analysisprovider) | List of analysis providers can be used by this piped | No | | notifications | [Notifications](/docs/operator-manual/piped/configuration-reference/#notifications) | Notification to Slack, Webhook... | No | ### Git diff --git a/docs/content/en/docs/user-guide/adding-a-manual-approval.md b/docs/content/en/docs/user-guide/adding-a-manual-approval.md index 3e1c9268cd..8abe9bd171 100644 --- a/docs/content/en/docs/user-guide/adding-a-manual-approval.md +++ b/docs/content/en/docs/user-guide/adding-a-manual-approval.md @@ -7,3 +7,8 @@ description: > --- > TBA + + +
+Deployment with a WAIT_APPROVAL stage +
diff --git a/docs/content/en/docs/user-guide/adding-a-wait-stage.md b/docs/content/en/docs/user-guide/adding-a-wait-stage.md index f040041a7b..0f9c359155 100644 --- a/docs/content/en/docs/user-guide/adding-a-wait-stage.md +++ b/docs/content/en/docs/user-guide/adding-a-wait-stage.md @@ -7,3 +7,8 @@ description: > --- > TBA + + ++Deployment with a WAIT stage +
diff --git a/docs/content/en/docs/user-guide/application-live-state.md b/docs/content/en/docs/user-guide/application-live-state.md index 00673366cb..47cc3ad0c8 100644 --- a/docs/content/en/docs/user-guide/application-live-state.md +++ b/docs/content/en/docs/user-guide/application-live-state.md @@ -7,3 +7,8 @@ description: > --- > TBA + + ++Application Details Page +
diff --git a/docs/content/en/docs/user-guide/cancelling-a-deployment.md b/docs/content/en/docs/user-guide/cancelling-a-deployment.md index fb6b519814..31b99970d9 100644 --- a/docs/content/en/docs/user-guide/cancelling-a-deployment.md +++ b/docs/content/en/docs/user-guide/cancelling-a-deployment.md @@ -7,3 +7,9 @@ description: > --- > TBA + + ++Cancel a Deployment from web UI +
+ diff --git a/docs/content/en/docs/user-guide/configuration-drift-detection.md b/docs/content/en/docs/user-guide/configuration-drift-detection.md index 6bb479cbd2..ca359fc631 100644 --- a/docs/content/en/docs/user-guide/configuration-drift-detection.md +++ b/docs/content/en/docs/user-guide/configuration-drift-detection.md @@ -7,3 +7,21 @@ description: > --- > TBA + +Configuration Drift is the phenomenon where running resources become more and more different with the defined in Git as time goes on, due to manual ad-hoc changes and updates. +As PipeCD is using Git as single source of truth, all application resources and infrastructure changes must be done by making a pull request to Git. + + ++Application is in SYNCED state +
+ + ++Application is in OUT_OF_SYNC state +
+ + ++The details shows why the application is in OUT_OF_SYNC state +
diff --git a/docs/content/en/docs/user-guide/configuration-reference.md b/docs/content/en/docs/user-guide/configuration-reference.md index 0ad8dac901..466b3db3df 100644 --- a/docs/content/en/docs/user-guide/configuration-reference.md +++ b/docs/content/en/docs/user-guide/configuration-reference.md @@ -8,32 +8,79 @@ description: > > TBA -### Piped Configuration +## Kubernetes Application ``` yaml apiVersion: pipecd.dev/v1beta1 -kind: Piped +kind: KubernetesApp spec: - projectID: ... - pipedID: ... + input: + pipeline: ... ``` | Field | Type | Description | Required | |-|-|-|-| -| projectID | string | The project ID this piped belongs to | Yes | -| pipedID | string | The generated ID for this piped | Yes | -| pipedKeyFile | string | The path to the file containing generated Key for this piped | Yes | -| webURL | string | The URL address of PipeCD web | Yes | -| syncInterval | duration | How offten to check whether an application should be synced. Default is `1m` | No | -| git | [Git](/docs/operator-manual/piped/configuration-reference/#git) | Git configuration needed for Git commands | No | -| repositories | [][Repository](/docs/operator-manual/piped/configuration-reference/#repository) | List of Git repositories this piped will handle | No | -| chartRepositories | [][ChartRepository](/docs/operator-manual/piped/configuration-reference/#chartrepository) | List of Helm chart repositories that should be added while starting up | No | -| cloudProviders | [][CloudProvider](/docs/operator-manual/piped/configuration-reference/#cloudprovider) | List of cloud providers can be used by this piped | No | -| analysisProviders | [][CloudProvider](/docs/operator-manual/piped/configuration-reference/#analysisprovider) | List of analysis providers can be used by this piped | No | -| notifications | [Notifications](/docs/operator-manual/piped/configuration-reference/#notifications) | Notification to Slack, Webhook... | No | +| input | [KubernetesDeploymentInput](/docs/user-guide/configuration-reference/#kubernetesdeploymentinput) | Input for Kubernetes deployment such as kubectl version, helm version, manifests filter... | No | +| commitMatcher | [CommitMatcher](/docs/user-guide/configuration-reference/#commitmatcher) | Forcibly use QuickSync or Pipeline when commit message matched the specified format. | No | +| quickSync | [KubernetesQuickSync](/docs/user-guide/configuration-reference/#kubernetesquicksync) | Configuration for quick sync. | No | +| pipeline | [Pipeline](/docs/user-guide/configuration-reference/#pipeline) | Pipeline for deploying progressively. | No | +| service | [KubernetesService](/docs/user-guide/configuration-reference/#kubernetesservice) | Which Kubernetes resource should be considered as the Service of application. Empty means the first Service resource will be used. | No | +| workloads | [][KubernetesWorkload](/docs/user-guide/configuration-reference/#kubernetesworkload) | Which Kubernetes resources should be consiedered as the Workloads of application. Empty means all Deployment resources. | No | +| trafficRouting | [KubernetesTrafficRouting](/docs/user-guide/configuration-reference/#kubernetestrafficrouting) | How to change traffic routing percentages. | No | -### Analysis Template Configuration +## Terraform application + +``` yaml +apiVersion: pipecd.dev/v1beta1 +kind: TerraformApp +spec: + input: + pipeline: + ... +``` + +| Field | Type | Description | Required | +|-|-|-|-| +| input | [TerraformDeploymentInput](/docs/user-guide/configuration-reference/#terraformdeploymentinput) | Input for Terraform deployment such as terraform version, workspace... | No | +| quickSync | [TerraformQuickSync](/docs/user-guide/configuration-reference/#terraformquicksync) | Configuration for quick sync. | No | +| pipeline | [Pipeline](/docs/user-guide/configuration-reference/#pipeline) | Pipeline for deploying progressively. | No | + +## CloudRun application + +``` yaml +apiVersion: pipecd.dev/v1beta1 +kind: CloudRunApp +spec: + input: + pipeline: + ... +``` + +| Field | Type | Description | Required | +|-|-|-|-| +| input | [CloudRunDeploymentInput](/docs/user-guide/configuration-reference/#cloudrundeploymentinput) | Input for CloudRun deployment such as docker image... | No | +| quickSync | [CloudRunQuickSync](/docs/user-guide/configuration-reference/#cloudrunquicksync) | Configuration for quick sync. | No | +| pipeline | [Pipeline](/docs/user-guide/configuration-reference/#pipeline) | Pipeline for deploying progressively. | No | + +## Lambda application + +``` yaml +apiVersion: pipecd.dev/v1beta1 +kind: LambdaApp +spec: + input: + pipeline: + ... +``` + +| Field | Type | Description | Required | +|-|-|-|-| +| input | [CloudRunDeploymentInput](/docs/user-guide/configuration-reference/#cloudrundeploymentinput) | Input for Lambda deployment such as where to fetch source code... | No | +| quickSync | [CloudRunQuickSync](/docs/user-guide/configuration-reference/#cloudrunquicksync) | Configuration for quick sync. | No | +| pipeline | [Pipeline](/docs/user-guide/configuration-reference/#pipeline) | Pipeline for deploying progressively. | No | + +## Analysis Template Configuration ``` yaml apiVersion: pipecd.dev/v1beta1 @@ -45,44 +92,187 @@ spec: | Field | Type | Description | Required | |-|-|-|-| -### Git +## CommitMatcher + +| Field | Type | Description | Required | +|-|-|-|-| +| quickSync | string | Regular expression string to forcibly do QuickSync when it matches the commit message. | No | +| pipeline | string | Regular expression string to forcibly do Pipeline when it matches the commit message. | No | + +## Pipeline + +| Field | Type | Description | Required | +|-|-|-|-| +| stages | [][PipelineStage](/docs/user-guide/configuration-reference/#pipelinestage) | List of deployment pipeline stages. | No | + +## PipelineStage + +| Field | Type | Description | Required | +|-|-|-|-| +| id | string | The unique ID of the stage. | No | +| name | string | One of the provided stage names. | Yes | +| desc | string | The description about the stage. | No | +| timeout | duration | The maximum time the stage can be taken to run. | No | +| with | | Specific configuration for the stage. | No | + +## KubernetesDeploymentInput + +| Field | Type | Description | Required | +|-|-|-|-| +| manifests | []string | List of manifest files in the application configuration directory used to deploy. Empty means all manifest files in the directory will be used. | No | +| kubectlVersion | string | Version of kubectl will be used. Empty means the [default version](https://github.com/pipe-cd/pipe/blob/master/dockers/piped-base/install-kubectl.sh#L34) will be used. | No | +| kustomizeVersion | string | Version of kustomize will be used. Empty means the [default version](https://github.com/pipe-cd/pipe/blob/master/dockers/piped-base/install-kustomize.sh#L34) will be used. | No | +| helmVersion | string | Version of helm will be used. Empty means the [default version](https://github.com/pipe-cd/pipe/blob/master/dockers/piped-base/install-helm.sh#L35) will be used. | No | +| helmChart | [HelmChart](/docs/user-guide/configuration-reference/#helmchart) | Where to fetch helm chart. | No | +| helmOptions | [HelmOptions](/docs/user-guide/configuration-reference/#helmoptions) | Configurable parameters for helm commands. | No | +| namespace | string | The namespace where manifests will be applied. | No | +| autoRollback | bool | Automatically reverts all deployment changes on failure. Default is `true`. | No | +| dependencies | []string | List of directories where their changes will trigger the deployment. | No | + +## HelmChart + +| Field | Type | Description | Required | +|-|-|-|-| + +## HelmOptions + +| Field | Type | Description | Required | +|-|-|-|-| + +## KubernetesQuickSync + +| Field | Type | Description | Required | +|-|-|-|-| +| addVariantLabelToSelector | bool | Whether the PRIMARY variant label should be added to manifests if they were missing. Default is `false`. | No | +| prune | bool | Whether the resources that are no longer defined in Git should be removed or not. Default is `false` | No | + +## KubernetesService + +| Field | Type | Description | Required | +|-|-|-|-| +| name | string | The name of Service manifest. | No | + +## KubernetesWorkload + +| Field | Type | Description | Required | +|-|-|-|-| +| kind | string | The kind name of workload manifests. Currently, only `Deployment` is supported. In the future, we also want to support `ReplicationController`, `DaemonSet`, `StatefulSet`. | No | +| name | string | The name of workload manifest. | No | + +## KubernetesTrafficRouting + +| Field | Type | Description | Required | +|-|-|-|-| +| method | string | Which traffic routing method will be used. Avaiable values are `istio`, `podselector`. Default is `podselector`. | No | +| istio | [IstioTrafficRouting](/docs/user-guide/configuration-reference/#istiotrafficrouting)| Istio configuration when the method is `istio`. | No | + +## IstioTrafficRouting + +| Field | Type | Description | Required | +|-|-|-|-| + +## TerraformDeploymentInput + +| Field | Type | Description | Required | +|-|-|-|-| + +## TerraformQuickSync + +| Field | Type | Description | Required | +|-|-|-|-| + +## CloudRunDeploymentInput + +| Field | Type | Description | Required | +|-|-|-|-| + +## CloudRunQuickSync + +| Field | Type | Description | Required | +|-|-|-|-| + +## LambdaDeploymentInput + +| Field | Type | Description | Required | +|-|-|-|-| + +## LambdaQuickSync + +| Field | Type | Description | Required | +|-|-|-|-| + +## StageOptions + +### KubernetesPrimaryRolloutStageOptions + +| Field | Type | Description | Required | +|-|-|-|-| +| suffix | string | Suffix that should be used when naming the PRIMARY variant's resources. Default is `primary`. | No | +| createService | bool | Whether the PRIMARY service should be created. Default is `false`. | No | +| addVariantLabelToSelector | bool | Whether the PRIMARY variant label should be added to manifests if they were missing. Default is `false`. | No | +| prune | bool | Whether the resources that are no longer defined in Git should be removed or not. Default is `false` | No | + +### KubernetesCanaryRolloutStageOptions + +| Field | Type | Description | Required | +|-|-|-|-| +| replicas | Replicas | How many pods for CANARY workloads. Default is `1` pod. | No | +| suffix | string | Suffix that should be used when naming the CANARY variant's resources. Default is `canary`. | No | +| createService | bool | Whether the CANARY service should be created. Default is `false`. | No | + +### KubernetesCanaryCleanStageOptions + +| Field | Type | Description | Required | +|-|-|-|-| + +### KubernetesBaselineRolloutStageOptions + +| Field | Type | Description | Required | +|-|-|-|-| +| replicas | Replicas | How many pods for BASELINE workloads. Default is `1` pod. | No | +| suffix | string | Suffix that should be used when naming the BASELINE variant's resources. Default is `baseline`. | No | +| createService | bool | Whether the BASELINE service should be created. Default is `false`. | No | + +### KubernetesBaselineCleanStageOptions + +| Field | Type | Description | Required | +|-|-|-|-| + +### KubernetesTrafficRoutingStageOptions | Field | Type | Description | Required | |-|-|-|-| -| Username | string | The username that will be configured to `git` | No | +| all | string | Which variant should receive all traffic. Avaiable values are "primary", "canary", "baseline". Default is `primary`. | No | +| primary | int | The percentage of traffic should be routed to PRIMARY variant. | No | +| canary | int | The percentage of traffic should be routed to CANARY variant. | No | +| baseline | int | The percentage of traffic should be routed to BASELINE variant. | No | -### Repository +### TerraformPlanStageOptions | Field | Type | Description | Required | |-|-|-|-| -| repoID | string | Unique identifier to the repository. This must be unique in the piped scope | Yes | -### ChartRepository +### TerraformApplyStageOptions | Field | Type | Description | Required | |-|-|-|-| -| name | string | The name of the chart repository | Yes | -### CLoudProvider +### CloudRunCanaryRolloutStageOptions | Field | Type | Description | Required | |-|-|-|-| -| Name | string | The name of the cloud provider | Yes | -### AnalysisProvider +### CloudRunTrafficRoutingStageOptions | Field | Type | Description | Required | |-|-|-|-| -| Name | string | The name of the analysis provider | Yes | -### Notifications +### LambdaCanaryRolloutStageOptions | Field | Type | Description | Required | |-|-|-|-| -| routes | [][Notification.Route](/docs/operator-manual/piped/configuration-reference/#notificationroute) | List of notification routes | No | -### Notification.Route +### LambdaTrafficRoutingStageOptions | Field | Type | Description | Required | |-|-|-|-| -| Name | string | The name of the analysis provider | Yes | diff --git a/docs/content/en/docs/user-guide/configuring-an-application/_index.md b/docs/content/en/docs/user-guide/configuring-an-application/_index.md index b7983dd431..510fc3b9ee 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/_index.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/_index.md @@ -6,4 +6,50 @@ description: > This page describes how to add and configure an application. --- +An application is a collect of resources and configurations that are managed together. +It represents the service which you are going to deploy. With PipeCD all application configurations and its deployment configuration (`.piped.yaml`) must be committed to a directory of a Git respository. That directory is called as application configuration directory. + +Before deploying an application, the application must be registered from the web UI and a deployment configuration file (`.piped.yaml`) must be committed to the application configuration directory. +An application must belong to exactly one environment and can be handled by one registered `piped`. Currently, PipeCD supports the following application kinds: + +- Kubernetes application +- Terraform application +- CloudRun application +- Lambda application + +## Registering a new application from Web UI + +Registering application helps PipedCD know where the application configuration is placing, what `piped` should handle the application as well as what cloud the application should be deployed to. + +By clicking on `+ADD` button at the application list page, a popup at the right side will be revealed as the following: + + ++Popup for registering a new application from Web UI +
+ +| Field | Description | Required | +|-|-|-|-| +| Name | The application name | Yes | +| Kind | The application kind. Select one of these values: `Kubernetes`, `Terraform`, `CloudRun`, `Lambda` | Yes | +| Env | The environment this application should belongs to. Select one of the registered environments at `Settings/Environment` page. | Yes | +| Piped | The piped that handles this application. Select one of the registered `piped`s at `Settings/Piped` page. | Yes | +| Repository | The Git repository contains application configuration and deployment configuration. Select one of the registered repositories in `piped` configuration. | Yes | +| Path | The relative path from the root of the Git repository to the directory containing application configuration and deployment configuration. | Yes | +| Config Filename | The name of deployment configuration file. Default is `.pipe.yaml`. | No | +| Cloud Provider | Where the application will be deployed to. Select one of the registered cloud providers in `piped` configuration. | Yes | + +After filling all the above fields, click `Save` button to complete application registering. + +## Adding a deployment configuration file `.piped.yaml` + +After registering the application, one more step left is adding the deployment configuration file (`.pipe.yaml`) to the application configuration directory in Git repository. +This deployment configuration specifies how application should be deployed such as canary/bluegreen strategy, required manual approval... + > TBA + +``` yaml +apiVersion: pipecd.dev/v1beta1 +kind: KubernetesApp +spec: +``` diff --git a/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/canary.md b/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/canary.md index e05d31fefe..28438fc111 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/canary.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/canary.md @@ -1,7 +1,7 @@ --- title: "Canary Deployment" linkTitle: "Canary" -weight: 3 +weight: 2 description: > Overview about deploying Kubernetes application. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/overview.md b/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/overview.md deleted file mode 100644 index fd6162a15c..0000000000 --- a/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/overview.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Overview" -linkTitle: "Overview" -weight: 1 -description: > - Overview about deploying Kubernetes application. ---- - -> TBA diff --git a/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/simple.md b/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/simple.md index fb5eb2e578..c3ca22476c 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/simple.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/cloudrun/simple.md @@ -1,7 +1,7 @@ --- title: "Simple" linkTitle: "Simple" -weight: 2 +weight: 1 description: > Overview about deploying Kubernetes application. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/_index.md b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/_index.md index b2cab85fde..3ff9a5d50f 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/_index.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/_index.md @@ -7,3 +7,10 @@ description: > --- > TBA + +### Kubernetes Application Variant + +Each Kubernetes application can has 3 variants: primary (aka stable), baseline, canary. +- `primary` runs the current version of code and configuration. +- `baseline` runs the same version of code and configuration as the primary variant. (Creating a brand new baseline workload ensures that the metrics produced are free of any effects caused by long-running processes.) +- `canary` runs the proposed changed of code or configuration. diff --git a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/bluegreen.md b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/bluegreen.md index a1d570666c..b5818428e0 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/bluegreen.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/bluegreen.md @@ -1,7 +1,7 @@ --- title: "BlueGreen Deployment" linkTitle: "BlueGreen" -weight: 5 +weight: 4 description: > Overview about deploying Kubernetes application. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/canary.md b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/canary.md index 74d206668a..e05d31fefe 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/canary.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/canary.md @@ -1,7 +1,7 @@ --- title: "Canary Deployment" linkTitle: "Canary" -weight: 4 +weight: 3 description: > Overview about deploying Kubernetes application. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/manifest-templating.md b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/manifest-templating.md index cf5dd1f2df..cb4a0df74b 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/manifest-templating.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/manifest-templating.md @@ -1,7 +1,7 @@ --- title: "Manifest Templating" linkTitle: "Manifest Templating" -weight: 3 +weight: 2 description: > This page describes all supported templating methods such as Helm, Kustomize. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/overview.md b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/overview.md deleted file mode 100644 index 88741f4fc1..0000000000 --- a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/overview.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Overview" -linkTitle: "Overview" -weight: 1 -description: > - Overview about deploying Kubernetes application. ---- - -> TBA - - -### Kubernetes Application Variant - -Each Kubernetes application can has 3 variants: primary (aka stable), baseline, canary. -- `primary` runs the current version of code and configuration. -- `baseline` runs the same version of code and configuration as the primary variant. (Creating a brand new baseline workload ensures that the metrics produced are free of any effects caused by long-running processes.) -- `canary` runs the proposed changed of code or configuration. diff --git a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/simple.md b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/simple.md index fb5eb2e578..c3ca22476c 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/simple.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/kubernetes/simple.md @@ -1,7 +1,7 @@ --- title: "Simple" linkTitle: "Simple" -weight: 2 +weight: 1 description: > Overview about deploying Kubernetes application. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/lambda/canary.md b/docs/content/en/docs/user-guide/configuring-an-application/lambda/canary.md index e05d31fefe..28438fc111 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/lambda/canary.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/lambda/canary.md @@ -1,7 +1,7 @@ --- title: "Canary Deployment" linkTitle: "Canary" -weight: 3 +weight: 2 description: > Overview about deploying Kubernetes application. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/lambda/overview.md b/docs/content/en/docs/user-guide/configuring-an-application/lambda/overview.md deleted file mode 100644 index fd6162a15c..0000000000 --- a/docs/content/en/docs/user-guide/configuring-an-application/lambda/overview.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Overview" -linkTitle: "Overview" -weight: 1 -description: > - Overview about deploying Kubernetes application. ---- - -> TBA diff --git a/docs/content/en/docs/user-guide/configuring-an-application/lambda/simple.md b/docs/content/en/docs/user-guide/configuring-an-application/lambda/simple.md index fb5eb2e578..c3ca22476c 100644 --- a/docs/content/en/docs/user-guide/configuring-an-application/lambda/simple.md +++ b/docs/content/en/docs/user-guide/configuring-an-application/lambda/simple.md @@ -1,7 +1,7 @@ --- title: "Simple" linkTitle: "Simple" -weight: 2 +weight: 1 description: > Overview about deploying Kubernetes application. --- diff --git a/docs/content/en/docs/user-guide/configuring-an-application/overview.md b/docs/content/en/docs/user-guide/configuring-an-application/overview.md deleted file mode 100644 index 10d6cb7bf6..0000000000 --- a/docs/content/en/docs/user-guide/configuring-an-application/overview.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Overview" -linkTitle: "Overview" -weight: 1 -description: > - This page describes how to add a new application. ---- - -> TBA - -Before deploying an application, the application must be registered from web UI to configure what piped should handle the application or where to deploy it. An application must belong to exactly one environment and can be handled by one registered piped. Currently, PipeCD supports the following application kinds: - -- Kubernetes applicaiton -- Terraform application -- CloudRun application -- Lambda application - -1. Registering a new application from Web UI. -2. Adding a deployment configuration file (`.piped.yaml`) to application directory in Git. diff --git a/docs/content/en/docs/user-guide/configuring-an-application/terraform/overview.md b/docs/content/en/docs/user-guide/configuring-an-application/terraform/overview.md deleted file mode 100644 index fd6162a15c..0000000000 --- a/docs/content/en/docs/user-guide/configuring-an-application/terraform/overview.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Overview" -linkTitle: "Overview" -weight: 1 -description: > - Overview about deploying Kubernetes application. ---- - -> TBA diff --git a/docs/content/en/docs/user-guide/insights.md b/docs/content/en/docs/user-guide/insights.md index 2d13714053..c252a74f58 100644 --- a/docs/content/en/docs/user-guide/insights.md +++ b/docs/content/en/docs/user-guide/insights.md @@ -6,3 +6,4 @@ description: > This page describes how to see the delivery performances. --- +> TBA diff --git a/docs/content/en/docs/user-guide/rolling-back-a-deployment.md b/docs/content/en/docs/user-guide/rolling-back-a-deployment.md index d62eb91ad1..208f1bad5f 100644 --- a/docs/content/en/docs/user-guide/rolling-back-a-deployment.md +++ b/docs/content/en/docs/user-guide/rolling-back-a-deployment.md @@ -7,3 +7,9 @@ description: > --- > TBA + + ++Cancel a deployment with rolling back +
+ diff --git a/docs/content/en/docs/user-guide/triggering-a-deployment.md b/docs/content/en/docs/user-guide/triggering-a-deployment.md index 4f684f006f..5cd1f33799 100644 --- a/docs/content/en/docs/user-guide/triggering-a-deployment.md +++ b/docs/content/en/docs/user-guide/triggering-a-deployment.md @@ -10,3 +10,9 @@ description: > - Automatically syncing by Git event. - Manually syncing from Web UI. + + ++Application Details Page +
+ diff --git a/docs/static/images/application-details.png b/docs/static/images/application-details.png index b795f550ce..8d87d5b6b8 100644 Binary files a/docs/static/images/application-details.png and b/docs/static/images/application-details.png differ diff --git a/docs/static/images/application-out-of-sync-details.png b/docs/static/images/application-out-of-sync-details.png new file mode 100644 index 0000000000..c960a946f3 Binary files /dev/null and b/docs/static/images/application-out-of-sync-details.png differ diff --git a/docs/static/images/application-out-of-sync.png b/docs/static/images/application-out-of-sync.png new file mode 100644 index 0000000000..63cf7c6941 Binary files /dev/null and b/docs/static/images/application-out-of-sync.png differ diff --git a/docs/static/images/application-synced.png b/docs/static/images/application-synced.png new file mode 100644 index 0000000000..e31f6d1170 Binary files /dev/null and b/docs/static/images/application-synced.png differ diff --git a/docs/static/images/cancel-deployment.png b/docs/static/images/cancel-deployment.png new file mode 100644 index 0000000000..ad08844eff Binary files /dev/null and b/docs/static/images/cancel-deployment.png differ diff --git a/docs/static/images/deployment-wait-approval-stage.png b/docs/static/images/deployment-wait-approval-stage.png new file mode 100644 index 0000000000..2a21b5d841 Binary files /dev/null and b/docs/static/images/deployment-wait-approval-stage.png differ diff --git a/docs/static/images/deployment-wait-stage.png b/docs/static/images/deployment-wait-stage.png new file mode 100644 index 0000000000..d07ba503e9 Binary files /dev/null and b/docs/static/images/deployment-wait-stage.png differ diff --git a/docs/static/images/registering-an-application.png b/docs/static/images/registering-an-application.png new file mode 100644 index 0000000000..5d5b673726 Binary files /dev/null and b/docs/static/images/registering-an-application.png differ diff --git a/pkg/config/deployment_cloudrun.go b/pkg/config/deployment_cloudrun.go index 65a69d3c61..81fc79ac37 100644 --- a/pkg/config/deployment_cloudrun.go +++ b/pkg/config/deployment_cloudrun.go @@ -16,9 +16,12 @@ package config // CloudRunDeploymentSpec represents a deployment configuration for CloudRun application. type CloudRunDeploymentSpec struct { - Input CloudRunDeploymentInput `json:"input"` + // Input for CloudRun deployment such as docker image... + Input CloudRunDeploymentInput `json:"input"` + // Configuration for quick sync. QuickSync CloudRunSyncStageOptions `json:"quickSync"` - Pipeline *DeploymentPipeline `json:"pipeline"` + // Pipline for deploying progressively. + Pipeline *DeploymentPipeline `json:"pipeline"` } func (s *CloudRunDeploymentSpec) GetStage(index int32) (PipelineStage, bool) { @@ -37,7 +40,7 @@ func (s *CloudRunDeploymentSpec) Validate() error { } type CloudRunDeploymentInput struct { - image string `json:"image"` + Image string `json:"image"` // Automatically reverts all changes from all stages when one of them failed. // Default is true. AutoRollback bool `json:"autoRollback"` diff --git a/pkg/config/deployment_kubernetes.go b/pkg/config/deployment_kubernetes.go index 17048b68d1..c816d8d90e 100644 --- a/pkg/config/deployment_kubernetes.go +++ b/pkg/config/deployment_kubernetes.go @@ -16,11 +16,14 @@ package config // KubernetesDeploymentSpec represents a deployment configuration for Kubernetes application. type KubernetesDeploymentSpec struct { - Input KubernetesDeploymentInput `json:"input"` - CommitMatcher DeploymentCommitMatcher `json:"commitMatcher"` - QuickSync K8sSyncStageOptions `json:"quickSync"` - Pipeline *DeploymentPipeline `json:"pipeline"` - + // Input for Kubernetes deployment such as kubectl version, helm version, manifests filter... + Input KubernetesDeploymentInput `json:"input"` + // Forcibly use QuickSync or Pipeline when commit message matched the specified format. + CommitMatcher DeploymentCommitMatcher `json:"commitMatcher"` + // Configuration for quick sync. + QuickSync K8sSyncStageOptions `json:"quickSync"` + // Pipeline for deploying progressively. + Pipeline *DeploymentPipeline `json:"pipeline"` // Which resource should be considered as the Service of application. // Empty means the first Service resource will be used. Service K8sResourceReference `json:"service"` @@ -51,21 +54,29 @@ func (s *KubernetesDeploymentSpec) Validate() error { return nil } +// KubernetesDeploymentInput represents needed input for triggering a Kubernetes deployment. type KubernetesDeploymentInput struct { - Manifests []string `json:"manifests"` - KubectlVersion string `json:"kubectlVersion"` - + // List of manifest files in the application configuration directory used to deploy. + // Empty means all manifest files in the directory will be used. + Manifests []string `json:"manifests"` + // Version of kubectl will be used. + KubectlVersion string `json:"kubectlVersion"` + // Version of kustomize will be used. KustomizeVersion string `json:"kustomizeVersion"` - HelmChart *InputHelmChart `json:"helmChart"` + // Version of helm will be used. + HelmVersion string `json:"helmVersion"` + // Where to fetch helm chart. + HelmChart *InputHelmChart `json:"helmChart"` + // COnfigurable parameters for helm commands. HelmOptions *InputHelmOptions `json:"helmOptions"` - HelmVersion string `json:"helmVersion"` // The namespace where manifests will be applied. Namespace string `json:"namespace"` - // Automatically reverts all changes from all stages when one of them failed. + // Automatically reverts all deployment changes on failure. // Default is true. - AutoRollback bool `json:"autoRollback"` + AutoRollback bool `json:"autoRollback"` + // List of directories where their changes will trigger the deployment. Dependencies []string `json:"dependencies,omitempty"` } @@ -131,7 +142,7 @@ type K8sResourceReference struct { type K8sSyncStageOptions struct { // Whether the PRIMARY variant label should be added to manifests if they were missing. AddVariantLabelToSelector bool `json:"addVariantLabelToSelector"` - // Whether the resources that are no longer defined in Git will be removed. + // Whether the resources that are no longer defined in Git should be removed or not. Prune bool `json:"prune"` } @@ -144,7 +155,7 @@ type K8sPrimaryRolloutStageOptions struct { CreateService bool `json:"createService"` // Whether the PRIMARY variant label should be added to manifests if they were missing. AddVariantLabelToSelector bool `json:"addVariantLabelToSelector"` - // Whether the resources that are no longer defined in Git will be removed. + // Whether the resources that are no longer defined in Git should be removed or not. Prune bool `json:"prune"` } diff --git a/pkg/config/deployment_lambda.go b/pkg/config/deployment_lambda.go index 67a498f75d..d431515af9 100644 --- a/pkg/config/deployment_lambda.go +++ b/pkg/config/deployment_lambda.go @@ -16,9 +16,12 @@ package config // LambdaDeploymentSpec represents a deployment configuration for Lambda application. type LambdaDeploymentSpec struct { - Input LambdaDeploymentInput `json:"input"` + // Input for Lambda deployment such as where to fetch source code... + Input LambdaDeploymentInput `json:"input"` + // Configuration for quick sync. QuickSync LambdaSyncStageOptions `json:"quickSync"` - Pipeline *DeploymentPipeline `json:"pipeline"` + // Pipeline for deploying progressively. + Pipeline *DeploymentPipeline `json:"pipeline"` } func (s *LambdaDeploymentSpec) GetStage(index int32) (PipelineStage, bool) { diff --git a/pkg/config/deployment_terraform.go b/pkg/config/deployment_terraform.go index 6dd19acfa1..c38e78318d 100644 --- a/pkg/config/deployment_terraform.go +++ b/pkg/config/deployment_terraform.go @@ -16,9 +16,12 @@ package config // TerraformDeploymentSpec represents a deployment configuration for Terraform application. type TerraformDeploymentSpec struct { - Input TerraformDeploymentInput `json:"input"` + // Input for Terraform deployment such as terraform version, workspace... + Input TerraformDeploymentInput `json:"input"` + // Configuration for quick sync. QuickSync TerraformApplyStageOptions `json:"quickSync"` - Pipeline *DeploymentPipeline `json:"pipeline"` + // Pipeline for deploying progressively. + Pipeline *DeploymentPipeline `json:"pipeline"` } func (s *TerraformDeploymentSpec) GetStage(index int32) (PipelineStage, bool) {