Manage Applications

Once you have spin installed and configured, you can use it to manage your Spinnaker application’s lifecycle.

Overview

spin can manage the whole lifecycle of your application:

  1. $ spin application
  2. Usage:
  3. application [command]
  4. Aliases:
  5. application, applications, app
  6. Available Commands:
  7. delete Delete the specified application
  8. get Get the specified application
  9. list List the all applications
  10. save Save the provided application
  11. Flags:
  12. -h, --help help for application
  13. Global Flags:
  14. --config string path to config file (default $HOME/.spin/config)
  15. --gate-endpoint string Gate (API server) endpoint (default http://localhost:8084)
  16. -k, --insecure ignore certificate errors
  17. --no-color disable color (default true)
  18. --output string configure output formatting
  19. -q, --quiet squelch non-essential output
  20. Use " application [command] --help" for more information about a command.

The following assumes Spinnaker is running and Gate is listening on http://localhost:8084. If gate is running elsewhere, you can set the Gate endpoint with the global --gate-endpoint flag.

Managing Your Application’s Lifecycle

Create a new application using save

  1. $ spin application save --application-name my-app --owner-email someone@example.com --cloud-providers "gce, kubernetes"
  2. Application save succeeded

Applications can also be updated with the save command.

List our Spinnaker applications with list

  1. spin application list
  2. [
  3. ...
  4. {
  5. "accounts": "my-account",
  6. "cloudProviders": "gce,kubernetes",
  7. "createTs": "1529349914747",
  8. "email": "jacobkiefer@google.com",
  9. "instancePort": 80,
  10. "lastModifiedBy": "anonymous",
  11. "name": "my-app",
  12. "platformHealthOnly": true,
  13. "providerSettings": {
  14. "gce": {
  15. "associatePublicIpAddress": true
  16. }
  17. },
  18. "updateTs": "1529349915014",
  19. "user": "anonymous"
  20. }
  21. ...
  22. ]

We see our application in the returned list along with the other existing applications.

Retrieve a single application with get

  1. spin application get my-app
  2. {
  3. "attributes": {
  4. "accounts": "my-account",
  5. "cloudProviders": "gce,kubernetes",
  6. "createTs": "1529349914747",
  7. "email": "jacobkiefer@google.com",
  8. "instancePort": 80,
  9. "lastModifiedBy": "anonymous",
  10. "name": "my-account",
  11. "platformHealthOnly": true,
  12. "providerSettings": {
  13. "gce": {
  14. "associatePublicIpAddress": true
  15. }
  16. },
  17. "updateTs": "1529349915014",
  18. "user": "anonymous"
  19. },
  20. "clusters": {
  21. "my-account-cluster": [
  22. {
  23. "loadBalancers": [],
  24. "name": "my-account-gce",
  25. "provider": "gce",
  26. "serverGroups": [
  27. "my-account-gce-v000",
  28. "my-account-gce-v001"
  29. ]
  30. }
  31. ]
  32. },
  33. "name": "my-account"
  34. }

Note that we retrieve not only the application attributes, but also the clusters associated with the application.

Delete a single application with delete

When we’re finished with our Spinnaker application, we can delete it.

  1. spin application delete my-app

Last modified May 7, 2021: docs(migration): fix imgs and links (9a18ce6)