Added tox environment for running api tests using docker

Change-Id: I0b9f6a34218e52ebe6cda590eb271d9e49ed8186
This commit is contained in:
amitgandhinz
2014-11-18 14:23:40 -05:00
parent 6c938bc8e7
commit 181bdbcba0
8 changed files with 78 additions and 19 deletions

View File

@@ -2,28 +2,26 @@ Before Starting
---------------
The following files should exist in this folder before running Dockerfile
* docker_rsa (private key) -> public key should be published to the private git repo
* poppy.conf (desired configuration for poppy api)
* logging.conf (desired logging configuration file)
Install Fig::
$ sudo pip install -U fig
Building and Running the Poppy API Server
-----------------------------------------
Building the Poppy Server Docker Image
--------------------------------------
From this folder, run::
Copy the Dockerfile to the /poppy root folder, then run::
$ dev up
$ docker build -t poppy .
Note that `dev` is a wrapper around the [`fig` CLI](http://www.fig.sh/cli.html) so
any sub-commands that work with the fig CLI will work with `dev` as well.
Also note that the `fig_dev.yml` file in this folder cannot be used directly with
`fig`. Please invoke `dev` instead as it does some extra setup before internally
invoking `fig`.
Running the Poppy Docker Container
--------------------------------------
Name the container 'poppy'::
$ docker run -d -p 81:8081 --name poppy poppy
Testing
--------
@@ -31,3 +29,9 @@ Testing
Access the running poppy api instance home document::
$ curl <docker_ip>/v1.0/
Next Steps
----------
If running locally with Cassandra, ensure the Cassandra Docker Container is running and linked.

View File

@@ -1,10 +0,0 @@
#!/bin/sh
THIS_DIR=$(dirname $0)
PROJECT_ROOT_DIR=$THIS_DIR/../..
# Copy Dockerfile from this folder to project root folder
cp $THIS_DIR/Dockerfile $PROJECT_ROOT_DIR/
# Bring up development environment
FIG_FILE=fig_dev.yml fig $@

View File

@@ -1,25 +0,0 @@
repose:
build: ../repose/.
ports:
- "80:8080"
environment:
KEYSTONE_ADMIN: Username
KEYSTONE_PASSWORD: Password
KEYSTONE_URI: Uri
DESTINATION_HOST: poppy
DESTINATION_PORT: 8081
links:
- poppydev
poppydev:
build: ../../.
ports:
- "81:8081"
links:
- cassandra
volumes:
- ../../:/home/poppy
cassandra:
build: ../cassandra/.
ports:
- "9160:9160"
- "9042:9042"