Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
[dockerfile_for_local_execution] Intial test version
Browse files Browse the repository at this point in the history
Docker file for running bootstrap in a container, so that the process of
installing dependent libraries is simplified.

* Added README on how to run things in the container
  • Loading branch information
oskarpearson committed Apr 9, 2015
1 parent ef86a54 commit cce973f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
47 changes: 47 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM ubuntu:14.04

MAINTAINER WebOps MoJ <webops@digital.justice.gov.uk>

# Support tools for building Python apps
# - build-essential
# - python-dev
# - python-setuptools
#
# Specific packages required for the app to work
# - git
# - libgit2-dev
# - libffi-dev
# - libyaml-dev
# Specific packages for libgit2:
# - cmake
RUN apt-get update && apt-get install -y \
build-essential python-dev python-setuptools \
git libgit2-dev libffi-dev libyaml-dev \
cmake

# Install libgit2 - http://www.pygit2.org/install.html
RUN mkdir /tmp/libgit2
WORKDIR /tmp/libgit1
ADD https://github.com/libgit2/libgit2/archive/v0.22.0.tar.gz /tmp/libgit1/
RUN tar zxf v0.22.0.tar.gz
# Perform the build
WORKDIR /tmp/libgit1/libgit2-0.22.0
RUN cmake .
RUN make
RUN make install

WORKDIR /
RUN easy_install pip

# Copy and work on just the requirements.txt file, so that the 'pip install' step is cacheable
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

# Cleanup
RUN rm -rf /tmp/libgit2
RUN rm -rf /var/lib/apt/lists/*
RUN rm -fr *Release* *Sources* *Packages*
RUN truncate -s 0 /var/log/*log

WORKDIR /usr/src/bootstrap_cfn
COPY . /usr/src/bootstrap_cfn
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ Installation
cd bootstrap-cfn
pip install -r requirements.txt

Running in Docker
=================

::

docker build -t bootstrap_cfn_local .

In your per-app deploy directory::

docker run --volume $HOME/.aws:/root/.aws --volume `pwd`:/usr/local/deploy -t -i bootstrap_cfn_local fab application:your-service-name aws:your-service-name-dev environment:dev config:/usr/local/deploy/cloudformation/your-service-name.yml passwords:/usr/local/deploy/cloudformation/your-service-name-secrets.yml command_over_here

Developing and running tests
=============================
Expand Down Expand Up @@ -173,9 +183,9 @@ Salt specific configuration

In order to rsync your salt states to the salt master you need to add a `salt` section to the top level of your project's YAML file. The following parameters specify the rsync sources and targets:

- **local_salt_dir**: Directory containing all the files you want to have in your salt root (for example top.sls or project specific states).
- **local_salt_dir**: Directory containing all the files you want to have in your salt root (for example top.sls or project specific states).
**Default value**: ./salt
- **local_pillar_dir**: Directory containing all the files you want to have in your pillar root.
- **local_pillar_dir**: Directory containing all the files you want to have in your pillar root.
**Default value**: ./pillar
- **local_vendor_dir**: Directory containing formulas cloned by salt-shaker.
**Default value**: ./vendor
Expand Down

0 comments on commit cce973f

Please sign in to comment.