Applications and Server Groups

Using Spinnaker applications and server groups


The following three concept pictures are from Will Gorman’sMesoscon presentation. They introduce the key concepts that we will use in the following section.

A Spinnaker application contains (0-n) clusters.

Figure 1. Spinnaker application concept

A Spinnaker cluster contains (1-n) server groups, and each server group contains (0-n) service instances. Each server group represents a new version of the cluster.

Figure 2. Spinnaker cluster view

A Spinnaker server group maps (1-1) to a DC/OS service (aka Marathon app).

Figure 3. Spinnaker server group

Applications and Server Groups

This section contains instructions for

Creating an Application

  1. On the Spinnaker home page, select the Applications screen. There you select the Create Application action.

Figure 4. Applications screen

  1. In the New Application dialog type myapp for the Name and xxx@yyy.zzz for the Owner Email.

Figure 5. New application dialog

The new Application myapp shows up in the Applications list. Select myapp to open the app.

Figure 6. New app in Applications screen

Creating a Server Group

A server group is a DC/OS service (or Marathon app), so most of the information you have to fill in below will be familiar to you from creating Marathon json definitions.

  1. In the myapp > Clusters view select the Create Server Group button.

Figure 7. Clusters view screen

  1. Under Basic Settings, enter the dcos Account and dcos Region you want to create the server group in.

Figure 8. Basic Settings screen

  1. Select the name of the Stack. The Spinnaker application name plus stack name make the cluster name, in our case myapp-prod.

  2. In Container Settings select nginx:1.11 for the image to use.

Figure 9. Container Settings screen

  1. In Network select Bridge for Network Type and port 80 for Container Port. Set web for service endpoint Name.

Figure 10. Network Settings screen

  1. In Health Checks define a health check specifying / for Path and 0 for Port Index.

Figure 11. Health Checks screen

  1. Select Create to create the server group.

In the myapp > Clusters view, you will see the new cluster with one server group containing one instance, that is, one nginx server running in our sample.

Figure 12. New cluster with server group

Creating a Server Group Version

  1. Repeat steps 1 - 4 in Creating a Server Group. Choose the same dcos Account, same dcos Region, and same name for Stack as before.
  2. In Container Settings, select nginx:1.12 for the image.
  3. For the other sections, choose the same settings we used in Creating a Server Group.
  4. Choose Create to create another version of the server group.

Figure 13. New server group version Container Image

The myapp > Clusters view now shows that our cluster runs two server group versions, V000 and V001. Later, we will show how you can leverage this capability in blue-green deployments.

Figure 14. New server group version

The following image shows how our two server group versions look on the DC/OS web interface. They are now running as DC/OS services, with the name made of the combined cluster name and version number; in this example they are myapp-prod-V000 and myapp-prod-v001.

Figure 15. Spinnaker server groups on DC/OS web interface