Skip to content

Commit

Permalink
[doc] Add pipectl init (#4763)
Browse files Browse the repository at this point in the history
* Add pipectl init status

Signed-off-by: t-kikuc <[email protected]>

* add init cmd to pipectl doc

Signed-off-by: t-kikuc <[email protected]>

* add pipectl init explanation

Signed-off-by: t-kikuc <[email protected]>

* fi pipectl init status

Signed-off-by: t-kikuc <[email protected]>

* add link to feature status

Signed-off-by: t-kikuc <[email protected]>

* fix link to feature status

Signed-off-by: t-kikuc <[email protected]>

* Add link to command-line-tool

Signed-off-by: t-kikuc <[email protected]>

---------

Signed-off-by: t-kikuc <[email protected]>
  • Loading branch information
t-kikuc authored Feb 1, 2024
1 parent 742932a commit c2bc69f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/content/en/docs-dev/feature-status/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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](../user-guide/command-line-tool/)

### [pipectl init](../user-guide/command-line-tool.md#generating-an-application-config-apppipecdyaml)

| Feature | Phase |
|-|-|
| Kubernetes - QuickSync | Incubating |
| ECS - QuickSync | Alpha |
| ECS - Pipeline Sync | Incubating |
33 changes: 33 additions & 0 deletions docs/content/en/docs-dev/user-guide/command-line-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -311,6 +312,38 @@ 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.
```
See [Feature Status](../feature-status/_index.md#pipectl-init).
### 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.
4 changes: 2 additions & 2 deletions pkg/app/pipectl/cmd/initialize/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand Down

0 comments on commit c2bc69f

Please sign in to comment.