OSDN Git Service

Bug fix: SSH keys directory volume mount configurations. concourse-ci-0.1.4
authorwhitestar <whitestar@gaea.test>
Wed, 15 Feb 2017 13:36:47 +0000 (22:36 +0900)
committerwhitestar <whitestar@gaea.test>
Wed, 15 Feb 2017 13:36:47 +0000 (22:36 +0900)
cookbooks/concourse-ci/CHANGELOG.md
cookbooks/concourse-ci/README.md
cookbooks/concourse-ci/attributes/default.rb
cookbooks/concourse-ci/metadata.rb
cookbooks/concourse-ci/recipes/docker-compose.rb

index a5c7850..bd43a50 100644 (file)
@@ -1,6 +1,10 @@
 concourse-ci CHANGELOG
 ======================
 
+0.1.4
+-----
+- Bug fix: SSH keys directory volume mount configurations.
+
 0.1.3
 -----
 - moves secrets from the `docker-compose.yml` file to the `.env` file.
index b9967c1..2750753 100644 (file)
@@ -72,7 +72,7 @@ run_list(
   'recipe[concourse-ci::docker-compose]',
 )
 
-image = 'concourse/concourse:2.6.0'
+image = 'concourse/concourse:2.7.0'
 port = '18080'
 
 override_attributes(
@@ -85,12 +85,20 @@ override_attributes(
           'ports' => [
             "#{port}:8080",
           ],
+          #'volumes' => [
+          #  # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
+          #  #"#{node['concourse-ci']['docker-compose']['web_keys_dir']}:/concourse-keys",
+          #],
           'environment' => {
             'CONCOURSE_EXTERNAL_URL' => "http://192.168.1.3:#{port}",
           },
         },
         'concourse-worker' => {
           'image' => image,
+          #'volumes' => [
+          #  # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
+          #  #"#{node['concourse-ci']['docker-compose']['worker_keys_dir']}:/concourse-keys",
+          #],
         },
       },
     },
@@ -140,14 +148,19 @@ override_attributes(
             #'CONCOURSE_TLS_CERT' => '/root/server.crt',
             #'CONCOURSE_TLS_KEY' => '/root/server.key',
           },
-          'volumes' => [
-            # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
-            #"#{server_cert_path(node['concourse-ci']['ssl_cert']['common_name'])}:/root/server.crt:ro",
-            #"#{server_key_path(node['concourse-ci']['ssl_cert']['common_name'])}:/root/server.key:ro",
-          ],
+          #'volumes' => [
+          #  # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
+          #  #"#{node['concourse-ci']['docker-compose']['web_keys_dir']}:/concourse-keys",
+          #  #"#{server_cert_path(node['concourse-ci']['ssl_cert']['common_name'])}:/root/server.crt:ro",
+          #  #"#{server_key_path(node['concourse-ci']['ssl_cert']['common_name'])}:/root/server.key:ro",
+          #],
         },
         'concourse-worker' => {
           'image' => image,
+          #'volumes' => [
+          #  # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
+          #  #"#{node['concourse-ci']['docker-compose']['worker_keys_dir']}:/concourse-keys",
+          #],
         },
       },
     },
index c2c4f13..ec652ca 100644 (file)
@@ -83,7 +83,8 @@ version_1_config = {
       #'8443:8443',  # https
     ],
     'volumes' => [
-      "#{node['concourse-ci']['docker-compose']['web_keys_dir']}:/concourse-keys",
+      # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
+      #"#{node['concourse-ci']['docker-compose']['web_keys_dir']}:/concourse-keys",
     ],
     'environment' => {
       #'CONCOURSE_TLS_BIND_PORT' => '8443',  # activate HTTPS
@@ -106,7 +107,8 @@ version_1_config = {
     ],
     'command' => 'worker',
     'volumes' => [
-      "#{node['concourse-ci']['docker-compose']['worker_keys_dir']}:/concourse-keys",
+      # These volumes will be set by the concourse-ci::docker-compose recipe automatically.
+      #"#{node['concourse-ci']['docker-compose']['worker_keys_dir']}:/concourse-keys",
     ],
     'environment' => {
       'CONCOURSE_TSA_HOST' => 'concourse-web',
index 1e7c95b..c554a4b 100644 (file)
@@ -5,10 +5,17 @@ maintainer_email ''
 license          'Apache 2.0'
 description      'Installs/Configures Concourse CI by Docker Compose'
 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version          '0.1.3'
+version          '0.1.4'
 source_url       'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
 issues_url       'https://osdn.jp/projects/metasearch/ticket'
 
+supports 'ubuntu', '>= 14.04'
+=begin
+%w( centos redhat ).each do |os|
+  supports os, '>= 8.0'
+end
+=end
+
 depends 'docker-grid', '>= 0.2.7'
 depends 'platform_utils', '>= 0.4.3'
 depends 'ssl_cert', '>= 0.3.7'
index a12fcf5..23aeea4 100644 (file)
@@ -150,6 +150,8 @@ web_vols = config_srvs['concourse-web']['volumes'].to_a
 web_ports = config_srvs['concourse-web']['ports']
 override_config_srvs['concourse-web']['ports'] = ['8080:8080'] if web_ports.empty?
 
+web_vols.push("#{node['concourse-ci']['docker-compose']['web_keys_dir']}:/concourse-keys")
+
 web_password_reset = node['concourse-ci']['docker-compose']['web_password_reset']
 basic_auth_passwd = nil
 web_password_vault_item = node['concourse-ci']['docker-compose']['web_password_vault_item']
@@ -201,6 +203,12 @@ force_override_config_srvs['concourse-web']['environment'] = web_envs unless web
 # reset vlumes array.
 override_config_srvs['concourse-web']['volumes'] = web_vols unless web_vols.empty?
 
+# Worker
+worker_vols = config_srvs['concourse-worker']['volumes'].to_a
+worker_vols.push("#{node['concourse-ci']['docker-compose']['worker_keys_dir']}:/concourse-keys")
+# reset vlumes array.
+override_config_srvs['concourse-worker']['volumes'] = worker_vols unless worker_vols.empty?
+
 template env_file do
   source 'opt/docker-compose/app/concourse/.env'
   owner 'root'