Skip to content

Commit 18acb8c

Browse files
author
Matthew Fisher
committed
chore(builder): migrate to heroku's cedar stack
Heroku now officially maintains a Docker image for their cedar stack. The maintainer of cedarish is deprecating it in favour of this image, so we should migrate over such that we emulate their environment perfectly. Since we no longer build a root filesystem and package it into a tarball, this speeds up build time of the builder dramatically with the tradeoff of having to fetch heroku/cedar:14 on boot, which is slightly slower than a `docker import`. However, the difference between relying on your local connection to build and the cloud provider using precious clock cycles to build the image vs. relying on a cloud provider's bandwidth to pull the image on boot is quite significant, so really it's a question of tomato vs. tomatoe.
1 parent aaa2f8e commit 18acb8c

7 files changed

Lines changed: 4 additions & 25 deletions

File tree

builder/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,3 @@ test-style:
7474
@$(GOFMT) $(GO_PACKAGES) $(GO_FILES) | read; if [ $$? == 0 ]; then echo "gofmt check failed."; exit 1; fi
7575
$(GOVET) $(repo_path) $(GO_PACKAGES_REPO_PATH)
7676
$(GOLINT) ./...
77-
78-
cedarish/build:
79-
mkdir -p build
80-
docker pull progrium/cedarish:latest
81-
docker save progrium/cedarish:latest | gzip -9 > build/progrium_cedarish_$(shell date "+%Y_%m_%d").tar.gz

builder/image/Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ RUN useradd -d $GITHOME $GITUSER
3838
RUN mkdir -p $GITHOME/.ssh && chown git:git $GITHOME/.ssh
3939
RUN chown -R $GITUSER:$GITUSER $GITHOME
4040

41-
# HACK: import progrium/cedarish as a tarball
42-
# see https://github.com/deis/deis/issues/1027
43-
RUN curl -#SL -o /progrium_cedarish.tar.gz \
44-
https://github.com/progrium/cedarish/releases/download/v3/cedarish-cedar14_v3.tar.gz
45-
4641
# define the execution environment
4742
# use VOLUME to remove /var/lib/docker from copy-on-write for performance
4843
# we don't want to stack overlay filesystems

builder/image/bin/boot

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,6 @@ while [[ ! -e /var/run/docker.sock ]]; do
6969
sleep 1
7070
done
7171

72-
# HACK: load progrium/cedarish tarball for faster boot times
73-
# see https://github.com/deis/deis/issues/1027
74-
if ! docker history progrium/cedarish >/dev/null 2>/dev/null ; then
75-
echo "Loading cedarish..."
76-
cat /progrium_cedarish.tar.gz | docker import - progrium/cedarish
77-
else
78-
echo "Cedarish already loaded"
79-
fi
80-
8172
# build required images
8273
docker build -t deis/slugbuilder /app/slugbuilder/
8374
docker build -t deis/slugrunner /app/slugrunner/

builder/image/slugbuilder/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM progrium/cedarish:latest
1+
FROM heroku/cedar:14
22

33
RUN mkdir /app
44
RUN addgroup --quiet --gid 2000 slug && \

builder/image/slugbuilder/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,4 @@ you'd like:
6868

6969
## Base Environment
7070

71-
The Docker image here is based on [cedarish](https://github.com/progrium/cedarish), an image that
72-
emulates the Heroku Cedar stack environment. All buildpacks should have everything they need to run
73-
in this environment, but if something is missing it should be added upstream to cedarish.
71+
The Docker image is based on Heroku's official [Cedar image](https://registry.hub.docker.com/u/heroku/cedar/).

builder/image/slugrunner/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM progrium/cedarish:latest
1+
FROM heroku/cedar:14
22

33
RUN mkdir /app
44
RUN addgroup --quiet --gid 2000 slug && \

builder/image/slugrunner/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ It is also possible to fully customize the command line for `sdutil` tool using
3838

3939
## Base Environment
4040

41-
The Docker image here is based on [cedarish](https://github.com/progrium/cedarish), an image that emulates the Heroku Cedar stack environment. App slugs should include everything they need to run, but if something is missing it should be added upstream to cedarish.
41+
The Docker image is based on Heroku's official [Cedar image](https://registry.hub.docker.com/u/heroku/cedar/).
4242

4343
## License
4444

0 commit comments

Comments
 (0)