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 - [Attributes](#attributes)
14 - [dcos-grid::default](#dcos-griddefault)
15 - [dcos-grid::agent](#dcos-gridagent)
16 - [dcos-grid::bootstrap](#dcos-gridbootstrap)
17 - [dcos-grid::cli (ver. 0.3.0 or later)](#dcos-gridcli-ver-030-or-later)
18 - [dcos-grid::cloud-config (for CoreOS only)](#dcos-gridcloud-config-for-coreos-only)
19 - [dcos-grid::master](#dcos-gridmaster)
20 - [dcos-grid::node](#dcos-gridnode)
21 - [dcos-grid::node-commons](#dcos-gridnode-commons)
22 - [dcos-grid::public-agent](#dcos-gridpublic-agent)
23 - [Role Examples](#role-examples)
24 - [Uninstall DC/OS](#uninstall-dcos)
25 - [License and Authors](#license-and-authors)
30 - CentOS, Red Hat Enterprise Linux >= 7.2
31 - CoreOS Latest version.
32 - Ubuntu 16.04 (Experimental). DC/OS does not officially support Ubuntu yet. See [_Ubuntu 16.04 Enablement_](https://dcosjira.atlassian.net/browse/DCOS-25).
33 - DC/OS requires systemd, which is only fully supported in Ubuntu 15.04 and later releases. See [_SystemdForUpstartUsers_](https://wiki.ubuntu.com/SystemdForUpstartUsers)
40 |Key|Type|Description, example|Default|
42 |`['dcos-grid']['dcos_release_url']`|String|DC/OS download URL.|`'https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh'`|
43 |`['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'`|
44 |`['dcos-grid']['docker']['apt_repo']['url']`|String| (ver. 0.3.1 or later)|`'https://apt.dockerproject.org/repo'`|
45 |`['dcos-grid']['docker']['apt_repo']['keyserver']`|String| (ver. 0.3.1 or later)|`'hkp://p80.pool.sks-keyservers.net:80'`|
46 |`['dcos-grid']['docker']['apt_repo']['recv-keys']`|String| (ver. 0.3.1 or later)|`'58118E89F3A912897C070ADBF76221572C52609D'`|
47 |`['dcos-grid']['docker']['yum_repo']['baseurl']`|String| (ver. 0.3.1 or later)|`'https://yum.dockerproject.org/repo/main/centos/$releasever/'`|
48 |`['dcos-grid']['docker']['yum_repo']['gpgcheck']`|String|`'0'`: disabled, `'1'`: enabled (ver. 0.3.1 or later).|`'1'`|
49 |`['dcos-grid']['docker']['yum_repo']['gpgkey']`|String| (ver. 0.3.1 or later)|`'https://yum.dockerproject.org/gpg'`|
50 |`['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`|
51 |`['dcos-grid']['docker-engine']['version_on_centos']`|String|Docker version for CentOS (ver. 0.3.0 or later).|`'1.11.2-1'`|
52 |`['dcos-grid']['docker-engine']['version_on_ubuntu']`|String|Docker version for Ubuntu (ver. 0.3.0 or later).|`'1.11.2-0'`|
53 |`['dcos-grid']['docker-engine']['version']`|String|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}` (ver. 0.3.0 or later).|See default.rb|
54 |`['dcos-grid']['docker-engine']['storage-driver_on_centos']`|String|Docker storage driver (overlay, devicemapper, ...) for CentOS (ver. 0.3.4 or later).|`'overlay'`|
55 |`['dcos-grid']['docker-engine']['storage-driver_on_ubuntu']`|String|Docker storage driver (aufs, overlay, ...) for Ubuntu (ver. 0.3.4 or later).|`'aufs'`|
56 |`['dcos-grid']['docker-engine']['storage-driver']`|String|(ver. 0.3.4 or later).|See default.rb|
57 |`['dcos-grid']['docker-engine']['daemon_extra_options']`|String|ref. `docker daemon --help` (ver. 0.3.4 or later).|`'-H fd://'`|
58 |`['dcos-grid']['bootstrap']['ip']`|String|Bootstrap node IP address.|`'127.0.0.1'`|
59 |`['dcos-grid']['bootstrap']['port']`|String|Bootstrap node port number.|`'8080'`|
60 |`['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'`|
61 |`['dcos-grid']['bootstrap']['config']`|Hash|Install configurations.|see [_Install Configuration Parameters_](https://dcos.io/docs/1.8/administration/installing/custom/configuration-parameters/)|
62 |`['dcos-grid']['bootstrap']['config']['bootstrap_url']`|String||`"http://#{node['dcos-grid']['bootstrap']['ip']}:#{node['dcos-grid']['bootstrap']['port']}"`|
63 |`['dcos-grid']['bootstrap']['config']['cluster_name']`|String||`'dcos0'`|
64 |`['dcos-grid']['bootstrap']['config']['exhibitor_storage_backend']`|String||`'static'`|
65 |`['dcos-grid']['bootstrap']['config']['ip_detect_filename']`|String||`'/genconf/ip-detect'`|
66 |`['dcos-grid']['bootstrap']['config']['master_discovery']`|String|(ver. 0.3.2 or later)|`'static'`|
67 |`['dcos-grid']['bootstrap']['config']['master_list']`|Array|e.g. `['192.168.1.101','192.168.1.102','192.168.1.103']`|`nil`|
68 |`['dcos-grid']['bootstrap']['config']['oauth_auth_host']`|String|(ver. 0.3.2 or later)|`'https://dcos.auth0.com'`|
69 |`['dcos-grid']['bootstrap']['config']['oauth_auth_redirector']`|String|(ver. 0.3.2 or later)|`'https://auth.dcos.io'`|
70 |`['dcos-grid']['bootstrap']['config']['oauth_available']`|String|(ver. 0.3.2 or later)|`'true'`|
71 |`['dcos-grid']['bootstrap']['config']['oauth_enabled']`|String|(ver. 0.3.2 or later)|`'true'`|
72 |`['dcos-grid']['bootstrap']['config']['oauth_issuer_url']`|String|(ver. 0.3.2 or later)|`'https://dcos.auth0.com/'`|
73 |`['dcos-grid']['bootstrap']['config']['resolvers']`|Array|e.g. `['8.8.8.8','8.8.4.4']` (Google DNS)|`nil`|
74 |`['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'`|
75 |`['dcos-grid']['node']['auto_setup']`|Boolean|execute the node setup script automatically or not.|`false`|
76 |`['dcos-grid']['cloud-config']['target_platform']`|String|CoreOS only now.|`'coreos'`|
77 |`['dcos-grid']['cloud-config']['target_dir']`|String||`'/home/core'`|
78 |`['dcos-grid']['cloud-config']['target_owner']`|String||`'core:core'`|
79 |`['dcos-grid']['cloud-config']['hostname']`|String||`'<fqdn>'`|
80 |`['dcos-grid']['cloud-config']['ssh_authorized_keys']`|Array||`['<your_ssh_pub_key>',]`|
86 #### dcos-grid::default
88 This recipe does nothing.
92 This recipe sets up a private agent node. Note: If `node['dcos-grid']['node']['auto_setup']` is `false`, you must execute the following manually.
95 $ /opt/dcos-grid/node_setup.sh slave
98 #### dcos-grid::bootstrap
100 This recipe sets up a bootstrap node. Note: Please execute the following manually.
103 $ /opt/dcos-grid/bootstrap_setup.sh
106 #### dcos-grid::cli (ver. 0.3.0 or later)
108 This recipe installs DC/OS CLI.
110 #### dcos-grid::cloud-config (for CoreOS only)
112 This recipe generates a `/home/core/cloud-config.yaml` template file on local machine by the following `chef-solo` command.
115 $ sudo chef-solo -c solo.rb -j nodes/local-dcos0-cloud-config.json
118 - `nodes/local-dcos0-cloud-config.json`
123 "role[dcos0-cloud-config]"
128 - `roles/dcos0-cloud-config.rb`
131 cluster_name = 'dcos0'
133 name "#{cluster_name}-cloud-config"
134 description "#{cluster_name} cloud-config.yaml file."
137 "role[#{cluster_name}]", # includes common attributes.
138 'recipe[dcos-grid::cloud-config]',
142 Then edit this yaml template (hostname, ssh_authorized_keys, IP address and so on) and install CoreOS by the `cloud-config.yaml`.
145 $ coreos-cloudinit -from-file ~/cloud-config.yaml -validate
147 $ sudo coreos-install -d /dev/sda -C stable -c ~/cloud-config.yaml
150 #### dcos-grid::master
152 This recipe sets up a master node. Note: If `node['dcos-grid']['node']['auto_setup']` is `false`, you must execute the following manually.
155 $ /opt/dcos-grid/node_setup.sh master
160 This recipe sets up a base node (particular role is not assigned yet). Note: Please execute the following manually.
163 $ /opt/dcos-grid/node_setup.sh {master|slave|slave_public}
166 #### dcos-grid::node-commons
168 This recipe sets up common environment for DC/OS node.
170 #### dcos-grid::public-agent
172 This recipe sets up a public node. Note: If `node['dcos-grid']['node']['auto_setup']` is `false`, you must execute the following manually.
175 $ /opt/dcos-grid/node_setup.sh slave_public
180 - `roles/dcos0.rb`: Common attributes.
183 cluster_name = 'dcos0'
186 description "#{cluster_name} cluster"
193 'dcos_release_url' => 'https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh',
194 #'dcos_release_url' => 'https://downloads.dcos.io/dcos/EarlyAccess/dcos_generate_config.sh',
196 'version_on_centos' => '1.11.2-1',
197 'version_on_ubuntu' => '1.11.2-0',
198 #'version' => '1.11.2-1.el7.centos',
201 'ip' => '192.168.56.100',
204 'cluster_name' => cluster_name,
216 'interface' => 'eth1,enp0s8',
220 'auto_setup' => false,
226 - `roles/dcos0-boot.rb`
229 cluster_name = 'dcos0'
231 name "#{cluster_name}-boot"
232 description "#{cluster_name} cluster bootstrap node"
235 "role[#{cluster_name}]",
236 'recipe[dcos-grid::bootstrap]',
240 - `roles/dcos-master.rb`
243 cluster_name = 'dcos0'
245 name "#{cluster_name}-master"
246 description "#{cluster_name} cluster master node"
249 "role[#{cluster_name}]",
250 'recipe[dcos-grid::master]',
256 'auto_setup' => false,
262 - `roles/dcos0-agent.rb`
265 cluster_name = 'dcos0'
267 name "#{cluster_name}-agent"
268 description "#{cluster_name} cluster private agent node"
271 "role[#{cluster_name}]",
272 'recipe[dcos-grid::agent]',
278 'auto_setup' => true,
286 Please log in each node and execute the following.
289 $ /opt/dcos-grid/uninstall.sh
292 ## License and Authors
294 - Author:: whitestar at osdn.jp
297 Copyright 2016, whitestar
299 Licensed under the Apache License, Version 2.0 (the "License");
300 you may not use this file except in compliance with the License.
301 You may obtain a copy of the License at
303 http://www.apache.org/licenses/LICENSE-2.0
305 Unless required by applicable law or agreed to in writing, software
306 distributed under the License is distributed on an "AS IS" BASIS,
307 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
308 See the License for the specific language governing permissions and
309 limitations under the License.