• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: コミット

Grid環境構築用のChefリポジトリです。


コミットメタ情報

リビジョン78ce72e54535ed1494397752b403ebbb93943ab3 (tree)
日時2018-04-27 22:35:47
作者whitestar <whitestar@user...>
コミッターwhitestar

ログメッセージ

adds the docker-compose v2 format support.

変更サマリ

差分

--- a/cookbooks/concourse-ci/CHANGELOG.md
+++ b/cookbooks/concourse-ci/CHANGELOG.md
@@ -1,6 +1,10 @@
11 concourse-ci CHANGELOG
22 ======================
33
4+0.2.5
5+-----
6+- adds the docker-compose v2 format support.
7+
48 0.2.4
59 -----
610 - adds the port number to the TSA host setting of the worker service.
--- a/cookbooks/concourse-ci/README.md
+++ b/cookbooks/concourse-ci/README.md
@@ -60,7 +60,7 @@ This cookbook sets up a Concourse CI service by Docker Compose.
6060 |`['concourse-ci']['docker-compose']['web_oauth_client_id_vault_item']`|Hash|See `attributes/default.rb`|`{}`|
6161 |`['concourse-ci']['docker-compose']['web_oauth_client_secret_vault_item']`|Hash|See `attributes/default.rb`|`{}`|
6262 |`['concourse-ci']['docker-compose']['ssh_keys_reset']`|String|Resets all SSH keys forcely.|`false`|
63-|`['concourse-ci']['docker-compose']['config_format_version']`|String|Read only. `docker-compose.yml` format version. Only version 1 is supported now.|`'1'`|
63+|`['concourse-ci']['docker-compose']['config_format_version']`|String|`docker-compose.yml` format version. `'1'` or `'2'`|`'1'`|
6464 |`['concourse-ci']['docker-compose']['config']`|Hash|`docker-compose.yml` configurations.|See `attributes/default.rb`|
6565
6666 ## Usage
--- a/cookbooks/concourse-ci/attributes/default.rb
+++ b/cookbooks/concourse-ci/attributes/default.rb
@@ -99,8 +99,7 @@ default['concourse-ci']['docker-compose']['web_oauth_client_secret_vault_item']
9999 }
100100 default['concourse-ci']['docker-compose']['ssh_keys_reset'] = false
101101
102-# TODO: support version 2 format, and use `default` instead of `force_override`
103-force_override['concourse-ci']['docker-compose']['config_format_version'] = '1'
102+default['concourse-ci']['docker-compose']['config_format_version'] = '1'
104103 version_1_config = {
105104 'concourse-db' => {
106105 'restart' => 'always',
@@ -172,65 +171,15 @@ version_1_config = {
172171 },
173172 }
174173
175-# Not supported yet.
176174 new_config = Marshal.load(Marshal.dump(version_1_config)) # deep copy
177-new_config['concourse-web'].delete('links')
178-new_config['concourse-worker'].delete('links')
175+# for using networks instead
176+#new_config['concourse-web'].delete('links')
177+#new_config['concourse-worker'].delete('links')
179178 version_2_config = {
180179 # Version 2 docker-compose format
181180 'version' => '2',
182181 'services' => new_config,
183182 }
184-=begin
185-version_2_config = {
186- # Version 2 docker-compose format
187- 'version' => '2',
188- 'services' => {
189- 'concourse-db' => {
190- 'restart' => 'always',
191- 'image' => 'postgres:9.5',
192- 'volumes' => [
193- #"#{node['concourse-ci']['docker-compose']['pgdata_dir']}:/database",
194- ],
195- 'environment' => {
196- 'POSTGRES_DB' => 'concourse',
197- 'POSTGRES_USER' => 'concourse',
198- 'POSTGRES_PASSWORD' => nil,
199- 'PGDATA' => '/database',
200- },
201- },
202- 'concourse-web' => {
203- 'restart' => 'always',
204- 'image' => 'concourse/concourse', # latest, 2.6.0,...
205- 'command' => 'web',
206- 'ports' => [
207- #'8080:8080',
208- ],
209- 'volumes' => [
210- "#{node['concourse-ci']['docker-compose']['web_keys_dir']}:/concourse-keys",
211- ],
212- 'environment' => {
213- 'CONCOURSE_BASIC_AUTH_USERNAME' => 'concourse',
214- 'CONCOURSE_BASIC_AUTH_PASSWORD' => nil,
215- 'CONCOURSE_EXTERNAL_URL' => nil,
216- 'CONCOURSE_POSTGRES_DATA_SOURCE' => \
217- 'postgres://concourse:<POSTGRES_PASSWORD>@concourse-db:5432/concourse?sslmode=disable',
218- },
219- },
220- 'concourse-worker' => {
221- 'restart' => 'always',
222- 'image' => 'concourse/concourse',
223- 'privileged' => true,
224- 'command' => 'worker',
225- 'volumes' => [
226- "#{node['concourse-ci']['docker-compose']['worker_keys_dir']}:/concourse-keys",
227- ],
228- 'environment' => {
229- 'CONCOURSE_TSA_HOST' => 'concourse-web',
230- },
231- },
232- },
233-}
234-=end
183+
235184 default['concourse-ci']['docker-compose']['config'] = \
236185 node['concourse-ci']['docker-compose']['config_format_version'] == '1' ? version_1_config : version_2_config
--- a/cookbooks/concourse-ci/concourse.yml
+++ b/cookbooks/concourse-ci/concourse.yml
@@ -97,4 +97,4 @@ jobs:
9797 tag_prefix: ((cookbook-name))-
9898 tag: src-git/cookbooks/((cookbook-name))/version
9999 only_tag: true
100- annotate: ../src-git/cookbooks/((cookbook-name))/version
100+ annotate: src-git/cookbooks/((cookbook-name))/version
--- a/cookbooks/concourse-ci/version
+++ b/cookbooks/concourse-ci/version
@@ -1 +1 @@
1-0.2.4
1+0.2.5
旧リポジトリブラウザで表示