Skip to content

Commit

Permalink
Merge pull request #95 from rackerlabs/dockerize
Browse files Browse the repository at this point in the history
Dockerize!
  • Loading branch information
lekhajee committed Nov 22, 2014
2 parents be70322 + 2aa0472 commit f17dc64
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM python:2.7-onbuild
EXPOSE 8900
CMD ["twistd", "-n", "mimic"]
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ node, for 20 seconds:

`{"loadBalancer": {"name": "a-new-loadbalancer2", "protocol": "HTTP", "virtualIps": [{"type": "PUBLIC"}], "metadata": [{"key": "lb_pending_update", "value": 20}], "nodes": []}}`


## Mimic Control APIs ##

When any of Mimic's included plugins schedule a timeout, you will need to cause
Expand Down Expand Up @@ -124,3 +123,14 @@ If you would prefer to advance Mimic to something resembling the present day ins
3. `pip install -r requirements.txt` from within the mimic folder (if there is a gcc error, `apt-get install python-dev`)
4. cd into mimic or add the mimic to the PYTHONPATH and run `twistd -n mimic`

## Running Mimic on Docker ##

The repository root has a `Dockerfile` that does what you want. It exposes Mimic on port 8900 by default.

To play around with Mimic locally, try:

```
docker build -t mimic . && docker run --restart=no --rm=true -p 8900:8900 mimic
```

This will expose Mimic on port 8900, so you can access it directly from the host. The default port exposure is intended for communication between containers; see the Docker documentation for more information. If you're using `boot2docker`, run `boot2docker ip` to find the right IP.

0 comments on commit f17dc64

Please sign in to comment.