poppy/docker/compose
amitgandhinz 0d08dfa66e Added Docker Files to mimic third party API's
This change works towards making the API tests pass
against Mimic'd drivers so that real production accounts
do not need to be set up - namely:
- Mimic - Fastly
- Mimic - Keystone

It also makes the mimic fastly instance the default driver in /etc

Implements: bp/mimic-fastly

Change-Id: I35d36fbc2452fc4e2233c19abefd738c9975edd0
2015-08-04 15:12:34 -04:00
..
README.md Migrate Docker from fig to docker-compose 2015-07-23 14:17:22 -04:00
dependencies.yml Added Docker Files to mimic third party API's 2015-08-04 15:12:34 -04:00
poppy_stack.yml Added Docker Files to mimic third party API's 2015-08-04 15:12:34 -04:00
poppy_stack_mocked.yml Added Docker Files to mimic third party API's 2015-08-04 15:12:34 -04:00

README.md

Before you begin

Install Docker-Compose::

$ sudo pip install -U docker-compose

Warning - never git commit your secret credentials to upstream!

Install the Full Poppy stack (poppy_stack.yml)

  1. Create your poppy.conf Configuration file:

    $ cp docker/api/poppy-sample.conf docker/api/poppy.conf

  2. Update docker/api/poppy.conf with your secret settings (this file is git-ignored).

  3. Build and Run::

    $ docker-compose -f docker/compose/poppy_stack.yml up -d

Running Poppy Locally

During development, you want to run poppy locally, but use dependencies like Zookeeper and Cassandra within a Docker Container.

  1. Build and Run::

    $ docker-compose -f dependencies.yml up -d

Testing

Access the running poppy api instance home document::

$ curl <docker_ip>/v1.0/

Useful Commands

Kill All Containers:

$ docker kill $(docker ps -aq)

Remove All Containers:

$ docker rm $(docker ps -aq)

List All Containers:

$ docker ps -a

Rebuild Stack:

$ docker-compose -f docker/compose/poppy_stack.yml build

Known Issues

Docker Cassandra Image:

Killing the container (docker kill ...) will remove the data, but not the structure.  This will cause issues with schema migration next time you run the container.  It is recommended to remove the container completely (docker rm ...) to restart with a clean slate.

Akamai Driver:

Interacting with the Akamai API via the egcurl client requires the host to be running with time synced with an NTP server.  Any time skew will cause policy updates to fail with a 'Invalid Timestamp' error.  Restart your docker host (boot2docker) and try again.