concourse-ci CHANGELOG
======================
+0.1.7
+-----
+- improves CA certificates import feature.
+- adds the `['concourse-ci']['docker-image']['entrypoint']` attribute.
+
0.1.6
-----
- adds CA certificates import feature.
|`['concourse-ci']['with_ssl_cert_cookbook']`|Boolean|See `attributes/default.rb`|`false`|
|`['concourse-ci']['ssl_cert']['ca_names']`|Array|Internal CA names that are imported by the ssl_cert cookbook.|`[]`|
|`['concourse-ci']['ssl_cert']['common_name']`|String|Server common name for TLS|`node['fqdn']`|
+|`['concourse-ci']['docker-image']['entrypoint']`|String|Concourse Docker image's entrypoint setting to import an internal CA certificate.|`'/usr/local/bin/dumb-init /usr/local/bin/concourse'`|
|`['concourse-ci']['docker-compose']['import_ca']`|Boolean|whether import internal CA certificates or not.|`false`|
|`['concourse-ci']['docker-compose']['app_dir']`|String||`"#{node['docker-grid']['compose']['app_dir']}/concourse"`|
|`['concourse-ci']['docker-compose']['pgdata_dir']`|String|Path string or nil (unset).|`"#{node['concourse-ci']['docker-compose']['app_dir']}/database"`|
# are overridden by the following 'common_name' attributes.
default['concourse-ci']['ssl_cert']['ca_names'] = []
default['concourse-ci']['ssl_cert']['common_name'] = node['fqdn']
+default['concourse-ci']['docker-image']['entrypoint'] = '/usr/local/bin/dumb-init /usr/local/bin/concourse'
default['concourse-ci']['docker-compose']['import_ca'] = false
default['concourse-ci']['docker-compose']['app_dir'] = "#{node['docker-grid']['compose']['app_dir']}/concourse"
default['concourse-ci']['docker-compose']['pgdata_dir'] = "#{node['concourse-ci']['docker-compose']['app_dir']}/database"
},
},
'concourse-web' => {
- 'restart' => 'always',
+ 'restart' => 'unless-stopped',
'image' => 'concourse/concourse', # latest, 2.6.0,...
'links' => [
'concourse-db',
},
},
'concourse-worker' => {
- 'restart' => 'always',
'image' => 'concourse/concourse',
'privileged' => true,
'links' => [
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.6'
+version '0.1.7'
source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
issues_url 'https://osdn.jp/projects/metasearch/ticket'
web_vols.push("#{ca_cert_path(ca_name)}:/usr/share/ca-certificates/#{ca_name}.crt:ro")
}
+ import_ca_script = '/usr/local/bin/concourse_import_ca'
template "#{bin_dir}/concourse_import_ca" do
source 'opt/docker-compose/app/concourse/bin/concourse_import_ca'
owner 'root'
mode '0755'
action :create
end
- web_vols.push("#{bin_dir}/concourse_import_ca:/usr/local/bin/concourse_import_ca:ro")
+ web_vols.push("#{bin_dir}/concourse_import_ca:#{import_ca_script}:ro")
+
+ image_entrypoint = node['concourse-ci']['docker-image']['entrypoint']
+ override_config_srvs['concourse-web']['entrypoint'] \
+ = "/bin/sh -c \"#{import_ca_script} && #{image_entrypoint} web\""
+ if config_format_version == '2'
+ node.rm('concourse-ci', 'docker-compose', 'config', 'services', 'concourse-web', 'command')
+ else
+ node.rm('concourse-ci', 'docker-compose', 'config', 'concourse-web', 'command')
+ end
end
template "#{bin_dir}/concourse_up" do
See #{doc_url}
- Start:
$ cd #{app_dir}
- $ ./bin/concourse_up
+ $ sudo docker-compose up
- Stop
$ sudo docker-compose down
EOM
#!/bin/sh\r
+# DEPRECATED: use `sudo docker-compose up` instead.\r
\r
cd <%= node['concourse-ci']['docker-compose']['app_dir'] %>\r
sudo docker-compose up -d\r