From 81a9676d9aa10f22866abd24836d71901cb2ff95 Mon Sep 17 00:00:00 2001 From: t-kikuc Date: Wed, 31 Jan 2024 09:23:44 +0900 Subject: [PATCH 1/7] Add pipectl init status Signed-off-by: t-kikuc --- docs/content/en/docs-dev/feature-status/_index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/content/en/docs-dev/feature-status/_index.md b/docs/content/en/docs-dev/feature-status/_index.md index 6b749fb4d8..a2e00adef3 100644 --- a/docs/content/en/docs-dev/feature-status/_index.md +++ b/docs/content/en/docs-dev/feature-status/_index.md @@ -130,3 +130,13 @@ Please note that the phases (Incubating, Alpha, Beta, and Stable) are applied to | [Insights](../user-guide/insights/) - Show the delivery performance of a team or an application | Incubating | | [Deployment Chain](../user-guide/managing-application/deployment-chain/) - Allow rolling out to multiple clusters gradually or promoting across environments | Alpha | | [Metrics](../user-guide/managing-controlplane/metrics/) - Dashboards for PipeCD and Piped metrics | Beta | + +## pipectl + +### init + +| Feature | Phase | +|-|-| +| Kubernetes - QuickSync | Alpha | +| ECS - QuickSync | Alpha | +| ECS - Pipeline Sync | Alpha | From 0988b894412d3347272debf647a327a07c09ccbe Mon Sep 17 00:00:00 2001 From: t-kikuc Date: Wed, 31 Jan 2024 09:29:50 +0900 Subject: [PATCH 2/7] add init cmd to pipectl doc Signed-off-by: t-kikuc --- docs/content/en/docs-dev/user-guide/command-line-tool.md | 1 + pkg/app/pipectl/cmd/initialize/initialize.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/content/en/docs-dev/user-guide/command-line-tool.md b/docs/content/en/docs-dev/user-guide/command-line-tool.md index 01e7df1571..28d832efe9 100644 --- a/docs/content/en/docs-dev/user-guide/command-line-tool.md +++ b/docs/content/en/docs-dev/user-guide/command-line-tool.md @@ -104,6 +104,7 @@ Available Commands: encrypt Encrypt the plaintext entered in either stdin or the --input-file flag. event Manage event resources. help Help about any command + init Generate an application config (app.pipecd.yaml) easily and interactively. piped Manage piped resources. plan-preview Show plan preview against the specified commit. quickstart Quick prepare PipeCD control plane in quickstart mode. diff --git a/pkg/app/pipectl/cmd/initialize/initialize.go b/pkg/app/pipectl/cmd/initialize/initialize.go index 34b3a37e07..f7703c64bb 100644 --- a/pkg/app/pipectl/cmd/initialize/initialize.go +++ b/pkg/app/pipectl/cmd/initialize/initialize.go @@ -51,9 +51,9 @@ func NewCommand() *cobra.Command { c := &command{} cmd := &cobra.Command{ Use: "init", - Short: "Generate a app.pipecd.yaml easily and interactively", + Short: "Generate an application config (app.pipecd.yaml) easily and interactively.", Example: ` pipectl init`, - Long: "Generate a app.pipecd.yaml easily, interactively selecting options.", + Long: "Generate an application config (app.pipecd.yaml) easily, interactively selecting options.", RunE: cli.WithContext(c.run), } From da322cf1026511b7cc256742e8c829654b427074 Mon Sep 17 00:00:00 2001 From: t-kikuc Date: Wed, 31 Jan 2024 09:38:32 +0900 Subject: [PATCH 3/7] add pipectl init explanation Signed-off-by: t-kikuc --- .../docs-dev/user-guide/command-line-tool.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/content/en/docs-dev/user-guide/command-line-tool.md b/docs/content/en/docs-dev/user-guide/command-line-tool.md index 28d832efe9..66d790e750 100644 --- a/docs/content/en/docs-dev/user-guide/command-line-tool.md +++ b/docs/content/en/docs-dev/user-guide/command-line-tool.md @@ -312,6 +312,36 @@ You can encrypt it the same way you do [from the web](../managing-application/se Note: The docs for pipectl available command is maybe outdated, we suggest users use the `help` command for the updated usage while using pipectl. +### Generating an application config (app.pipecd.yaml) + +Generate an app.pipecd.yaml interactively: + +``` console +$ pipectl init +Which platform? Enter the number [0]Kubernetes [1]ECS: 1 +Name of the application: myApp +... +``` + +After the above interaction, you can get the config YAML: + +```yaml +apiVersion: pipecd.dev/v1beta1 +kind: ECSApp +spec: + name: myApp + input: + serviceDefinitionFile: serviceDef.yaml + taskDefinitionFile: taskDef.yaml + targetGroups: + primary: + targetGroupArn: arn:aws:elasticloadbalancing:ap-northeast-1:123456789012:targetgroup/xxx/xxx + containerName: web + containerPort: 80 + description: Generated by `pipectl init`. See https://pipecd.dev/docs/user-guide/configuration-reference/ for more. +``` + + ### You want more? We always want to add more needed commands into pipectl. Please let us know what command you want to add by creating issues in the [pipe-cd/pipecd](https://github.com/pipe-cd/pipecd/issues) repository. We also welcome your pull request to add the command. From d8148dc8b5e85c44aa1405481a5399a42e0d1d68 Mon Sep 17 00:00:00 2001 From: t-kikuc Date: Wed, 31 Jan 2024 09:41:33 +0900 Subject: [PATCH 4/7] fi pipectl init status Signed-off-by: t-kikuc --- docs/content/en/docs-dev/feature-status/_index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/en/docs-dev/feature-status/_index.md b/docs/content/en/docs-dev/feature-status/_index.md index a2e00adef3..d7f060a62b 100644 --- a/docs/content/en/docs-dev/feature-status/_index.md +++ b/docs/content/en/docs-dev/feature-status/_index.md @@ -131,12 +131,12 @@ Please note that the phases (Incubating, Alpha, Beta, and Stable) are applied to | [Deployment Chain](../user-guide/managing-application/deployment-chain/) - Allow rolling out to multiple clusters gradually or promoting across environments | Alpha | | [Metrics](../user-guide/managing-controlplane/metrics/) - Dashboards for PipeCD and Piped metrics | Beta | -## pipectl +## [pipectl](../user-guide/command-line-tool/) -### init +### pipectl init | Feature | Phase | |-|-| -| Kubernetes - QuickSync | Alpha | +| Kubernetes - QuickSync | Incubating | | ECS - QuickSync | Alpha | -| ECS - Pipeline Sync | Alpha | +| ECS - Pipeline Sync | Incubating | From 103a91168260a8bcfbb62576817ec8e022629452 Mon Sep 17 00:00:00 2001 From: t-kikuc Date: Thu, 1 Feb 2024 09:46:20 +0900 Subject: [PATCH 5/7] add link to feature status Signed-off-by: t-kikuc --- docs/content/en/docs-dev/user-guide/command-line-tool.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/content/en/docs-dev/user-guide/command-line-tool.md b/docs/content/en/docs-dev/user-guide/command-line-tool.md index 66d790e750..0e36b20dcb 100644 --- a/docs/content/en/docs-dev/user-guide/command-line-tool.md +++ b/docs/content/en/docs-dev/user-guide/command-line-tool.md @@ -314,6 +314,7 @@ Note: The docs for pipectl available command is maybe outdated, we suggest users ### Generating an application config (app.pipecd.yaml) + Generate an app.pipecd.yaml interactively: ``` console @@ -341,6 +342,7 @@ spec: description: Generated by `pipectl init`. See https://pipecd.dev/docs/user-guide/configuration-reference/ for more. ``` +See [Feature Status](../feature-status/_index.md). ### You want more? From cd91d7fd71842b5baa7cc516e6fd26f817e1d663 Mon Sep 17 00:00:00 2001 From: t-kikuc Date: Thu, 1 Feb 2024 09:47:32 +0900 Subject: [PATCH 6/7] fix link to feature status Signed-off-by: t-kikuc --- docs/content/en/docs-dev/user-guide/command-line-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs-dev/user-guide/command-line-tool.md b/docs/content/en/docs-dev/user-guide/command-line-tool.md index 0e36b20dcb..432685deb9 100644 --- a/docs/content/en/docs-dev/user-guide/command-line-tool.md +++ b/docs/content/en/docs-dev/user-guide/command-line-tool.md @@ -342,7 +342,7 @@ spec: description: Generated by `pipectl init`. See https://pipecd.dev/docs/user-guide/configuration-reference/ for more. ``` -See [Feature Status](../feature-status/_index.md). +See [Feature Status](../feature-status/_index.md#pipectl-init). ### You want more? From 23be1e2b89fb04adfdfe777c1ea1c7d548574067 Mon Sep 17 00:00:00 2001 From: t-kikuc Date: Thu, 1 Feb 2024 09:48:55 +0900 Subject: [PATCH 7/7] Add link to command-line-tool Signed-off-by: t-kikuc --- docs/content/en/docs-dev/feature-status/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/docs-dev/feature-status/_index.md b/docs/content/en/docs-dev/feature-status/_index.md index d7f060a62b..133fdf640e 100644 --- a/docs/content/en/docs-dev/feature-status/_index.md +++ b/docs/content/en/docs-dev/feature-status/_index.md @@ -133,7 +133,7 @@ Please note that the phases (Incubating, Alpha, Beta, and Stable) are applied to ## [pipectl](../user-guide/command-line-tool/) -### pipectl init +### [pipectl init](../user-guide/command-line-tool.md#generating-an-application-config-apppipecdyaml) | Feature | Phase | |-|-|