Version 1.0.0.RC1

© 2012-2017 Pivotal Software, Inc.

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

Preface

1. About the documentation

The documentation for this release is available in HTML.

The latest copy of the Spring Cloud Skipper reference guide can be found here.

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

2. Getting help

If you are having trouble with Spring Cloud Skipper, we would like to help!

All of Spring Cloud Skipper is open source, including the documentation! If you find problems with the docs; or if you just want to improve them, please get involved.

Spring Cloud Skipper Overview

Skipper is a lightweight tool that allows you to discover Spring Boot applications and manage their lifecycle on multiple Cloud Platforms. You can use Skipper standalone or integrate it with Continuous Integration pipelines to help implement the practice of Continuous Deployment.

Skipper consists of a server application that exposes a HTTP API. A shell application provides easy to use commands to interact with the server. The server uses a relational database to store state. Documentation to call the HTTP API is available in the REST API Guide.

Applications in Skipper are bundled as packages which contain a templated configuration file and a default set of values that are used to fill in the template. You can override these defaults when installing or upgrading a package. Skipper provides a means to orchestrate the upgrade/rollback procedure of applications between different versions, taking the minimal set of actions to bring the system to the desired state.

Skipper’s design is influenced by a large number of projects in the Kubernetes ecosystem that perform resource templating and/or orchestration, hence the nautically inspired project name Skipper. In particular, Helm's approach to present the user with familiar apt-get or brew like installation experience was a big influence.

3. Features

The main features are:

  • Define multiple platform accounts where Spring Boot applications can be deployed. Supported platforms are Local, Cloud Foundry, and Kubernetes.

  • Substitute variables in Mustache templated files that describe how to deploy applications to a platform.

  • Search Package Repositories for existing applications.

  • Upgrade/Rollback a package based on a simple workflow.

  • Store the history of resolved template files (aka 'application manifests') which represent the final description of what has been deployed to a platform for a specific release.

  • Use via a standalone interactive shell or HTTP API.

4. Concepts

The main concepts are Platforms, Packages, Repositories, Releases and Release Workflows.

Platforms are where your apps run. Skipper 1.0 supports deploying applications to platforms by using the Spring Cloud Deployer family of libraries. This allows Skipper to deploy Spring Boot applications to Cloud Foundry, Kubernetes and your local machine. You can configure a single Skipper server to deploy to multiple platforms, with each platform identified by a unique name.

The Spring Cloud Deployer libraries for Apache YARN, Apache Mesos, Redhat Openshift and Hashicorp Nomad were not bundled with Skipper in 1.0. Donovan Muller has provided support for Redhat Openshift.

Packages define the basic recipe for describing what to install on a platform. A package can define a single application or it can define a group of applications. It contains descriptive metadata, the location of the Spring Boot uberjar and default application or deployment properties. The location of the uberjar can be a Maven repository, docker registry, file location, or http location. A package is a collection of Yaml files that are zipped up into a file with a naming convention such as name-version.zip, e.g. myapp-1.0.3.zip.

Repositories are where package metadata and zip files are hosted. Repositories can either be 'local' or 'remote'. A remote repository is the one that is only accessible via http. Any arbitrary web app that serves up files off a file system can be used to host a remote repository as long as certain directory and file naming conventions are followed. A local repository is managed by the Skipper server and backed by a relational database. Skipper lets you search for packages that are hosted in repositories.

Releases are created in Skipper after you install, upgrade or rollback a package. A release has a unique name that you provide to perform release operations such as upgrading, rolling back and deleting. The release contains the fully resolved template files, also known as application manifests, that represent the final description of what has been deployed to the platform. You can also get the status and application manifest for a specific release.

Release Workflows are the steps taken to upgrade or rollback an application from one version to another. In Skipper terms, it is how we go from one Release to another on a Platform. Note, an upgrade may keep the same version, but instead update applications properties.

Getting started

This section describes the minimal steps to install Skipper on your local machine in addition to using Skipper to installing a sample application. It is the "three second tour". After completing this section, you can move on to the Three minute Tour. When you are ready to dive deeper, head on over to the "three hour tour" section, Using Skipper. Well, it isn’t really three hours…​

5. System Requirements

The Skipper server is a Spring Boot application. Both the Server and Shell are based on Java 8. The server uses a RDBMS to store state. An embedded H2 database is used if you do not provide a Data Source configuration via Spring Boot configuration properties. Supported databases are H2, HSQLDB, MySQL, Oracle, Postgresql, DB2 and SqlServer. Schemas are created on server startup

6. Installing Skipper

This section will cover installing Skipper on your local machine as it is the easiest way to get started. The section Installation discusses installing on Cloud Foundry and Kubernetes. It also shows additional options for installing on your local machine.

  • Download the Skipper Server and Shell apps:

wget http://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-skipper-server/1.0.0.RC1/spring-cloud-skipper-server-1.0.0.RC1.jar

wget http://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-skipper-shell/1.0.0.RC1/spring-cloud-skipper-shell-1.0.0.RC1.jar
  • Launch the Server and Shell apps:

java -jar spring-cloud-skipper-server-1.0.0.RC1.jar


java -jar spring-cloud-skipper-shell-1.0.0.RC1.jar

The default port that the server listens on is 7577. That is SKPR on a telephone keypad. :)

There is also a docker image hosted on dockerhub

Now let’s install some apps!

7. A three second tour

The default configuration of Skipper will deploy apps to the local machine. The default configuration also has one local repository named local where you can upload packages, and one remote repository named experimental where some sample test packages are located. You can get a list of the package repositories by using the command repo list.

skipper:>repo list
╔════════════╤═══════════════════════════════════════════════════════════╤═════╤═════╗
║    Name    │                            URL                            │Local│Order║
╠════════════╪═══════════════════════════════════════════════════════════╪═════╪═════╣
║experimental│http://skipper-repository.cfapps.io/repository/experimental│false│0    ║
║local       │http://10.55.13.45:7577                                    │true │1    ║
╚════════════╧═══════════════════════════════════════════════════════════╧═════╧═════╝

Search for the available packages using the package search command.

skipper:>package search
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║      Name       │Version│                                  Description                                   ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld       │1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Maven resource. ║
║helloworld       │1.0.0  │The app has two endpoints, /about and /greeting in English.  Maven resource.    ║
║helloworld-docker│1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Docker resource.║
║helloworld-docker│1.0.0  │The app has two endpoints, /about and /greeting in English.  Docker resource.   ║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝

Install the Maven based Hello World application using the package install command. Since this application picks a random port for the http server by default, we specify the Spring Boot property server.port, prefixed with spec.applicationProperties. The prefix is due to the internal format of the template file.

skipper:>package install --release-name helloworld-local --package-name helloworld --package-version 1.0.0 --properties spec.applicationProperties.server.port=8099
Released helloworld-local. Now at version v1.

You can now curl the greeting endpoint.

$ curl http://localhost:8099/greeting
Hello World!

The release name helloworld-local is used for subsequent commands such as release status, release upgrade or release delete.

To see the status of the release, use the release status command

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

Let’s upgrade the release. The 1.0.1 package refers to a newly released application that changed the default value of the greeting to be in Portuguese.

skipper:>release upgrade --release-name helloworld-local --package-name helloworld --package-version 1.0.1  --properties spec.applicationProperties.server.port=8100
helloworld-local has been upgraded.  Now at version v2.

This will deploy the new version of the application, wait until it is healthy, and then destroy the old version of the application.

skipper:>release status --release-name helloworld-local
╔═══════════════╤═════════════════════════════════════════════════════════════════════════════════════╗
║Last Deployed  │Fri Oct 27 16:20:07 IST 2017                                                         ║
║Status         │DEPLOYED                                                                             ║
║Platform Status│All applications have been successfully deployed.                                    ║
║               │[helloworld-local.helloworld-v2], State = [helloworld-local.helloworld-v2-0=deployed]║
╚═══════════════╧═════════════════════════════════════════════════════════════════════════════════════╝

You can now curl the greeting endpoint at the new port and see that the application has been updated.

$ curl http://localhost:8100/greeting
Olá Mundo!

To delete the release, use the delete command.

skipper:>release delete --release-name helloworld-local
helloworld-local has been deleted.
This example where the upgrade changed only a property of the application is not realistic. A more realistic example is the case where code has changed in the updated application so that it behaves differently.

You can also deploy the other packages named helloworld-docker to the local machine.

This example shows the most basic operations, other interesting commands such as manifest get, release rollback, release list and release history are covered in the Three minute Tour.

Three minute Tour

Picking up from where the A three second tour left off, this section walks through the additional commands and other features of Skipper. Each section walks through the same set of operations, but for a different platform.

8. Local machine

Start up the server and shell as in the three second tour.

Let’s install and then update the hello world application.

skipper:>package install --release-name helloworldlocal --package-name helloworld --package-version 1.0.0 --properties spec.applicationProperties.server.port=8099
Released helloworldlocal. Now at version v1.

You can now curl the greeting endpoint.

$ curl http://localhost:8099/greeting
Hello World!
$ curl http://localhost:8099/about
Hello World v1.0.0.RELEASE

We will use a YAML file to update the release. This application contains a Spring Boot @ConfigurationProperty named helloworld.greeting, so we will set that along with a standard Spring Boot property endpoints.sensitive=false. We will also bump the memory up to 2G, make the Boot actuator endpoint not sensitive and set the port to 8100.

The helloworld-upgrade-local.yml file contains

spec:
  applicationProperties:
    server.port: 8100
    endpoints.sensitive: false
    helloworld.greeting: yo
  deploymentProperties:
    spring.cloud.deployer.memory: 2048m

The upgrade command

skipper:>release upgrade --release-name helloworldlocal --package-name helloworld --package-version 1.0.1 --file /home/mpollack/helloworld-upgrade-local.yml
helloworldlocal has been upgraded.  Now at version v2.

The command line option --package-version 1.0.1 is used to also upgrade to a newer version of the package.

The current upgrade strategy is very simple, if the new app is healthy, the old app is removed. There is not a rolling upgrade option, all new apps are deployed, checked for health, and then previous versions removed. More flexible upgrade strategies are planned in a future release of Skipper.

You can now curl the greeting endpoint and the about endpoint or view them in your browser.

$ curl http://localhost:8100/greeting
yo
$ curl http://localhost:8100/about
Hello World v1.0.1.RELEASE

The list command shows you the current DEPLOYED and DELETED releases for every release name. In this case there is just one entry

skipper:>release list
╔═══════════════╤═══════╤═════════════╤════════╤══════════╤═════════╤═════════╤════════════════════════════════════════════════════╗
║     Name      │Version│Last updated │ Status │ Package  │ Package │Platform │                  Platform Status                   ║
║               │       │             │        │   Name   │ Version │  Name   │                                                    ║
╠═══════════════╪═══════╪═════════════╪════════╪══════════╪═════════╪═════════╪════════════════════════════════════════════════════╣
║helloworldlocal│2      │Fri Oct 27   │DEPLOYED│helloworld│1.0.1    │default  │[helloworldlocal.helloworld-v2], State =            ║
║               │       │16:39:03 IST │        │          │         │         │[helloworldlocal.helloworld-v2-0=deployed]          ║
║               │       │2017         │        │          │         │         │                                                    ║
╚═══════════════╧═══════╧═════════════╧════════╧══════════╧═════════╧═════════╧════════════════════════════════════════════════════╝

You can get the full history of the release using the history command.

skipper:>release history --release-name helloworldlocal
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │Package Name│Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║2      │Fri Oct 27 16:39:03 IST 2017│DEPLOYED│helloworld  │1.0.1          │Upgrade complete║
║1      │Fri Oct 27 16:37:59 IST 2017│DELETED │helloworld  │1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝

To see what changed, you can look at the Skipper manifest for each release using the manifest get command. A manifest diff command is coming in a future release.

skipper:>manifest get --release-name helloworldlocal --release-version 2

---
# Source: helloworld.yml
apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: helloworld
  type: demo
spec:
  resource: maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld:1.0.1.RELEASE
  applicationProperties:
    server.port: 8100
    endpoints.sensitive: false
    helloworld.greeting: yo
  deploymentProperties:
    spring.cloud.deployer.memory: 2048m
    spring.cloud.deployer.count: 1

and

skipper:>manifest get --release-name helloworldlocal --release-version 1

---
# Source: helloworld.yml
apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: helloworld
  type: demo
spec:
  resource: maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld:1.0.0.RELEASE
  applicationProperties:
    server.port: 8099
  deploymentProperties:

Next we will use the rollback command to deploy an older version of the application. Since we have the manifest for that version, we have all we need to redeploy an earlier release.

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

The history now shows a new v3 version, even though it is identical in terms of app behavior to the v1 version.

skipper:>release history --release-name helloworldlocal
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │Package Name│Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║3      │Fri Oct 27 16:42:47 IST 2017│DEPLOYED│helloworld  │1.0.0          │Upgrade complete║
║2      │Fri Oct 27 16:39:03 IST 2017│DELETED │helloworld  │1.0.1          │Delete complete ║
║1      │Fri Oct 27 16:37:59 IST 2017│DELETED │helloworld  │1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝

You can now curl the greeting endpoint.

$ curl http://localhost:8099/greeting
Hello World!
$ curl http://localhost:8099/about
Hello World v1.0.0.RELEASE

9. Cloud Foundry

First, follow the instructions in the section Installing on Cloud Foundry to deploy the Skipper Server to Cloud Foundry.

When you start the Skipper shell, by default it tries to look for the Skipper server on the same (local) machine. To specify the Skipper server that is running on Cloud Foundry, provide the serverUrl when launching the shell or use the config command after the shell has started.

java -jar spring-cloud-skipper-shell-1.0.0.RC1.jar --spring.cloud.skipper.client.serverUri=https://mlp-skipper.cfapps.io/api

or

skipper:>skipper config --uri https://mlp-skipper.cfapps.io/api
Successfully targeted https://mlp-skipper.cfapps.io/api

The repo list command shows the experimental and local repositories, since they are configured by default. The local repository is where you can upload new packages. The experimental repository has a few "hello world" applications to help get you started.

skipper:>repo list
╔════════════╤═══════════════════════════════════════════════════════════╤═════╤═════╗
║    Name    │                            URL                            │Local│Order║
╠════════════╪═══════════════════════════════════════════════════════════╪═════╪═════╣
║experimental│http://skipper-repository.cfapps.io/repository/experimental│false│0    ║
║local       │http://d4d6d1b6-c7e5-4226-69ec-01d4:7577                   │true │1    ║
╚════════════╧═══════════════════════════════════════════════════════════╧═════╧═════╝

and the package search command shows

skipper:>package search
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║      Name       │Version│                                  Description                                   ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld       │1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Maven resource. ║
║helloworld       │1.0.0  │The app has two endpoints, /about and /greeting in English.  Maven resource.    ║
║helloworld-docker│1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Docker resource.║
║helloworld-docker│1.0.0  │The app has two endpoints, /about and /greeting in English.  Docker resource.   ║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝

The command platform list shows which platforms the server has been configured with, in this case just one Cloud Foundry platform. Disabling the local platform during the installation process via property enableLocalPlatform = false is why the default local platform does not appear.

╔════╤════════════╤═════════════════════════════════════════════════════════════════════════╗
║Name│    Type    │                               Description                               ║
╠════╪════════════╪═════════════════════════════════════════════════════════════════════════╣
║pws │cloudfoundry│org = [scdf-ci], space = [space-mark], url = [https://api.run.pivotal.io]║
╚════╧════════════╧═════════════════════════════════════════════════════════════════════════╝

Let’s install the Hello World app, specifically, the maven based artifact.

skipper:>package install --release-name helloworldpcf --package-name helloworld --package-version 1.0.0 --platform-name pws --properties spec.deploymentProperties.spring.cloud.deployer.cloudfoundry.route=helloworldpcf.cfapps.io
Released helloworldpcf. Now at version v1.

The deployment property spring.cloud.deployer.cloudfoundry.route=helloworldpcf.cfapps.io is set so that when different versions of this application are deployed, they have the same http route.

The command option --platform-name pws was specified since the default value of that shell option is default. You can register a platform under the name default when installing Skipper, but it is a best practice to specify the target platform name.

Monitor the progress of the deployment using the release status command.

skipper:>release status --release-name helloworldpcf
╔═══════════════╤════════════════════════════════════════════════╗
║Last Deployed  │Thu Jan 18 13:18:44 EST 2018                    ║
║Status         │DEPLOYED                                        ║
║Platform Status│The applications are being deployed.            ║
║               │[helloworldpcf-helloworld-v1], State = [partial]║
╚═══════════════╧════════════════════════════════════════════════╝

Eventually the Platform Status will say All applications have been successfully deployed.

The status DEPLOYED above indicates that Skipper has told the platform to deploy. Skipper does not keep track of the intermediate states 'deploying' or 'deleting'. The platform status provides finer grained status information.

A cf apps command will now have a new listing for this deployed application.

$ cf apps
Getting apps in org scdf-ci / space space-mark as [email protected]...
OK

name                          requested state   instances   memory   disk   urls
helloworldpcf-helloworld-v1   started           1/1         1G       1G     helloworldpcf.cfapps.io

You can now curl the greeting endpoint and the about endpoint.

$ curl http://helloworldpcf.cfapps.io/greeting
Hello World!
$ curl http://helloworldpcf.cfapps.io/about
Hello World v1.0.0.RELEASE

The name of the application is based on the convention <release-name>-<package-name>-v<incrementing-counter>.

Also note that we specified a route for this application that is different than the application’s name. The deployment property spring.cloud.deployer.cloudfoundry.route is set to something that will not change across the deployment of different versions of this application, in this case helloworldpcf.cfapps.io.

The package provides a means to template the application version, application properties and deployment properties that are used to deploy the application to Cloud Foundry. The manifest get command shows the final YAML file which is passed off to the Spring Cloud Deployer Library.

skipper:>manifest get --release-name helloworldpcf

---
# Source: helloworld.yml
apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: helloworld
  type: demo
spec:
  resource: maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld:1.0.0.RELEASE
  applicationProperties:
  deploymentProperties:
    spring.cloud.deployer.cloudfoundry.route: helloworldpcf.cfapps.io

The manifest is in a Kubernetes Resource file inspired format. By looking at the manifest you can see which maven artifact was used and which properties were set before the final push to Cloud Foundry. The metadata values that are present will be used in a future release to support searching for releases based on those values.

Since it is somewhat awkward to specify multiple flattened out YAML values for the --properties argument in the shell, you can also specify the location of a YAML file when installing or upgrading. We will use a YAML file, named helloworld-upgrade.yml to update the release. This application contains a Spring Boot @ConfigurationProperty named helloworld.greeting, so we will set that along with a standard Spring Boot property endpoints.sensitive=false. We will also bump the memory up to 2G from the default 1G. The contents of the helloworld-upgrade.yml file is shown below.

spec:
  applicationProperties:
    endpoints.sensitive: false
    helloworld.greeting: yo
  deploymentProperties:
    spring.cloud.deployer.cloudfoundry.route: helloworldpcf.cfapps.io
    spring.cloud.deployer.memory: 2048m

Run the release upgrade command

skipper:>release upgrade --release-name helloworldpcf --package-name helloworld --package-version 1.0.0 --file /home/mpollack/helloworld-upgrade.yml
helloworldpcf has been upgraded.  Now at version v2.

This will start another instance of the hello world application and Skipper will determine when it can stop the instance of the previous instance. If you do not specify --package-version it will pick the latest version of the helloworld package. You do not need to specify the --platform-name as it will always be where the current application was deployed.

The cf apps and cf routes command shows

$ cf apps
Getting apps in org scdf-ci / space space-mark as [email protected]...
OK

name                          requested state   instances   memory   disk   urls
helloworldpcf-helloworld-v1   started           1/1         1G       1G     helloworldpcf.cfapps.io
helloworldpcf-helloworld-v2   stopped           0/1         2G       1G     helloworldpcf.cfapps.io

and

$ cf routes
Getting routes for org scdf-ci / space space-mark as [email protected] ...

space        host                          domain      port   path   type   apps                                                      service
space-mark   helloworldpcf                 cfapps.io                        helloworldpcf-helloworld-v1,helloworldpcf-helloworld-v2

At this point Skipper is checking the health of the new application. The default health check is to test that the HTTP port of the application is open. There is a simple customization in Skipper to influences the way the health check is performed. The property spring.cloud.skipper.server.strategies.healthcheck.timeoutInMillis is the maximum time the upgrade process will wait for a healthy app. The default value is 5 minutes. Skipper will fail the deployment if it is not healthy within that time. The property spring.cloud.skipper.server.strategies.healthcheck.sleepInMillis is how long to sleep between health checks.

The current upgrade strategy is very simple, if the new app is healthy, the old app is removed. There is not a rolling upgrade option, all new apps are deployed, checked for health, and then previous versions removed. More flexible upgrade strategies are planned in a future release.

You can now curl the greeting endpoint and the about endpoint.

$ curl http://helloworldpcf.cfapps.io/greeting
yo
$ curl http://helloworldpcf.cfapps.io/about
Hello World v1.0.0.RELEASE

The release list command shows you the current DEPLOYED and DELETED releases for every release name. In this case there is just one entry

╔═════════════╤═══════╤══════════════════╤════════╤═══════════╤═══════════╤══════════╤════════════════════════════════════════╗
║    Name     │Version│   Last updated   │ Status │  Package  │  Package  │ Platform │         Platform Status                ║
║             │       │                  │        │   Name    │  Version  │   Name   │                                        ║
╠═════════════╪═══════╪══════════════════╪════════╪═══════════╪═══════════╪══════════╪════════════════════════════════════════╣
║helloworldpcf│2      │Thu Jan 18        │DEPLOYED│helloworld │1.0.0      │pws       │[helloworldpcf-helloworld-v2], State =  ║
║             │       │13:26:50 EST 2018 │        │           │           │          │[helloworldpcf-helloworld-v2-0=deployed]║
╚═════════════╧═══════╧══════════════════╧════════╧═══════════╧═══════════╧══════════╧════════════════════════════════════════╝

You can get the full history of the release using the release history command

skipper:>release history --release-name helloworldpcf
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │Package Name│Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║2      │Thu Jan 18 13:26:50 EST 2018│DEPLOYED│helloworld  │1.0.0          │Upgrade complete║
║1      │Thu Jan 18 13:18:44 EST 2018│DELETED │helloworld  │1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝

A more typical upgrade process is not to change application properties, but to change the version of the application because the code has changed. We will now upgrade the release to use a new maven artifact, version 1.0.1, which also corresponds to version 1.0.1 of the helloworld skipper package. In this case, we will not add any additional properties other than the route.

skipper:>release upgrade --release-name helloworldpcf --package-name helloworld --package-version 1.0.1 --properties spec.deploymentProperties.spring.cloud.deployer.cloudfoundry.route=helloworldpcf.cfapps.io
helloworldpcf has been upgraded.  Now at version v3.

Note that the current release’s property values such as using 2G, or the greeting being yo are not carried over. In a future release we will introduce a --reuse-properties command that will carry the current release properties over to the next release to be made. You can monitor the status of the upgrade using the status command

skipper:>release status --release-name helloworldpcf
╔═══════════════╤════════════════════════════════════════════════╗
║Last Deployed  │Thu Jan 18 13:49:42 EST 2018                    ║
║Status         │UNKNOWN                                         ║
║Platform Status│The applications are being deployed.            ║
║               │[helloworldpcf-helloworld-v3], State = [partial]║
╚═══════════════╧════════════════════════════════════════════════╝

And a curl command shows

curl http://helloworldpcf.cfapps.io/greeting
Olá Mundo!
$ curl http://helloworldpcf.cfapps.io/about
Hello World v1.0.1.RELEASE

Our release history now looks like

skipper:>release history --release-name helloworldpcf
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │Package Name│Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║3      │Thu Jan 18 13:49:42 EST 2018│DEPLOYED│helloworld  │1.0.1          │Upgrade complete║
║2      │Thu Jan 18 13:26:50 EST 2018│DELETED │helloworld  │1.0.0          │Delete complete ║
║1      │Thu Jan 18 13:18:44 EST 2018│DELETED │helloworld  │1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝

Next we will use the rollback command to deploy an older version of the application. Since we have the manifest for that version, we have all we need to redeploy an earlier release.

skipper:>release rollback --release-name helloworldpcf --release-version 2
helloworldpcf has been rolled back.  Now at version v4.

The history now shows a new v4 version, even though it is identical in terms of app behavior to the v2 version.

skipper:>release history --release-name helloworldpcf
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │Package Name│Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║4      │Thu Jan 18 13:51:43 EST 2018│DEPLOYED│helloworld  │1.0.0          │Upgrade complete║
║3      │Thu Jan 18 13:49:42 EST 2018│DELETED │helloworld  │1.0.1          │Delete complete ║
║2      │Thu Jan 18 13:26:50 EST 2018│DELETED │helloworld  │1.0.0          │Delete complete ║
║1      │Thu Jan 18 13:18:44 EST 2018│DELETED │helloworld  │1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝

The curl commands show

$ curl http://helloworldpcf.cfapps.io/greeting
yo
$ curl http://helloworldpcf.cfapps.io/about
Hello World v1.0.0.RELEASE

10. Kuberenetes

In this example we will be running the Skipper server on the local machine and deploying to minikube also running on the local machine.

The upgrade approach in 1.02 does not handle correctly the routing of http traffic between versions, so take what is below with a grain of salt. The Spring Cloud Deployer for Kubernetes creates a service, replication controller, and pod for the app (or optionally a Deployment). This is not an issue for apps that communicate via Messaging middleware and will be addressed in a future release.

Start the Skipper server with the option --spring.config.location=skipper.yml where the YAML is shown below.

spring:
  cloud:
    skipper:
      server:
        enableLocalPlatform: false
        platform:
          kubernetes:
            accounts:
              minikube:
                namespace: default

The repo list command shows the experimental and local repositories, since they are configured by default.

skipper:>repo list
╔════════════╤═══════════════════════════════════════════════════════════╤═════╤═════╗
║    Name    │                            URL                            │Local│Order║
╠════════════╪═══════════════════════════════════════════════════════════╪═════╪═════╣
║experimental│http://skipper-repository.cfapps.io/repository/experimental│false│0    ║
║local       │http://d4d6d1b6-c7e5-4226-69ec-01d4:7577                   │true │1    ║
╚════════════╧═══════════════════════════════════════════════════════════╧═════╧═════╝

and the package search command shows

skipper:>package search
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║      Name       │Version│                                  Description                                   ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld       │1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Maven resource. ║
║helloworld       │1.0.0  │The app has two endpoints, /about and /greeting in English.  Maven resource.    ║
║helloworld-docker│1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Docker resource.║
║helloworld-docker│1.0.0  │The app has two endpoints, /about and /greeting in English.  Docker resource.   ║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝

The command platform list shows which platforms the server has been configured with, in this case just one Kubernetes namespace. Disabling the local platform with the property enableLocalPlatform = false is why the default local platform does not appear.

skipper:>platform list
╔════════╤══════════╤══════════════════════════════════════════════════════════════════════════════════════╗
║  Name  │   Type   │                                     Description                                      ║
╠════════╪══════════╪══════════════════════════════════════════════════════════════════════════════════════╣
║minikube│kubernetes│master url = [https://192.168.99.100:8443/], namespace = [default], api version = [v1]║
╚════════╧══════════╧══════════════════════════════════════════════════════════════════════════════════════╝

Let’s install the Hello World app, specifically, the Docker based artifact.

skipper:>package install --release-name helloworldk8s --package-name helloworld-docker --package-version 1.0.0 --platform-name minikube --properties spec.deploymentProperties.spring.cloud.deployer.kubernetes.createNodePort=32123
Released helloworldk8s. Now at version v1.

The command option --platform-name minikube was specified since the default value of that shell option is default. You can register a platform under the name default when installing Skipper, but it is a best practice to specify the target platform name.

You can monitor the process using the release status command.

skipper:>release status --release-name helloworldk8s
╔═══════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════╗
║Last Deployed  │Wed Oct 25 17:34:24 EDT 2017                                                                      ║
║Status         │DEPLOYED                                                                                          ║
║Platform Status│The applications are being deployed.                                                              ║
║               │[helloworldk8s-helloworld-docker-v1], State = [helloworldk8s-helloworld-docker-v1-cch68=deploying]║
╚═══════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════╝

Eventually the Platform Status will say All applications have been successfully deployed.

Note that the status DEPLOYED above indicates that Skipper has told the platform to deploy. Skipper does not keep track of the intermediate states 'deploying' or 'deleting'.

A kubectl pods command will now have a new listing for this deployed application

$ kubectl get pods
NAME                                       READY     STATUS    RESTARTS   AGE
helloworldk8s-helloworld-docker-v1-g8j39   0/1       Running   0          37s

$ kubectl get service
NAME                                 CLUSTER-IP   EXTERNAL-IP   PORT(S)          AGE
helloworldk8s-helloworld-docker-v1   10.0.0.202   <nodes>       8080:32123/TCP   41s
kubernetes                           10.0.0.1     <none>        443/TCP          57m

To get the URL of this app on minikube

$ minikube service --url helloworldk8s-helloworld-docker-v1
http://192.168.99.100:32123

You can now curl the greeting endpoint and the about endpoint.

$ curl http://192.168.99.100:32123/greeting
Hello World!
$ curl http://192.168.99.100:32123/about
Hello World v1.0.0.RELEASE

The name of the application is based on the convention <release-name>-<package-name>-v<incrementing-counter>. This will need to change in future releases in order to handle routing correctly.

The package provides a means to template the application version, application properties and deployment properties that are used to deploy the application to Kubernetes. The manifest get command shows the final YAML file which is passed off to the Spring Cloud Deployer Library.

skipper:>manifest get --release-name helloworldk8s

---
# Source: template.yml
apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: helloworld-docker
spec:
  resource: docker:springcloud/spring-cloud-skipper-samples-helloworld:1.0.0.RELEASE
  applicationProperties:
  deploymentProperties:
    spring.cloud.deployer.kubernetes.createNodePort: 32123

The manifest is in a Kubernetes Resource file inspired format. By looking at the manifest you can see which Docker images was used and which properties were set before the final push to Kubernetes. The metadata values that are present will be used in an upcoming release of Skipper to support searching for releases based on those values.

Since it is somewhat awkward to specify multiple flattened out YAML values for the --properties argument in the shell, you can also specify the location of a YAML file when installing or upgrading. We will use a YAML file when we will update the release. This application contains a Spring Boot @ConfigurationProperty named helloworld.greeting, so we will set that along with a standard Spring Boot property endpoints.sensitive=false. We will also bump the memory down to 768m from the default 1G.

spec:
  applicationProperties:
    endpoints.sensitive: false
    helloworld.greeting: yo
  deploymentProperties:
    spring.cloud.deployer.kubernetes.createNodePort: 32124
    spring.cloud.deployer.memory: 768m

The release upgrade command

skipper:>release upgrade --release-name helloworldk8s --package-name helloworld-docker --package-version 1.0.0 --file /home/mpollack/helloworld-upgrade-k8s.yml
helloworldk8s has been upgraded.  Now at version v2.

This will start another instance of the hello world application. If you do not specify --package-version it will pick the latest version of the helloworld-docker package. You do not need to specify the --platform-name as it will always be where the current application was deployed.

the kubectl get all command shows

$ kubectl get all
NAME                                          READY     STATUS    RESTARTS   AGE
po/helloworldk8s-helloworld-docker-v1-g8j39   1/1       Running   0          2m
po/helloworldk8s-helloworld-docker-v2-jz85l   0/1       Running   0          50s

NAME                                    DESIRED   CURRENT   READY     AGE
rc/helloworldk8s-helloworld-docker-v1   1         1         1         2m
rc/helloworldk8s-helloworld-docker-v2   1         1         0         50s

NAME                                     CLUSTER-IP   EXTERNAL-IP   PORT(S)          AGE
svc/helloworldk8s-helloworld-docker-v1   10.0.0.202   <nodes>       8080:32123/TCP   2m
svc/helloworldk8s-helloworld-docker-v2   10.0.0.154   <nodes>       8080:32124/TCP   51s
svc/kubernetes                           10.0.0.1     <none>        443/TCP          59m

At this point Skipper is looking to see if the health endpoint of the Boot application is ok. The property spring.cloud.skipper.server.strategies.healthcheck.timeoutInMillis is the maximum time the upgrade process will wait for a healthy app. The default value is 5 minutes. Skipper will fail the deployment if it is not healthy within that time. The property spring.cloud.skipper.server.strategies.healthcheck.sleepInMillis is how long to sleep between health checks.

The current upgrade strategy is very simple, if the new app is healthy, the old app is removed. There is not a rolling upgrade option, all new apps are deployed, checked for health, and then previous versions removed. More flexible upgrade strategies are planned along with the introduction of the Spring Cloud State Machine project to orchestrate the update process.

You can now curl the greeting endpoint and the about endpoint.

$ curl http://192.168.99.100:32124/greeting
yo
$ curl http://192.168.99.100:32124/about
Hello World v1.0.0.RELEASE

The release list command shows you the current DEPLOYED and DELETED release for every release name. In this case there is just one entry

skipper:>release list
╔═════════════╤═══════╤════════════════════════════╤════════╤═════════════════╤═══════════════╤═════════════╤═══════════════╗
║    Name     │Version│        Last updated        │ Status │  Package Name   │Package Version│Platform Name│Platform Status║
╠═════════════╪═══════╪════════════════════════════╪════════╪═════════════════╪═══════════════╪═════════════╪═══════════════╣
║helloworldk8s│2      │Wed Oct 25 17:36:16 EDT 2017│DEPLOYED│helloworld-docker│1.0.0          │minikube     │               ║
╚═════════════╧═══════╧════════════════════════════╧════════╧═════════════════╧═══════════════╧═════════════╧═══════════════╝

You can get the full history of the release using the history command.

skipper:>release history --release-name helloworldk8s
╔═══════╤════════════════════════════╤════════╤═════════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │  Package Name   │Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪═════════════════╪═══════════════╪════════════════╣
║2      │Wed Oct 25 17:36:16 EDT 2017│DEPLOYED│helloworld-docker│1.0.0          │Upgrade complete║
║1      │Wed Oct 25 17:34:24 EDT 2017│DELETED │helloworld-docker│1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧═════════════════╧═══════════════╧════════════════╝

A more typical upgrade process is not to change application properties, but to change the version of the application because the code has change. We will now upgrade the release to use a new Docker artifact, version 1.0.1, which also corresponds to version 1.0.1 of the helloworld Skipper package. In this case we will not add any additional properties other than the NodePort.

skipper:>release upgrade --release-name helloworldk8s --package-name helloworld-docker --package-version 1.0.1 --properties spec.deploymentProperties.spring.cloud.deployer.kubernetes.createNodePort=32125
Released helloworldk8s. Now at version v3.

Note that the the current release’s property values such as using 2G, or the greeting being yo are not carried over. In a future release we will introduce a --reuse-properties command that will carry the current release properties over to the next release to be made. You can monitor the status of the upgrade using the status command

skipper:>release status --release-name helloworldk8s
╔═══════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════╗
║Last Deployed  │Wed Oct 25 17:41:33 EDT 2017                                                                      ║
║Status         │DEPLOYED                                                                                          ║
║Platform Status│All applications have been successfully deployed.                                                 ║
║               │[helloworldk8s-helloworld-docker-v3], State = [helloworldk8s-helloworld-docker-v3-sb59j=deployed] ║
╚═══════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════╝

And a curl command shows

$ curl http://192.168.99.100:32125/greeting
Olá Mundo!

$ curl http://192.168.99.100:32125/about
Hello World v1.0.1.RELEASE

Our history now looks like

skipper:>release history --release-name helloworldk8s
╔═══════╤════════════════════════════╤════════╤═════════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │  Package Name   │Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪═════════════════╪═══════════════╪════════════════╣
║3      │Wed Oct 25 17:41:33 EDT 2017│DEPLOYED│helloworld-docker│1.0.1          │Upgrade complete║
║2      │Wed Oct 25 17:36:16 EDT 2017│DELETED │helloworld-docker│1.0.0          │Delete complete ║
║1      │Wed Oct 25 17:34:24 EDT 2017│DELETED │helloworld-docker│1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧═════════════════╧═══════════════╧════════════════╝

Next we will use the rollback command to deploy an older version of the application. Since we have the manifest for that version, we have all we need to redeploy an earlier release.

skipper:>release rollback --release-name helloworldk8s --release-version 2
helloworldk8s has been rolled back.  Now at version v4.

The history now shows a new v4 version, even though it is identical to the v2 version.

skipper:>release history --release-name helloworldk8s
╔═══════╤════════════════════════════╤════════╤═════════════════╤═══════════════╤════════════════╗
║Version│        Last updated        │ Status │  Package Name   │Package Version│  Description   ║
╠═══════╪════════════════════════════╪════════╪═════════════════╪═══════════════╪════════════════╣
║4      │Wed Oct 25 17:44:25 EDT 2017│DEPLOYED│helloworld-docker│1.0.0          │Upgrade complete║
║3      │Wed Oct 25 17:41:33 EDT 2017│DELETED │helloworld-docker│1.0.1          │Delete complete ║
║2      │Wed Oct 25 17:36:16 EDT 2017│DELETED │helloworld-docker│1.0.0          │Delete complete ║
║1      │Wed Oct 25 17:34:24 EDT 2017│DELETED │helloworld-docker│1.0.0          │Delete complete ║
╚═══════╧════════════════════════════╧════════╧═════════════════╧═══════════════╧════════════════╝

The curl commands show

$ curl http://192.168.99.100:32124/greeting
yo
$ curl http://192.168.99.100:32124/about
Hello World v1.0.0.RELEASE

Using Skipper

This section is the 'three hour tour' of Skipper. It describes how to configure and use the main feature set of Skipper in detail. We will cover, the shell, platforms, packages, and repositories.

Feel free to reach out on Gitter for help and ask questions on Stack Overflow. Issues can be filed on Github issues.

11. Skipper Shell

The shell is based on the Spring Shell project. One of the shell’s best features is tab-completion and colorization of commands. Use the 'help' command or the --help argument when starting the shell to get help information. The output of using the --help argument is shown below

Skipper Options:

  --spring.cloud.skipper.client.serverUri=<uri>                        Address of the Skipper Server [default: http://localhost:7577].
  --spring.cloud.skipper.client.username=<USER>                        Username of the Skipper Server [no default].
  --spring.cloud.skipper.client.password=<PASSWORD>                    Password of the Skipper Server [no default].
  --spring.cloud.skipper.client.credentials-provider-command=<COMMAND> Executes an external command which must return an OAuth Access Token [no default].
  --spring.cloud.skipper.client.skip-ssl-validation=<true|false>       Accept any SSL certificate (even self-signed) [default: no].

  --spring.shell.historySize=<SIZE>                 Default size of the shell log file [default: 3000].
  --spring.shell.commandFile=<FILE>                 Skipper Shell executes commands read from the file(s) and then exits.

  --help                                            This message.

11.1. Shell Modes

The shell can be started either in interactive or non-interactive mode. In the case of the non-interactive mode, command line arguments are executed as Skipper commands and then the shell exits. If there are any arguments that do not have the prefix spring.cloud.skipper.client, they will be considered as skipper commands to execute.

For example,

java -jar spring-cloud-skipper-shell-1.0.0.RC1.jar --spring.cloud.skipper.client.serverUri=http://localhost:9123/api

Will bring up the interactive shell and connect to localhost:9123/api. However, the command

$ java -jar spring-cloud-skipper-shell-1.0.0.RC1.jar --spring.cloud.skipper.client.serverUri=http://localhost:9123/api search

Will connect to localhost:9123/api, execute the search command and then exit.

A more common use case would be to update a package from within a CI job. For example, in a Jenkins Stage.

stage ('Build') {
    steps {
        checkout([
            $class: 'GitSCM',
            branches: [
                [name: "*/master"]
            ],
            userRemoteConfigs: [
                [url: "https://github.com/markpollack/skipper-samples.git"]
            ]
        ])
        sh '''
            VERSION="1.0.0.M1-$(date +%Y%m%d_%H%M%S)-VERSION"
            mvn org.codehaus.mojo:versions-maven-plugin:2.3:set -DnewVersion="${VERSION}"
            mvn install
            java -jar /home/mpollack/software/skipper.jar upgrade --package-name helloworld --release-name helloworld-jenkins --properties version=${VERSION}
        '''
    }
}

12. Platforms

Skipper supports deploying to multiple platforms. The platforms included are Local, Cloud Foundry and Kubernetes. For each platform, you can configure multiple accounts. Each account name must be globally unique across all platforms.

Usually different accounts will correspond to a different orgs/spaces for Cloud Foundry and different namespaces for a single Kubernetes cluster.

Platforms are defined using Spring Boot’s Externalized Configuration feature. To simplify the getting started experience, if a local platform account is not defined in your configuration, Skipper will create a local deployer implementation named default.

You can make use of the Encryption and Decryption features of Spring Cloud Config as one way to secure credentials.

Distinct from where Skipper will deploy application, you can also run the Skipper server itself on a platform. Installation on other platforms is covered in the Installation section.

Here is example YAML file showing configuration of all three platforms

spring:
  cloud:
    skipper:
      server:
        platform:
          local:
            accounts:
              localDevDebug:
                javaOpts: "-Xdebug"
          cloudfoundry:
            accounts:
              cf-dev:
                connection:
                  url: https://api.run.pivotal.io
                  org: scdf-ci
                  space: space-mark
                  domain: cfapps.io
                  username: <your-username>
                  password: <your-password>
                  skipSslValidation: false
                deployment:
                  deleteRoutes: false
          kubernetes:
            accounts:
              minikube:
                namespace: default

The properties available for each platform can be found in these classes

13. Packages

Packages contain all the necessary information to install your application or group of applications. The approach to decribing the applications is to use a YAML file that provides all the necessary information to help facilitate searching for your application hosted in a Package Registry and to install your application to a platform.

To make it easy to customize a package, the YAML files are templated. The final version of the YAML file, with all values substituted is known as the release manifest. Skipper currently understands how to deploy applications based off a YAML file that contains the information needed for a Spring Cloud Deployer implementation to deploy an application. It describes, where to find the application (either a http, maven or docker location) , application properties (think Spring Boot @ConfigurationProperties), an deployment properites (e.g. how much memory to use).

13.1. Package Format

A package is a collection of YAML files that are zipped up into a file with the naming convention [PackageName]-[PackageVersion].zip for example: mypackage-1.0.0.zip

A package can define a single application or a group of applications.

The single application package file, mypackage-1.0.0.zip when unzipped, should have the following directory structure.

mypackage-1.0.0
├── package.yml
├── templates
│   └── template.yml
└── values.yml

The package.yml file contains metadata about the package and is used to support Skipper’s search functionality. The template.yml file contains placeholders for values that are specified in the values.yml file. When installing a package, placeholder values can also be specified and they would override the values in the values.yml file. The templating engine that Skipper uses JMustache. The YAML files can have either .yml or .yaml extensions.

The files helloworld-1.0.0.zip or helloworld-docker-1.0.0.zip are good examples to use as a basis to create your own package 'by-hand'.

The source code for the helloword sample can be found here.

13.2. Package with multiple applications

A package can contain a group of applications bundled in it. In those cases, the structure of the package would look like this:

mypackagegroup-1.0.0
├── package.yml
├── packages
│   ├── app1
│   │   ├── package.yml
│   │   ├── templates
│   │   │   └── log.yml
│   │   └── values.yml
│   └── app2
│       ├── package.yml
│       ├── templates
│       │   └── time.yml
│       └── values.yml
└── values.yml

In the above, the mypackagegroup would still have its own package.yml, values.yml to specify the package metadata and the values to override. All the applications inside the mypackagegroup are considered sub-packages and would follow the similar package structure as the individual packages. These sub packages need to be specified inside the packages directory of the root package mypackagegroup.

The file ticktock-1.0.0.zip is a good example to use as a basis for creating your own package 'by-hand'.

13.3. Package Metadata

The package.yml file specifies the package metadata. A sample package metadata would look like this:

# Required Fields
apiVersion: skipper.spring.io/v1
kind: SkipperPackageMetadata
name: mypackage
version: 1.0.0

# Optional Fields
packageSourceUrl: https://github.com/some-mypackage-project/v1.0.0.RELEASE
packageHomeUrl: http://some-mypackage-project/
tags: skipper, mypackage, sample
maintainer: https://github.com/maintainer
description: This is a mypackage sample.

Required Fields:

  • apiVersion - The Package Index spec version this file is based on

  • kinds - What type of package system is being used

  • name - name of the package

  • version - version of the package

Optional Fields:

  • packageSourceUrl - Location to source code for this package.

  • packageHomeUrl - The home page of the package

  • tags - A comma separated list of tags to be used for searching

  • maintainer - Who is maintaining this package

  • description Free form text describing the functionality of the package. Will generally be shown in search results.

  • sha256 - Hash of package binary (not yet enforced)

  • iconUrl - URL for an icon to show for this package.

  • origin - Free form text describing the origin of this package, for example your company name.

Currently, the package search functionality is only a wildcard match against the name of the package.

A Package Repository exposes an index.yml file that contains multiple metadata documents, separated by the standard three dash notation --- to separate the documents. For example index.yml.

13.4. Package Templates

The template.yml file in a package structure such as

mypackage-1.0.0
├── package.yml
├── templates
│   └── template.yml
└── values.yml

will commonly have the following content:

# template.yml
apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: mypackage
  type: sample
spec:
  resource: maven://org.mysample:mypackage
  resourceMetadata:  maven://org.mysample:mypackage:jar:metadata:{{spec.version}}
  version: {{spec.version}}
  applicationProperties:
    {{#spec.applicationProperties.entrySet}}
    {{key}}: {{value}}
    {{/spec.applicationProperties.entrySet}}
  deploymentProperties:
    {{#spec.deploymentProperties.entrySet}}
    {{key}}: {{value}}
    {{/spec.deploymentProperties.entrySet}}

Skipper only knows how to manage applications defined in this way. A future release will introduce support for different formats, for example supporting the Cloud Foundry manifest format.

The apiVersion, kind and spec.resource are required.

The spec.resource and spec.version define where the application executable is located. The spec.resourceMetadata field defines where a Spring Boot Configuration meta-data jar is located that contains configuration properties of the application. This is either a Spring Boot uberjar hosted under a http endpoint or a maven or docker repository. The template placeholder {{spec.version}} so that the version of a specific application can be easily upgraded without having to create a new package .zip file.

The resource is http:// or a maven:// or docker: based. The format for specifying a resource is shown below.

13.4.1. HTTP Resources

spec:
  resource: http://example.com/app/hello-world
  version: 1.0.0.RELEASE

There is a naming convention that must be followed for HTTP based resource so that Skipper can assemble a full URL from the resource and version field and also parse the version number given the URL. The above spec will reference a URL at example.com/app/hello-world-1.0.0.RELEASE.jar. The resource and version fields should not have any numbers after the - character.

13.4.2. Docker Resources

spec:
  resource: docker:springcloud/spring-cloud-skipper-samples-helloworld
  version: 1.0.0.RELEASE

The mapping to docker registry names is

spec:
  resource: docker:<user>/<repo>
  version: <tag>

13.4.3. Maven Resources

spec:
  resource: maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld:1.0.0.RELEASE
  version: 1.0.0.RELEASE

The mapping to maven artifact names is

spec:
  resource: maven://<maven-group-name>:<maven-artifact-name>
  version:<maven-version>

There is only one setting to specify with maven repositories to search. This applies across all platform accounts. By default the configuration:

maven:
  remoteRepositories:
    springRepo: https://repo.spring.io/libs-snapshot

is used. You can specify other entries and also specify proxy properties. This is currently best documented here. Essentially, this needs to be set a property in your launch properties or manifest.yml (when pushing to PCF) like so:

# manifest.yml
...
env:
    MAVEN_REMOTE_REPOSITORIES_{{REPOSITORY_NAME}}_URL: https://repo.spring.io
...

The metadata section is used to help search for applications after they have been installed. This feature will be made available in a future release.

Currently, only SpringCloudDeployerApplication kind is supported which means the applications can be deployed into the target platforms only using their corresponding Spring Cloud Deployer implementations (CF, Kubernetes Deployer etc.).

The spec contains the resource specification and the properties for the package.

The resource represents the resource URI to download the application from. This would typically be a maven co-ordinate or a docker image URL.

The SpringCloudDeployerApplication kind of application can have applicationProperties and deploymentProperties as the configuration properties.

The application properties correspond to the properties for the application itself.

The deployment properties correspond to the properties for the deployment operation performed by Spring Cloud Deployer implementations.

The name of the template file can be anything as all the files under templates directory are loaded to apply the template configurations.

13.5. Package Values

The values.yml file contains the default values for any of the keys specified in the template files.

For instance, in a package that defines one application, the format is

version: 1.0.0.RELEASE
spec:
  applicationProperties:
    server.port: 9090

If the package defines multiple applications, provide the name of the package in the top level YML section to scope the spec section. That is, given a multiple application package with the layout

ticktock-1.0.0/
├── packages
│   ├── log
│   │   ├── package.yml
│   │   └── values.yml
│   └── time
│       ├── package.yml
│       └── values.yml
├── package.yml
└── values.yml

A top level values.yml file

#values.yml

hello: world

time:
  appVersion: 1.3.0.M1
  deployment:
    applicationProperties:
      log.level: WARN
      trigger.fixed-delay: 1
log:
  deployment:
    count: 2
    applicationProperties:
      log.level: WARN
      log.name: skipperlogger

Would set hello as a variable available to be used as a placeholder in the packages\log\values.yml file and the packages\time\values.yml. However, the YML section under time: is applied only to the packages\time\values.yml file and the YML section under log: is applied only to the packages\time\values.yml file.

13.6. Package Upload

After creating the package in the above structure, we can compress it in a zip file with the name [PackageName]-[PackageVersion].zip e.g. mypackage-1.0.0.zip

For instance, the package directory would look like this before compression:

mypackage-1.0.0
├── package.yml
├── templates
│   └── template.yml
└── values.yml

This zip file can be uploaded into one of the local repositories of Skipper server. By default, Skipper server has the local repository with the name local.

Using the Skipper Shell, we can upload the package zip into Skipper server’s local repository.

skipper:>package upload --path /path-to-package/mypackage-1.0.0.zip
Package uploaded successfully:[mypackage:1.0.0]

If no --repo-name is set, the upload command will use local as the repository to upload.

skipper:>package search
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║      Name       │Version│                                  Description                                   ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld       │1.0.0  │The app has two endpoints, /about and /greeting in English.  Maven resource.    ║
║helloworld       │1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Maven resource. ║
║helloworld-docker│1.0.0  │The app has two endpoints, /about and /greeting in English.  Docker resource.   ║
║helloworld-docker│1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Docker resource.║
║mypackage        │1.0.0  │This is a mypackage sample                                                      ║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝

13.7. Creating Your Own Package

In this section, we will try to create a package that can be deployed using Spring Cloud Deployer implementations.

For this package, we are going to be creating a super simple package and uploading it to our local machine.

To get started creating your own package, create a folder following the naming convention ([package-name]-[package-version]), in our case it will be demo-1.0.0. In this directory, create empty files values.yml, package.yml and a templates directory. In the templates directory create an empty template.yml file.

Go into the package.yml where we are going to specify the package metadata, for this app we are only going to be filling the minimum values possible:

# package.yml

apiVersion: skipper.spring.io/v1
kind: SkipperPackageMetadata
name: demo
version: 1.0.0
description: Greets the world!

Importantly here, ensure that your name and version matches the name and version in your folder name or you will get an error.

Next, open up your templates/template.yml. Here we are going to be specifying the actual information about your package and most importantly setting default values. In the template.yml, copy the template for the kind SpringCloudDeployerApplication from the above sample.

# templates/template.yml

apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: demo
spec:
  resource: maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld
  version: {{version}}
  applicationProperties:
    {{#spec.applicationProperties.entrySet}}
    {{key}}: {{value}}
    {{/spec.applicationProperties.entrySet}}
  deploymentProperties:
    {{#spec.deploymentProperties.entrySet}}
    {{key}}: {{value}}
    {{/spec.deploymentProperties.entrySet}}

Simply, this specifies our application name is demo, and finds our package in maven and we can specify a version, applicationProperties and deploymentProperties in our values.yml. So lets do that.

# values.yml

# This is a YAML-formatted file.
# Declare variables to be passed into your templates
version: 1.0.0.RELEASE
spec:
  applicationProperties:
    server.port: 8100

This will set out version to 1.0.0.RELEASE and also set the server.port=8100 as one of the application properties. When the Skipper Package reader resolves these values by merging the values.yml against the template, the resolved values would look like this:

# hypothetical template.yml

apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: demo
spec:
  resource: maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld
  version: 1.0.0.RELEASE
  applicationProperties:
    server.port: 8100
  deploymentProperties:

The reason to use values.yml instead of entering the values directly is that it allows you to overwrite the values at run time using the --file or --properties flags.

We have now finished making our file, we now have to zip it up. The easiest way to do is the zip -r command line command. You should see something like:

$ zip -r demo-1.0.0.zip demo-1.0.0/
  adding: demo-1.0.0/ (stored 0%)
  adding: demo-1.0.0/package.yml (deflated 14%)
  adding: demo-1.0.0/templates/ (stored 0%)
  adding: demo-1.0.0/templates/template.yml (deflated 55%)
  adding: demo-1.0.0/values.yml (deflated 4%)

Armed with our zipped file and the path to it, we can head to skipper and use the upload command:

skipper:>package upload --path /Users/path-to-your-zip/demo-1.0.0.zip
Package uploaded successfully:[demo:1.0.0]

Now you can search for it as shown above, then install it!

skipper:>package install --package-name demo --package-version 1.0.0 --release-name demo
Released demo. Now at version v1.

Congratulations! You have now created, packaged, uploaded and installed your own Skipper Package!

14. Repositories

Repositories are where package metadata and package .zip files are hosted. Repositores can be local or remote, were local means backed by Skipper’s relational database and remote means a filesystem exposed over http.

When registering a remote registry, for example, the experimental one that is currently defined by default in addition to one named local` use the following format:

spring
  cloud:
    skipper:
      server:
        packageRepositories:
          -
            name: experimental
            url: http://skipper-repository.cfapps.io/repository/experimental
            description: Experimental Skipper Repository
            repoOrder: 0
          -
            name: local
            url: http://${spring.cloud.client.hostname}:7577
            local: true
            description: Default local database backed repository
            repoOrder: 1

The repoOrder determines which repository will serve up a package if one with the same name is registered in two or more repositories.

The directory structure assumed for a remote repository is the registered url value followed by the package name and then the zip file name., e.g. skipper-repository.cfapps.io/repository/experimental/helloworld/helloworld-1.0.0.zip for the package helloworld with the version 1.0.0. Directly under the registered url is expected to be a file named index.yml, e.g. skipper-repository.cfapps.io/repository/experimental/index.yml. This contains the package metadata for all the packages hosted by the repository.

It is up to you to update the index.yml file 'by-hand' for remote repositories.

'Local' repositories are backed by Skipper’s database. In the Skipper 1.0 release they does not expose the index.yml or the .zip files under a filesystem like URL structure as with remote repositories. This will be provided in the next version. However, on the positive side, you can upload packages to a local repository and don’t need to maintain an index file. See the skipper command section for information on creating local repositories.

A good example that shows using a Spring Boot web application with static resources to host a Repository can be found here. This application is currently running under skipper-repository.cfapps.io/repository/experimental.

Installation

15. Installing on a Local Platform

15.1. Local Platform configuration

Here is an example YAML file to configure two local deployer accounts named localDev and localDevDebug

spring:
  cloud:
    skipper:
      server:
        platform:
          local:
            accounts:
              localDev:
                shutdownTimeout: 60
                javaOpts: "-Dtest=foo"
              localDevDebug:
                javaOpts: "-Xdebug"

The key-value pairs that follow the name of the account are javaCmd, workingDirectoriesRoot, deleteFilesOnExit, envVarsToInherit, shutdownTimeout, javaOpts, and useSpringApplicationJson. More information can be found in the JavaDocs for LocalDeployerProperties.

16. Installing on Cloud Foundry

16.1. Cloud Foundry configuration

Here is an example YAML file to configure two Cloud Foundry accounts named cf-dev and cf-qa. This is useful on Cloud Foundry if you are using the Spring Cloud Config Server to manage Skipper’s configuration properties.

Here is a sample YML snippet, modify to fit your needs.

It is important to set enableLocalPlatform to false so that the local platform deployer is never used.
The deleteRoutes deployment setting is false so that "v2" of an application has the same route as "v1". Otherwise, undeploying "v1" will remove the route.
spring:
  cloud:
    skipper:
      server:
        enableLocalPlatform: false
        platform:
          cloudfoundry:
            accounts:
              cf-dev:
                connection:
                  url: https://api.run.pivotal.io
                  org: myOrg
                  space: mySpace
                  domain: cfapps.io
                  username: [email protected]
                  password: drowssap
                  skipSslValidation: false
                deployment:
                  memory: 2048m
                  disk: 2048m
                  services: rabbit
                  deleteRoutes: false
              cf-qa:
                connection:
                  url: https://api.run.pivotal.io
                  org: myOrgQA
                  space: mySpaceQA
                  domain: cfapps.io
                  username: [email protected]
                  password: drowssap
                  skipSslValidation: true
                deployment:
                  memory: 1024m
                  disk: 1024m
                  services: rabbitQA
                  deleteRoutes: false

You can also run the Skipper Server locally and deploy to Cloud Foundry. In this case, it is more convenient to specify the configuration in a skipper.yml file, and start the server with the option --spring.config.location=skipper.yml

If you are using cf push to deploy Skipper, a Cloud Foundry manifest is more appropriate to use. Here is a sample manifest.yml, modify to fit your needs.

It is important to set SPRING_CLOUD_SKIPPER_SERVER_ENABLE_LOCAL_PLATFORM to false so that the local platform deployer is never used.
It is important to set SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_DEPLOYMENT_DELETE_ROUTES: false so that "v2" of an application has the same route as "v1". Otherwise, undeploying "v1" will remove the route.
applications:
- name: mlp-skipper
  host: mlp-skipper
  memory: 1G
  disk_quota: 1G
  timeout: 180
  instances: 1
  buildpack: java_buildpack
  path: spring-cloud-skipper-server.jar
env:
    SPRING_APPLICATION_NAME: mlp-skipper
    SPRING_CLOUD_SKIPPER_SERVER_ENABLE_LOCAL_PLATFORM: false
    SPRING_CLOUD_SKIPPER_SERVER_STRATEGIES_HEALTHCHECK.TIMEOUTINMILLIS: 300000
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_CONNECTION_URL: https://api.run.pivotal.io
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_CONNECTION_ORG: myOrgQA
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_CONNECTION_SPACE: mySpaceQA
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_CONNECTION_DOMAIN: cfapps.io
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_CONNECTION_USERNAME: [email protected]
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_CONNECTION_PASSWORD: drowssap
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_CONNECTION_SKIP_SSL_VALIDATION: false
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_DEPLOYMENT_DELETE_ROUTES: false
    SPRING_CLOUD_SKIPPER_SERVER_PLATFORM_CLOUDFOUNDRY_ACCOUNTS[pws]_DEPLOYMENT_SERVICES: rabbitmq
services:
- mysqlboost
In the manifest above we bound the application to the mysqlboost service. If you do not specify a service, the server will use an embedded database.

For information on the deployment properties that can be configured can be found in CloudFoundryDeploymentProperties.

When starting the Skipper shell on your local machine, it will try to connect to the Server at the default location of localhost:7577/api. Use the shell’s command line option --spring.cloud.skipper.client.serverUri to specify the location of the server. You can alternatively use the interactive shell command config to set the server location

server-unknown:>skipper config --uri https://mlp-skipper.cfapps.io/api
Successfully targeted https://mlp-skipper.cfapps.io/api
skipper:>

17. Installing on Kubernetes

There is a docker image springcloud/spring-cloud-skipper-server is available for Skipper server in dockerhub. You can use this to run the Skipper server in Kubernetes.

17.1. Kuberenetes configuration

Here is an example YAML file to configure two accounts named k8s-dev and k8sqa on a Kubernetes cluster that correspond to different namespaces. We are investigating how to support connecting to different Kubernetes clusters.

spring:
  cloud:
    skipper:
      server:
        platform:
          kubernetes:
            accounts:
              k8s-dev:
                namespace: devNamespace
                cpu: 4
              k8s-qa:
                namespace: qaNamespace
                memory: 1024m

More information on the deployment properties that can be configured can be found in KubernetesDeployerProperties

18. Database configuration

Spring Cloud Skipper uses a relational database to store metadata. We use flyway to bootstrap and then migrate the database as the product evolves. We currently provide schemas for the following databases: H2, HSQLDB, MySQL, PostgreSQL, Microsoft SQL Server, Oracle 12, IBM DB2.

The JDBC drivers for MySQL (via MariaDB driver), HSQLDB, PostgreSQL, SQL Server, along the embedded H2 database are bundled with the server jar. If you are using any other database, then the corresponding JDBC driver jar needs to be on the classpath of the server. If not specified the server will start with the embedded in memory H2 database.

The database properties can be passed as environment variables or command-line arguments to the Server.

Please make sure that you configure the correct flyway.schemas for Oracle, DB2 and SQL Server, otherwise flyway will try to create it’s schema_version table on the default schema for a connection, which could be different than that your credentials are associated with. Please refer to the Flyway documentation for more options.

Here are some examples.

export spring_datasource_url=jdbc:postgresql://localhost:5432/mydb
export spring_datasource_username=myuser
export spring_datasource_password=mypass
export spring_datasource_driver-class-name="org.postgresql.Driver"
  • MySQL

java -jar spring-cloud-skipper-server-{project-version}.jar \
    --spring.datasource.url=jdbc:mysql:<db-info> \
    --spring.datasource.username=<user> \
    --spring.datasource.password=<password> \
    --spring.datasource.driver-class-name=org.mariadb.jdbc.Driver &
  • PostgreSQL

java -jar spring-cloud-skipper-server-{project-version}.jar \
    --spring.datasource.url=jdbc:postgresql:<db-info> \
    --spring.datasource.username=<user> \
    --spring.datasource.password=<password> \
    --spring.datasource.driver-class-name=org.postgresql.Driver &
  • HSQLDB

java -jar spring-cloud-skipper-server-{project-version}.jar \
    --spring.datasource.url=jdbc:hsqldb:mem:<db-info> \
    --spring.datasource.username=sa \
    --spring.datasource.password= \
    --spring.datasource.driver-class-name=org.hsqldb.jdbc.JDBCDriver &
  • Microsoft SQL Server

java -jar spring-cloud-skipper-server-{project-version}.jar \
    --spring.datasource.url=jdbc:sqlserver://<db-info>;database=<database-name> \
    --spring.datasource.username=<user> \
    --spring.datasource.password=<password> \
    --flyway.schemas=<database-name> \
    --spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver &
  • Oracle

java -jar spring-cloud-skipper-server-{project-version}.jar \
    --spring.datasource.url=jdbc:oracle:thin:<user>/<password>@<db-address>/<service-id> \
    --spring.datasource.username=<user> \
    --spring.datasource.password=<password> \
    --flyway.schemas=<tablespace-name> \
    --spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver &
  • IBM DB2

java -jar spring-cloud-skipper-server-{project-version}.jar \
    --spring.datasource.url=jdbc:db2:thin://<db-info>/<db-name> \
    --spring.datasource.username=<user> \
    --spring.datasource.password=<password> \
    --flyway.schemas=<db-name> \
    --spring.datasource.driver-class-name=com.ibm.db2.jcc.DB2Driver &

Security

By default, the Spring Cloud Skipper server is unsecured and runs on an unencrypted HTTP connection. You can secure your REST endpoints by enabling HTTPS and requiring clients to authenticate using OAuth 2.0

By default, the REST endpoints (administration, management and health) do not require authenticated access.

19. Enabling HTTPS

By default, the REST endpoints use plain HTTP as a transport. You can switch to HTTPS easily, by adding a certificate to your configuration in e.g. skipper.yml.

You can reference the Yaml file using the following parameter: --spring.config.location=skipper.yml

server:
  port: 8443                                         (1)
  ssl:
    key-alias: yourKeyAlias                          (2)
    key-store: path/to/keystore                      (3)
    key-store-password: yourKeyStorePassword         (4)
    key-password: yourKeyPassword                    (5)
    trust-store: path/to/trust-store                 (6)
    trust-store-password: yourTrustStorePassword     (7)
1 As the default port is 7577, you may choose to change the port to a more common HTTPs-typical port.
2 The alias (or name) under which the key is stored in the keystore.
3 The path to the keystore file. Classpath resources may also be specified, by using the classpath prefix: classpath:path/to/keystore
4 The password of the keystore.
5 The password of the key.
6 The path to the truststore file. Classpath resources may also be specified, by using the classpath prefix: classpath:path/to/trust-store
7 The password of the trust store.
If HTTPS is enabled, it will completely replace HTTP as the protocol over which the REST endpoints interact. Plain HTTP requests will fail - therefore, make sure that you configure the Skipper Shell accordingly.

19.1. Using Self-Signed Certificates

For testing purposes or during development it might be convenient to create self-signed certificates. To get started, execute the following command to create a certificate:

$ keytool -genkey -alias skipper -keyalg RSA -keystore skipper.keystore \
          -validity 3650 -storetype JKS \
          -dname "CN=localhost, OU=Spring, O=Pivotal, L=Holualoa, ST=HI, C=US"  (1)
          -keypass skipper -storepass skipper
1 CN is the only important parameter here. It should match the domain you are trying to access, e.g. localhost.

Then add the following to your skipper.yml file:

server:
  port: 8443
  ssl:
    enabled: true
    key-alias: skipper
    key-store: "/your/path/to/skipper.keystore"
    key-store-type: jks
    key-store-password: skipper
    key-password: skipper

This is all that’s needed for the Skipper Server. Once you start the server, you should be able to access it via https://localhost:8443/. As this is a self-signed certificate, you will hit a warning in your browser, that you need to ignore.

19.2. Self-Signed Certificates and the Shell

By default self-signed certificates are an issue for the Shell and additional steps are necessary to make the Shell work with self-signed certificates. Two options are available:

  1. Add the self-signed certificate to the JVM truststore

  2. Skip certificate validation

Add the self-signed certificate to the JVM truststore

In order to use the JVM truststore option, we need to export the previously created certificate from the keystore:

$ keytool -export -alias skipper -keystore skipper.keystore -file skipper_cert -storepass skipper

Next, we need to create a truststore which the Shell will use:

$ keytool -importcert -keystore skipper.truststore -alias skipper -storepass skipper -file skipper_cert -noprompt

Now, you are ready to launch the Skipper Shell using the following JVM arguments:

$ java -Djavax.net.ssl.trustStorePassword=skipper \
       -Djavax.net.ssl.trustStore=/path/to/skipper.truststore \
       -Djavax.net.ssl.trustStoreType=jks \
       -jar spring-cloud-skipper-shell-1.0.0.RC1.jar

In case you run into trouble establishing a connection via SSL, you can enable additional logging by using and setting the javax.net.debug JVM argument to ssl.

Don’t forget to target the Skipper Server with:

skipper:>skipper config --uri https://localhost:8443/api

Skip Certificate Validation

Alternatively, you can also bypass the certification validation by providing the optional command-line parameter --spring.cloud.skipper.client.skip-ssl-validation=true.

Using this command-line parameter, the shell will accept any (self-signed) SSL certificate.

If possible you should avoid using this option. Disabling the trust manager defeats the purpose of SSL and makes you vulnerable to man-in-the-middle attacks.

20. OAuth 2.0 Security

OAuth 2.0 allows you to integrate Spring Cloud Skipper into Single Sign On (SSO) environments. The following 3 OAuth2 Grant Types will be used:

  • Password - Used by the shell (And the REST integration), so you can login using username and password

  • Client Credentials - Retrieve an Access Token directly from your OAuth provider and pass it to the Skipper server using the Authorization Http header.

The REST endpoints can be accessed using 2 ways:

  • Basic Authentication which will use the Password Grant Type under the covers to authenticate with your OAuth2 service

  • Access Token which will use the Client Credentials Grant Type under the covers

When authentication is set up, it is strongly recommended to enable HTTPS as well, especially in production environments.

You can turn on OAuth2 authentication by adding the following to skipper.yml or via environment variables:

security:
  oauth2:
    client:
      client-id: myclient                                             (1)
      client-secret: mysecret
      access-token-uri: http://127.0.0.1:9999/oauth/token
      user-authorization-uri: http://127.0.0.1:9999/oauth/authorize
    resource:
      user-info-uri: http://127.0.0.1:9999/me
1 Providing the Client Id in the OAuth Configuration Section will activate OAuth2 security

You can verify that basic authentication is working properly using curl:

$ curl -u myusername:mypassword http://localhost:7577/

As a result you should see a list of available REST endpoints.

Besides Basic Authentication, you can also provide an Access Token in order to access the REST Api. In order to make that happen, you would retrieve an OAuth2 Access Token from your OAuth2 provider first, and then pass that Access Token to the REST Api using the Authorization Http header:

$ curl -H "Authorization: Bearer <ACCESS_TOKEN>" http://localhost:7577/

20.1. OAuth REST Endpoint Authorization

Spring Cloud Skipper supports the following 3 roles:

  • VIEW for anything that relates to retrieving state

  • CREATE for anything that involves creating, deleting or mutating the state of the system

  • MANAGE for boot management endpoints.

The rules regarding which REST endpoints require which roles, are specified in application.yml of the spring-cloud-skipper-server-core module.

Nonetheless, you can override those, if desired. The configuration takes the form of a YAML list (as some rules may have precedence over others) and so you’ll need to copy/paste the whole list and tailor it to your needs (as there is no way to merge lists). Always refer to your version of application.yml, as the snippet reproduced below may be out-dated. The default rules are as such:

            # About

            - GET /api/about                      => hasRole('ROLE_VIEW')

            # AppDeployerDatas

            - GET /api/appDeployerDatas           => hasRole('ROLE_VIEW')

            # Deployers

            - GET /api/deployers                  => hasRole('ROLE_VIEW')

            ## Releases

            - GET /api/releases                   => hasRole('ROLE_VIEW')

            # Status

            - GET /api/release/status/**         => hasRole('ROLE_VIEW')

            # Manifest

            - GET /api/release/manifest/**       => hasRole('ROLE_VIEW')

            # Upgrade

            - POST /api/release/upgrade          => hasRole('ROLE_CREATE')

            # Rollback

            - POST /api/release/rollback/**      => hasRole('ROLE_CREATE')

            # Delete

            - DELETE /api/release/**             => hasRole('ROLE_CREATE')

            # History

            - GET /api/release/history/**           => hasRole('ROLE_VIEW')

            # List

            - GET /api/release/list                         => hasRole('ROLE_VIEW')
            - GET /api/release/list/**                      => hasRole('ROLE_VIEW')

            # Packages

            - GET /api/packages                    => hasRole('ROLE_VIEW')

            # Upload

            - POST /api/package/upload             => hasRole('ROLE_CREATE')

            # Install

            - POST /api/package/install             => hasRole('ROLE_CREATE')
            - POST /api/package/install/**          => hasRole('ROLE_CREATE')

            # Delete

            - DELETE /api/package/**                => hasRole('ROLE_CREATE')

            # PackageMetaData

            - GET /api/packageMetadata              => hasRole('ROLE_VIEW')
            - GET /api/packageMetadata/**           => hasRole('ROLE_VIEW')

            # Repositories

            - GET /api/repositories                 => hasRole('ROLE_VIEW')
            - GET /api/repositories/**              => hasRole('ROLE_VIEW')

            # Boot Endpoints

            - GET  /actuator/**                     => hasRole('ROLE_MANAGE')

The format of each line is the following:

HTTP_METHOD URL_PATTERN '=>' SECURITY_ATTRIBUTE

where

Be mindful that the above is indeed a YAML list, not a map (thus the use of '-' dashes at the start of each line) that lives under the spring.cloud.skipper.security.authorization.rules key.

Users and Roles

Spring Cloud Skipper does not make any assumptions of how roles are assigned to users. Due to fact that the determination of security roles is very environment-specific, Spring Cloud Data Skipper will by default assign all roles to authenticated OAuth2 users using the DefaultAuthoritiesExtractor class.

You can customize that behavior by providing your own Spring bean definition that extends Spring Security OAuth’s AuthoritiesExtractor interface. In that case, the custom bean definition will take precedence over the default one provided by Spring Cloud Skipper.

20.2. OAuth Authentication using the Spring Cloud Skipper Shell

If your OAuth2 provider supports the Password Grant Type you can start the Skipper Shell with:

$ java -jar spring-cloud-skipper-shell-1.0.0.RC1.jar \
  --spring.cloud.skipper.client.serverUrl=http://localhost:7577 \
  --spring.cloud.skipper.client.username=my_username \
  --spring.cloud.skipper.client.password=my_password
Keep in mind that when authentication for Spring Cloud Skipper is enabled, the underlying OAuth2 provider must support the Password OAuth2 Grant Type, if you want to use the Shell.

From within the Skipper Shell you can also provide credentials using:

skipper:> skipper config --uri https://localhost:7577/api --username my_username --password my_password

Once successfully targeted, you should see the following output:

Successfully targeted http://localhost:7577/api
skipper:>

20.3. OAuth2 Authentication Examples

20.3.1. Local OAuth2 Server

With Spring Security OAuth you can easily create your own OAuth2 Server with the following 2 simple annotations:

  • @EnableResourceServer

  • @EnableAuthorizationServer

A working example application can be found at:

Simply clone the project, built and start it. Furthermore configure Spring Cloud Skipper with the respective Client Id and Client Secret.

Please use this option for development or demo purposes only.

20.3.2. Authentication using UAA

If you need to setup a production-ready OAuth provider, you may want to consider using the CloudFoundry User Account and Authentication (UAA) Server. Used by Cloud Foundry, it can also be used stand-alone. For more information see github.com/cloudfoundry/uaa.

20.3.3. Authentication using GitHub

If you rather like to use an existing OAuth2 provider, here is an example for GitHub. First you need to Register a new application under your GitHub account at:

For the Authorization callback URL you will enter Spring Cloud Skippers’s Login URL, e.g. localhost:9393/login.

Configure Spring Cloud Skipper with the GitHub relevant Client Id and Secret:

security:
  oauth2:
    client:
      client-id: your-github-client-id
      client-secret: your-github-client-secret
      access-token-uri: https://github.com/login/oauth/access_token
      user-authorization-uri: https://github.com/login/oauth/authorize
    resource:
      user-info-uri: https://api.github.com/user
GitHub does not support the OAuth2 password grant type. As such you cannot use the Spring Cloud Skipper Shell in conjunction with GitHub.

Skipper Commands

21. Package commands

The command search shows all the packages available to be installed by the Skipper server.

skipper:>package search
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║      Name       │Version│                                  Description                                   ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld       │1.0.0  │The app has two endpoints, /about and /greeting in English.  Maven resource.    ║
║helloworld       │1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Maven resource. ║
║helloworld-docker│1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Docker resource.║
║helloworld-docker│1.0.0  │The app has two endpoints, /about and /greeting in English.  Docker resource.   ║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝

The search command can use --name option to search for the package name containing the given option value.

skipper:>package search --name helloworld-
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║      Name       │Version│                                  Description                                   ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld-docker│1.0.0  │The app has two endpoints, /about and /greeting in English.  Docker resource.   ║
║helloworld-docker│1.0.1  │The app has two endpoints, /about and /greeting in Portuguese.  Docker resource.║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝

To search for more details of the packages, the option --details can be used.

skipper:>package search --name helloworld- --details
╔════════════════╤═════════════════════════════════════════════════════════════════════════════╗
║      Name      │                                    Value                                    ║
╠════════════════╪═════════════════════════════════════════════════════════════════════════════╣
║apiVersion      │v1                                                                           ║
║origin          │A sample repository for using Skipper                                        ║
║repositoryId    │1                                                                            ║
║kind            │skipper                                                                      ║
║name            │helloworld-docker                                                            ║
║version         │1.0.0                                                                        ║
║packageSourceUrl│https://github.com/markpollack/skipper-sample-repository                     ║
║packageHomeUrl  │https://github.com/markpollack/skipper-sample-repository                     ║
║tags            │web, demo, docker, helloworld                                                ║
║maintainer      │https://github.com/markpollack                                               ║
║description     │The app has two endpoints, /about and /greeting in English.  Docker resource.║
║sha256          │                                                                             ║
║iconUrl         │                                                                             ║
╚════════════════╧═════════════════════════════════════════════════════════════════════════════╝

╔════════════════╤════════════════════════════════════════════════════════════════════════════════╗
║      Name      │                                     Value                                      ║
╠════════════════╪════════════════════════════════════════════════════════════════════════════════╣
║apiVersion      │v1                                                                              ║
║origin          │A sample repository for using Skipper                                           ║
║repositoryId    │1                                                                               ║
║kind            │skipper                                                                         ║
║name            │helloworld-docker                                                               ║
║version         │1.0.1                                                                           ║
║packageSourceUrl│https://github.com/markpollack/skipper-sample-repository                        ║
║packageHomeUrl  │https://github.com/markpollack/skipper-sample-repository                        ║
║tags            │web, demo, docker, helloworld                                                   ║
║maintainer      │https://github.com/markpollack                                                  ║
║description     │The app has two endpoints, /about and /greeting in Portuguese.  Docker resource.║
║sha256          │                                                                                ║
║iconUrl         │                                                                                ║
╚════════════════╧════════════════════════════════════════════════════════════════════════════════╝

21.2. Upload

This command uploads a package .zip file

skipper:>package upload --path /path-to-package/mypackage-1.0.0.zip
Package uploaded successfully:[mypackage:1.0.0]

If no --repo-name is set, the upload command will use local as the repository to upload.

21.3. Install

This command installs a package.

skipper:>package install --release-name helloworldlocal --package-name helloworld --package-version 1.0.0 --properties spec.applicationProperties.server.port=8099
Released helloworldlocal. Now at version v1.

If no package-version is specified, then the latest package version by the given package-name will be considered.

If no platform-name is specified, the platform name default will be used.

The properties can either be provided via comma separated YAML String using the --properties option or, via a YAML file using the --file option.

21.4. Delete

This command deletes a package. You can only delete a package that is in a local (database backed) repository.

skipper:>package delete --package-name helloworld
Can not delete package [helloworld], associated repository [experimental] is remote.

22. Release commands

22.1. List

This command lists the latest deployed or failed release.

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.

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 specifed, then the latest release version will be used.

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.

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, then the latest package version by the given package-name will be considered. The properties can either be provided via comma separated YAML String using the --properties option or, via a YAML file using the --file option.

An upgrade can be done by overriding the package version or by keeping the existing package version but by overriding the properties. When overriding the package version, it needs to accompany with the corresponding properties as the existing properties won’t be carried over. In a future release we will 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

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

where log-level-change.yml is

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

Since it is quite 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 is

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 below

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

22.4. Rollback

This command rollsback the release to a specific version.

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

If no --release-version 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.

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.

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

23. Manifest commands

23.1. Get

The manifest get command shows the manifest used for a specific release.

skipper:>manifest get --release-name helloworldk8s

---
# Source: template.yml
apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
  name: helloworld-docker
spec:
  resource: docker:springcloud/spring-cloud-skipper-samples-helloworld:1.0.0.RELEASE
  applicationProperties:
  deploymentProperties:
    spring.cloud.deployer.kubernetes.createNodePort: 32123

24. Platform commands

24.1. List

The platform list command shows the list all the available deployment platform accounts.

An example output of platform list can be

skipper:>platform list
╔════════╤════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║  Name  │    Type    │                                                                         Description                                                                          ║
╠════════╪════════════╪══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║default │local       │ShutdownTimeout = [30], EnvVarsToInherit = [TMP,LANG,LANGUAGE,LC_.*,PATH], JavaCmd =                                                                          ║
║        │            │[/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java], WorkingDirectoriesRoot = [/var/folders/t3/qf1wkpwj4lgd9gjccwk0wr7h0000gp/T], ║
║        │            │DeleteFilesOnExit = [true]                                                                                                                                    ║
║cf-dev  │cloudfoundry│org = [scdf-ci], space = [ilaya-space], url = [https://api.run.pivotal.io]                                                                                    ║
║minikube│kubernetes  │master url = [https://192.168.99.101:8443/], namespace = [default], api version = [v1]                                                                        ║
╚════════╧════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

25. Repository commands

25.1. List

You can list add or delete a repository using the commands repo add, repo delete and repo list

An example output of repo list is shown below

skipper:>repo list
╔════════════╤═══════════════════════════════════════════════════════════╤═════╤═════╗
║    Name    │                            URL                            │Local│Order║
╠════════════╪═══════════════════════════════════════════════════════════╪═════╪═════╣
║experimental│http://skipper-repository.cfapps.io/repository/experimental│false│0    ║
║local       │http://10.55.13.45:7577                                    │true │1    ║
╚════════════╧═══════════════════════════════════════════════════════════╧═════╧═════╝

If a repository is local, it is backed by Skipper’s database and you will be able to upload packages to the repository. If it is not local, it is a remote repository and you are only able to read packages. The packages in a remote repository are updated outside of Skipper’s control. The 1.0 release only polls the remote repository for contents upon server startup. Follow issue GH-262 for more on adding support for dynamic updating of remote repository metadata.

26. Skipper Server commands

26.1. Config

This command configures the shell to reference the HTTP API endpoint of the Skipper Server.

skipper:>skipper config --uri https://localhost:8443/api

When using OAuth, you can use the username and password options

From within the Skipper Shell you can also provide credentials using:

skipper:> skipper config --uri https://localhost:7577/api --username my_username --password my_password

See the section Security for more information.

26.2. Info

This command shows which server version is being used

skipper:>info
Spring Cloud Skipper Server v1.0.0.1.0.0.RC1

Architecture

Skipper uses a basic client server architecture. The server exposes a REST API that is used by the interactive shell. You can brose the API using familiar HTTP client tools. The server persists Package Metadata and Release state in a relational database.

Platforms are defined using using the property prefix spring.cloud.skipper.server.platform. For each of the supported platforms, cloudfoundry, 'kubernetes’ and local, you can define multiple accounts. Each account maps onto an instance of a Spring Cloud Deployer implementation which is responsible for deploying the applications. The Installation shows more details but it is important to note that the Skipper server is not tied to a deploying to a single platform. Wherever Skipper is running, it can be configured to deploy to any platform. For example, if Skipper is deployed on Cloud Foundry, you can still register accounts for Kubernetes and deploy apps to Kubernetes from Cloud Foundry.

The release workflow is currently a hard-coded workflow managed by the Spring Cloud State Machine project. The state of the State Machine is persisted in a relational database.

REST API Guide

In this section you will learn all about the Spring Cloud Skipper REST API.

27. Overview

Spring Cloud Skipper provides a REST API allowing you to access all aspects of the server. In fact the Spring Cloud Skipper Shell is a first-class consumer of that API.

27.1. HTTP verbs

Spring Cloud Skipper tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

Verb Usage

GET

Used to retrieve a resource

POST

Used to create a new resource

PUT

Used to update an existing resource, including partial updates. Also used for resources that imply the concept of restarts.

DELETE

Used to delete an existing resource

27.2. HTTP status codes

RESTful note tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

The request completed successfully

201 Created

A new resource has been created successfully. The resource’s URI is available from the response’s Location header

204 No Content

An update to an existing resource has been applied successfully

400 Bad Request

The request was malformed. The response body will include an error providing further information

404 Not Found

The requested resource did not exist

27.3. Headers

Every response has the following header(s):

Name Description

Content-Type

The Content-Type of the payload, e.g. application/hal+json

27.4. Errors

Path Type Description

error

String

The HTTP error that occurred, e.g. Bad Request

message

String

A description of the cause of the error

path

String

The path to which the request was made

status

Number

The HTTP status code, e.g. 400

timestamp

Number

The time, in milliseconds, at which the error occurred

27.5. Hypermedia

Spring Cloud Skipper uses hypermedia and resources include links to other resources in their responses. Responses are in Hypertext Application from resource to resource Language (HAL) format. Links can be found beneath the _links key. Users of the API should not create URIs themselves, instead they should use the above-described links to navigate.

28. Resources

28.1. Index

The index provides the entry point into Spring Cloud Skipper’s REST API.

28.1.1. Accessing the index

A GET request is used to access the index

Request structure
GET /api HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api' -i
Example response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 1366

{
  "_links" : {
    "jpaRepositoryStates" : {
      "href" : "http://localhost:7577/api/jpaRepositoryStates"
    },
    "releases" : {
      "href" : "http://localhost:7577/api/releases{?page,size,sort}",
      "templated" : true
    },
    "repositories" : {
      "href" : "http://localhost:7577/api/repositories{?page,size,sort}",
      "templated" : true
    },
    "jpaRepositoryTransitions" : {
      "href" : "http://localhost:7577/api/jpaRepositoryTransitions"
    },
    "deployers" : {
      "href" : "http://localhost:7577/api/deployers{?page,size,sort}",
      "templated" : true
    },
    "jpaRepositoryGuards" : {
      "href" : "http://localhost:7577/api/jpaRepositoryGuards"
    },
    "packageMetadata" : {
      "href" : "http://localhost:7577/api/packageMetadata{?page,size,sort,projection}",
      "templated" : true
    },
    "jpaRepositoryStateMachines" : {
      "href" : "http://localhost:7577/api/jpaRepositoryStateMachines"
    },
    "jpaRepositoryActions" : {
      "href" : "http://localhost:7577/api/jpaRepositoryActions"
    },
    "about" : {
      "href" : "http://localhost:7577/api/about"
    },
    "release" : {
      "href" : "http://localhost:7577/api/release"
    },
    "package" : {
      "href" : "http://localhost:7577/api/package"
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile"
    }
  }
}

The main element of the index are the links as they allow you to traverse the API and execute the desired functionality:

Relation Description

repositories

Exposes 'package repository' repository

deployers

Exposes deployer repository

packageMetadata

Exposes package metadata repository

releases

Exposes release repository

profile

Entrypoint to provide ALPS metadata defining simple descriptions of application-level semantics

about

Provides meta information of the server

release

Exposes release resource

package

Exposes package resource

28.2. Server

The Server resource exposes build and version information of the server.

28.2.1. Server info

A GET request will return meta information for Spring Cloud Skipper. This includes:

  • Server name, typically spring-cloud-skipper-server

  • Version of the server, e.g. 1.0.0.RC1

Request structure
GET /api/about HTTP/1.1
Accept: application/json
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/about' -i \
    -H 'Accept: application/json'
Response structure
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 260

{
  "versionInfo" : {
    "server" : {
      "name" : "Spring Cloud Skipper Server",
      "version" : "fake-server-version"
    },
    "shell" : {
      "name" : "Spring Cloud Skipper Shell",
      "version" : "fake-shell-version"
    }
  },
  "links" : [ ]
}
Response fields
Path Type Description

versionInfo.server.name

String

Spring Cloud Skipper Server dependency.

versionInfo.server.version

String

Spring Cloud Skipper Server dependency version.

versionInfo.shell.name

String

Spring Cloud Skipper Shell dependency.

versionInfo.shell.version

String

Spring Cloud Skipper Shell dependency version.

links

Array

Links.

28.3. Platforms

The Platforms (or Platform Deployer) resource is what is exported from the Spring Data Repository DeployerRepository and exposed by Spring Data REST.

28.3.1. Find All

A GET request will return a paginated list for all the Spring Cloud Skipper platform deployers.

Request structure
GET /api/deployers?page=0&size=10 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/deployers?page=0&size=10' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 983

{
  "_embedded" : {
    "deployers" : [ {
      "name" : "default",
      "type" : "local",
      "description" : "ShutdownTimeout = [30], EnvVarsToInherit = [TMP,LANG,LANGUAGE,LC_.*,PATH], JavaCmd = [/opt/jdk1.8.0_144/jre/bin/java], WorkingDirectoriesRoot = [/tmp], DeleteFilesOnExit = [true]",
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/deployers/428bb5d7-d392-450e-9142-a4ccc5faea10"
        },
        "deployer" : {
          "href" : "http://localhost:7577/api/deployers/428bb5d7-d392-450e-9142-a4ccc5faea10"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/deployers{&sort}",
      "templated" : true
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/deployers"
    },
    "search" : {
      "href" : "http://localhost:7577/api/deployers/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}
Response fields
Path Type Description

page

Object

Pagination properties

page.size

Number

The size of the page being returned

page.totalElements

Number

Total elements available for pagination

page.totalPages

Number

Total amount of pages

page.number

Number

Page number of the page returned (zero-based)

_embedded.deployers

Array

Array containing Deployer objects

_embedded.deployers[].name

String

Name of the deployer

_embedded.deployers[].type

String

Type of the deployer (e.g. 'local')

_embedded.deployers[].description

String

Description providing some deployer properties

28.4. Packages

The Packages resource is what is exported from the Spring Data Repository PackageMetadata and exposed by Spring Data REST.

A GET request will return a paginated list for all Spring Cloud Skipper package metadata.

Request structure
GET /api/packageMetadata?page=0&size=10 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/packageMetadata?page=0&size=10' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 8872

{
  "_embedded" : {
    "packageMetadata" : [ {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/1"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/1{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/1"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.1.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/2"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/2{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/2"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "2.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/3"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/3{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/3"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "time",
      "displayName" : null,
      "version" : "2.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/time/tree/v1.2.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "time, source",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The time source periodically emits a timestamp string.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/4"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/4{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/4"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "ticktock",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://example.com/dataflow/ticktock",
      "packageHomeUrl" : "http://example.com/dataflow/ticktock",
      "tags" : "stream, time, log",
      "maintainer" : "https://github.com/markpollack",
      "description" : "The ticktock stream sends a time stamp and logs the value.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/5"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/5{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/5"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log-docker",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.1.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "Docker version of the log sink application",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/6"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/6{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/6"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log-docker",
      "displayName" : null,
      "version" : "2.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "Docker version of the log sink application",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/7"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/7{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/7"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "helloworld-docker",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.1.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "helloworld",
      "maintainer" : "https://github.com/markpollack",
      "description" : "The hello world app says hello.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/8"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/8{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/8"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/packageMetadata{&sort,projection}",
      "templated" : true
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/packageMetadata"
    },
    "search" : {
      "href" : "http://localhost:7577/api/packageMetadata/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 8,
    "totalPages" : 1,
    "number" : 0
  }
}
Response fields
Path Type Description

page

Object

Pagination properties

page.size

Number

The size of the page being returned

page.totalElements

Number

Total elements available for pagination

page.totalPages

Number

Total amount of pages

page.number

Number

Page number of the page returned (zero-based)

_embedded.packageMetadata

Array

Contains a collection of Package Metadata items

_embedded.packageMetadata[].apiVersion

String

The Package Index spec version this file is based on

_embedded.packageMetadata[].origin

String

Indicates the origin of the repository (free form text)

_embedded.packageMetadata[].repositoryId

Number

The repository ID this Package belongs to

_embedded.packageMetadata[].repositoryName

String

The repository name this Package belongs to.

_embedded.packageMetadata[].kind

String

What type of package system is being used

_embedded.packageMetadata[].name

String

The name of the package

_embedded.packageMetadata[].displayName

Null

Display name of the release

_embedded.packageMetadata[].version

String

The version of the package

_embedded.packageMetadata[].packageSourceUrl

String

Location to source code for this package

_embedded.packageMetadata[].packageHomeUrl

String

The home page of the package

_embedded.packageMetadata[].tags

String

A comma separated list of tags to use for searching

_embedded.packageMetadata[].maintainer

String

Who is maintaining this package

_embedded.packageMetadata[].description

String

Brief description of the package

_embedded.packageMetadata[].sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

_embedded.packageMetadata[].iconUrl

Null

Url location of a icon

28.4.2. Search with details

A GET request will return details of a package using the id of the package.

Request structure
GET /api/packageMetadata/1 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/packageMetadata/1' -i
Response structure
HTTP/1.1 200 OK
ETag: "1"
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 953

{
  "apiVersion" : "skipper.spring.io/v1",
  "origin" : "samples-package-repository",
  "repositoryId" : 1,
  "repositoryName" : "test",
  "kind" : "SkipperPackageMetadata",
  "name" : "log",
  "displayName" : null,
  "version" : "1.0.0",
  "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
  "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
  "tags" : "logging, sink",
  "maintainer" : "https://github.com/sobychacko",
  "description" : "The log sink uses the application logger to output the data for inspection.",
  "sha256" : null,
  "iconUrl" : null,
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/packageMetadata/1"
    },
    "packageMetadata" : {
      "href" : "http://localhost:7577/api/packageMetadata/1{?projection}",
      "templated" : true
    },
    "install" : {
      "href" : "http://localhost:7577/api/package/install/1"
    }
  }
}
Response fields
Path Type Description

apiVersion

String

The Package Index spec version this file is based on

origin

String

Indicates the origin of the repository (free form text)

repositoryId

Number

The repository ID this Package belongs to.

repositoryName

String

The repository name this Package belongs to.

kind

String

What type of package system is being used

name

String

The name of the package

displayName

Null

The display name of the package

version

String

The version of the package

packageSourceUrl

String

Location to source code for this package

packageHomeUrl

String

The home page of the package

tags

String

A comma separated list of tags to use for searching

maintainer

String

Who is maintaining this package

description

String

Brief description of the package

sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

iconUrl

Null

Url location of a icon

28.5. Package

The Package resource maps onto the PackageController for uploading and installing packages

28.5.1. Upload

Upload a package into a the local database backed repository.

Request structure
POST /api/package/upload HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
Content-Length: 2155

{
  "name" : "log",
  "repoName" : "local",
  "version" : "9.9.9",
  "extension" : "zip",
  "packageFileAsBytes" : "UEsDBAoAAAAAABirQ0sAAAAAAAAAAAAAAAAKABwAbG9nLTkuOS45L1VUCQADXzjUWWM41Fl1eAsAAQToAwAABOgDAABQSwMEFAAAAAgAGKtDS8fRN6fRAAAAKQEAABQAHABsb2ctOS45LjkvdmFsdWVzLnltbFVUCQADXzjUWV841Fl1eAsAAQToAwAABOgDAAB1Tjtrw0AM3u9XCDz70ma8zRDTJe3QdOko27J75F7odC4l5L9XtHQsCIT0PTs40YotCOwYGlVYM8PtljDS/W46ePvwFXQQ3ofnc69oRBFaYPWBrBJONAdkUjl7nII6SIaJoGCtSvNJz6/cGIRiCShUzU5cfU4OHu3RPtjX8TwOl9FEElxQ0BmAObckSjAdU1X1TNVpGIS8/WyAv/8T51aGtLxoYwcRd0rucMi82VrYp21lBT4zX+0ccltsFSaMFktxatZXn6494zR5+fX9p5z5BlBLAwQUAAAACABggjhLl0n3puQAAACOAQAAFQAcAGxvZy05LjkuOS9wYWNrYWdlLnltbFVUCQADNBPIWTg41Fl1eAsAAQToAwAABOgDAACFj7FOxDAMhvc8RR6AJhwb3RgqMTDdAbsvNa3VNo4SpxJvjxsELCehyFJkff5+GxK9Yy7Esbf7ySwUx96WhVLCbCJs2NuVJ7P/MI9On4GUfqdO7sHdu/PwMjxdBpMgLDDhhWsO+JbX3s4iqfTeTyRzvbrAmy8pU5y6sHIduyIZYetUqV/Iol6vkV7b6Peb9mfe/tyqbiL3bXXE//uNwFTaZZOCd7ZQXMwGFEUL8+2l+foZZl2AzYglZErS7n+d8RA1h60FixXtaNxKAQ6kxWC2wparpCoNGEHAfnC2FEvCcIDOfAFQSwMECgAAAAAAGKtDSwAAAAAAAAAAAAAAABQAHABsb2ctOS45LjkvdGVtcGxhdGVzL1VUCQADXzjUWWM41Fl1eAsAAQToAwAABOgDAABQSwMEFAAAAAgAGKtDS+YXM8/oAAAAQAIAABsAHABsb2ctOS45LjkvdGVtcGxhdGVzL2xvZy55bWxVVAkAA1841FlfONRZdXgLAAEE6AMAAAToAwAApVA9a8MwEN39KwSdI9NVW7MXCoHuF/liVNu64yQ7GOP/3pODA4WUtnSTnp7eF3B4R0mBojOpC8wo9fRcdSE2zpxYQmyPRPmFuRowQwMZXGVMhAGd6anVs6cxZmeWZSfYDVlXfcszKy+F2FWJ0ZevgolG8QoPMGF0dU3S2rRZXUR1rySd9T2NjU1ZEAYLzE69DkXnIHA+h+yWZbrl3nx20dc94//EP0Dcve5XJ6X3wUPW+5uQzpUDptLL6AJPpaR9SLEYs8wnvO1SyB3O61p2m6Af8Q7Xv9VokHuaB8W+C/KI8cccP0l8AlBLAQIeAwoAAAAAABirQ0sAAAAAAAAAAAAAAAAKABgAAAAAAAAAEAD9QQAAAABsb2ctOS45LjkvVVQFAANfONRZdXgLAAEE6AMAAAToAwAAUEsBAh4DFAAAAAgAGKtDS8fRN6fRAAAAKQEAABQAGAAAAAAAAQAAALSBRAAAAGxvZy05LjkuOS92YWx1ZXMueW1sVVQFAANfONRZdXgLAAEE6AMAAAToAwAAUEsBAh4DFAAAAAgAYII4S5dJ96bkAAAAjgEAABUAGAAAAAAAAQAAALSBYwEAAGxvZy05LjkuOS9wYWNrYWdlLnltbFVUBQADNBPIWXV4CwABBOgDAAAE6AMAAFBLAQIeAwoAAAAAABirQ0sAAAAAAAAAAAAAAAAUABgAAAAAAAAAEAD9QZYCAABsb2ctOS45LjkvdGVtcGxhdGVzL1VUBQADXzjUWXV4CwABBOgDAAAE6AMAAFBLAQIeAxQAAAAIABirQ0vmFzPP6AAAAEACAAAbABgAAAAAAAEAAAC0geQCAABsb2ctOS45LjkvdGVtcGxhdGVzL2xvZy55bWxVVAUAA1841Fl1eAsAAQToAwAABOgDAABQSwUGAAAAAAUABQDAAQAAIQQAAAAA"
}
Example request
$ curl 'http://localhost:7577/api/package/upload' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "name" : "log",
  "repoName" : "local",
  "version" : "9.9.9",
  "extension" : "zip",
  "packageFileAsBytes" : "UEsDBAoAAAAAABirQ0sAAAAAAAAAAAAAAAAKABwAbG9nLTkuOS45L1VUCQADXzjUWWM41Fl1eAsAAQToAwAABOgDAABQSwMEFAAAAAgAGKtDS8fRN6fRAAAAKQEAABQAHABsb2ctOS45LjkvdmFsdWVzLnltbFVUCQADXzjUWV841Fl1eAsAAQToAwAABOgDAAB1Tjtrw0AM3u9XCDz70ma8zRDTJe3QdOko27J75F7odC4l5L9XtHQsCIT0PTs40YotCOwYGlVYM8PtljDS/W46ePvwFXQQ3ofnc69oRBFaYPWBrBJONAdkUjl7nII6SIaJoGCtSvNJz6/cGIRiCShUzU5cfU4OHu3RPtjX8TwOl9FEElxQ0BmAObckSjAdU1X1TNVpGIS8/WyAv/8T51aGtLxoYwcRd0rucMi82VrYp21lBT4zX+0ccltsFSaMFktxatZXn6494zR5+fX9p5z5BlBLAwQUAAAACABggjhLl0n3puQAAACOAQAAFQAcAGxvZy05LjkuOS9wYWNrYWdlLnltbFVUCQADNBPIWTg41Fl1eAsAAQToAwAABOgDAACFj7FOxDAMhvc8RR6AJhwb3RgqMTDdAbsvNa3VNo4SpxJvjxsELCehyFJkff5+GxK9Yy7Esbf7ySwUx96WhVLCbCJs2NuVJ7P/MI9On4GUfqdO7sHdu/PwMjxdBpMgLDDhhWsO+JbX3s4iqfTeTyRzvbrAmy8pU5y6sHIduyIZYetUqV/Iol6vkV7b6Peb9mfe/tyqbiL3bXXE//uNwFTaZZOCd7ZQXMwGFEUL8+2l+foZZl2AzYglZErS7n+d8RA1h60FixXtaNxKAQ6kxWC2wparpCoNGEHAfnC2FEvCcIDOfAFQSwMECgAAAAAAGKtDSwAAAAAAAAAAAAAAABQAHABsb2ctOS45LjkvdGVtcGxhdGVzL1VUCQADXzjUWWM41Fl1eAsAAQToAwAABOgDAABQSwMEFAAAAAgAGKtDS+YXM8/oAAAAQAIAABsAHABsb2ctOS45LjkvdGVtcGxhdGVzL2xvZy55bWxVVAkAA1841FlfONRZdXgLAAEE6AMAAAToAwAApVA9a8MwEN39KwSdI9NVW7MXCoHuF/liVNu64yQ7GOP/3pODA4WUtnSTnp7eF3B4R0mBojOpC8wo9fRcdSE2zpxYQmyPRPmFuRowQwMZXGVMhAGd6anVs6cxZmeWZSfYDVlXfcszKy+F2FWJ0ZevgolG8QoPMGF0dU3S2rRZXUR1rySd9T2NjU1ZEAYLzE69DkXnIHA+h+yWZbrl3nx20dc94//EP0Dcve5XJ6X3wUPW+5uQzpUDptLL6AJPpaR9SLEYs8wnvO1SyB3O61p2m6Af8Q7Xv9VokHuaB8W+C/KI8cccP0l8AlBLAQIeAwoAAAAAABirQ0sAAAAAAAAAAAAAAAAKABgAAAAAAAAAEAD9QQAAAABsb2ctOS45LjkvVVQFAANfONRZdXgLAAEE6AMAAAToAwAAUEsBAh4DFAAAAAgAGKtDS8fRN6fRAAAAKQEAABQAGAAAAAAAAQAAALSBRAAAAGxvZy05LjkuOS92YWx1ZXMueW1sVVQFAANfONRZdXgLAAEE6AMAAAToAwAAUEsBAh4DFAAAAAgAYII4S5dJ96bkAAAAjgEAABUAGAAAAAAAAQAAALSBYwEAAGxvZy05LjkuOS9wYWNrYWdlLnltbFVUBQADNBPIWXV4CwABBOgDAAAE6AMAAFBLAQIeAwoAAAAAABirQ0sAAAAAAAAAAAAAAAAUABgAAAAAAAAAEAD9QZYCAABsb2ctOS45LjkvdGVtcGxhdGVzL1VUBQADXzjUWXV4CwABBOgDAAAE6AMAAFBLAQIeAxQAAAAIABirQ0vmFzPP6AAAAEACAAAbABgAAAAAAAEAAAC0geQCAABsb2ctOS45LjkvdGVtcGxhdGVzL2xvZy55bWxVVAUAA1841Fl1eAsAAQToAwAABOgDAABQSwUGAAAAAAUABQDAAQAAIQQAAAAA"
}'
Response structure
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 683

{
  "apiVersion" : "v1",
  "origin" : null,
  "repositoryId" : 2,
  "repositoryName" : "local",
  "kind" : "skipper",
  "name" : "log",
  "displayName" : null,
  "version" : "9.9.9",
  "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RELEASE",
  "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
  "tags" : "logging, sink",
  "maintainer" : "https://github.com/sobychacko",
  "description" : "The log sink uses the application logger to output the data for inspection.",
  "sha256" : null,
  "iconUrl" : null,
  "links" : [ {
    "rel" : "install",
    "href" : "http://localhost:7577/api/package/install"
  } ]
}
Response fields
Path Type Description

apiVersion

String

The Package Index spec version this file is based on

origin

Null

Indicates the origin of the repository (free form text)

repositoryId

Number

The repository ID this Package belongs to.

repositoryName

String

The repository nane this Package belongs to.

kind

String

What type of package system is being used

name

String

The name of the package

displayName

Null

The display name of the package

version

String

The version of the package

packageSourceUrl

String

Location to source code for this package

packageHomeUrl

String

The home page of the package

tags

String

A comma separated list of tags to use for searching

maintainer

String

Who is maintaining this package

description

String

Brief description of the package

sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

iconUrl

Null

Url location of a icon

28.5.2. Install

Install a package (identified by the InstallRequest) into the target platform.

Request structure
POST /api/package/install HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
Content-Length: 223

{
  "packageIdentifier" : {
    "repositoryName" : "notused",
    "packageName" : "log",
    "packageVersion" : "1.0.0"
  },
  "installProperties" : {
    "releaseName" : "myLogRelease",
    "platformName" : "default"
  }
}
Example request
$ curl 'http://localhost:7577/api/package/install' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "packageIdentifier" : {
    "repositoryName" : "notused",
    "packageName" : "log",
    "packageVersion" : "1.0.0"
  },
  "installProperties" : {
    "releaseName" : "myLogRelease",
    "platformName" : "default"
  }
}'
Response structure
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 3117

{
  "name" : "myLogRelease",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DEPLOYED",
      "platformStatus" : "[{\"deploymentId\":\"myLogRelease.log-v1\",\"instances\":{\"myLogRelease.log-v1-0\":{\"instanceNumber\":0,\"baseUrl\":\"http://10.194.6.14:53272\",\"process\":{\"errorStream\":{},\"outputStream\":{},\"alive\":true,\"inputStream\":{}},\"attributes\":{\"guid\":\"53272\",\"pid\":\"28063\",\"port\":\"53272\",\"stderr\":\"/tmp/spring-cloud-dataflow-7825501106328115326/myLogRelease-1516340524760/myLogRelease.log-v1/stderr_0.log\",\"stdout\":\"/tmp/spring-cloud-dataflow-7825501106328115326/myLogRelease-1516340524760/myLogRelease.log-v1/stdout_0.log\",\"url\":\"http://10.194.6.14:53272\",\"working.dir\":\"/tmp/spring-cloud-dataflow-7825501106328115326/myLogRelease-1516340524760/myLogRelease.log-v1\"},\"id\":\"myLogRelease.log-v1-0\",\"state\":\"deploying\"}},\"state\":\"deploying\"}]"
    },
    "firstDeployed" : 1516340524751,
    "lastDeployed" : 1516340524751,
    "deleted" : null,
    "description" : "Install complete"
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: {{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : null
  },
  "manifest" : {
    "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.2.0.RC1\n  applicationProperties:\n  deploymentProperties:\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
Response fields
Path Type Description

name

String

Name of the release

version

Number

Version of the release

info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

info.status.platformStatus

String

Status from the underlying platform

info.firstDeployed

Number

Date/Time of first deployment

info.lastDeployed

Number

Date/Time of last deployment

info.deleted

Null

Date/Time of when the release was deleted

info.description

String

Human-friendly 'log entry' about this release

pkg.metadata.origin

String

Indicates the origin of the repository (free form text)

pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

pkg.metadata.repositoryId

Number

The repository ID this Package belongs to

pkg.metadata.repositoryName

String

The repository name this Package belongs to.

pkg.metadata.kind

String

What type of package system is being used

pkg.metadata.name

String

The name of the package

pkg.metadata.displayName

Null

Display name of the release

pkg.metadata.version

String

The version of the package

pkg.metadata.packageSourceUrl

String

Location to source code for this package

pkg.metadata.packageHomeUrl

String

The home page of the package

pkg.metadata.tags

String

A comma separated list of tags to use for searching

pkg.metadata.maintainer

String

Who is maintaining this package

pkg.metadata.description

String

Brief description of the package

pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

pkg.metadata.iconUrl

Null

Url location of a icon

pkg.templates[].name

String

Name is the path-like name of the template

pkg.templates[].data

String

Data is the template as string data

pkg.dependencies

Array

The packages that this package depends upon

pkg.configValues.raw

String

The raw YAML string of configuration values

pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

configValues.raw

Null

The raw YAML string of configuration values

manifest.data

String

The manifest of the release

platformName

String

Platform name of the release

28.5.3. Install with id

Install a package identified by its ID into the target platform.

Request structure
POST /api/package/install/2 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
Content-Length: 87

{
  "releaseName" : "myLogReleaseWithInstallProperties",
  "platformName" : "default"
}
Example request
$ curl 'http://localhost:7577/api/package/install/2' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "releaseName" : "myLogReleaseWithInstallProperties",
  "platformName" : "default"
}'
Response structure
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 3325

{
  "name" : "myLogReleaseWithInstallProperties",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DEPLOYED",
      "platformStatus" : "[{\"deploymentId\":\"myLogReleaseWithInstallProperties.log-v1\",\"instances\":{\"myLogReleaseWithInstallProperties.log-v1-0\":{\"instanceNumber\":0,\"baseUrl\":\"http://10.194.6.14:9051\",\"process\":{\"errorStream\":{},\"outputStream\":{},\"alive\":true,\"inputStream\":{}},\"attributes\":{\"guid\":\"9051\",\"pid\":\"28140\",\"port\":\"9051\",\"stderr\":\"/tmp/spring-cloud-dataflow-7825501106328115326/myLogReleaseWithInstallProperties-1516340540052/myLogReleaseWithInstallProperties.log-v1/stderr_0.log\",\"stdout\":\"/tmp/spring-cloud-dataflow-7825501106328115326/myLogReleaseWithInstallProperties-1516340540052/myLogReleaseWithInstallProperties.log-v1/stdout_0.log\",\"url\":\"http://10.194.6.14:9051\",\"working.dir\":\"/tmp/spring-cloud-dataflow-7825501106328115326/myLogReleaseWithInstallProperties-1516340540052/myLogReleaseWithInstallProperties.log-v1\"},\"id\":\"myLogReleaseWithInstallProperties.log-v1-0\",\"state\":\"deploying\"}},\"state\":\"deploying\"}]"
    },
    "firstDeployed" : 1516340540045,
    "lastDeployed" : 1516340540045,
    "deleted" : null,
    "description" : "Install complete"
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.1.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: {{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.3.0.M1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : null
  },
  "manifest" : {
    "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.3.0.M1\n  applicationProperties:\n  deploymentProperties:\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
Response fields
Path Type Description

name

String

Name of the release

version

Number

Version of the release

info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

info.status.platformStatus

String

Status from the underlying platform

info.firstDeployed

Number

Date/Time of first deployment

info.lastDeployed

Number

Date/Time of last deployment

info.deleted

Null

Date/Time of when the release was deleted

info.description

String

Human-friendly 'log entry' about this release

pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

pkg.metadata.origin

String

Indicates the origin of the repository (free form text)

pkg.metadata.repositoryId

Number

The repository ID this Package belongs to

pkg.metadata.repositoryName

String

The repository name this Package belongs to.

pkg.metadata.kind

String

What type of package system is being used

pkg.metadata.name

String

The name of the package

pkg.metadata.displayName

Null

Display name of the release

pkg.metadata.version

String

The version of the package

pkg.metadata.packageSourceUrl

String

Location to source code for this package

pkg.metadata.packageHomeUrl

String

The home page of the package

pkg.metadata.tags

String

A comma separated list of tags to use for searching

pkg.metadata.maintainer

String

Who is maintaining this package

pkg.metadata.description

String

Brief description of the package

pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

pkg.metadata.iconUrl

Null

Url location of a icon

pkg.templates[].name

String

Name is the path-like name of the template

pkg.templates[].data

String

Data is the template as string data

pkg.dependencies

Array

The packages that this package depends upon

pkg.configValues.raw

String

The raw YAML string of configuration values

pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

configValues.raw

Null

The raw YAML string of configuration values

manifest.data

String

The manifest of the release

platformName

String

Platform name of the release

28.6. Repositories

The Repositories resource is what is exported from the Spring Data Repository RepositoryRepository (yes, funnyn name) and exposed by Spring Data REST.

28.6.1. Find All

A GET request will return a paginated list for all Spring Cloud Skipper repositories.

Request structure
GET /api/repositories?page=0&size=10 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/repositories?page=0&size=10' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 1321

{
  "_embedded" : {
    "repositories" : [ {
      "name" : "test",
      "url" : "classpath:/repositories/binaries/test",
      "sourceUrl" : null,
      "local" : false,
      "description" : "test repository with a few packages",
      "repoOrder" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/repositories/1"
        },
        "repository" : {
          "href" : "http://localhost:7577/api/repositories/1"
        }
      }
    }, {
      "name" : "local",
      "url" : "http://localhost:7577",
      "sourceUrl" : null,
      "local" : true,
      "description" : "Default local database backed repository",
      "repoOrder" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/repositories/2"
        },
        "repository" : {
          "href" : "http://localhost:7577/api/repositories/2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/repositories{&sort}",
      "templated" : true
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/repositories"
    },
    "search" : {
      "href" : "http://localhost:7577/api/repositories/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}
Response fields
Path Type Description

page

Object

Pagination properties

page.size

Number

The size of the page being returned

page.totalElements

Number

Total elements available for pagination

page.totalPages

Number

Total amount of pages

page.number

Number

Page number of the page returned (zero-based)

_embedded.repositories

Array

Contains a collection of Repositories

_embedded.repositories[].name

String

Name of the Repository

_embedded.repositories[].url

String

Url of the Repository

_embedded.repositories[].sourceUrl

Null

Source Url of the repository

_embedded.repositories[].description

String

Description of the Repository

_embedded.repositories[].local

Boolean

Is the repo local?

_embedded.repositories[].repoOrder

Null

Order of the Repository

28.6.2. Find By Name

A GET request will return a single Spring Cloud Skipper repositories.

Request structure
GET /api/repositories/search/findByName?name=local HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/repositories/search/findByName?name=local' -i
Response structure
HTTP/1.1 200 OK
ETag: "0"
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 366

{
  "name" : "local",
  "url" : "http://localhost:7577",
  "sourceUrl" : null,
  "local" : true,
  "description" : "Default local database backed repository",
  "repoOrder" : null,
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/repositories/2"
    },
    "repository" : {
      "href" : "http://localhost:7577/api/repositories/2"
    }
  }
}
Response fields
Path Type Description

name

String

Name of the Repository

url

String

URL of the Repository

description

String

Description of the Repository

local

Boolean

Is the repo local?

repoOrder

Null

Order of the Repository

sourceUrl

Null

Source URL of the repository

28.7. Releases

The Release resource is what is exported from the Spring Data Repository ReleaseRepository and exposed by Spring Data REST.

28.7.1. Find all

A GET request will return a paginated list for all Spring Cloud Skipper releases.

Find All Releases

Rollback the release to a previous or a specific release.

Request structure
GET /api/releases?page=0&size=10 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/releases?page=0&size=10' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 439

{
  "_embedded" : {
    "releases" : [ ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/releases{&sort}",
      "templated" : true
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/releases"
    },
    "search" : {
      "href" : "http://localhost:7577/api/releases/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 0,
    "totalPages" : 0,
    "number" : 0
  }
}
Response fields
Path Type Description

page

Object

Pagination properties

page.size

Number

The size of the page being returned

page.totalElements

Number

Total elements available for pagination

page.totalPages

Number

Total amount of pages

page.number

Number

Page number of the page returned (zero-based)

_embedded.releases

Array

Provides a list of releases

28.8. Release

The Release resource maps onto the ReleaseController for managing the lifecycle of a release.

28.8.1. List

List latest

List the latest version of releases with status of deployed or failed.

Request structure
GET /api/release/list HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/list' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 3400

{
  "_embedded" : {
    "releases" : [ {
      "name" : "myLogRelease",
      "version" : 1,
      "info" : {
        "status" : {
          "statusCode" : "DEPLOYED",
          "platformStatus" : "[{\"deploymentId\":\"myLogRelease.log-v1\",\"instances\":{\"myLogRelease.log-v1-0\":{\"instanceNumber\":0,\"baseUrl\":\"http://10.194.6.14:8487\",\"process\":{\"errorStream\":{},\"outputStream\":{},\"alive\":true,\"inputStream\":{}},\"attributes\":{\"guid\":\"8487\",\"pid\":\"27981\",\"port\":\"8487\",\"stderr\":\"/tmp/spring-cloud-dataflow-2171540607371142387/myLogRelease-1516340506368/myLogRelease.log-v1/stderr_0.log\",\"stdout\":\"/tmp/spring-cloud-dataflow-2171540607371142387/myLogRelease-1516340506368/myLogRelease.log-v1/stdout_0.log\",\"url\":\"http://10.194.6.14:8487\",\"working.dir\":\"/tmp/spring-cloud-dataflow-2171540607371142387/myLogRelease-1516340506368/myLogRelease.log-v1\"},\"id\":\"myLogRelease.log-v1-0\",\"state\":\"deployed\"}},\"state\":\"deployed\"}]"
        },
        "firstDeployed" : 1516340506359,
        "lastDeployed" : 1516340506359,
        "deleted" : null,
        "description" : "Install complete"
      },
      "pkg" : {
        "metadata" : {
          "apiVersion" : "skipper.spring.io/v1",
          "origin" : "samples-package-repository",
          "repositoryId" : 1,
          "repositoryName" : "test",
          "kind" : "SkipperPackageMetadata",
          "name" : "log",
          "displayName" : null,
          "version" : "1.0.0",
          "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
          "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
          "tags" : "logging, sink",
          "maintainer" : "https://github.com/sobychacko",
          "description" : "The log sink uses the application logger to output the data for inspection.",
          "sha256" : null,
          "iconUrl" : null
        },
        "templates" : [ {
          "name" : "log.yml",
          "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: {{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
        } ],
        "dependencies" : [ ],
        "configValues" : {
          "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
        },
        "fileHolders" : [ ]
      },
      "configValues" : {
        "raw" : null
      },
      "manifest" : {
        "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.2.0.RC1\n  applicationProperties:\n  deploymentProperties:\n"
      },
      "platformName" : "default",
      "_links" : {
        "status" : {
          "href" : "http://localhost:7577/api/release/status/{name}",
          "templated" : true
        }
      }
    } ]
  }
}
Response fields
Path Type Description

_embedded.releases[].name

String

Name of the release

_embedded.releases[].version

Number

Version of the release

_embedded.releases[].info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

_embedded.releases[].info.status.platformStatus

String

Status from the underlying platform

_embedded.releases[].info.firstDeployed

Number

Date/Time of first deployment

_embedded.releases[].info.lastDeployed

Number

Date/Time of last deployment

_embedded.releases[].info.deleted

Null

Date/Time of when the release was deleted

_embedded.releases[].info.description

String

Human-friendly 'log entry' about this release

_embedded.releases[].pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

_embedded.releases[].pkg.metadata.origin

String

Indicates the origin of the repository (free form text)

_embedded.releases[].pkg.metadata.repositoryId

Number

The repository ID this Package belongs to

_embedded.releases[].pkg.metadata.repositoryName

String

The repository name this Package belongs to.

_embedded.releases[].pkg.metadata.kind

String

What type of package system is being used

_embedded.releases[].pkg.metadata.name

String

The name of the package

_embedded.releases[].pkg.metadata.displayName

Null

Display name of the release

_embedded.releases[].pkg.metadata.version

String

The version of the package

_embedded.releases[].pkg.metadata.packageSourceUrl

String

Location to source code for this package

_embedded.releases[].pkg.metadata.packageHomeUrl

String

The home page of the package

_embedded.releases[].pkg.metadata.tags

String

A comma separated list of tags to use for searching

_embedded.releases[].pkg.metadata.maintainer

String

Who is maintaining this package

_embedded.releases[].pkg.metadata.description

String

Brief description of the package

_embedded.releases[].pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

_embedded.releases[].pkg.metadata.iconUrl

Null

Url location of a icon

_embedded.releases[].pkg.templates[].name

String

Name is the path-like name of the template

_embedded.releases[].pkg.templates[].data

String

Data is the template as string data

_embedded.releases[].pkg.dependencies

Array

The packages that this package depends upon

_embedded.releases[].pkg.configValues.raw

String

The raw YAML string of configuration values

_embedded.releases[].pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

_embedded.releases[].configValues.raw

Null

The raw YAML string of configuration values

_embedded.releases[].manifest.data

String

The manifest of the release

_embedded.releases[].platformName

String

Platform name of the release

List latest by name

List the latest version of releases with status of deployed or failed by the given release name.

Request structure
GET /api/release/list/myLogRelease2 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/list/myLogRelease2' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 3414

{
  "_embedded" : {
    "releases" : [ {
      "name" : "myLogRelease2",
      "version" : 1,
      "info" : {
        "status" : {
          "statusCode" : "DEPLOYED",
          "platformStatus" : "[{\"deploymentId\":\"myLogRelease2.log-v1\",\"instances\":{\"myLogRelease2.log-v1-0\":{\"instanceNumber\":0,\"baseUrl\":\"http://10.194.6.14:48182\",\"process\":{\"errorStream\":{},\"outputStream\":{},\"alive\":true,\"inputStream\":{}},\"attributes\":{\"guid\":\"48182\",\"pid\":\"27916\",\"port\":\"48182\",\"stderr\":\"/tmp/spring-cloud-dataflow-2171540607371142387/myLogRelease2-1516340490871/myLogRelease2.log-v1/stderr_0.log\",\"stdout\":\"/tmp/spring-cloud-dataflow-2171540607371142387/myLogRelease2-1516340490871/myLogRelease2.log-v1/stdout_0.log\",\"url\":\"http://10.194.6.14:48182\",\"working.dir\":\"/tmp/spring-cloud-dataflow-2171540607371142387/myLogRelease2-1516340490871/myLogRelease2.log-v1\"},\"id\":\"myLogRelease2.log-v1-0\",\"state\":\"deployed\"}},\"state\":\"deployed\"}]"
        },
        "firstDeployed" : 1516340490861,
        "lastDeployed" : 1516340490861,
        "deleted" : null,
        "description" : "Install complete"
      },
      "pkg" : {
        "metadata" : {
          "apiVersion" : "skipper.spring.io/v1",
          "origin" : "samples-package-repository",
          "repositoryId" : 1,
          "repositoryName" : "test",
          "kind" : "SkipperPackageMetadata",
          "name" : "log",
          "displayName" : null,
          "version" : "1.0.0",
          "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
          "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
          "tags" : "logging, sink",
          "maintainer" : "https://github.com/sobychacko",
          "description" : "The log sink uses the application logger to output the data for inspection.",
          "sha256" : null,
          "iconUrl" : null
        },
        "templates" : [ {
          "name" : "log.yml",
          "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: {{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
        } ],
        "dependencies" : [ ],
        "configValues" : {
          "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
        },
        "fileHolders" : [ ]
      },
      "configValues" : {
        "raw" : null
      },
      "manifest" : {
        "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.2.0.RC1\n  applicationProperties:\n  deploymentProperties:\n"
      },
      "platformName" : "default",
      "_links" : {
        "status" : {
          "href" : "http://localhost:7577/api/release/status/{name}",
          "templated" : true
        }
      }
    } ]
  }
}
Response fields
Path Type Description

_embedded.releases[].name

String

Name of the release

_embedded.releases[].version

Number

Version of the release

_embedded.releases[].info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

_embedded.releases[].info.status.platformStatus

String

Status from the underlying platform

_embedded.releases[].info.firstDeployed

Number

Date/Time of first deployment

_embedded.releases[].info.lastDeployed

Number

Date/Time of last deployment

_embedded.releases[].info.deleted

Null

Date/Time of when the release was deleted

_embedded.releases[].info.description

String

Human-friendly 'log entry' about this release

_embedded.releases[].pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

_embedded.releases[].pkg.metadata.origin

String

Indicates the origin of the repository (free form text)

_embedded.releases[].pkg.metadata.repositoryId

Number

The repository ID this Package belongs to

_embedded.releases[].pkg.metadata.repositoryName

String

The repository name this Package belongs to.

_embedded.releases[].pkg.metadata.kind

String

What type of package system is being used

_embedded.releases[].pkg.metadata.name

String

The name of the package

_embedded.releases[].pkg.metadata.displayName

Null

Display name of the release

_embedded.releases[].pkg.metadata.version

String

The version of the package

_embedded.releases[].pkg.metadata.packageSourceUrl

String

Location to source code for this package

_embedded.releases[].pkg.metadata.packageHomeUrl

String

The home page of the package

_embedded.releases[].pkg.metadata.tags

String

A comma separated list of tags to use for searching

_embedded.releases[].pkg.metadata.maintainer

String

Who is maintaining this package

_embedded.releases[].pkg.metadata.description

String

Brief description of the package

_embedded.releases[].pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

_embedded.releases[].pkg.metadata.iconUrl

Null

Url location of a icon

_embedded.releases[].pkg.templates[].name

String

Name is the path-like name of the template

_embedded.releases[].pkg.templates[].data

String

Data is the template as string data

_embedded.releases[].pkg.dependencies

Array

The packages that this package depends upon

_embedded.releases[].pkg.configValues.raw

String

The raw YAML string of configuration values

_embedded.releases[].pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

_embedded.releases[].configValues.raw

Null

The raw YAML string of configuration values

_embedded.releases[].manifest.data

String

The manifest of the release

_embedded.releases[].platformName

String

Platform name of the release

28.8.2. Status

Get the status of a release

This REST endpoint provides the status for the last known release version.

Request structure
GET /api/release/status/myLogRelease HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/status/myLogRelease' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 1122

{
  "status" : {
    "statusCode" : "DEPLOYED",
    "platformStatus" : "[{\"deploymentId\":\"myLogRelease.log-v1\",\"instances\":{\"myLogRelease.log-v1-0\":{\"instanceNumber\":0,\"baseUrl\":\"http://10.194.6.14:46313\",\"process\":{\"errorStream\":{},\"outputStream\":{},\"alive\":true,\"inputStream\":{}},\"attributes\":{\"guid\":\"46313\",\"pid\":\"27587\",\"port\":\"46313\",\"stderr\":\"/tmp/spring-cloud-dataflow-88559012869389124/myLogRelease-1516340392740/myLogRelease.log-v1/stderr_0.log\",\"stdout\":\"/tmp/spring-cloud-dataflow-88559012869389124/myLogRelease-1516340392740/myLogRelease.log-v1/stdout_0.log\",\"url\":\"http://10.194.6.14:46313\",\"working.dir\":\"/tmp/spring-cloud-dataflow-88559012869389124/myLogRelease-1516340392740/myLogRelease.log-v1\"},\"id\":\"myLogRelease.log-v1-0\",\"state\":\"deployed\"}},\"state\":\"deployed\"}]"
  },
  "firstDeployed" : 1516340392725,
  "lastDeployed" : 1516340392725,
  "deleted" : null,
  "description" : "Install complete",
  "_links" : {
    "manifest" : {
      "href" : "http://localhost:7577/api/release/manifest/{name}",
      "templated" : true
    }
  }
}
Response fields
Path Type Description

status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

status.platformStatus

String

Status from the underlying platform

firstDeployed

Number

Date/Time of first deployment

lastDeployed

Number

Date/Time of last deployment

deleted

Null

Date/Time of when the release was deleted

description

String

Human-friendly 'log entry' about this release

Status by version

This REST endpoint provides the status for a specific release version.

Request structure
GET /api/release/status/myLogRelease2/1 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/status/myLogRelease2/1' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 1131

{
  "status" : {
    "statusCode" : "DEPLOYED",
    "platformStatus" : "[{\"deploymentId\":\"myLogRelease2.log-v1\",\"instances\":{\"myLogRelease2.log-v1-0\":{\"instanceNumber\":0,\"baseUrl\":\"http://10.194.6.14:63828\",\"process\":{\"errorStream\":{},\"outputStream\":{},\"alive\":true,\"inputStream\":{}},\"attributes\":{\"guid\":\"63828\",\"pid\":\"27652\",\"port\":\"63828\",\"stderr\":\"/tmp/spring-cloud-dataflow-88559012869389124/myLogRelease2-1516340408189/myLogRelease2.log-v1/stderr_0.log\",\"stdout\":\"/tmp/spring-cloud-dataflow-88559012869389124/myLogRelease2-1516340408189/myLogRelease2.log-v1/stdout_0.log\",\"url\":\"http://10.194.6.14:63828\",\"working.dir\":\"/tmp/spring-cloud-dataflow-88559012869389124/myLogRelease2-1516340408189/myLogRelease2.log-v1\"},\"id\":\"myLogRelease2.log-v1-0\",\"state\":\"deployed\"}},\"state\":\"deployed\"}]"
  },
  "firstDeployed" : 1516340408181,
  "lastDeployed" : 1516340408181,
  "deleted" : null,
  "description" : "Install complete",
  "_links" : {
    "manifest" : {
      "href" : "http://localhost:7577/api/release/manifest/{name}",
      "templated" : true
    }
  }
}
Response fields
Path Type Description

status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

status.platformStatus

String

Status from the underlying platform

firstDeployed

Number

Date/Time of first deployment

lastDeployed

Number

Date/Time of last deployment

deleted

Null

Date/Time of when the release was deleted

description

String

Human-friendly 'log entry' about this release

28.8.3. Upgrade

Upgrade a release

Upgrade an existing release using the configured package and config values from the UpgradeRequest.

Request structure
POST /api/release/upgrade HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
Content-Length: 157

{
  "packageIdentifier" : {
    "packageName" : "log",
    "packageVersion" : "1.1.0"
  },
  "upgradeProperties" : {
    "releaseName" : "myLogRelease"
  }
}
Example request
$ curl 'http://localhost:7577/api/release/upgrade' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "packageIdentifier" : {
    "packageName" : "log",
    "packageVersion" : "1.1.0"
  },
  "upgradeProperties" : {
    "releaseName" : "myLogRelease"
  }
}'
Response structure
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 2342

{
  "name" : "myLogRelease",
  "version" : 2,
  "info" : {
    "status" : {
      "statusCode" : "UNKNOWN",
      "platformStatus" : null
    },
    "firstDeployed" : 1516340443460,
    "lastDeployed" : 1516340443460,
    "deleted" : null,
    "description" : "Upgrade install underway"
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.1.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: {{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.3.0.M1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : null
  },
  "manifest" : {
    "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.3.0.M1\n  applicationProperties:\n  deploymentProperties:\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
Response fields
Path Type Description

name

String

Name of the release

version

Number

Version of the release

info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

info.status.platformStatus

Null

Status from the underlying platform

info.firstDeployed

Number

Date/Time of first deployment

info.lastDeployed

Number

Date/Time of last deployment

info.deleted

Null

Date/Time of when the release was deleted

info.description

String

Human-friendly 'log entry' about this release

pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

pkg.metadata.origin

String

Indicates the origin of the repository (free form text)

pkg.metadata.repositoryId

Number

The repository ID this Package belongs to.

pkg.metadata.repositoryName

String

The repository name this Package belongs to.

pkg.metadata.kind

String

What type of package system is being used

pkg.metadata.name

String

The name of the package

pkg.metadata.displayName

Null

Display name of the release

pkg.metadata.version

String

The version of the package

pkg.metadata.packageSourceUrl

String

Location to source code for this package

pkg.metadata.packageHomeUrl

String

The home page of the package

pkg.metadata.tags

String

A comma separated list of tags to use for searching

pkg.metadata.maintainer

String

Who is maintaining this package

pkg.metadata.description

String

Brief description of the package

pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

pkg.metadata.iconUrl

Null

Url location of a icon

pkg.templates[].name

String

Name is the path-like name of the template

pkg.templates[].data

String

Data is the template as string data

pkg.dependencies

Array

The packages that this package depends upon

pkg.configValues.raw

String

The raw YAML string of configuration values

pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

configValues.raw

Null

The raw YAML string of configuration values

manifest.data

String

The manifest of the release

platformName

String

Platform name of the release

28.8.4. Rollback

Rollback release

Rollback the release to a previous or a specific release.

Request structure
POST /api/release/rollback/myLogRelease/1 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/rollback/myLogRelease/1' -i -X POST
Response structure
HTTP/1.1 201 Created
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 2366

{
  "name" : "myLogRelease",
  "version" : 3,
  "info" : {
    "status" : {
      "statusCode" : "UNKNOWN",
      "platformStatus" : null
    },
    "firstDeployed" : 1516340305939,
    "lastDeployed" : 1516340305939,
    "deleted" : null,
    "description" : "Initial install underway"
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: {{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : null
  },
  "manifest" : {
    "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.2.0.RC1\n  applicationProperties:\n  deploymentProperties:\n"
  },
  "platformName" : "default",
  "_links" : {
    "status" : {
      "href" : "http://localhost:7577/api/release/status/{name}",
      "templated" : true
    }
  }
}
Response fields
Path Type Description

name

String

Name of the release

version

Number

Version of the release

info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

info.status.platformStatus

Null

Status from the underlying platform

info.firstDeployed

Number

Date/Time of first deployment

info.lastDeployed

Number

Date/Time of last deployment

info.deleted

Null

Date/Time of when the release was deleted

info.description

String

Human-friendly 'log entry' about this release

pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

pkg.metadata.origin

String

Indicates the origin of the repository (free form text)

pkg.metadata.repositoryId

Number

The repository ID this Package belongs to.

pkg.metadata.repositoryName

String

The repository name this Package belongs to.

pkg.metadata.kind

String

What type of package system is being used

pkg.metadata.name

String

The name of the package

pkg.metadata.displayName

Null

Display name of the release

pkg.metadata.version

String

The version of the package

pkg.metadata.packageSourceUrl

String

Location to source code for this package

pkg.metadata.packageHomeUrl

String

The home page of the package

pkg.metadata.tags

String

A comma separated list of tags to use for searching

pkg.metadata.maintainer

String

Who is maintaining this package

pkg.metadata.description

String

Brief description of the package

pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

pkg.metadata.iconUrl

Null

Url location of a icon

pkg.templates[].name

String

Name is the path-like name of the template

pkg.templates[].data

String

Data is the template as string data

pkg.dependencies

Array

The packages that this package depends upon

pkg.configValues.raw

String

The raw YAML string of configuration values

pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

configValues.raw

Null

The raw YAML string of configuration values

manifest.data

String

The manifest of the release

platformName

String

Platform name of the release

28.8.5. Manifest

Get manifest

REST endpoint that returns the manifest for the last known release version.

Request structure
GET /api/release/manifest/myLogRelease HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/manifest/myLogRelease' -i \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json'
Response structure
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 415

{
  "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.2.0.RC1\n  applicationProperties:\n  deploymentProperties:\n",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
Get manifest by version

REST endpoint that returns the manifest for a specific release version.

Request structure
GET /api/release/manifest/myLogRelease2/1 HTTP/1.1
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/manifest/myLogRelease2/1' -i
Response structure
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 441

{
  "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.2.0.RC1\n  applicationProperties:\n  deploymentProperties:\n",
  "_links" : {
    "status" : {
      "href" : "http://localhost:7577/api/release/status/{name}",
      "templated" : true
    }
  }
}

28.8.6. Delete

Delete a release

Delete an existing release. This doesn’t uninstall the uploaded packages corresponding to the release.

Request structure
DELETE /api/release/myLogRelease1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/myLogRelease1' -i -X DELETE \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json'
Response structure
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2332

{
  "name" : "myLogRelease1",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : 1516340349990,
    "lastDeployed" : 1516340349990,
    "deleted" : null,
    "description" : "Delete complete"
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : "samples-package-repository",
      "repositoryId" : 1,
      "repositoryName" : "test",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: {{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : null
  },
  "manifest" : {
    "data" : "\n---\n# Source: log.yml\napiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  version: 1.2.0.RC1\n  applicationProperties:\n  deploymentProperties:\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
Response fields
Path Type Description

name

String

Name of the release

version

Number

Version of the release

info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

info.status.platformStatus

Null

Status from the underlying platform

info.firstDeployed

Number

Date/Time of first deployment

info.lastDeployed

Number

Date/Time of last deployment

info.deleted

Null

Date/Time of when the release was deleted

info.description

String

Human-friendly 'log entry' about this release

pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

pkg.metadata.origin

String

Indicates the origin of the repository (free form text)

pkg.metadata.repositoryId

Number

The repository ID this Package belongs to.

pkg.metadata.repositoryName

String

The repository name this Package belongs to.

pkg.metadata.kind

String

What type of package system is being used

pkg.metadata.name

String

The name of the package

pkg.metadata.displayName

Null

Display name of the release

pkg.metadata.version

String

The version of the package

pkg.metadata.packageSourceUrl

String

Location to source code for this package

pkg.metadata.packageHomeUrl

String

The home page of the package

pkg.metadata.tags

String

A comma separated list of tags to use for searching

pkg.metadata.maintainer

String

Who is maintaining this package

pkg.metadata.description

String

Brief description of the package

pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

pkg.metadata.iconUrl

Null

Url location of a icon

pkg.templates[].name

String

Name is the path-like name of the template

pkg.templates[].data

String

Data is the template as string data

pkg.dependencies

Array

The packages that this package depends upon

pkg.configValues.raw

String

The raw YAML string of configuration values

pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

configValues.raw

Null

The raw YAML string of configuration values

manifest.data

String

The manifest of the release

platformName

String

Platform name of the release

Delete a release and uninstall package

Delete an existing release and uninstall the installed packages corresponding to the release provided there are no other releases in active state use these packages.

Request structure
DELETE /api/release/myLogRelease/package HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
Example request
$ curl 'http://localhost:7577/api/release/myLogRelease/package' -i -X DELETE \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json'
Response structure
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2637

{
  "name" : "myLogRelease",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : 1516340334553,
    "lastDeployed" : 1516340334553,
    "deleted" : null,
    "description" : "Delete complete"
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "skipper",
      "name" : "mylog",
      "displayName" : null,
      "version" : "9.9.9",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RELEASE",
      "packageHomeUrl" : "http://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper/v1\nkind: SpringBootApp\nmetadata:\n  name: mylog\n  count: {{metadata.count}}\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit:{{version}}\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  applicationProperties:\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RELEASE\nmetadata:\n  count: 1\n#resources:\n#  log:\n#    resourceGroupAndName: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n#    version: 1.2.0.RELEASE\n\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : null
  },
  "manifest" : {
    "data" : "\n---\n# Source: log.yml\napiVersion: skipper/v1\nkind: SpringBootApp\nmetadata:\n  name: mylog\n  count: 1\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit:1.2.0.RELEASE\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RELEASE\n  applicationProperties:\n  deploymentProperties:\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
Response fields
Path Type Description

name

String

Name of the release

version

Number

Version of the release

info.status.statusCode

String

StatusCode of the release’s status (UNKNOWN,DEPLOYED,DELETED,FAILED)

info.status.platformStatus

Null

Status from the underlying platform

info.firstDeployed

Number

Date/Time of first deployment

info.lastDeployed

Number

Date/Time of last deployment

info.deleted

Null

Date/Time of when the release was deleted

info.description

String

Human-friendly 'log entry' about this release

pkg.metadata.apiVersion

String

The Package Index spec version this file is based on

pkg.metadata.origin

Null

Indicates the origin of the repository (free form text)

pkg.metadata.repositoryId

Number

The repository ID this Package belongs to.

pkg.metadata.repositoryName

String

The repository name this Package belongs to.

pkg.metadata.kind

String

What type of package system is being used

pkg.metadata.name

String

The name of the package

pkg.metadata.displayName

Null

Display name of the release

pkg.metadata.version

String

The version of the package

pkg.metadata.packageSourceUrl

String

Location to source code for this package

pkg.metadata.packageHomeUrl

String

The home page of the package

pkg.metadata.tags

String

A comma separated list of tags to use for searching

pkg.metadata.maintainer

String

Who is maintaining this package

pkg.metadata.description

String

Brief description of the package

pkg.metadata.sha256

Null

Hash of package binary that will be downloaded using SHA256 hash algorithm

pkg.metadata.iconUrl

Null

Url location of a icon

pkg.templates[].name

String

Name is the path-like name of the template

pkg.templates[].data

String

Data is the template as string data

pkg.dependencies

Array

The packages that this package depends upon

pkg.configValues.raw

String

The raw YAML string of configuration values

pkg.fileHolders

Array

Miscellaneous files in a package, e.g. README, LICENSE, etc.

configValues.raw

Null

The raw YAML string of configuration values

manifest.data

String

The manifest of the release

platformName

String

Platform name of the release

Appendices

Appendix A: Building

To build the source you will need to install JDK 1.8.

The build uses the Maven wrapper so you don’t have to install a specific version of Maven.

The main build command is

$ ./mvnw clean install

To create the executables and avoid running the tests and generating JavaDocs, use the command

$./mvnw clean package -DskipTests -Dmaven.javadoc.skip=true
You can also install Maven (>=3.3.3) yourself and run the mvn command in place of ./mvnw in the examples below. If you do that you also might need to add -P spring if your local Maven settings do not contain repository declarations for spring pre-release artifacts.
Be aware that you might need to increase the amount of memory available to Maven by setting a MAVEN_OPTS environment variable with a value like -Xmx512m -XX:MaxPermSize=128m. We try to cover this in the .mvn configuration, so if you find you have to do it to make a build succeed, please raise a ticket to get the settings added to source control.

A.1. Documentation

To generate just the REST Docs documentation, use the command

./mvnw test -pl spring-cloud-skipper-server-core -Dtest=*Documentation*

To build the asciidoctor documentation only, use the command

./mvnw package -DskipTests -Pfull -pl spring-cloud-skipper-docs

A.2. Importing into eclipse

You can generate eclipse project metadata using the following command:

$ ./mvnw eclipse:eclipse

The generated eclipse projects can be imported by selecting import existing projects from the file menu.

Appendix B: Contributing

Spring Cloud is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.

B.1. Sign the Contributor License Agreement

Before we accept a non-trivial patch or pull request we will need you to sign the contributor’s agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests.

B.2. Code Conventions and Housekeeping

None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge.

  • Use the Spring Framework code format conventions. Follow these instructions for setting up the eclipse formatter in eclipse or IntelliJ. Note that checkstyle is enabled in the build.

  • Make sure all new .java files to have a simple Javadoc class comment with at least an @author tag identifying you, and preferably at least a paragraph on what the class is for.

  • Add the ASF license header comment to all new .java files (copy from existing files in the project)

  • Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).

  • Add some Javadocs and, if you change the namespace, some XSD doc elements.

  • A few unit tests would help a lot as well — someone has to do it.

  • If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).

  • When writing a commit message please follow these conventions, if you are fixing an existing issue please add Fixes gh-XXXX at the end of the commit message (where XXXX is the issue number).