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

v1.0.0 #109

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e97b7dd
Bump up to 1.0.0
fgrehm Jan 6, 2016
4028b08
Remove noisy comments
fgrehm Jan 6, 2016
63ebf20
Happy new year :fireworks:
fgrehm Jan 6, 2016
7e73d22
I havent used devstep to work on this project for a while now
fgrehm Jan 6, 2016
2adeaa4
Remove postgresql / mysql clients and tmux
fgrehm Jan 6, 2016
9672fab
buildpacks/ruby: Set default to 2.3.0 and bundler to 1.11.2
fgrehm Jan 6, 2016
0ccae91
buildpacks: Remove `bats` support
fgrehm Jan 6, 2016
66502cc
buildpacks: Remove `phantomjs`
fgrehm Jan 6, 2016
5d6d70c
buildpacks/ruby: Grab bundler version from `Gemfile.lock`
fgrehm Jan 6, 2016
96e5623
buildpacks/inline: Simpler command invocation
fgrehm Jan 6, 2016
0109950
buildpacks/inline: Deal with provision exit codes properly
fgrehm Jan 6, 2016
5a15b27
Update CHANGELOG
fgrehm Jan 6, 2016
630ba70
buildpacks/inline: Allow `provision` config to be set with strings
fgrehm Jan 6, 2016
8ad1d61
buildpacks/golang: Bump default to 1.5.2
fgrehm Jan 6, 2016
eea92f7
buildpacks/golang: Nicely handle blanky `git remote`s
fgrehm Jan 6, 2016
903238b
buildpacks/python: Update default to 2.7.11
fgrehm Jan 6, 2016
7257760
Update docs in prep for 1.0.0
fgrehm Jan 6, 2016
2150873
buildpacks/golang: Pass in `-t` to `go get`
fgrehm Jan 6, 2016
cabf3bb
baseimage: Add `developer` to the `docker` group
fgrehm Jan 8, 2016
e10f9bb
docs/cli: Support for aliases / binstubs / custom commands will be go…
fgrehm Jan 8, 2016
620f580
buildpacks/inline: Always run commands at the end of the build proces…
fgrehm Jan 8, 2016
583d1b1
stack: Allow workspace dir to be owned by a different user
fgrehm Mar 10, 2016
832e24e
buildpacks/golang: Bump default verstion to 1.6
fgrehm Mar 10, 2016
13e218f
stack: Allow cache dir to be owned by users that are not root
fgrehm Mar 10, 2016
c394102
docs: Update documentation to reflect latest changes and document how…
fgrehm Mar 10, 2016
49d12fa
docs/cli: `binstubs` command is gone
fgrehm Mar 10, 2016
099e184
addons: Remove docker
fgrehm Mar 10, 2016
3eb3a72
v1.0.0
fgrehm Mar 10, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
## [1.0.0](https://github.com/fgrehm/devstep/compare/v0.4.0...v1.0.0) (2016-03-10)

BREAKING CHANGES:

- baseimage: Removed tmux
- addons: Removed `docker`
- buildpacks: Removed `bats` and `phantomjs`

IMPROVEMENTS:

- buildpacks/golang: Bump default Go to 1.6
- buildpacks/golang: Pass in `-t` to `go get` [[GH-96]]
- buildpacks/inline: Support strings for the `provision` config on `devstep.yml` files
- buildpacks/inline: Always run inline `provision` commands at the end of the build process, after all of the other buildpacks have kicked in.
- buildpacks/python: Bump default Python to 2.7.11

BUG FIXES:

- buildpacks/golang: Nicely handle blanky `git remote`s [[GH-94]]
- buildpacks/inline: Improve `devstep.yml` `provision` config handling [[GH-97]]
- buildpacks/inline: Return the same exit code returned by the `provision` command [[GH-99]]

[GH-94]: https://github.com/fgrehm/devstep/issues/94
[GH-96]: https://github.com/fgrehm/devstep/issues/96
[GH-97]: https://github.com/fgrehm/devstep/issues/97
[GH-99]: https://github.com/fgrehm/devstep/issues/99

## [0.4.0](https://github.com/fgrehm/devstep/compare/v0.3.1...v0.4.0) (2015-07-06)

BREAKING CHANGES:
Expand Down
21 changes: 2 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,16 @@ ENV HOME=/home/devstep \
LC_ALL=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8

#####################################################################
# Copy over our build scripts
ADD image/ /tmp/build

#####################################################################
# Install required packages and do some additional setup
RUN /tmp/build/prepare.sh

#####################################################################
# Devstep goodies (ADDed at the end to increase image "cacheability")
ADD stack $DEVSTEP_PATH
RUN for script in $DEVSTEP_PATH/buildpacks/*/bin/install-dependencies; do \
$script; \
done

#####################################################################
# Fix permissions and set up init
RUN /tmp/build/fix-permissions.sh
RUN for script in $DEVSTEP_PATH/buildpacks/*/bin/install-dependencies; do $script; done \
&& /tmp/build/fix-permissions.sh

#####################################################################
# Setup default user
USER developer
ENV USER developer

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

# Start a bash session by default
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Fabio Rehm
Copyright (c) 2014-2016 Fabio Rehm

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
11 changes: 0 additions & 11 deletions devstep.yml

This file was deleted.

13 changes: 0 additions & 13 deletions docs/addons/docker.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/buildpacks/bats.md

This file was deleted.

15 changes: 10 additions & 5 deletions docs/buildpacks/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ If a `Godep` dir is found, this buildpack will download and install [godep](http
into your `$PATH` and will parse the `GoVersion` and `ImportPath` attributes
when setting things up.

Since currently devstep [does not support](https://github.com/fgrehm/devstep/issues/51)
setting the workspace directory used inside the container, this buildpack will
attempt to parse your project's import path for you using the following approach:
This buildpack will attempt to identify your project's import path for you using
the following priority:

1. `ImportPath` from Godep configs
2. `.godir` file
3. Remote github repository URL
4. `GO_PROJECT_NAME` environmental variable

After identifying the import path, the buildpack will symlink your project sources
into the appropriate path under the `$GOPATH/src` dir.
into the appropriate path under the `$GOPATH/src` dir. You can also configure
the `working_dir` to an appropriate path on your [project's `devstep.yml`](cli/configuration):

If godep is configured, the buildpack will attempt a `godep go build` for you,
```yml
# The directory where project sources should be mounted inside the container.
working_dir: '/home/devstep/gocode/src/github.com/fgrehm/devstep-cli'
```

If godep is configured, the buildpack will attempt a `godep go install` for you,
otherwise it will download project's dependencies with `go get` so you can
start hacking right away.

Expand Down
12 changes: 0 additions & 12 deletions docs/buildpacks/phantomjs.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/buildpacks/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can also provide arbitrary releases Python with a `runtime.txt` file.

Runtime options include:

- python-2.7.10 (default)
- python-2.7.11 (default)
- python-3.4.1
- pypy-1.9 (experimental)

Expand Down
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.2.2 and
Bundler 1.10.5 will be installed.
stack with a fallback to a Ruby from the Cedar stack. By default Ruby 2.3.0 and
Bundler 1.11.2 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
29 changes: 0 additions & 29 deletions docs/cli/aliases-and-binstubs.md

This file was deleted.

9 changes: 4 additions & 5 deletions docs/cli/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

1. [Hack](#user-content-hack)
1. [Build](#user-content-build)
1. [Boostrap](#user-content-bootstrap)
1. [Bootstrap](#user-content-bootstrap)
1. [Other commands](#user-content-other-commands)

--------------
Expand All @@ -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.4.0` with project
1. Create a Docker container based on `fgrehm/devstep:v1.0.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.4.0` with project
1. Create a Docker container based on `fgrehm/devstep:v1.0.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.4.0` image.
of the `fgrehm/devstep:v1.0.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 Expand Up @@ -129,7 +129,6 @@ of choice.
* `info` - Show information about the current environment
* `run` - Run a one off command against the current base image
* `exec` - Run a one off command against the last container created for the current project
* `binstubs` - Generate binstubs for the commands specified on devstep.yml
* `clean` - Remove previously built images for the current environment
* `pristine` - Rebuild project image from scratch
* `help, h` - Shows a list of commands or help for one command
Expand Down
21 changes: 1 addition & 20 deletions docs/cli/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The available options are described below:
repository: 'repo/name'

# The image used by devstep when building environments from scratch
# DEFAULT: 'fgrehm/devstep:v0.4.0'
# DEFAULT: 'fgrehm/devstep:v1.0.0'
source_image: 'source/image:tag'

# The host cache dir that gets mounted inside the container at `/home/devstep/cache`
Expand Down Expand Up @@ -43,25 +43,6 @@ volumes:
environment:
RAILS_ENV: "development"

# Custom command aliases that can be used with `devstep run` to save some
# typing. It is also used for generating project specific binstubs.
# DEFAULT: <empty>
commands:
# This can be run with `devstep run server`
server:
cmd: ["rails", "server"]
# Here you can use some of the configs described above
publish: ["3000:3000"]
volumes:
- '{{env "HOME"}}/certs/some-certificate.crt:/home/devstep/some-certificate.crt'
- '{{env "HOME"}}/projects/some-gem-sources:/home/devstep/some-gem-sources'
links:
- 'redis:redis'
environment:
RAILS_ENV: "hacking"
ruby:
# No custom options, used only for generating binstubs

# Custom provisioning steps that can be used when the available buildpacks are not
# enough. Use it to configure addons or run additional commands during the build.
# DEFAULT: <empty>
Expand Down
39 changes: 21 additions & 18 deletions docs/cli/installation.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
# CLI Installation
------------------

The CLI is [written in Golang](https://github.com/fgrehm/devstep-cli) and precompiled
binaries are available for each GitHub tagged release. Installing it is a matter
of downloading it from GitHub, placing the binary on a directory available on your
`PATH` and making it executable.

This one liner can handle it for you assuming that `$HOME/bin` is available
on your `PATH`:
Precompiled binaries are available for each GitHub tagged release:

```sh
L=$HOME/bin/devstep && curl -sL https://github.com/fgrehm/devstep-cli/releases/download/v0.4.0/linux_amd64 > $L && chmod +x $L
# On Linux (assumes `$HOME/bin` is on your `PATH`)
L=$HOME/bin/devstep && curl -sL https://github.com/fgrehm/devstep-cli/releases/download/v1.0.0/linux_amd64 > $L && chmod +x $L

# On OSX
brew tap fgrehm/devstep
brew install devstep
```

Please note that the CLI is currently limited to connecting to a local `/var/run/docker.sock`
Please note that the CLI currently defaults to connecting to a local `/var/run/docker.sock`
socket only and the user that runs `devstep` commands will need [non-root access to it](http://docs.docker.io/installation/ubuntulinux/#giving-non-root-access).
Support for execution over TCP is likely to be added at some point.

On OSX we rely on the environmental variables set by `docker-machine` (like
`DOCKER_HOST` and `DOCKER_CERT_PATH` for example) and also on the fact that the
`$HOME` dir is automagically shared with the VM that runs the docker daemon.

> **IMPORTANT**: A `developer` user will be used by Devstep and it assumes your
user and group ids are equal to `1000` when using the CLI or the container's init
process will be aborted. This is to guarantee that files created within Docker
containers have the appropriate permissions so that you can manipulate them
on the host without the need to use `sudo`. This is currently a Devstep limitation
that will be worked around in case there is enough demand or will be fixed once
Docker adds support for user namespaces.
user and group ids are equal to `1000` when using the CLI. This is to guarantee
that files created within Docker containers have the appropriate permissions so
that you can manipulate them on the host without the need to use `sudo`. This is
currently a Devstep limitation that will be handled on a future release.

> The `1000` id was chosen because it is the default uid / gid of Ubuntu Desktop users
that are created during the installation process. To work around this limitation
you can build your own image with the appropriate ids and add a `source_image: '<YOUR-IMAGE>:<OPTIONAL-TAG>'`
line to your `~/devstep.yml` so that the image is used as a source for your projects.

> When on OSX using dinghy, this should not be a problem thanks to how it sets up
NFS shares.

## Bash autocomplete

An autocompletion script can be installed using the one liner below:
An autocompletion script for Linux can be installed using the one liner below:

```sh
curl -sL https://github.com/codegangsta/cli/raw/master/autocomplete/bash_autocomplete | sed 's/$PROG/devstep/' | sudo tee /etc/bash_completion.d/devstep
```

On OSX it gets installed automatically thanks to Homebrew.
Loading