OSDN Git Service

bug fix: Bootstrap node's nginx restart command. dcos-grid-0.5.2
authorwhitestar <whitestar@gaea.test>
Sat, 21 Jan 2017 11:13:00 +0000 (20:13 +0900)
committerwhitestar <whitestar@gaea.test>
Sat, 21 Jan 2017 11:13:00 +0000 (20:13 +0900)
cookbooks/dcos-grid/CHANGELOG.md
cookbooks/dcos-grid/README.md
cookbooks/dcos-grid/attributes/default.rb
cookbooks/dcos-grid/metadata.rb
cookbooks/dcos-grid/templates/default/opt/dcos-grid/bootstrap_setup.sh
cookbooks/dcos-grid/templates/default/opt/dcos-grid/bootstrap_upgrade.sh
cookbooks/dcos-grid/templates/default/opt/dcos-grid/cloud-config.yaml
roles/dcos1-node.rb [new file with mode: 0644]

index 575fe2b..964a99b 100644 (file)
@@ -1,6 +1,11 @@
 dcos-grid CHANGELOG
 ===================
 
+0.5.2
+-----
+- bug fix: Bootstrap node's nginx restart command.
+- adds the `['dcos-grid']['cloud-config']['timezone']` attribute.
+
 0.5.1
 -----
 - adds `DC/OS in LXD` setup support.
index 9f44d17..b981bbc 100644 (file)
@@ -93,6 +93,7 @@ This cookbook sets up your customized DC/OS cluster on bare metal, virtual machi
 |`['dcos-grid']['cloud-config']['target_dir']`|String||`'/home/core'`|
 |`['dcos-grid']['cloud-config']['target_owner']`|String||`'core:core'`|
 |`['dcos-grid']['cloud-config']['hostname']`|String||`'<fqdn>'`|
+|`['dcos-grid']['cloud-config']['timezone']`|String||`'Etc/GMT'`|
 |`['dcos-grid']['cloud-config']['ssh_authorized_keys']`|Array||`['<your_ssh_pub_key>',]`|
 |`['dcos-grid']['universe-server']['docker-compose']['app_dir']`|String||`'/opt/docker-compose/app/dcos-universe'`|
 |`['dcos-grid']['universe-server']['docker-compose']['config']`|Hash|`docker-compose.yml` configurations.|See `attributes/default.rb`|
index 9f4e9e5..2755178 100644 (file)
@@ -89,6 +89,7 @@ default['dcos-grid']['cloud-config'] = {
   'target_dir' => '/home/core',
   'target_owner' => 'core:core',
   'hostname' => '<fqdn>',
+  'timezone' => 'Etc/GMT',
   'ssh_authorized_keys' => [
     '<your_ssh_pub_key>',
   ],
index 79f763c..4383cde 100644 (file)
@@ -5,7 +5,7 @@ maintainer_email ''
 license          'Apache 2.0'
 description      'Installs/Configures DC/OS Cluster Node.'
 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version          '0.5.1'
+version          '0.5.2'
 source_url       'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
 issues_url       'https://osdn.jp/projects/metasearch/ticket'
 
index 3352576..7b4ce82 100644 (file)
@@ -85,7 +85,8 @@ restart_nginx() {
   fi
 
   echo 'Launching Docker container for the bootstrap service ...'
-  execute "$sudo docker run -d -p ${port}:80 -v $PWD/genconf/serve:/usr/share/nginx/html:ro nginx"
+  execute "cd $install_dir" 
+  execute "$sudo docker run -d --restart always -p ${port}:80 -v $PWD/genconf/serve:/usr/share/nginx/html:ro nginx"
 }
 
 sudo='sudo'
index f94a639..23db6bf 100644 (file)
@@ -91,7 +91,8 @@ restart_nginx() {
   fi
 
   echo 'Launching Docker container for the bootstrap service ...'
-  execute "$sudo docker run -d -p ${port}:80 -v $PWD/genconf/serve:/usr/share/nginx/html:ro nginx"
+  execute "cd $install_dir" 
+  execute "$sudo docker run -d --restart always -p ${port}:80 -v $PWD/genconf/serve:/usr/share/nginx/html:ro nginx"
 }
 
 upgrade() {
index 9f8a48d..13f13db 100644 (file)
@@ -5,6 +5,7 @@ dcos_config = node['dcos-grid']['bootstrap']['config']
 #cloud-config
 
 hostname: <%= cloud_config['hostname'] %>
+timezone: <%= cloud_config['timezone'] %>
 
 # include one or more SSH public keys for the core user
 ssh_authorized_keys:
diff --git a/roles/dcos1-node.rb b/roles/dcos1-node.rb
new file mode 100644 (file)
index 0000000..0b7560b
--- /dev/null
@@ -0,0 +1,23 @@
+cluster_name = 'dcos1'
+
+name "#{cluster_name}-node"
+description "#{cluster_name} cluster node"
+
+run_list(
+  'role[docker4dcos]',
+  "role[#{cluster_name}]",
+  'recipe[dcos-grid::node]',
+)
+
+#env_run_lists
+
+default_attributes(
+)
+
+override_attributes(
+  'dcos-grid' => {
+    'node' => {
+      'auto_setup' => false,
+    },
+  },
+)