OSDN Git Service

adds the APT Cacher NG autopilot feature.
[metasearch/grid-chef-repo.git] / roles / docker-os-repo.rb
1 #
2 # Copyright 2016-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-os-repo'
18 description 'Docker Engine by each OS distribution'
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' => 'os-repository',
33     'compose' => {
34       #'skip_setup' => true,  # default: false
35     },
36     'engine' => {
37       'version' => '',  # latest
38       #'skip_setup' => true,  # default: false
39       # package name: `docker`
40       #'version_on_centos' => '1.12.6-11',
41       #'version_on_centos' => '1.12.5-14',
42       #'version_on_centos' => '1.10.3-59', 
43       # package name: `docker.io`
44       #'version_on_ubuntu' => '1.12.3-0ubuntu4~16.04.2',
45       #'version_on_ubuntu' => '1.10.3-0ubuntu6',
46       'storage-driver_on_centos' => 'overlay',  # defacto: 'devicemapper'
47       'storage-driver_on_ubuntu' => 'overlay2',  # defact: 'aufs'
48       #'userns-remap' => 'default',
49       'daemon_extra_options' => [
50         '-H fd://',
51         #'-H fd:// --bip=192.168.100.1/24 --fixed-cidr=192.168.100.0/24',
52         # for docker >= 1.10, docker-engine >= 1.12 (on rhel family)
53         # '-H fd://' option automatically removed by this cookbook.
54         # See https://github.com/docker/docker/issues/22847
55       ].join(' '), 
56     },
57   },
58 )