OSDN Git Service

improves server key pair deployment. screwdriver-0.2.2
authorwhitestar <whitestar@users.osdn.me>
Tue, 5 Sep 2017 13:33:18 +0000 (22:33 +0900)
committerwhitestar <whitestar@users.osdn.me>
Tue, 5 Sep 2017 13:33:18 +0000 (22:33 +0900)
cookbooks/screwdriver/CHANGELOG.md
cookbooks/screwdriver/README.md
cookbooks/screwdriver/metadata.rb
cookbooks/screwdriver/recipes/docker-compose.rb
cookbooks/screwdriver/version

index dc57af4..f73b819 100644 (file)
@@ -1,5 +1,9 @@
 # screwdriver CHANGELOG
 
+0.2.2
+-----
+- improves server key pair deployment.
+
 0.2.1
 -----
 - revises documents.
index c9db869..1cc30b6 100644 (file)
@@ -176,9 +176,9 @@ run_list(
 
 override_attributes(
   'ssl_cert' => {
-    'common_names' => [
-      cn,
-    ],
+    #'common_names' => [
+    #  cn,  # screwdriver cookbook < 0.2.2
+    #],
   },
   'screwdriver' => {
     'with_ssl_cert_cookbook' => true,
@@ -288,9 +288,9 @@ $ knife vault update ssl_server_certs screwdriver.io.example.com.prod -S 'name:s
 ```ruby
 override_attributes(
   'ssl_cert' => {
-    'common_names' => [
-      'screwdriver.io.example.com',
-    ],
+    #'common_names' => [
+    #  'screwdriver.io.example.com',  # screwdriver cookbook < 0.2.2
+    #],
   },
   'screwdriver' => {
     'with_ssl_cert_cookbook' => true,
index e34b485..cf6ae4d 100644 (file)
@@ -17,4 +17,4 @@ supports 'ubuntu', '>= 14.04'
 
 depends 'docker-grid', '>= 0.4.0'
 #depends 'platform_utils', '>= 0.4.4'
-depends 'ssl_cert', '>= 0.4.0'
+depends 'ssl_cert', '>= 0.4.1'
index 63e2f9a..e083882 100644 (file)
@@ -228,9 +228,10 @@ store_uri = store_envs_org['URI']
 ui_uri = api_uri.gsub(/:\d+/, ":#{ui_port}")  # based on the API URI.
 
 if node['screwdriver']['with_ssl_cert_cookbook']
+  cn = node['screwdriver']['ssl_cert']['common_name']
+  append_server_ssl_cn(cn)
   include_recipe 'ssl_cert::server_key_pairs'
 
-  cn = node['screwdriver']['ssl_cert']['common_name']
   server_cert = server_cert_content(cn)
   server_key = server_key_content(cn)
 
@@ -300,13 +301,13 @@ store_envs['ECOSYSTEM_UI'] = ui_uri
 
 # Common
 if node['screwdriver']['docker-compose']['import_ca']
-  include_recipe 'ssl_cert::ca_certs'
-
   node['screwdriver']['ssl_cert']['ca_names'].each {|ca_name|
+    append_ca_name(ca_name)
     ca_cert_vol = "#{ca_cert_path(ca_name)}:/usr/share/ca-certificates/#{ca_name}.crt:ro"
     api_vols.push(ca_cert_vol)
     #ui_vols.push(ca_cert_vol)
   }
+  include_recipe 'ssl_cert::ca_certs'
 
   import_ca_script = '/usr/local/bin/screwdriver_import_ca'
   template "#{bin_dir}/screwdriver_import_ca" do