By default, 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 get get a list of the package repositories by using the command repo list
Note | |
---|---|
The shell supports tab completion. |
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 search
command.
skipper:>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 install
command. Since this application picks a random port for the http server by default, we specify the Spring Boot property server.port
, prefixed via spec.applicationProperties
.
skipper:>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 status, upgrade or delete.
To see the status of the release, use the status
command
skipper:>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 Portugese`.
skipper:>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:>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-v1], State = [helloworld-local.helloworld-v1-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:>delete --release-name helloworld-local helloworld-local has been deleted.
Note | |
---|---|
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
, rollback
, list
and history
are covered in the Part IV, “Three minute Tour”.