You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by tn...@apache.org on 2015/05/25 07:31:54 UTC

[19/20] mesos git commit: Add documentation for new docker flags.

Add documentation for new docker flags.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9f91e07e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9f91e07e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9f91e07e

Branch: refs/heads/master
Commit: 9f91e07e4d90ff0cab2f362d8425770d6a919c16
Parents: a76bed6
Author: Timothy Chen <tn...@gmail.com>
Authored: Fri Jan 16 23:07:19 2015 +0000
Committer: Timothy Chen <tn...@gmail.com>
Committed: Sun May 24 22:27:40 2015 -0700

----------------------------------------------------------------------
 docs/configuration.md        | 31 +++++++++++++++++++++++++++++++
 docs/docker-containerizer.md | 19 ++++++++++++-------
 2 files changed, 43 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9f91e07e/docs/configuration.md
----------------------------------------------------------------------
diff --git a/docs/configuration.md b/docs/configuration.md
index 54c4e31..0a7629a 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -859,6 +859,37 @@ file:///path/to/file (where file contains one of the above)</code></pre>
   </tr>
   <tr>
     <td>
+      --[no-]docker_kill_orphans
+    </td>
+    <td>
+      Enable docker containerizer to kill orphaned containers
+      (default: true)
+    </td>
+  </tr>
+  <tr>
+    <td>
+      --docker_sock=VALUE
+    </td>
+    <td>
+      The docker UNIX socket path that the CLI uses to communicate to the
+      daemon. We need this to launch docker containers that can run docker
+      CLI.
+      (default: /var/run/docker.sock)
+    </td>
+  </tr>
+  <tr>
+    <td>
+      --docker_mesos_image=VALUE
+    </td>
+    <td>
+      The docker image used to launch this mesos slave instance.
+      If a image is specified, the docker containerizer assumes the slave
+      is running in a docker container, and launches executors with
+      docker containers in order to recover them when the slave recovers.
+    </td>
+  </tr>
+  <tr>
+    <td>
       --docker_sandbox_directory=VALUE
     </td>
     <td>

http://git-wip-us.apache.org/repos/asf/mesos/blob/9f91e07e/docs/docker-containerizer.md
----------------------------------------------------------------------
diff --git a/docs/docker-containerizer.md b/docs/docker-containerizer.md
index a5438b7..da9c533 100644
--- a/docs/docker-containerizer.md
+++ b/docs/docker-containerizer.md
@@ -39,18 +39,17 @@ Currently the Docker Containerizer when launching as task will do the following:
 
 1, Fetch all the files specified in the CommandInfo into the sandbox.
 2, Pull the docker image from the remote repository.
-3, Run the docker image with the configured DockerInfo options, and map the sandbox directory into the Docker container and set the directory mapping to the MESOS_SANDBOX environment variable.
-4. Stream the docker logs into the stdout/stderr files in the sandbox.
-5. Launch the Command Executor to perform a docker wait on the container.
-6. On container exit or containerizer destroy, stop and remove the docker container.
+3, Run the docker image with the Docker executor, and map the sandbox directory into the Docker container and set the directory mapping to the MESOS_SANDBOX environment variable.
+   The executor will also stream the container logs into stdout/stderr files in the sandbox.
+4. On container exit or containerizer destroy, stop and remove the docker container.
 
-The Docker Containerizer launches all containers with the "mesos-" prefix (ie: mesos-abcdefghji), and also assumes all containers with the "mesos-" prefix is managed by the slave and is free to stop or kill the containers.
+The Docker Containerizer launches all containers with the "mesos-" prefix plus the slave id (ie: mesos-slave1-abcdefghji), and also assumes all containers with the "mesos-" prefix is managed by the slave and is free to stop or kill the containers.
 
 When launching the docker image as an Executor, the only difference is that it skips launching a command executor but just reaps on the docker container executor pid.
 
-Note that we currently default to host networking when running a docker image, to easier support running a docker image asn an Executor.
+Note that we currently default to host networking when running a docker image, to easier support running a docker image as an Executor.
 
-Also since we explicitly attempt to pull the image on launch, if the docker image is only installed locally but not avaialble on the remote repository the launch will fail as well.
+The containerizer also supports optional force pulling of the image, and if disabled the docker image will only be updated again if it's not available on the host.
 
 ## Private Docker repository
 
@@ -65,3 +64,9 @@ To run a docker image with the default command (ie: docker run image), the Comma
 
 To run a docker image with an entrypoint defined, the CommandInfo's shell option must be set to false.
 If shell option is set to true the Docker Containerizer will run the user's command wrapped with /bin/sh -c which will also become parameters to the image entrypoint.
+
+## Recover Docker containers on slave recovery
+
+The Docker containerizer supports recovering Docker containers when the slave restarts, which supports both when the slave is running in a Docker container or not.
+
+With the docker_mesos_image flag enabled, the Docker containerizer assumes the containerizer is running in a container itself and modifies the mechanism it recovers and launches docker containers accordingly.