IBM Cloud Foundry Public Now Supports cflinuxfs3

5 min read

cflinuxfs3 is now available on IBM Cloud Foundry Public.

We recently made a new 'stack' available in IBM Cloud Foundry public environments and made it the default for all new apps. A "stack" is essentially the file system and operating system image that your application runs in when you push it to Cloud Foundry. The stack we've used for a few years called 'cflinuxfs2' was based upon Ubuntu 14 that was removed from service on April 30, 2019.

The new 'cflinuxfs3' stack is derived from Ubuntu 18 and we highly recommend that you proactively update your applications to use it for performance and support considerations.

Key Dates

After June 30, 2019, we will attempt to automatically update the stack of existing applications to 'cflinuxfs3'. Please follow the steps below to update your application in the meantime.

Steps to update your application stack to cflinuxfs3

After Sunday, June 30, 2019, we will attempt to automatically update your applications to use cflinuxfs3. For most applications, this will require a short outage of typically just a few minutes and then your application will be available again. However, it is not guaranteed to work and, therefore, we recommend that you manage this update yourself by taking some simple steps.

You can choose from various options to accomplish this. If you can tolerate a short outage, the simplest method is to update your existing application by pushing it again. Alternatively, you can in-place update the already pushed application by changing the stack value and then triggering a restart and restage. Both of these simple techniques will result in a short outage, however, so read on for alternative options if you require zero-downtime.

Simple Option #1: Update the application by pushing it again

This uses the standard cf push approach with one extra parameter to change the stack. Note that you must have your existing application code available and you must push it as part of Step 3:

  1. cf login
  2. cf target -o <ORGANIZATION_NAME> -s <SPACE_NAME>
  3. cf push <APPLICATION_NAME> -s cflinuxfs3

Note: If you are using the ibmcloud CLI instead of the cf CLI, simply replace 'cf' commands with 'ibmcloud cf'.

Simple Option #2: In-place update of the existing application

The advantage of this option is that you do not need to push your code again and can, instead, try to refresh the previously pushed application directly on IBM Cloud Foundry:

  1. cf login
  2. cf target -o <ORGANIZATION_NAME> -s <SPACE_NAME>
  3. cf curl -X PUT -d "{\"stack_guid\":\"`cf stack cflinuxfs3 --guid`\", \"state\":\"STOPPED\"}" /v2/apps/`cf app <APPLICATION_NAME> --guid`
  4. cf restart <APPLICATION_NAME>

Note: If you are using the ibmcloud CLI instead of the cf CLI, simply replace 'cf' commands with 'ibmcloud cf'.

Blue-green deployment method

If you wish to avoid downtime or possible outages in case of failure with cflinuxfs3, then you should follow a blue-green deployment method instead. The concept is simple—you push a new ("green") copy of your application using cflinuxfs3 alongside the existing ("blue") one that is using cflinuxfs2. If the new (green) is successfully working, you can update the routing of your application traffic to begin using the green cflinuxfs3 version and remove traffic from the blue cflinuxfs2 legacy application, before then removing the old one entirely. You can even do sophisticated controls on how much traffic goes to each application instead of switching completely. Full details on how to accomplish this can be found here: blue-green deployment.

Key things to keep in mind

When you update an application to use a new stack, the application has to be re-staged, and, importantly, that means re-compiling it. In most cases, that will work fine but it's possible your app will no longer compile with the latest buildpacks or external code libraries, or in some rare cases, it may simply not work with the newer cflinuxfs3 for some reason. Such problems can be more likely if you are using default buildpacks (instead of manually specified ones) because over time the default buildpacks get updated and support different versions of code libraries, and your code may no longer be supported. If that happens, you will need to update your app for currency before attempting to re-push it again.

If you need to know what stack your application is using, you can easily check with the "cf app <APPLICATION_NAME>" command. This document also provides further information about Cloud Foundry stacks and stack changes.

Choose your update option

In summary, if you have no concerns, the easiest option is to wait for IBM to automatically attempt to update your application after June 30, 2019. If you want to pre-emptively do the update, you can use either of the simple options above. If you have any concerns about your application not updating successfully, and if high availability is important to you, then please make a blue-green deployment update to your application before June 30, 2019.

Be the first to hear about news, product updates, and innovation from IBM Cloud