• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: コミット

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


コミットメタ情報

リビジョンd0d8fb4e94b0ad24394952500fcac6acdac2e0e4 (tree)
日時2017-12-02 22:36:51
作者whitestar <whitestar@user...>
コミッターwhitestar

ログメッセージ

refactors docker roles.

変更サマリ

差分

--- a/roles/docker-new-repo.rb
+++ b/roles/docker-new-repo.rb
@@ -18,7 +18,8 @@ name 'docker-new-repo'
1818 description 'Docker CE by the new repository'
1919
2020 run_list(
21- 'role[docker]',
21+ 'recipe[docker-grid::engine]',
22+ 'recipe[docker-grid::compose]',
2223 )
2324
2425 #env_run_lists
@@ -46,13 +47,13 @@ override_attributes(
4647 'storage-driver_on_centos' => 'overlay', # defacto: 'devicemapper'
4748 'storage-driver_on_ubuntu' => 'overlay2', # defacto: 'aufs'
4849 #'userns-remap' => 'default',
49- #'daemon_extra_options' => [
50- #'-H fd://',
50+ 'daemon_extra_options' => [
51+ '-H fd://',
5152 #'-H fd:// --bip=192.168.100.1/24 --fixed-cidr=192.168.100.0/24',
5253 # for docker >= 1.10, docker-engine >= 1.12 (on rhel family)
5354 # '-H fd://' option automatically removed by this cookbook.
5455 # See https://github.com/docker/docker/issues/22847
55- #].join(' '),
56+ ].join(' '),
5657 },
5758 },
5859 )
--- /dev/null
+++ b/roles/docker-old-repo.rb
@@ -0,0 +1,65 @@
1+#
2+# Copyright 2017, whitestar
3+#
4+# Licensed under the Apache License, Version 2.0 (the "License");
5+# you may not use this file except in compliance with the License.
6+# You may obtain a copy of the License at
7+#
8+# http://www.apache.org/licenses/LICENSE-2.0
9+#
10+# Unless required by applicable law or agreed to in writing, software
11+# distributed under the License is distributed on an "AS IS" BASIS,
12+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+# See the License for the specific language governing permissions and
14+# limitations under the License.
15+#
16+
17+name 'docker-old-repo'
18+description 'Docker Engine by the old repository'
19+
20+run_list(
21+ 'recipe[docker-grid::engine]',
22+ 'recipe[docker-grid::compose]',
23+)
24+
25+#env_run_lists
26+
27+default_attributes(
28+)
29+
30+override_attributes(
31+ 'docker-grid' => {
32+ 'install_flavor' => 'dockerproject',
33+ 'dockerproject' => {
34+ 'enable_new_repo' => false,
35+ },
36+ 'compose' => {
37+ #'skip_setup' => true, # default: false
38+ },
39+ 'engine' => {
40+ 'version' => '', # latest
41+ #'skip_setup' => true, # default: false
42+ # old package: `docker-engine`
43+ #'version_on_centos' => '17.03.1.ce-1',
44+ #'version_on_centos' => '1.13.1-1',
45+ #'version_on_centos' => '1.12.6-1',
46+ #'version_on_centos' => '1.11.2-1',
47+ #'version_on_centos' => '1.10.3-1',
48+ #'version_on_ubuntu' => '17.05.0~ce-0',
49+ #'version_on_ubuntu' => '17.03.1~ce-0',
50+ #'version_on_ubuntu' => '1.13.1-0',
51+ #'version_on_ubuntu' => '1.12.6-0',
52+ #'version_on_ubuntu' => '1.11.2-0',
53+ 'storage-driver_on_centos' => 'overlay', # defacto: 'devicemapper'
54+ 'storage-driver_on_ubuntu' => 'overlay', # defacto: 'aufs'
55+ #'userns-remap' => 'default',
56+ 'daemon_extra_options' => [
57+ '-H fd://',
58+ #'-H fd:// --bip=192.168.100.1/24 --fixed-cidr=192.168.100.0/24',
59+ # for docker >= 1.10, docker-engine >= 1.12 (on rhel family)
60+ # '-H fd://' option automatically removed by this cookbook.
61+ # See https://github.com/docker/docker/issues/22847
62+ ].join(' '),
63+ },
64+ },
65+)
--- a/roles/docker-os-repo.rb
+++ b/roles/docker-os-repo.rb
@@ -18,7 +18,8 @@ name 'docker-os-repo'
1818 description 'Docker Engine by each OS distribution'
1919
2020 run_list(
21- 'role[docker]',
21+ 'recipe[docker-grid::engine]',
22+ 'recipe[docker-grid::compose]',
2223 )
2324
2425 #env_run_lists
@@ -45,13 +46,13 @@ override_attributes(
4546 'storage-driver_on_centos' => 'overlay', # defacto: 'devicemapper'
4647 'storage-driver_on_ubuntu' => 'overlay2', # defact: 'aufs'
4748 #'userns-remap' => 'default',
48- #'daemon_extra_options' => [
49- #'-H fd://',
49+ 'daemon_extra_options' => [
50+ '-H fd://',
5051 #'-H fd:// --bip=192.168.100.1/24 --fixed-cidr=192.168.100.0/24',
5152 # for docker >= 1.10, docker-engine >= 1.12 (on rhel family)
5253 # '-H fd://' option automatically removed by this cookbook.
5354 # See https://github.com/docker/docker/issues/22847
54- #].join(' '),
55+ ].join(' '),
5556 },
5657 },
5758 )
--- a/roles/docker.rb
+++ b/roles/docker.rb
@@ -15,11 +15,10 @@
1515 #
1616
1717 name 'docker'
18-description 'Docker Engine by the old repository'
18+description 'Docker Engine'
1919
2020 run_list(
21- 'recipe[docker-grid::engine]',
22- 'recipe[docker-grid::compose]',
21+ 'role[docker-new-repo]',
2322 )
2423
2524 #env_run_lists
@@ -29,29 +28,8 @@ default_attributes(
2928
3029 override_attributes(
3130 'docker-grid' => {
32- 'install_flavor' => 'dockerproject',
33- 'dockerproject' => {
34- 'enable_new_repo' => false,
35- },
36- 'compose' => {
37- #'skip_setup' => true, # default: false
38- },
3931 'engine' => {
4032 'version' => '', # latest
41- #'skip_setup' => true, # default: false
42- # old package: `docker-engine`
43- #'version_on_centos' => '17.03.1.ce-1',
44- #'version_on_centos' => '1.13.1-1',
45- #'version_on_centos' => '1.12.6-1',
46- #'version_on_centos' => '1.11.2-1',
47- #'version_on_centos' => '1.10.3-1',
48- #'version_on_ubuntu' => '17.05.0~ce-0',
49- #'version_on_ubuntu' => '17.03.1~ce-0',
50- #'version_on_ubuntu' => '1.13.1-0',
51- #'version_on_ubuntu' => '1.12.6-0',
52- #'version_on_ubuntu' => '1.11.2-0',
53- 'storage-driver_on_centos' => 'overlay', # defacto: 'devicemapper'
54- 'storage-driver_on_ubuntu' => 'overlay', # defacto: 'aufs'
5533 #'userns-remap' => 'default',
5634 'daemon_extra_options' => [
5735 '-H fd://',
旧リポジトリブラウザで表示