4 This cookbook sets up your customized DC/OS cluster on bare metal, virtual machines and every cloud. This install method is based on [_Advanced DC/OS Installation Guide_](https://dcos.io/docs/1.8/administration/installing/custom/advanced/).
8 - [Requirements](#requirements)
9 - [platforms](#platforms)
10 - [packages](#packages)
11 - [cookbooks](#cookbooks)
12 - [Attributes](#attributes)
15 - [dcos-grid::default](#dcos-griddefault)
16 - [dcos-grid::agent](#dcos-gridagent)
17 - [dcos-grid::bootstrap](#dcos-gridbootstrap)
18 - [dcos-grid::cli (ver. 0.3.0 or later)](#dcos-gridcli-ver-030-or-later)
19 - [dcos-grid::cloud-config (for CoreOS only)](#dcos-gridcloud-config-for-coreos-only)
20 - [dcos-grid::master](#dcos-gridmaster)
21 - [dcos-grid::node](#dcos-gridnode)
22 - [dcos-grid::node-commons](#dcos-gridnode-commons)
23 - [dcos-grid::public-agent](#dcos-gridpublic-agent)
24 - [Role Examples](#role-examples)
25 - [Uninstall DC/OS](#uninstall-dcos)
26 - [License and Authors](#license-and-authors)
31 - CentOS, Red Hat Enterprise Linux >= 7.2
32 - CoreOS Latest version.
33 - Ubuntu 16.04 (Experimental). DC/OS does not officially support Ubuntu yet. See [_Ubuntu 16.04 Enablement_](https://dcosjira.atlassian.net/browse/DCOS-25).
34 - DC/OS requires systemd, which is only fully supported in Ubuntu 15.04 and later releases. See [_SystemdForUpstartUsers_](https://wiki.ubuntu.com/SystemdForUpstartUsers)
40 - `docker-grid` (for `dcos-grid` ver. 0.4.0 or later).
44 |Key|Type|Description, example|Default|
46 |`['dcos-grid']['dcos_release_url']`|String|DC/OS download URL.|`'https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh'`|
47 |`['dcos-grid']['dcos_cli_release_url']`|String|DC/OS CLI download URL (ver. 0.3.0 or later).|`'https://downloads.dcos.io/binaries/cli/linux/x86-64/0.4.10/dcos'`|
48 |`['dcos-grid']['docker']['apt_repo']['url']`|String|DEPRECATED: use `['docker-grid']['apt_repo']['url']` (ver. 0.4.0 or later)|`nil`|
49 |`['dcos-grid']['docker']['apt_repo']['keyserver']`|String|DEPRECATED: use `['docker-grid']['apt_repo']['keyserver']` (ver. 0.4.0 or later)|`nil`|
50 |`['dcos-grid']['docker']['apt_repo']['recv-keys']`|String|DEPRECATED: use `['docker-grid']['apt_repo']['recv-keys']` (ver. 0.4.0 or later)|`nil`|
51 |`['dcos-grid']['docker']['yum_repo']['baseurl']`|String|DEPRECATED: use `['docker-grid']['yum_repo']['baseurl']` (ver. 0.4.0 or later)|`nil`|
52 |`['dcos-grid']['docker']['yum_repo']['gpgcheck']`|String|DEPRECATED: use `['docker-grid']['yum_repo']['gpgcheck']` (ver. 0.4.0 or later). `'0'`: disabled, `'1'`: enabled.|`nil`|
53 |`['dcos-grid']['docker']['yum_repo']['gpgkey']`|String|DEPRECATED: use `['docker-grid']['yum_repo']['gpgkey']` (ver. 0.4.0 or later)|`nil`|
54 |`['dcos-grid']['docker-engine']['setup']`|Boolean|Docker setup by this cookbook. If you will set up Docker by another cookbook, verify that this attribute is false. (ver. 0.3.0 or later)|`true`|
55 |`['dcos-grid']['docker-engine']['version_on_centos']`|String|DEPRECATED: use `['docker-grid']['engine']['version_on_centos']` (ver. 0.4.0 or later). Docker version for CentOS.|`nil`|
56 |`['dcos-grid']['docker-engine']['version_on_ubuntu']`|String|DEPRECATED: use `['docker-grid']['engine']['version_on_ubuntu']` (ver. 0.4.0 or later). Docker version for Ubuntu.|`nil`|
57 |`['dcos-grid']['docker-engine']['version']`|String|DEPRECATED: use `['docker-grid']['engine']['version']` (ver. 0.4.0 or later). Docker 1.9.x - 1.11.x is recommended for stability reasons. Note: this **default** value is overwritten by the `version_on_{centos or ubuntu}`.|See default.rb|
58 |`['dcos-grid']['docker-engine']['storage-driver_on_centos']`|String|DEPRECATED: use `['docker-grid']['engine']['storage-driver_on_centos']` (ver. 0.4.0 or later). Docker storage driver (overlay, devicemapper, ...) for CentOS.|`nil`|
59 |`['dcos-grid']['docker-engine']['storage-driver_on_ubuntu']`|String|DEPRECATED: use `['docker-grid']['engine']['storage-driver_on_ubuntu']` (ver. 0.4.0 or later). Docker storage driver (aufs, overlay, ...) for Ubuntu.|`nil`|
60 |`['dcos-grid']['docker-engine']['storage-driver']`|String|DEPRECATED: use `['docker-grid']['engine']['storage-driver']` (ver. 0.4.0 or later).|See default.rb|
61 |`['dcos-grid']['docker-engine']['daemon_extra_options']`|String|DEPRECATED: use `['docker-grid']['engine']['daemon_extra_options']` (ver. 0.4.0 or later). ref. `docker daemon --help`.|`nil`|
62 |`['dcos-grid']['bootstrap']['ip']`|String|Bootstrap node IP address.|`'127.0.0.1'`|
63 |`['dcos-grid']['bootstrap']['port']`|String|Bootstrap node port number.|`'8080'`|
64 |`['dcos-grid']['bootstrap']['genconf_dir']`|String|genconf directory path. Note: This is overridden by the value `"#{node['dcos-grid']['cloud-config']['target_dir']}/genconf"` in the `cloud-config` recipe (ver. 0.3.5 or later).|`'/opt/dcos-grid/genconf'`|
65 |`['dcos-grid']['bootstrap']['config']`|Hash|Install configurations.|see [_Install Configuration Parameters_](https://dcos.io/docs/1.8/administration/installing/custom/configuration-parameters/)|
66 |`['dcos-grid']['bootstrap']['config']['bootstrap_url']`|String||`"http://#{node['dcos-grid']['bootstrap']['ip']}:#{node['dcos-grid']['bootstrap']['port']}"`|
67 |`['dcos-grid']['bootstrap']['config']['cluster_name']`|String||`'dcos0'`|
68 |`['dcos-grid']['bootstrap']['config']['exhibitor_storage_backend']`|String||`'static'`|
69 |`['dcos-grid']['bootstrap']['config']['ip_detect_filename']`|String||`'/genconf/ip-detect'`|
70 |`['dcos-grid']['bootstrap']['config']['master_discovery']`|String|(ver. 0.3.2 or later)|`'static'`|
71 |`['dcos-grid']['bootstrap']['config']['master_list']`|Array|e.g. `['192.168.1.101','192.168.1.102','192.168.1.103']`|`nil`|
72 |`['dcos-grid']['bootstrap']['config']['oauth_auth_host']`|String|(ver. 0.3.2 or later)|`'https://dcos.auth0.com'`|
73 |`['dcos-grid']['bootstrap']['config']['oauth_auth_redirector']`|String|(ver. 0.3.2 or later)|`'https://auth.dcos.io'`|
74 |`['dcos-grid']['bootstrap']['config']['oauth_available']`|String|(ver. 0.3.2 or later)|`'true'`|
75 |`['dcos-grid']['bootstrap']['config']['oauth_enabled']`|String|(ver. 0.3.2 or later)|`'true'`|
76 |`['dcos-grid']['bootstrap']['config']['oauth_issuer_url']`|String|(ver. 0.3.2 or later)|`'https://dcos.auth0.com/'`|
77 |`['dcos-grid']['bootstrap']['config']['resolvers']`|Array|e.g. `['8.8.8.8','8.8.4.4']` (Google DNS)|`nil`|
78 |`['dcos-grid']['bootstrap']['bootstrap']['ip-detect']['interface']`|String|Network interface on each node for the `ip-detect` script. Note: If you set comma-delimited interface list (e.g. `'eth0,enp0s3'`), the first detected interface's ip is adopted (ver. 0.3.0 or later). |`'eth0'`|
79 |`['dcos-grid']['node']['auto_setup']`|Boolean|execute the node setup script automatically or not.|`false`|
80 |`['dcos-grid']['cloud-config']['target_platform']`|String|CoreOS only now.|`'coreos'`|
81 |`['dcos-grid']['cloud-config']['target_dir']`|String||`'/home/core'`|
82 |`['dcos-grid']['cloud-config']['target_owner']`|String||`'core:core'`|
83 |`['dcos-grid']['cloud-config']['hostname']`|String||`'<fqdn>'`|
84 |`['dcos-grid']['cloud-config']['ssh_authorized_keys']`|Array||`['<your_ssh_pub_key>',]`|
90 #### dcos-grid::default
92 This recipe does nothing.
96 This recipe sets up a private agent node. Note: If `node['dcos-grid']['node']['auto_setup']` is `false`, you must execute the following manually.
99 $ /opt/dcos-grid/node_setup.sh slave
102 #### dcos-grid::bootstrap
104 This recipe sets up a bootstrap node. Note: Please execute the following manually.
107 $ /opt/dcos-grid/bootstrap_setup.sh
110 #### dcos-grid::cli (ver. 0.3.0 or later)
112 This recipe installs DC/OS CLI.
114 #### dcos-grid::cloud-config (for CoreOS only)
116 This recipe generates a `/home/core/cloud-config.yaml` template file on local machine by the following `chef-solo` command.
119 $ sudo chef-solo -c solo.rb -j nodes/local-dcos0-cloud-config.json
122 - `nodes/local-dcos0-cloud-config.json`
127 "role[dcos0-cloud-config]"
132 - `roles/dcos0-cloud-config.rb`
135 cluster_name = 'dcos0'
137 name "#{cluster_name}-cloud-config"
138 description "#{cluster_name} cloud-config.yaml file."
141 "role[#{cluster_name}]", # includes common attributes.
142 'recipe[dcos-grid::cloud-config]',
146 Then edit this yaml template (hostname, ssh_authorized_keys, IP address and so on) and install CoreOS by the `cloud-config.yaml`.
149 $ coreos-cloudinit -from-file ~/cloud-config.yaml -validate
151 $ sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml
154 #### dcos-grid::master
156 This recipe sets up a master node. Note: If `node['dcos-grid']['node']['auto_setup']` is `false`, you must execute the following manually.
159 $ /opt/dcos-grid/node_setup.sh master
164 This recipe sets up a base node (particular role is not assigned yet). Note: Please execute the following manually.
167 $ /opt/dcos-grid/node_setup.sh {master|slave|slave_public}
170 #### dcos-grid::node-commons
172 This recipe sets up common environment for DC/OS node.
174 #### dcos-grid::public-agent
176 This recipe sets up a public node. Note: If `node['dcos-grid']['node']['auto_setup']` is `false`, you must execute the following manually.
179 $ /opt/dcos-grid/node_setup.sh slave_public
184 - `roles/dcos0.rb`: Common attributes.
187 cluster_name = 'dcos0'
190 description "#{cluster_name} cluster"
198 'version_on_centos' => '1.11.2-1',
199 'version_on_ubuntu' => '1.11.2-0',
200 #'version' => '1.11.2-1.el7.centos',
204 'dcos_release_url' => 'https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh',
205 #'dcos_release_url' => 'https://downloads.dcos.io/dcos/EarlyAccess/dcos_generate_config.sh',
207 'ip' => '192.168.56.100',
210 'cluster_name' => cluster_name,
222 'interface' => 'eth1,enp0s8',
226 'auto_setup' => false,
232 - `roles/dcos0-boot.rb`
235 cluster_name = 'dcos0'
237 name "#{cluster_name}-boot"
238 description "#{cluster_name} cluster bootstrap node"
241 "role[#{cluster_name}]",
242 'recipe[dcos-grid::bootstrap]',
246 - `roles/dcos-master.rb`
249 cluster_name = 'dcos0'
251 name "#{cluster_name}-master"
252 description "#{cluster_name} cluster master node"
255 "role[#{cluster_name}]",
256 'recipe[dcos-grid::master]',
262 'auto_setup' => false,
268 - `roles/dcos0-agent.rb`
271 cluster_name = 'dcos0'
273 name "#{cluster_name}-agent"
274 description "#{cluster_name} cluster private agent node"
277 "role[#{cluster_name}]",
278 'recipe[dcos-grid::agent]',
284 'auto_setup' => true,
292 Please log in each node and execute the following.
295 $ /opt/dcos-grid/uninstall.sh
298 ## License and Authors
300 - Author:: whitestar at osdn.jp
303 Copyright 2016, whitestar
305 Licensed under the Apache License, Version 2.0 (the "License");
306 you may not use this file except in compliance with the License.
307 You may obtain a copy of the License at
309 http://www.apache.org/licenses/LICENSE-2.0
311 Unless required by applicable law or agreed to in writing, software
312 distributed under the License is distributed on an "AS IS" BASIS,
313 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
314 See the License for the specific language governing permissions and
315 limitations under the License.