Updating an existing service

Overview

As your application evolves you will need to change its services and other components from time to time. This guide walks you through that process.

What you’ll need

Before you start, please check you have the following:

Sample project

In this example we’re using the same simple "hello world" project that we used in our Getting Started guides.

Updating your application code

In this example, you have decided to deploy a beta version of the Hello World application, and so you want to switch to using the “beta” branch of your application code. To do this:

  1. Open your Cloud 66 dashboard and click on the name of the application you need to change.

  2. Click on the edit icon in the top left-hand corner of the application detail panel to open the Service Editor

  3. Change the Git Branch field from master to beta and click Go

  4. Once Skycap has confirmed access to the new code location, click Save changes

New Snapshot required

The changes you make here will not reflect in either your Formations or your Cloud 66 deployments until you take a new Snapshot of the updated application.

Deploying your updated application

In order to see your beta version running, you first need to take a new Snapshot of your application. This will build your new code into a image so that you can deploy it to your cluster.

To do this:

  1. Click the Snapshot button and select Snapshot all
  2. Wait for the build to finish converting your code into images (or retagging existing images)
  3. Click on Formations in the left-hand nav
  4. Click on the “Hello World” Formation
  5. Click on the Render Formation button

You can now use the Cloud 66 Toolbelt to redeploy your application to Minikube following the same steps as in our Getting Started with Formations guide.

You’ll notice that the cx command looks nearly identical to the one we used in our Formations guide, except that the UID of the snapshot is different. This is because we are using our new snapshot with the new application code that we created in the previous step.

If you’ve followed all the steps successfully then the web page that loads when you run minikube service command will have the word “(beta)” in the title.

What’s next?