After creating an environment for an application, you can update the environment.

You can update the environment configuration as follows:
  • When you run the apply command and the Wpfile file exists in the working directory, or when you run the apply your_Wpfile command, the system reads the configuration items of the Wpfile file and updates them to the online environment.
You can update the deployment package version in one of the following ways:
  • If the preceding Wpfile file contains the configuration item application.package: url, the system automatically updates the environment deployment package.
  • If the default application and default environment are specified in the working directory, you can specify the --package and --label flags when running the apply command, or directly use the --package-id flag to specify a deployment package version to update the environment deployment package. Currently, the package size cannot exceed 5 GB.
  • If the default application and default environment are specified in the working directory, you can run the wpctl env:deploy command to update the deployment package.

To know how to run the apply command, you can run the wpctl env:apply --help command. The command-line interface (CLI) will inform you of the information about the working directory and how to add flags and set parameters for the apply command. For example, if you have not run the wpctl init command to specify the default application and default environment in the working directory, you can run the apply --help command. The CLI will prompt you that you can run the apply command to create an application or environment. When creating an application or environment, you can set relevant attributes by using flags such as --category.

$ wpctl env:apply --help
...
`wpctl env:apply
  --app target_app (--create-on-absent to create when it doesn't exist)
  --env target_env (--create-on-absent to create when it doesn't exist)
  --package https://*** --label v1 (or just using existed package with --package-id)`
`wpctl env:apply --template template***
  --app app_template_belongs_to
  --env new_env_name --create-on-absent`

If the default application and default environment are specified in your working directory, you can run the apply --help command. The CLI will prompt you that the default application and default environment are loaded. In this case, you can use the --package flag to update the environment deployment package, or use the Wpfile file to update the environment configuration.

$ wpctl env:apply --help
...
`wpctl env:apply
  (application benchmark-consumer loaded)
  (environment consumer loaded)
  --package https://*** --label v1 (or just using existed package with --package-id)`
  (Wpfile in this directory will be read as settings)
`wpctl env:apply --template template***
  --env new_env_name --create-on-absent`