summaryrefslogtreecommitdiffstats
path: root/blimp/docs
diff options
context:
space:
mode:
authormaniscalco <maniscalco@chromium.org>2015-10-05 12:30:22 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-05 19:32:05 +0000
commit91be48ce93f2cef2a78157a0af2fbbfb3d6ea687 (patch)
tree9a3af07ad06653dc7a8fae434f408a37cd4aa099 /blimp/docs
parent49d1d6354eeec0eed524cde21ab49991aa6d534d (diff)
downloadchromium_src-91be48ce93f2cef2a78157a0af2fbbfb3d6ea687.zip
chromium_src-91be48ce93f2cef2a78157a0af2fbbfb3d6ea687.tar.gz
chromium_src-91be48ce93f2cef2a78157a0af2fbbfb3d6ea687.tar.bz2
Add script to bundle blimp engine into a Docker image
The blimp engine will run as a Docker container, and this CL adds the tools to be able to do that. There are three main parts: - The Dockerfile: Defines what should be part of the Docker image. - bundle-engine.py: Bundles the blimp engine and all its runtime dependencies into a tarball. This tarball also contains the Dockerfile itself. - Building a Docker image. This can easily be done by using the tarball that bundle-engine.py generates. This part is only documented and is not itself packaged into a script. To create the tarball, you execute: $ ./blimp/tools/bundle-engine.py \ --build-dir ./out-linux/Debug \ --dockerfile ./blimp/engine/Dockerfile \ --target blimp/engine:blimp_engine \ --output ./out-linux/Debug/blimp_engine_deps.tar You can then build the Docker image with: $ docker build -t blimp_engine - < ./out-linux/Debug/blimp_engine_deps.tar You can then run your Docker container with: $ docker run blimp_engine --with-my-flags BUG=538353 Review URL: https://codereview.chromium.org/1380123004 Cr-Commit-Position: refs/heads/master@{#352386}
Diffstat (limited to 'blimp/docs')
-rw-r--r--blimp/docs/container.md69
-rw-r--r--blimp/docs/running.md4
2 files changed, 73 insertions, 0 deletions
diff --git a/blimp/docs/container.md b/blimp/docs/container.md
new file mode 100644
index 0000000..0150e2a
--- /dev/null
+++ b/blimp/docs/container.md
@@ -0,0 +1,69 @@
+# Running the engine in a Docker container
+
+For local development and testing, you can run the engine in a Docker
+container.
+
+The steps are:
+
+1. Bundle the engine and its dependencies using
+[`bundle-engine.py`](../tools/bundle-engine.py).
+
+1. Build a Docker image.
+
+1. Create a Docker container.
+
+
+## About Docker
+
+To get a high-level overview of Docker, please read [Understand the
+architecture](https://docs.docker.com/introduction/understanding-docker/).
+Optional reading includes reference guides for
+[`docker run`](https://docs.docker.com/reference/run/) and
+[Dockerfile](https://docs.docker.com/reference/builder/).
+
+
+### Installation
+
+For Googlers running Goobuntu wanting to install Docker, see
+[go/installdocker](https://goto.google.com/installdocker). For other
+contributors using Ubuntu, see [official Docker
+installation instructions](https://docs.docker.com/installation/ubuntulinux/).
+
+
+## Bundle Engine
+
+Assuming the current directory is `src/` and you've already built the engine,
+you can bundle it into a tarfile by running:
+
+```bash
+./blimp/tools/bundle-engine.py \
+ --build-dir ./out-linux/Debug \
+ --dockerfile ./blimp/engine/Dockerfile \
+ --target blimp/engine:blimp_engine \
+ --output ./out-linux/Debug/blimp_engine_deps.tar
+```
+
+## Build Docker Image
+
+Using the tarfile you can create a Docker image:
+
+```bash
+docker build -t blimp_engine - < ./out-linux/Debug/blimp_engine_deps.tar
+```
+
+## Create Docker Container
+
+From the Docker image you can create a Docker container (i.e. run the engine):
+
+```bash
+docker run blimp_engine
+```
+
+You can also pass additional flags:
+
+```bash
+docker run blimp_engine --with-my-flags
+```
+
+See the [blimp engine `Dockerfile`](../engine/Dockerfile) to find out what flags
+are passed by default.
diff --git a/blimp/docs/running.md b/blimp/docs/running.md
index f42b51a..494beea 100644
--- a/blimp/docs/running.md
+++ b/blimp/docs/running.md
@@ -30,3 +30,7 @@ adb_run_blimp_client
### Linux Client
TBD
+
+## Running the engine
+
+For running the engine in a container, see [container](docs/container.md).