22. Release Commands

Skipper’s release commands include the following:

22.1 List

This command lists the latest deployed or failed release, as shown (with output) in the following example:

skipper:>release list
╔═══════════════╤═══════╤═════════════════════════╤════════╤═══════════╤══════════════╤════════════╤══════════════════════════════════════════════════════════════════════════════╗
║     Name      │Version│      Last updated       │ Status │  Package  │   Package    │  Platform  │                               Platform Status                                ║
║               │       │                         │        │   Name    │   Version    │    Name    │                                                                              ║
╠═══════════════╪═══════╪═════════════════════════╪════════╪═══════════╪══════════════╪════════════╪══════════════════════════════════════════════════════════════════════════════╣
║helloworldlocal│3      │Mon Oct 30 17:57:41 IST  │DEPLOYED│helloworld │1.0.0         │default     │[helloworldlocal.helloworld-v3], State =                                      ║
║               │       │2017                     │        │           │              │            │[helloworldlocal.helloworld-v3-0=deployed]                                    ║
╚═══════════════╧═══════╧═════════════════════════╧════════╧═══════════╧══════════════╧════════════╧══════════════════════════════════════════════════════════════════════════════╝

22.2 Status

This command shows the status of a specific release and version, as shown (with output) in the following example:

skipper:>release status --release-name helloworldlocal
╔═══════════════╤═══════════════════════════════════════════════════════════════════════════════════╗
║Last Deployed  │Mon Oct 30 17:53:50 IST 2017                                                       ║
║Status         │DEPLOYED                                                                           ║
║Platform Status│All applications have been successfully deployed.                                  ║
║               │[helloworldlocal.helloworld-v2], State = [helloworldlocal.helloworld-v2-0=deployed]║
╚═══════════════╧═══════════════════════════════════════════════════════════════════════════════════╝

If no --release-version specified, the latest release version is used. The following example shows the command with the --release-version option:

skipper:>release status --release-name helloworldlocal --release-version 1
╔═══════════════╤════════════════════════════════════════════════════════════════════════╗
║Last Deployed  │Mon Oct 30 17:52:57 IST 2017                                            ║
║Status         │DELETED                                                                 ║
║Platform Status│The applications are known to the system, but is not currently deployed.║
║               │[helloworldlocal.helloworld-v1], State = [unknown]                      ║
╚═══════════════╧════════════════════════════════════════════════════════════════════════╝

22.3 Upgrade

This command upgrades a package, as shown (with output) in the following example:

skipper:>release upgrade --release-name helloworldlocal --package-name helloworld --package-version 1.0.0 --properties spec.applicationProperties.server.port=9090
helloworldpcf has been upgraded.  Now at version v2.

If no package-version is specified, the latest package version by the given --package-name option is considered. The properties can either be provided through comma separated YAML string by using the --properties option or through a YAML file by using the --file option.

[Note]Note

An upgrade can be done by overriding the package version or by keeping the existing package version but overriding the properties. When overriding the package version, it needs to accompany with the corresponding properties as the existing properties are not carried over. In a future release, we plan to introduce a --reuse-properties command that will carry the current release properties over to the next release to be made.

When performing an update on a package that contains nested packages, use the name of the package as a prefix in the property string or as the first level in the YAML document. For example, the ticktock package that contains a time and a log application, a command to upgrade the log application would be as follows:

skipper:>release upgrade --release-name ticktockskipper --package-name ticktock --file /home/mpollack/log-level-change.yml

where log-level-change.yml contains the following:

log:
  version: 1.1.1.RELEASE
  spec:
    applicationProperties:
      server.port: 9999
      endpoints.sensitive: false
      log.level: ERROR

Since it is a common use-case to change only the version of the application, the packages can list the version as a top-level property in the values.yml file. For example, in the test package ticktock (located here), values.yml contains the following:

version: 1.1.0.RELEASE
spec:
  applicationProperties:
    log.level: DEBUG
  deploymentProperties:
    memory: 1024m

You can then use the --properties option in the upgrade command, as shown in the following example:

skipper:>release upgrade --release-name ticktockskipper --package-name ticktock --properties log.version=1.1.1.RELEASE

22.4 Rollback

This command rolls back the release to a specific version, as shown (with output) in the following example:

skipper:>release rollback --release-name helloworldlocal --release-version 1
helloworldlocal has been rolled back.  Now at version v3.

If no --release-version is specified, then the rollback version is the previous stable release (either in DELETED or DEPLOYED status).

22.5 History

This command shows the history of a specific release, as shown (with output) in the following example:

skipper:>release history --release-name helloworldlocal
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │Package Name│Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║3      │Mon Oct 30 17:57:41 IST 2017│DEPLOYED│helloworld  │1.0.0          │Upgrade complete║
║2      │Mon Oct 30 17:53:50 IST 2017│DELETED │helloworld  │1.0.0          │Delete complete ║
║1      │Mon Oct 30 17:52:57 IST 2017│DELETED │helloworld  │1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝

22.6 Delete

This command deletes a specific release’s latest deployed revision, undeploying the application or applications, as shown (with output) in the following example:

skipper:>release delete --release-name helloworldlocal
helloworldlocal has been deleted.