OSDN Git Service

3992e4b9c77db018f62092e14639955ca9502dd1
[metasearch/grid-chef-repo.git] / roles / docker4latest_ubuntu.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 'docker4latest_ubuntu'
18 description 'Docker for the latest Ubuntu'
19
20 run_list(
21   'role[docker]',
22 )
23
24 #env_run_lists()
25
26 #default_attributes()
27
28 override_attributes(
29   'docker-grid' => {
30     'install_flavor' => 'dockerproject',
31     'dockerproject' => {
32       'enable_new_repo' => true,
33       'package_name' => 'docker-ce',  # new package name.
34     },
35     # install the package for the newer distribution of ubuntu.
36     'apt_repo' => {
37       # new repo.
38       # Check https://download.docker.com/linux/ubuntu/dists
39       'override_apt_line' => 'deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable',
40       #'override_apt_line' => 'deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable',
41       # old repo.
42       #'override_apt_line' => 'deb https://apt.dockerproject.org/repo ubuntu-zesty main',
43       #'override_apt_line' => 'deb https://apt.dockerproject.org/repo ubuntu-xenial main',
44     },
45     'compose' => {
46       #'skip_setup' => true,  # default: false
47       'auto_upgrade' => true,  # default: false
48       # Check https://github.com/docker/compose/releases
49       'release_base_url' => 'https://github.com/docker/compose/releases/download/1.18.0',
50       #'release_base_url' => 'https://github.com/docker/compose/releases/download/1.17.1',
51     },
52     'engine' => {
53       # new package: `docker-ce``
54       'version' => '17.12.1~ce-0~ubuntu',
55       #'version' => '17.09.0~ce-0~ubuntu',
56       #'version' => '17.06.2~ce-0~ubuntu',
57       # old package: `docker-engine``
58       #'version' => '17.05.0~ce-0~ubuntu-zesty',
59       #'version' => '17.03.1~ce-0~ubuntu-yakkety',
60       #'version' => '1.12.3-0~xenial',
61       'storage-driver_on_ubuntu' => 'overlay2',  # default: aufs
62       #'daemon_extra_options' => [
63         #'-H fd:// --bip=192.168.100.1/24 --fixed-cidr=192.168.100.0/24',
64         # for docker >= 1.10, docker-engine >= 1.12 (on rhel family)
65         # '-H fd://' option automatically removed by this cookbook.
66         # See https://github.com/docker/docker/issues/22847
67       #].join(' '), 
68       #'users_allow' => [
69       #],
70     },
71   },
72 )