We’re excited to announce that the Cedar-14 – the new version of the Celedon Cedar stack – is ready for general availability and is now the default stack on Heroku. Cedar-14 is based on the latest Ubuntu LTS Linux version and comes with a modern set of libraries and system dependencies that will stay current and updated for a long time to come.
Since we announced the public beta of Cedar-14 three months ago, we have migrated most of the apps that we run on Heroku to Cedar-14 (yes, a lot of Heroku runs on the Heroku platform) and thousands of users have also moved apps or created new Cedar-14 apps. We have worked with these early adopters and with buildpack maintainers to weed out bugs and problems. Cedar-14 is now stable and ready for production apps.
Read on to learn how to migrate apps to Cedar-14 and for details on future stack updates on Heroku.
Updating apps to Cedar-14
Before migrating a Heroku app to Cedar-14, we recommend testing your app source code on Cedar-14, either by upgrading an existing staging app or by creating a new staging app on Cedar-14.
To migrate an existing app to Cedar-14, use the stack
command:
$ heroku stack:set cedar-14 -a example-app
…
$ git commit -m "update to cedar-14" --allow-empty
…
$ git push heroku master
…
Note that running stack:set
only tells Heroku that you want the next push built and deployed on Cedar-14. You have to push and force a rebuild for the change to take effect. See the full Migrating to Cedar-14 Dev Center article for additional details.
If, in spite of testing, your app doesn’t work correctly on Cedar-14, you can always roll back to revert the stack change:
$ heroku rollback
Note that this will cause the apps stack to be reset to cedar
and you need to re-run stack:set cedar-14
to deploy to Cedar-14.
What to look out for
We have worked hard to make migrating to Cedar-14 as smooth as possible, but there are a few things to look out for.
Stack image libraries
When putting together Cedar-14, we have strived to make it backwards compatible with the old Cedar stack. To reduce stack surface area and the frequency of potentially disruptive stack updates, we have, however, removed some lesser used packages from Cedar-14. Apps may also encounter incompatibilities simply because most libraries on Cedar-14 have been updated to their most recent versions. A full declaration of Cedar and Cedar-14 packages is available on Dev Center.
Memory use
One of the most significant package differences between Cedar and Cedar-14 is the glibc versions available. Our testing has found that some programs consume more memory on Cedar-14. This change is related to how address space is managed across threads in newer glibc versions. The Cedar-14 migration guide has more details, but in general, we recommend that you monitor app memory use during the migration to Cedar-14 (using the new Dashboard Metrics for example) and that you check for R14 memory errors after the migration.
Buildpack support for Cedar-14
Buildpacks are the scripts that transform your source code into slugs that run on the Heroku platform. Buildpacks often pull in binary dependencies that are specific to a particular stack and for that reason, they generally have to be made stack-aware.
We have updated all of the default buildpacks maintained by Heroku and we have have worked with maintainers of popular third-party buildpacks to get as many of those as possible updated too. If you find that a third-party buildpack you’re using doesn’t work on Cedar-14, we recommend that you reach out to the maintainer or that you move to a Heroku-supported buildpack. If you’re a buildpack maintainer, please refer the Buildpack API article for details on how to support multiple stacks.
Stack future
Cedar-14 is now the default stack on Heroku and we recommend you use that stack for new apps. If you need to create Cedar apps for testing purposes, you can still do so by passing --stack cedar
when creating apps.
Stacks cannot live forever – packages and distro versions are deprecated or stop receiving security updates. With Cedar-14 GA, we’re also announcing the deprecation of the classic Cedar runtime stack: A year from now, on November 4th, 2015, the classic Cedar stack will be retired and any apps that have not been migrated to Cedar-14 will stop running. You must migrate all apps to Cedar-14 before this date to prevent disruption in availability. In the coming year, we will keep the old Cedar stack image patched and updated.
We know that Heroku users want stacks that are stable and have modern packages and libraries, and that’s why we currently base stacks on Ubuntu Linux LTS releases. We think Canonical and the Ubuntu community strike a great balance between stability and frequent updates with biennial LTS releases, and we plan to track those releases when we release new Heroku stacks.
A well-defined stack lifecycle policy is critical to keeping apps on Heroku patched secure. For additional details on how Heroku thinks about stacks and how we keep stacks updated, please refer to our Stack Image Update Policy on Dev Center.