This is an automated email from the ASF dual-hosted git repository.
mwalch pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/fluo-website.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new 38f738a Document running init in Docker (#133)
38f738a is described below
commit 38f738a0c43e57cb29385c961b1494c8015fa6f7
Author: Keith Turner <[email protected]>
AuthorDate: Wed Feb 28 09:56:21 2018 -0500
Document running init in Docker (#133)
---
_fluo-1-2/administration/run-fluo-in-docker.md | 28 ++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/_fluo-1-2/administration/run-fluo-in-docker.md
b/_fluo-1-2/administration/run-fluo-in-docker.md
index ca005e8..e067d81 100644
--- a/_fluo-1-2/administration/run-fluo-in-docker.md
+++ b/_fluo-1-2/administration/run-fluo-in-docker.md
@@ -38,10 +38,34 @@ docker run apache/fluo version
docker run apache/fluo classpath
```
+## Initialize application
+
+Before starting a Fluo oracle and worker using the Fluo Docker image,
+[initialize your Fluo application][initialize]. Initialization can also be
+done using Docker. To do this, the applications jars and config file need to
+be mapped into the docker container. To understand how to do this, assume the
+following setup for local files outside of Docker.
+
+ * Application jars in `/home/user1/myapp/lib`
+ * `fluo-app.properties` in `/home/user1/myapp/conf`
+ * `fluo.observer.init.dir=/opt/myapp/lib` is set in `fluo-app.properties`
along with any other properties needed
+
+With this setup, the following Docker command will initialize `myapp`. Fluo
+init runs in docker as root, so `HADOOP_USER_NAME` is set in order to avoid
+copying into HDFS as root. The Docker run option `-v
+/home/user1/myapp:/opt/myapp` maps the local directory `/home/user1/myapp` into
+the container at `/opt/myapp`.
+
+```bash
+docker run --network="host" -v /home/user1/myapp:/opt/myapp \
+ -e HADOOP_USER_NAME=`whoami` \
+ apache/fluo init -a myapp -f -p /opt/myapp/conf/fluo-app.properties
\
+ -o fluo.connection.zookeepers=zkhost/fluo
+```
+
## Run application in Docker
-Before starting a Fluo oracle and worker using the Fluo Docker image,
[initialize your Fluo application][initialize].
-Next, choose a method below to run the oracle and worker(s) of your Fluo
application. In the examples below, the Fluo
+After initializing, choose a method below to run the oracle and worker(s) of
your Fluo application. In the examples below, the Fluo
application is named `myapp` and was initialized using a Zookeeper node on
`zkhost`.
### Docker engine
--
To stop receiving notification emails like this one, please contact
[email protected].