Skip to content

Commit 1427e22

Browse files
committed
syncing read me to be up-to-date
1 parent b09f8fc commit 1427e22

File tree

2 files changed

+35
-164
lines changed

2 files changed

+35
-164
lines changed

aws/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ We've provided all the sensible defaults that you would want to play around with
5050

5151
- There is no git clone of this repo required. Terraform does this for you under the hood.
5252

53-
_*Note:* Use a new directory for the command below as terraform will write its files within that directory._
53+
_*Note:* Create a new directory before the command below as terraform will write its files within the current directory.
5454

5555
```bash
5656
terraform init -from-module github.com/dcos/terraform-dcos//aws

azure/README.md

Lines changed: 34 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -54,110 +54,53 @@ Set your environment variables by sourcing the files before you run any terrafor
5454
$ source ~/.azure/credentials
5555
```
5656

57-
### Example Terraform Deployments
5857

58+
## Example Terraform Deployments
5959
#### Pull down the DC/OS terraform scripts below
6060

6161
There is a module called `dcos-tested-azure-oses` that contains all the tested scripts per operating system. The deployment strategy is based on a bare image coupled with a prereq `script.sh` to get it ready to install dcos-core components. Its simple to add other operating systems by adding the AMI, region, and install scripts to meet the dcos specifications that can be found [here](https://dcos.io/docs/1.9/installing/custom/system-requirements/) and [here](https://dcos.io/docs/1.9/installing/custom/system-requirements/install-docker-centos/) as an example.
6262

63+
### Quick Start
6364

64-
For CoreOS 1235.9.0:
65-
```bash
66-
terraform init -from-module github.com/dcos/terraform-dcos//azure
67-
terraform plan --var os=coreos_1235.9.0
68-
```
69-
70-
For CoreOS 835.13.0:
65+
We've provided all the sensible defaults that you would want to play around with DC/OS. Just run this command to deploy a multi-master setup in the cloud. Three agents will be deployed for you. Two private agents, one public agent.
7166

72-
```bash
73-
terraform init -from-module github.com/dcos/terraform-dcos//azure
74-
terraform plan --var os=coreos_835.13.0 --var dcos_overlay_enable=disable # This OS cannot support docker networking
75-
```
67+
- There is no git clone of this repo required. Terraform does this for you under the hood.
7668

77-
For Centos 7.2:
69+
_*Note:* Create a new directory before the command below as terraform will write its files within the current directory._
7870

7971
```bash
8072
terraform init -from-module github.com/dcos/terraform-dcos//azure
81-
terraform plan --var os=centos_7.2
82-
```
83-
84-
## Pro-tip: Use Terraform’s -var-file
85-
86-
When reading the commands below relating to installing and upgrading, it may be easier for you to keep all these flags in a file instead. This way you can make a change to the file and it will persist when you do other commands to your cluster in the future.
87-
88-
For example:
89-
90-
This command below already has the flags on what I need to install such has:
91-
* DC/OS Version 1.8.8
92-
* Masters 3
93-
* Private Agents 2
94-
* Public Agents 1
95-
* SSH Public Key <Testing Pub Key>
96-
97-
```bash
98-
terraform apply -var-file desired_cluster_profile
73+
terraform apply
9974
```
10075

101-
When we view the file, you can see how you can save your state of your cluster:
76+
### Custom terraform-dcos variables
10277

103-
```bash
104-
$ cat desired_cluster_profile
105-
num_of_masters = "3"
106-
num_of_private_agents = "2"
107-
num_of_public_agents = "1"
108-
dcos_security = "permissive"
109-
dcos_version = "1.8.8"
110-
ssh_pub_key = "INSERT_PUBLIC_KEY_HERE"
111-
```
78+
The default variables are tracked in the [variables.tf](/aws/variables.tf) file. Since this file can be overwritten during updates when you may run `terraform get --update` when you want to fetch new releases of DC/OS to upgrade too, its best to use the [desired_cluster_profile.tfvars](/aws/desired_cluster_profile.tfvars.example) and set your custom terraform and DC/OS flags there. This way you can keep track of a single file that you can use manage the lifecycle of your cluster.
11279

113-
When reading the instructions below regarding installing and upgrading, you can always use your `--var-file` instead to keep track of all the changes you've made. It's easy to share this file with others if you want them to deploy your same cluster. Never save `state=upgrade` in your `--var-file`, it should be only used for upgrades or one time file changes.
80+
###### Supported Operating Systems
11481

82+
For a list of supported operating systems for this repo, see the ones that DC/OS recommends [here](https://docs.mesosphere.com/1.10/installing/oss/custom/system-requirements/). You can find the list that Terraform for this repo [here](/aws/modules/dcos-tested-aws-oses/platform/cloud/aws).
11583

116-
## Installing DC/OS
84+
###### Supported DC/OS Versions
11785

118-
If you wanted to install a specific version of DC/OS you can either use the stable versions or early access. You can also pick and choose any version if you like when you're first starting out. On the section below, this will explain how you automate upgrades when you're ready along with changing what order you would like them upgraded.
86+
For a list of all the DC/OS versions that this repository supports, you can find them at the `tf_dcos_core` module [here](https://github.com/dcos/tf_dcos_core/tree/master/dcos-versions).
11987

120-
### DC/OS Stable (1.10.0)
121-
```bash
122-
terraform apply --var dcos_version=1.8.8
123-
```
88+
To apply the configuration file, you can use this command below.
12489

125-
### DC/OS Master (default is stable)
12690
```bash
127-
terraform apply
91+
terraform apply -var-file desired_cluster_profile.tfvars
12892
```
12993

130-
### Config.yaml Modification
131-
132-
#### Recommended Configuration
133-
134-
You can modify all the DC/OS config.yaml flags via terraform. Here is an example of using the master_http_loadbalancer for cloud deployments. **master_http_loadbalancer is recommended for production**. You will be able to replace your masters in a multi master environment. Using the default static backend will not give you this option.
135-
136-
Here is an example default profile that will allow you to do this.
137-
138-
```bash
139-
$ cat desired_cluster_profile
140-
num_of_masters = "3"
141-
num_of_private_agents = "2"
142-
num_of_public_agents = "1"
143-
dcos_security = "permissive"
144-
dcos_version = "1.9.4"
145-
dcos_master_discovery = "master_http_loadbalancer"
146-
dcos_exhibitor_storage_backend = "azure"
147-
ssh_pub_key = "INSERT_PUBLIC_KEY_HERE"
148-
```
149-
150-
**NOTE:** This will append your exhibitor_azure_account_name, exhibitor_azure_account_key and exhibitor_azure_prefix key in your config.yaml on your bootstrap node so DC/OS will know how to upload its state to the azure storage backend.
151-
15294
#### Advance YAML Configuration
15395

154-
Here are the YAML flags examples where you can simply paste your YAML configuration in your desired_cluster_profile. The alternative to YAML is to convert it to JSON.
96+
We have designed this project to be flexible. Here are the example working variables that allows very deep customization by using a single `tfvars` file.
15597

156-
_*Note*: It is required to have at least one space when inserting your YAML settings_
98+
For advance users with stringent requirements, here are the DC/OS flags examples where you can simply paste your YAML configuration in your desired_cluster_profile.tfvars. The alternative to YAML is to convert it to JSON.
15799

158100
```bash
159-
$ cat desired_cluster_profile
160-
dcos_version = "1.9.4"
101+
$ cat desired_cluster_profile.tfvars
102+
dcos_version = "1.10.2"
103+
os = "centos_7.3"
161104
num_of_masters = "3"
162105
num_of_private_agents = "2"
163106
num_of_public_agents = "1"
@@ -195,103 +138,31 @@ dcos_cluster_docker_credentials = <<EOF
195138
'https://index.docker.io/v1/':
196139
auth: Ze9ja2VyY3licmljSmVFOEJrcTY2eTV1WHhnSkVuVndjVEE=
197140
EOF
141+
ssh_pub_key = "INSERT_PUBLIC_KEY_HERE"
198142
```
143+
_Note: The YAML comment is required for the DC/OS specific YAML settings._
199144

200145
## Upgrading DC/OS
201146

202-
You can upgrade your DC/OS cluster with a single command. This terraform script was built to perform installs and upgrade from the inception of this project. With the upgrade procedures below, you can also have finer control on how masters or agents upgrade at a given time. This will give you the ability to change the parallelism of master or agent upgrades.
203-
204-
### DC/OS 1.8 Upgrades
205-
206-
#### Upgrading DC/OS 1.7 to DC/OS 1.8 Disabled
147+
You can upgrade your DC/OS cluster with a single command. This terraform script was built to perform installs and upgrades from the inception of this project. With the upgrade procedures below, you can also have finer control on how masters or agents upgrade at a given time. This will give you the ability to change the parallelism of master or agent upgrades.
207148

208-
**Important**: DC/OS will is not designed to upgrade directly from disabled to strict. Please be responsible when using automation tools.
149+
### DC/OS Upgrades
209150

210-
This command below will upgrade your masters and agents one at a time. It takes roughly 5 minutes per node, so depending on how many nodes, you may want to consider changing your parallelism to change the speed of your upgrade.
151+
#### Rolling Upgrade
152+
###### Supported upgraded by dcos.io
211153

212-
**Prioritise Master Upgrades First**
213-
214-
If you take this route, you can use a few more commands but this will allow you upgrade your master nodes first, one at a time, then upgrade the agents simuanioustly with the next. Terraforms parallel algorithm will walk the graph in any order. It may do one agent first, a master second, etc. You would need to target your master resource so you can upgrade the masters first then change the parallelism back to any number for the agents.
215-
216-
**Master upgrade sequentially one at a time**
154+
##### Masters Sequentially, Agents Parellel:
217155
```bash
218-
terraform apply \
219-
--var os=coreos_1235.9.0 \
220-
--var dcos_version=1.8.8 \
221-
--var state=upgrade \
222-
--var dcos_security=disabled \
223-
-parallelism=1 \
224-
-target=null_resource.master
225-
```
226-
227-
**Upgrade everything else in parallel**
228-
```bash
229-
terraform apply \
230-
--var os=coreos_1235.9.0 \
231-
--var dcos_version=1.8.8 \
232-
--var state=upgrade \
233-
--var dcos_security=disabled
234-
```
235-
236-
*NOTE: the default for parallelism is 10. You can change this value to control how many nodes you want upgraded at any given time*
237-
238-
239-
### Upgrading with DC/OS 1.8 Security Changes
240-
241-
**Important**: DC/OS will is not designed to upgrade directly from disabled to strict. Please be responsible when using automation tools.
242-
243-
#### Upgrading DC/OS 1.8 Disabled to DC/OS 1.8 Permissive
244-
245-
On DC/OS 1.8 clusters, testing shows that you can actually upgrade the masters simultaneously from DC/OS 1.8 and 1.9, (not 1.7). So going forward, we can drop the `--parallelism=1` entirely. If this changes on a new version, I will be sure to call this out. To go from DC/OS 1.8 Disbaled to DC/OS 1.8 Permissive, you can upgrade by running this command below. Notice the `state` is still upgrade, because we're still doing an inplace upgrade to the same version. This allows you to make DC/OS cluster-wide changes on your cluster.
246-
247-
```bash
248-
terraform apply \
249-
--var dcos_version=1.8.8 \
250-
--var state=upgrade \
251-
--var dcos_security=permissive
252-
```
253-
254-
#### Upgrading DC/OS 1.8 Permissive to DC/OS 1.8 Strict
255-
256-
This command below will upgrade you from DC/OS permissive to DC/OS strict mode
257-
258-
```bash
259-
terraform apply \
260-
--var dcos_version=1.8.8 \
261-
--var state=upgrade \
262-
--var dcos_security=strict
263-
```
264-
265-
### DC/OS 1.9 Upgrades
266-
267-
**Important**: DC/OS documentation says that you cannot upgrade directly from 1.8 disabled to 1.9 while changing the version. We will err on the side of caution by following the instructions below as well.
268-
269-
#### Upgrading DC/OS 1.8 Disabled to DC/OS 1.9 Disabled
270-
271-
```bash
272-
terraform apply \
273-
--var dcos_version=1.9.0 \
274-
--var state=upgrade \
275-
--var dcos_security=disabled
276-
```
277-
278-
#### Upgrading DC/OS 1.8 Permissive to DC/OS 1.9 Permissive
279-
280-
```bash
281-
terraform apply \
282-
--var dcos_version=1.9.0 \
283-
--var state=upgrade \
284-
--var dcos_security=permissive
285-
```
156+
terraform apply -var-file desired_cluster_profile.tfvars -var state=upgrade -target null_resource.bootstrap -target null_resource.master -parallelism=1
157+
terraform apply -var-file desired_cluster_profile.tfvars -var state=upgrade
158+
```
286159

287-
#### Upgrading DC/OS 1.8 Strict to DC/OS 1.9 Strict
160+
##### All Roles Simultaniously
161+
###### Not supported by dcos.io but it works without dcos_skip_checks enabled.
288162

289-
```bash
290-
terraform apply \
291-
--var dcos_version=1.9.0 \
292-
--var state=upgrade \
293-
--var dcos_security=strict
294-
```
163+
```bash
164+
terraform apply -var-file desired_cluster_profile.tfvars -var state=upgrade
165+
```
295166

296167
## Maintenance
297168

0 commit comments

Comments
 (0)