aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jco...@apache.org
Subject aurora git commit: Added short example to documentation how to use .thermos_profile.
Date Mon, 31 Oct 2016 17:51:15 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 7ac639be5 -> 2a8c667ec


Added short example to documentation how to use .thermos_profile.

Reviewed at https://reviews.apache.org/r/53258/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/2a8c667e
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/2a8c667e
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/2a8c667e

Branch: refs/heads/master
Commit: 2a8c667ec1b48900530975169f132d9deb098399
Parents: 7ac639b
Author: Rogier Dikkes <r.dikkes@gmail.com>
Authored: Mon Oct 31 12:50:55 2016 -0500
Committer: Joshua Cohen <jcohen@apache.org>
Committed: Mon Oct 31 12:50:55 2016 -0500

----------------------------------------------------------------------
 docs/reference/configuration-tutorial.md | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/2a8c667e/docs/reference/configuration-tutorial.md
----------------------------------------------------------------------
diff --git a/docs/reference/configuration-tutorial.md b/docs/reference/configuration-tutorial.md
index c0e573b..4f052c6 100644
--- a/docs/reference/configuration-tutorial.md
+++ b/docs/reference/configuration-tutorial.md
@@ -243,6 +243,26 @@ The template for this Process is:
 
 Note: Be sure the extracted code archive has an executable.
 
+## Getting Environment Variables Into The Sandbox
+
+Every time a process is forked the Thermos executor checks for the existence of the
+`.thermos_profile` file, if the `.thermos_profile` file exists it will be sourced.
+You can utilize this process to pass environment variables to the sandbox.
+
+An example for this Process is:
+
+    setup_env = Process(
+      name = 'setup'
+      cmdline = '''cat <<EOF > .thermos_profile
+                   export RESULT=hello
+                   EOF'''
+    )
+
+    read_env = Process(
+      name = 'read'
+      cmdline = 'echo $RESULT'
+    )
+
 ## Defining Task Objects
 
 Tasks are handled by Mesos. A task is a collection of processes that
@@ -508,4 +528,4 @@ Then issue the following commands to create and kill the job, using your
own val
 
     aurora job create cluster1/$USER/test/hello_world-cluster1 hello_world_productionized.aurora
 
-    aurora job kill cluster1/$USER/test/hello_world-cluster1
+    aurora job kill cluster1/$USER/test/hello_world-cluster1
\ No newline at end of file


Mime
View raw message