[ARVADOS] created: 1e66f628a28e212a7a2d49025c5558ccb589ace2

git at public.curoverse.com git at public.curoverse.com
Sun Aug 3 17:53:32 EDT 2014


        at  1e66f628a28e212a7a2d49025c5558ccb589ace2 (commit)


commit 1e66f628a28e212a7a2d49025c5558ccb589ace2
Author: Ward Vandewege <ward at curoverse.com>
Date:   Sun Aug 3 23:52:07 2014 +0200

    Provide a bit more detail about build.sh in the documentation.
    
    refs #3363

diff --git a/doc/install/install-docker.html.textile.liquid b/doc/install/install-docker.html.textile.liquid
index 12cdfbe..00f84eb 100644
--- a/doc/install/install-docker.html.textile.liquid
+++ b/doc/install/install-docker.html.textile.liquid
@@ -24,7 +24,9 @@ See also: "Downloading the source code":https://arvados.org/projects/arvados/wik
 
 h2. Building the Arvados Docker containers
 
-First of all, a suitable @config.yml@ file is needed. The easiest way to generate one based on the provided @config.yml.example@ file is to run the @build.sh@ script which will prompt for a few inputs and then build all the Docker containers (this will take a while): 
+First of all, a suitable @config.yml@ file is needed. The easiest way to generate one based on the provided @config.yml.example@ file is to run the @build.sh@ script. If no @config.yml@ file exists, it will will prompt for a few inputs, write the @config.yml@ file, and then proceed to build all the Docker containers. If @config.yml@ exists, invoking @build.sh@ will simply build all Docker containers or update those that need to be updated.
+
+Run @build.sh@ without arguments to generate @config.yml@ and build all Docker containers (this will take a while!):
 
 <notextile>
 <pre><code>
@@ -74,6 +76,24 @@ crosbymichael/skydns    latest              1923ce648d4c        5 months ago
 
 h2. Updating the Arvados Docker containers
 
+ at build.sh@ takes a few optional arguments:
+
+<notextile>
+<pre><code>
+~$ <span class="userinput"> ./build.sh --help</span>
+
+usage: ./build.sh [options]
+
+Calling ./build.sh without arguments will build all Arvados docker images
+
+./build.sh options:
+  -h, --help   Print this help text
+  clean        Clear all build information
+  realclean    clean and remove all Arvados Docker images except arvados/debian
+  deepclean    realclean and remove arvados/debian, crosbymichael/skydns and
+               crosbymichael/skydns Docker images
+</code></pre></notextile>
+
 If there has been an update to the Arvados Docker building code, it is safest to rebuild the Arvados Docker images from scratch. All build information can be cleared with the 'clean' option to build.sh:
 
 <notextile>

commit 729949090fcc5d4158be57657c036df1056bb0c8
Author: Ward Vandewege <ward at curoverse.com>
Date:   Sun Aug 3 23:51:11 2014 +0200

    Only the deepclean Make action should remove the skydns-image and skydock-image files.
    
    refs #3363

diff --git a/docker/build_tools/Makefile b/docker/build_tools/Makefile
index 09c09cc..eb611ea 100644
--- a/docker/build_tools/Makefile
+++ b/docker/build_tools/Makefile
@@ -6,7 +6,7 @@ endif
 
 all: skydns-image skydock-image api-image compute-image doc-image workbench-image keep-image sso-image shell-image
 
-IMAGE_FILES := $(shell ls *-image 2>/dev/null |grep -v debian-arvados-image)
+IMAGE_FILES := $(shell ls *-image 2>/dev/null |grep -v -E 'debian-arvados-image|skydns-image|skydock-image')
 GENERATED_FILES := $(shell ls */generated/* 2>/dev/null)
 GENERATED_DIRS := $(shell ls */generated 2>/dev/null)
 
@@ -40,6 +40,7 @@ realclean: clean
 deepclean: clean
 	@echo "make deepclean"
 	- at rm -f debian-arvados-image 2>/dev/null
+	- at rm -f skydns-image skydock-image 2>/dev/null
 	+@[ "`$(DOCKER) ps -q`" = '' ] || $(DOCKER) stop `$(DOCKER) ps -q`
 	+@[ "$(REALCLEAN_CONTAINERS)" = '' ] || $(DOCKER) rm $(REALCLEAN_CONTAINERS)
 	+@[ "$(DEEPCLEAN_IMAGES)" = '' ] || $(DOCKER) rmi $(DEEPCLEAN_IMAGES)

commit f43267ad023fd4121c7ad12dc2b44579dfade1a4
Author: Ward Vandewege <ward at curoverse.com>
Date:   Sun Aug 3 23:33:11 2014 +0200

    Update Docker install documentation:
    
    * suggest use of build.sh to generate config.yml
    
    * reflect now default use of Curoverse SSO server
    
    refs #3363

diff --git a/doc/install/install-docker.html.textile.liquid b/doc/install/install-docker.html.textile.liquid
index 9b4cf6d..12cdfbe 100644
--- a/doc/install/install-docker.html.textile.liquid
+++ b/doc/install/install-docker.html.textile.liquid
@@ -24,29 +24,20 @@ See also: "Downloading the source code":https://arvados.org/projects/arvados/wik
 
 h2. Building the Arvados Docker containers
 
-First of all, a suitable @config.yml@ file is needed.
-
-<notextile>
-<pre><code>~$ <span class="userinput">cd arvados/docker</span>
-~$ <span class="userinput">cp config.yml.example config.yml</span>
-</code></pre></notextile>
-
-Edit the @config.yml@ file and fill in values for at a minimum these
-parameters:
-
-<pre>
-PUBLIC_KEY_PATH
-ARVADOS_USER_NAME
-API_HOSTNAME
-API_AUTO_ADMIN_USER
-</pre>
-
-Then build the docker containers (this will take a while):
+First of all, a suitable @config.yml@ file is needed. The easiest way to generate one based on the provided @config.yml.example@ file is to run the @build.sh@ script which will prompt for a few inputs and then build all the Docker containers (this will take a while): 
 
 <notextile>
 <pre><code>
 ~$ <span class="userinput">./build.sh</span>
+Generating config.yml.
+Arvados needs to know the email address of the administrative user,
+so that when that user logs in they are automatically made an admin.
+This should be an email address associated with a Google account.
+
+Enter your Google ID email address here:
+
 ...
+
 Step 7 : ADD generated/setup.sh /usr/local/bin/setup.sh
  ---> d7c0e7fdf7ab
 Removing intermediate container f3d81180795d
@@ -176,6 +167,8 @@ Point your browser to the Dockerized workbench:
 </code></pre>
 </notextile>
 
-Now use the google account you specified as @API_AUTO_ADMIN_USER@ in @config.yml@ to log in. You will be prompted *twice* by your browser that you are accessing a site with an untrusted SSL certificate. This is normal; by default the Arvados Docker installation uses self-signed SSL certificates for the SSO and API servers, respectively.
+Now use the google account you specified as @API_AUTO_ADMIN_USER@ in @config.yml@ to log in.
+
+You will be prompted by your browser that you are accessing a site with an untrusted SSL certificate. This is normal; by default the Arvados Docker installation uses self-signed SSL certificates for the SSO and API servers, respectively. If you use a local SSO server in a Docker container, you will be prompted *twice*. The default is to use the Curoverse SSO server.
 
 

commit 3862ce78fd0541199053efb9c25ea2d6e09223f7
Author: Ward Vandewege <ward at curoverse.com>
Date:   Sun Aug 3 23:23:14 2014 +0200

    * Default to using the auth.curoverse.com SSO server. Add instructions
    in config.yml.example for using a local SSO server.
    
    * Do not prepopulate the config.yml file generated by build.sh with
    random values for _PW and _SECRET variables, let config.rb deal with
    that at build time.
    
    * Make config.rb a bit more robust in choosing those values for _PW and
    _SECRET by not depending on any particular key order in the config Hash.
    
    refs #3363

diff --git a/docker/build_tools/build.rb b/docker/build_tools/build.rb
index df76d52..e7f2b7d 100755
--- a/docker/build_tools/build.rb
+++ b/docker/build_tools/build.rb
@@ -14,7 +14,7 @@ def main options
   # Check that:
   #   * Docker is installed and can be found in the user's path
   #   * Docker can be run as a non-root user
-  #      - TODO: put the user is in the docker group if necessary
+  #      - TODO: put the user in the docker group if necessary
   #      - TODO: mount cgroup automatically
   #      - TODO: start the docker service if not started
 
@@ -77,15 +77,15 @@ def main options
     end
 
     File.open 'config.yml', 'w' do |config_out|
+      config_out.write "# If a _PW or _SECRET variable is set to an empty string, a password\n"
+      config_out.write "# will be chosen randomly at build time. This is the\n"
+      config_out.write "# recommended setting.\n\n"
       config = YAML.load_file 'config.yml.example'
       config['API_AUTO_ADMIN_USER'] = admin_email_address
       config['ARVADOS_USER_NAME'] = user_name
       config['API_HOSTNAME'] = generate_api_hostname
       config['PUBLIC_KEY_PATH'] = find_or_create_ssh_key(config['API_HOSTNAME'])
       config.each_key do |var|
-        if var.end_with?('_PW') or var.end_with?('_SECRET')
-          config[var] = rand(2**256).to_s(36)
-        end
         config_out.write "#{var}: #{config[var]}\n"
       end
     end
diff --git a/docker/build_tools/config.rb b/docker/build_tools/config.rb
index 8b9bb73..77c721c 100755
--- a/docker/build_tools/config.rb
+++ b/docker/build_tools/config.rb
@@ -18,7 +18,7 @@ config = YAML.load_file('config.yml')
 # doesn't change if config.yml doesn't change. Otherwise, keys won't
 # match any more if (say) keep's files get regenerated but apiserver's
 # don't.
-config.each_key do |var|
+config.sort.map do |var,val|
   if (var.end_with?('_PW') || var.end_with?('_SECRET')) && (config[var].nil? || config[var].empty?)
     config[var] = Digest::SHA1.hexdigest(`hostname` + var + config.to_yaml)
   end
diff --git a/docker/config.yml.example b/docker/config.yml.example
index 52a505c..0765f2f 100644
--- a/docker/config.yml.example
+++ b/docker/config.yml.example
@@ -90,5 +90,11 @@ WORKBENCH_SECRET:
 SSO_HOSTNAME: sso
 SSO_SECRET:
 SSO_CLIENT_NAME: devsandbox
-SSO_CLIENT_APP_ID: devsandbox
-SSO_CLIENT_SECRET:
+# ==============================
+# Default to using auth.curoverse.com as SSO server
+# To use your a local Docker SSO server, set OMNIAUTH_URL and SSO_CLIENT_SECRET
+# to the empty string
+# ==============================
+OMNIAUTH_URL: https://auth.curoverse.com
+SSO_CLIENT_APP_ID: local_docker_installation
+SSO_CLIENT_SECRET: yohbai4eecohshoo1Yoot7tea9zoca9Eiz3Tajahweo9eePaeshaegh9meiye2ph

commit 4aea5131a87f375285210d9ccde2470cfeac5876
Author: Ward Vandewege <ward at curoverse.com>
Date:   Sun Aug 3 22:30:48 2014 +0200

    Be less presumptuous about the GNU/Linux distribution we are being run
    on, and do not try to install ruby >= 1.9.3 automatically.
    
    refs #3363

diff --git a/docker/build.sh b/docker/build.sh
index c9fbf05..77aeb1f 100755
--- a/docker/build.sh
+++ b/docker/build.sh
@@ -1,14 +1,11 @@
 #! /bin/bash
 
-# make sure Ruby 1.9.3 is installed before proceeding
+# make sure a Ruby version greater than or equal to 1.9.3 is installed before proceeding
 if ! ruby -e 'exit RUBY_VERSION >= "1.9.3"' 2>/dev/null
 then
-    echo "Installing Arvados requires at least Ruby 1.9.3."
-    echo "You may need to enter your password."
-    read -p "Press Ctrl-C to abort, or else press ENTER to install ruby1.9.3 and continue. " unused
-
-    sudo apt-get update
-    sudo apt-get -y install ruby1.9.3
+    echo "Building the Arvados docker containers requires at least Ruby 1.9.3."
+    echo "Please install ruby 1.9.3 or higher before executing this script."
+    exit 1
 fi
 
 function usage {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list