Migrating to the Celadon Cedar-14 Stack
Last updated 22 January 2016
Table of Contents
The Cedar-14 stack is the most current stack available on Heroku. It features updated system dependencies and runs on a recent version of Ubuntu Linux.
This article covers how to upgrade from Cedar-10 to Cedar-14. If you are looking to upgrade from Bamboo to Cedar-14, please refer to Migrating to the Celadon Cedar-14 Stack from Bamboo article.
The legacy Cedar-10 stack has been deprecated and reached its end-of-life on November 4, 2015. Applications may continue running, however you will not be able to push to your application without upgrading to Cedar-14 first.
Due to changes in the glibc library on Cedar-14, apps may see different memory consumption behavior on that stack. See the Performance Differences section for details.
- Heroku Toolbelt installed on your machine.
Create Cedar-14 app
Before upgrading an existing application to Cedar-14, you should test the upgrade on a Cedar-14 staging app that is not getting production traffic. You can create a staging app to use for testing, let’s call the git remote
heroku-cedar-14 and the app
$ heroku create --remote heroku-cedar-14 --stack cedar-14 <your cedar-14 app name> Creating your-cedar-14-app... done, stack is cedar-14 http://your-cedar-14-app.herokuapp.com/ | email@example.com:my-app.git Git remote heroku-cedar-14 added
Also add any add-ons (with
heroku addons:create) and config (with
heroku config:set) to the app that’s required for your code to run.
Deploy to your Cedar-14 staging app
Deploying to the new Cedar-14 staging app will not affect your currently running app on Cedar. It will merely stage the source code in a separate app and provide the opportunity to verify functionality.
Push the source to the
heroku-cedar-14 remote repository.
$ git push heroku-cedar-14 master Counting objects: 67, done. ... -----> Ruby app detected -----> Compiling Ruby/Rack ...
Once the app is deployed, you should verify that it is working correctly on the Cedar-14 stack, and if not, make any required changes.
Upgrading the production app to Cedar-14
Once you have verified that your source code works correctly on the Cedar-14 staging app, you are ready to update the production app from Cedar to Cedar-14.
First, set stack on the production app to Cedar-14:
$ heroku stack:set cedar-14 -a <app name> stack set, next release on production-app will use cedar-14 Run `git push heroku master` to create a new release on cedar-14
This does not immediately change the stack of the app, but the next release created will be deployed on Cedar-14. If you have no changes to your source pending release, you can create an empty commit with no changes to ensure a new build:
$ git commit --allow-empty -m "Upgrading to Cedar-14" [master 973c3f7] Upgrading to Cedar-14
To create the new release, push to your production app:
$ git push heroku master
Your production app is now running on Cedar-14, and you should verify that everything is working as expected.
The migration is now complete.
Reverting to Cedar
If the production app is not working after you changed the stack to Cedar-14, you can temporarily revert back to the Cedar-10 stack until you’ve debugged and resolved the issue.
First you need the release version of the previous Cedar-10 release:
$ heroku releases === production-app Releases v13 Deploy 973c3f7 firstname.lastname@example.org 2014/07/09 10:55:16 v12 Deploy ddb317d email@example.com 2014/07/07 10:46:26 ...
By rolling back, the stack will automatically be reverted to the stack the rollback release was created on.
$ heroku rollback v12
Your production app is now running on Cedar again.
Updated Ubuntu packages
To see what has been updated, please refer to list of updated packages.
Performance differences on Cedar-14
In testing, we’ve generally found that apps are faster on Cedar-14 than on Cedar-10. Some types of apps may consume more memory, however. Please see the Tuning glibc memory behavior article for details. We also recommend that you monitor memory consumption for a period after moving production apps to Cedar-14, to make sure the app performs correctly.