Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrehm committed Feb 13, 2015
2 parents d0598b3 + 0db4593 commit 3c81f09
Show file tree
Hide file tree
Showing 72 changed files with 422 additions and 253 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## [0.3.0](https://github.com/fgrehm/devstep/compare/v0.2.0...v0.3.0) (2015-02-12)

BREAKING CHANGES:

- Switched to the latest `progrium/cedarish:cedar14` image which uses an unmodified
Heroku `cedar14.sh` base stack source. More info [here](https://github.com/progrium/cedarish/tree/master/cedar14)
- Organization of Devstep's "stack" within the Docker image got changed, please see
commits associated with [GH-63] for more information

[GH-63]: https://github.com/fgrehm/devstep/issues/63

FEATURES:

- [Inline buildpack now supports reading commands from `devstep.yml`](http://fgrehm.viewdocs.io/devstep/buildpacks/inline)
- [New Oracle Java 8 addon](http://fgrehm.viewdocs.io/devstep/addons/oracle-java)
- [New Heroku toolbelt addon](http://fgrehm.viewdocs.io/devstep/addons/heroku-toolbelt)

IMPROVEMENTS:

- Reduced output by default and added support for `DEVSTEP_LOG` for setting the log level
- addons/docker: Lock installation to 1.5.0 instead of latest
- addons/docker: Support specifying a Docker version to be installed with `DEVSTEP_DOCKER_VERSION` env var
- buildpacks/golang: Bump default version to 1.4.1
- buildpacks/nodejs: Bump default Node to 0.10.35
- buildpacks/php: Backport recent oficial Heroku buildpack updates
- buildpacks/php: Download buildpack dependencies on demand
- buildpacks/python: Backport recent oficial Heroku buildpack updates
- buildpacks/python: Download buildpack dependencies on demand
- buildpacks/ruby: Bump default Bundler to 1.8.0
- buildpacks/ruby: Bump default Ruby to 2.2.0

BUG FIXES:

- buildpacks/nodejs: Skip Node.js installation if already installed

## [0.2.0](https://github.com/fgrehm/devstep/compare/v0.1.0...v0.2.0) (2014-09-24)

BREAKING CHANGES:
Expand Down
81 changes: 41 additions & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
FROM progrium/cedarish:cedar14
MAINTAINER Fabio Rehm "[email protected]"

# TODO: Move this to a single ENV line to reduce layers once Docker Hub supports it
ENV HOME /home/devstep
ENV DEVSTEP_PATH /opt/devstep
ENV DEVSTEP_CONF /etc/devstep
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8

#####################################################################
# Create a default user to avoid using the container as root, we set
# the user and group ids to 1000 as it is the most common ids for
Expand All @@ -13,11 +21,14 @@ RUN DEBIAN_FRONTEND=noninteractive && \
apt-get install -y sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /.devstep/cache && \
mkdir -p /.devstep/.profile.d && \
mkdir -p /.devstep/bin && \
mkdir -p /.devstep/log && \
echo "developer:x:1000:1000:Developer,,,:/.devstep:/bin/bash" >> /etc/passwd && \
mkdir -p $HOME/cache && \
mkdir -p $HOME/.profile.d && \
mkdir -p $HOME/bin && \
mkdir -p $HOME/log && \
mkdir -p $DEVSTEP_PATH/bin && \
mkdir -p $DEVSTEP_CONF/service && \
mkdir -p $DEVSTEP_CONF/init.d && \
echo "developer:x:1000:1000:Developer,,,:/home/devstep:/bin/bash" >> /etc/passwd && \
echo "developer:x:1000:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer
Expand All @@ -29,13 +40,9 @@ RUN DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y python runit --no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /etc/my_init.d && \
mkdir -p /etc/service
rm -rf /var/lib/apt/lists/*

#####################################################################
# * Install dependencies for rubies, php and possibly other programming
# language envs as well
# * Install and configure PostgreSQL and MySQL clients
# * Install bash-completion to save us a few keystrokes
# * Install vim because editing files with plain old vi sucks
Expand All @@ -49,17 +56,17 @@ RUN DEBIAN_FRONTEND=noninteractive && \

RUN DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y gawk libreadline5 libmcrypt4 libaprutil1 libreadline6-dev libyaml-dev libgdbm-dev libncurses5-dev libffi-dev libicu-dev --no-install-recommends && \
apt-get install -y postgresql-client mysql-client --no-install-recommends && \
apt-get install -y software-properties-common bash-completion --no-install-recommends && \
echo "[client]\nprotocol=tcp\nuser=root" >> /.devstep/.my.cnf && \
echo "export PGHOST=localhost" >> /.devstep/.profile.d/postgresql.sh && \
echo "export PGUSER=postgres" >> /.devstep/.profile.d/postgresql.sh && \
apt-get install -y libreadline5 libmcrypt4 libffi-dev --no-install-recommends && \
apt-get install -y postgresql-client mysql-client libsqlite3-dev --no-install-recommends && \
apt-get install -y --force-yes vim htop tmux mercurial bzr nodejs libssl0.9.8 --no-install-recommends && \
apt-get install -y software-properties-common bash-completion --no-install-recommends && \
echo "[client]\nprotocol=tcp\nuser=root" >> $HOME/.my.cnf && \
echo "export PGHOST=localhost" >> $HOME/.profile.d/postgresql.sh && \
echo "export PGUSER=postgres" >> $HOME/.profile.d/postgresql.sh && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /.devstep/bin && \
curl -L -s http://stedolan.github.io/jq/download/linux64/jq > /.devstep/bin/jq
curl -L -s http://stedolan.github.io/jq/download/linux64/jq > $DEVSTEP_PATH/bin/jq && \
chmod +x $DEVSTEP_PATH/bin/jq

#####################################################################
# Bring back apt .deb caching as they'll be either removed on the
Expand All @@ -69,44 +76,38 @@ RUN rm /etc/apt/apt.conf.d/docker-clean
#####################################################################
# Devstep buildpacks

ADD buildpacks /.devstep/buildpacks
RUN for script in /.devstep/buildpacks/*/bin/install-dependencies; do \
ADD stack/buildpacks $DEVSTEP_PATH/buildpacks
RUN for script in $DEVSTEP_PATH/buildpacks/*/bin/install-dependencies; do \
$script; \
done

#####################################################################
# Devstep goodies (ADDed at the end to increase image "cacheability")

ADD stack/bin /.devstep/bin
ADD stack/bashrc /.devstep/.bashrc
ADD stack/load-env.sh /.devstep/load-env.sh
ADD addons /.devstep/addons
ADD stack /opt/devstep

#####################################################################
# Fix permissions, set up init and generate locales
RUN chown -R developer:developer /.devstep && \
chown -R developer:developer /etc/my_init.d && \
chown -R developer:developer /etc/service && \
# Fix permissions, set up init
RUN cp $DEVSTEP_PATH/bashrc $HOME/.bashrc && \
chown -R developer:developer $HOME && \
chown -R developer:developer $DEVSTEP_PATH && \
chown -R developer:developer $DEVSTEP_CONF && \
chmod u+s /usr/bin/sudo && \
ln -s /.devstep/bin/fix-permissions /etc/my_init.d/05-fix-permissions.sh && \
ln -s /.devstep/bin/create-cache-symlinks /etc/my_init.d/10-create-cache-symlinks.sh && \
ln -s /.devstep/bin/forward-linked-ports /etc/my_init.d/10-forward-linked-ports.sh && \
chmod +x /.devstep/bin/* && \
chmod +x /etc/my_init.d/* && \
locale-gen en_US.UTF-8
ln -s $DEVSTEP_PATH/bin/fix-permissions $DEVSTEP_CONF/init.d/05-fix-permissions.sh && \
ln -s $DEVSTEP_PATH/bin/create-cache-symlinks $DEVSTEP_CONF/init.d/10-create-cache-symlinks.sh && \
ln -s $DEVSTEP_PATH/bin/forward-linked-ports $DEVSTEP_CONF/init.d/10-forward-linked-ports.sh && \
chmod +x $DEVSTEP_PATH/bin/* && \
chmod +x $DEVSTEP_CONF/init.d/*

#####################################################################
# Setup locales and default user
# Setup default user

USER developer
ENV HOME /.devstep
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
ENV USER developer

#####################################################################
# Use our init
ENTRYPOINT ["/.devstep/bin/entrypoint"]
ENTRYPOINT ["/opt/devstep/bin/entrypoint"]

# Start a bash session by default
CMD ["/bin/bash"]
40 changes: 0 additions & 40 deletions addons/docker/bin/configure

This file was deleted.

5 changes: 0 additions & 5 deletions addons/memcached/bin/start-server

This file was deleted.

5 changes: 0 additions & 5 deletions addons/redis/bin/start-server

This file was deleted.

4 changes: 2 additions & 2 deletions auto-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM fgrehm/devstep:v0.2.0
FROM fgrehm/devstep:v0.3.0

#####################################################################
# Add project to the image and build it
ONBUILD ADD . /workspace
ONBUILD WORKDIR /workspace
ONBUILD RUN CLEANUP=1 /.devstep/bin/build-project /workspace
ONBUILD RUN CLEANUP=1 /opt/devstep/bin/build-project /workspace
11 changes: 0 additions & 11 deletions bin/compile

This file was deleted.

3 changes: 0 additions & 3 deletions buildpacks/inline/bin/compile

This file was deleted.

8 changes: 0 additions & 8 deletions buildpacks/inline/bin/detect

This file was deleted.

6 changes: 4 additions & 2 deletions devstep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ privileged: true
volumes:
# FIXME: This only work on my machine
- '{{env "HOME"}}/devstep/development/docker:/var/lib/docker'
- '{{env "HOME"}}/projects/oss/devstep-examples:/.devstep/examples'
- '{{env "HOME"}}/projects/oss/devstep-cli/build/devstep:/.devstep/bin/devstep'
- '{{env "HOME"}}/projects/oss/devstep-examples:/devstep-examples'
- '{{env "HOME"}}/projects/oss/devstep-cli/build/linux_amd64:/home/devstep/bin/devstep'
commands:
make:
# No custom options
provision:
- ['configure-addons', 'docker']
5 changes: 4 additions & 1 deletion docs/addons/docker.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Docker Addon
--------------

This addon will install the latest Docker version from https://get.docker.io/builds/Linux/x86_64/docker-latest
This addon will install Docker 1.3.0 from https://get.docker.io/builds/Linux/x86_64
and will set things up for running nested Docker containers based on https://github.com/jpetazzo/dind.

In order to use it, you need to provide both the `--privileged` flag and because
`/var/lib/docker` cannot be on AUFS, so we need to make it a volume with `-v /var/lib/docker`.

To install it you can run `configure-addons docker` from within the container.

To specify a Docker version, use the the `DEVSTEP_DOCKER_VERSION` environmental
variable.
7 changes: 7 additions & 0 deletions docs/addons/heroku-toolbelt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Heroku Toolbelt Addon
-----------------------

This addon will install the latest [Heroku Toolbelt](https://toolbelt.heroku.com/)
version available for the Ubuntu 14.04 release.

To install it you can run `configure-addons oracle-java-8` from within the container.
8 changes: 8 additions & 0 deletions docs/addons/oracle-java.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Oracle Java Addon
-------------------

This addon will install the latest version available for the Ubuntu 14.04 release
and will leverage Devstep's caching mechanism so that the downloaded files are
reused between environments.

To install it you can run `configure-addons oracle-java-8` from within the container.
2 changes: 1 addition & 1 deletion docs/buildpacks/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all Devstep environments:

```yaml
volumes:
- '{{env "HOME"}}/projects/my-buildpack:/.devstep/buildpacks/my-buildpack'
- '{{env "HOME"}}/projects/my-buildpack:/opt/devstep/buildpacks/my-buildpack'
```
If you want to use a custom base image, you can add the following line to your
Expand Down
24 changes: 19 additions & 5 deletions docs/buildpacks/inline.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# Inline buildpack
------------------

This is a buildpack for projects that wish to build themselves and is based on
https://github.com/kr/heroku-buildpack-inline and it expects the project to
provide the usual buildpack executables in its source tree.
This is a buildpack for projects that wish to build themselves and is partially
based on https://github.com/kr/heroku-buildpack-inline

If an executable file is found under `bin/compile` of the project root, this
buildpack will simply call it.
First, it checks if there is a `provision` directive on `devstep.yml` under
the project's root and it uses the instructions provided during container
provisioning.

For example:

```yaml
provision:
- ['configure-addons', 'redis']
- ['configure-addons', 'heroku-toolbelt']
```
Will configure the Redis and Heroku toolbelt addons.
If no `provision` instructions are found, the buildpack will look for an
executable file under `bin/compile` of the project root and will run the script
if found.
4 changes: 2 additions & 2 deletions docs/buildpacks/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use [Bundler](http://bundler.io/) for dependency management. It will be used if
a `Gemfile` is found.

The installed Ruby will be the same one that gets installed on Heroku's Cedar 14
stack with a fallback to a Ruby from the Cedar stack. By default Ruby 2.1.3 and
Bundler 1.7.3 will be installed.
stack with a fallback to a Ruby from the Cedar stack. By default Ruby 2.1.4 and
Bundler 1.7.4 will be installed.

To specify a Ruby version, use the [`ruby` directive](http://bundler.io/v1.6/gemfile_ruby.html)
of your project's `Gemfile`, the `DEVSTEP_RUBY_VERSION` environmental variable or
Expand Down
6 changes: 3 additions & 3 deletions docs/cli/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
This is the easiest way to get started with Devstep. By running the command
from your project's root, Devstep will:

1. Create a Docker container based on `fgrehm/devstep:v0.2.0` with project
1. Create a Docker container based on `fgrehm/devstep:v0.3.0` with project
sources bind mounted at `/workspace`.
2. Detect and install project's dependencies on the new container using the
available buildpacks.
Expand Down Expand Up @@ -44,7 +44,7 @@ devstep hack -p 80:8080 --link postgres:db --link memcached:mc -e DEVSTEP_BUNDLE

By running the command from your project's root, Devstep will:

1. Create a Docker container based on `fgrehm/devstep:v0.2.0` with project
1. Create a Docker container based on `fgrehm/devstep:v0.3.0` with project
sources bind mounted at `/workspace`.
2. Detect and install project's dependencies on the new container using the
available buildpacks.
Expand All @@ -53,7 +53,7 @@ By running the command from your project's root, Devstep will:

The `devstep/<PROJECT>` images act like snapshots of your project dependencies
and will be used as the source image for subsequent `devstep` commands instead
of the `fgrehm/devstep:v0.2.0` image.
of the `fgrehm/devstep:v0.3.0` image.

For example, running a `devstep hack` after building the image will use `devstep/<PROJECT>:latest`
as the base container for new "hacking sessions" so that you don't have to build
Expand Down
Loading

0 comments on commit 3c81f09

Please sign in to comment.