Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 43 additions & 24 deletions docs/content/en/docs-dev/user-guide/command-line-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ Usage:

Available Commands:
application Manage application resources.
completion Generate the autocompletion script for the specified shell
Comment thread
vedantlavale marked this conversation as resolved.
deployment Manage deployment resources.
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.
migrate Do migration tasks.
piped Manage piped resources.
plan-preview Show plan preview against the specified commit.
plugin Do plugin tasks.
version Print the information of current binary.

Flags:
Expand Down Expand Up @@ -357,37 +359,54 @@ 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.
Comment thread
vedantlavale marked this conversation as resolved.

### Generating an application config (app.pipecd.yaml)
### Migrating application configs and database

Migrate v0 application configs and database records to be compatible with the plugin-based pipedv1.
Comment thread
vedantlavale marked this conversation as resolved.

Generate an app.pipecd.yaml interactively:
#### Migrating application config

Convert v0 application config files to the v1 format:

``` console
pipectl migrate application-config \
--config-files=path/to/app.pipecd.yaml
```

Or migrate all application config files in a directory:

``` console
$ pipectl init
Which platform? Enter the number [0]Kubernetes [1]ECS: 1
Name of the application: myApp
...
pipectl migrate application-config \
--dirs=path/to/app/directory
```

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.
The `--config-files` and `--dirs` flags are mutually exclusive; one of them is required. The original file is backed up with a `.old` extension.

#### Migrating database

Migrate database records to be compatible with plugin-architectured piped:
Comment thread
vedantlavale marked this conversation as resolved.

``` console
pipectl migrate database \
--address={CONTROL_PLANE_API_ADDRESS} \
--api-key={API_KEY} \
--applications={APPLICATION_ID}
```

The `--applications` flag accepts a list of application IDs and is required.

### Pushing a plugin

Push a plugin binary to an OCI registry:

``` console
pipectl plugin push \
--files=linux/amd64=./plugin-linux-amd64,linux/arm64=./plugin-linux-arm64 \
--tag=v0.1.0 \
--registry=ghcr.io/pipe-cd \
--repository=my-plugin
```

See [Feature Status](../feature-status/_index.md#pipectl-init).
The `--files` flag maps platforms to binary files in `os/arch=filepath` format. All of `--files`, `--tag`, `--registry`, and `--repository` are required. Add `--insecure` to skip TLS verification when using an HTTP-only registry.

### You want more?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ Usage:

Available Commands:
application Manage application resources.
completion Generate the autocompletion script for the specified shell
Comment thread
vedantlavale marked this conversation as resolved.
deployment Manage deployment resources.
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.
migrate Do migration tasks.
piped Manage piped resources.
plan-preview Show plan preview against the specified commit.
plugin Do plugin tasks.
version Print the information of current binary.

Flags:
Expand Down
Loading