OSDN Git Service

add .envrc
[metasearch/grid-chef-repo.git] / roles / devops-suite-with-ssl-on-docker.rb
index d0ef308..50af05b 100644 (file)
@@ -30,19 +30,22 @@ if $0.split.include?('chef-solo') || ($0.split.include?('chef-client') && ARGV.i
   host_cn = node['fqdn'] if host_cn.nil?
 end
 host_cn = 'devops.io.example.com' if host_cn.nil?
-aptly_cn = host_cn       # e.g. 'aptly.io.example.com'
-concourse_cn = host_cn   # e.g. 'concourse.io.example.com'
-concourse_port    = '8443'
-docker_reg_cn = host_cn  # e.g. 'registry.docker.example.com'
-docker_reg_port   = '5000'
+aptly_cn = host_cn        # e.g. 'aptly.io.example.com'
+athenz_cn = host_cn       # e.g. 'athenz.io.example.com'
+concourse_cn = host_cn    # e.g. 'concourse.io.example.com'
+concourse_port      = '8443'
+docker_reg_cn = host_cn   # e.g. 'registry.docker.example.com'
+docker_reg_port     = '5000'
 docker_reg_data_vol = '/opt/docker-compose/app/registry/data'
-gitlab_cn = host_cn      # e.g. 'gitlab.io.example.com'
-gitlab_https_port =  '443'
-gitlab_reg_port   = '5050'
-jenkins_cn = host_cn     # e.g. 'jenkins.io.example.com'
-jenkins_port      = '9083'
-nexus_cn = host_cn       # e.g. 'nexus.io.example.com'
-vault_cn = host_cn       # e.g. 'vault.io.example.com'
+gitlab_cn = host_cn       # e.g. 'gitlab.io.example.com'
+gitlab_https_port   =  '443'
+gitlab_reg_port     = '5050'
+jenkins_cn = host_cn      # e.g. 'jenkins.io.example.com'
+jenkins_port        = '9083'
+nexus_cn = host_cn        # e.g. 'nexus.io.example.com'
+screwdriver_cn = host_cn  # e.g. 'screwdriver.io.example.com'
+screwdriver_ui_port = '9000'  # default: 9000
+vault_cn = host_cn        # e.g. 'vault.io.example.com'
 dockerd_extra_opts = [
   '-H fd://',
   '--bip=192.168.100.1/24 --fixed-cidr=192.168.100.0/24',
@@ -54,13 +57,8 @@ with_ssl = true
 
 common_names = [
   host_cn,
-  aptly_cn,
-  concourse_cn,
-  docker_reg_cn,
-  gitlab_cn,
-  jenkins_cn,
-  nexus_cn,
 ].compact.uniq
+common_names = nil if common_names.empty?
 
 # for GitLab
 ldap_servers = <<-'EOS'
@@ -321,6 +319,43 @@ override_attributes(
       },
     },
   },
+  'screwdriver' => {
+    'with_ssl_cert_cookbook' => with_ssl,
+    'ssl_cert' => {
+      'common_name' => screwdriver_cn,
+    },
+    'docker-compose' => {
+      'config' => {
+        'services' => {
+          'reverseproxy' => {
+            'ports' => [
+              "#{screwdriver_ui_port}:9000"
+            ],
+            'environment' => {
+            },
+          },
+          'api' => {
+            #'ports' => [
+            #],
+            'environment' => {
+            },
+          },
+          'ui' => {
+            #'ports' => [
+            #],
+            'environment' => {
+            },
+          },
+          'store' => {
+            #'ports' => [
+            #],
+            'environment' => {
+            },
+          },
+        },
+      },
+    },
+  },
   'hc-vault' => {
     'with_ssl_cert_cookbook' => with_ssl,
     'ssl_cert' => {