Skip to content

Commit 79118d4

Browse files
authored
updating REAME.md to include latest changes
1 parent 56618e5 commit 79118d4

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

gcp/README.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ _Mission: Allow for automated installs and upgrades for DC/OS on GCP._
1010
- SSH Keys
1111
- Existing Google Project. Soon automated with Terraform using project creation as documented [here.](https://cloud.google.com/community/tutorials/managing-gcp-projects-with-terraform)
1212

13+
14+
## Create Installer Directory
15+
16+
Make your directory where Terraform will download and place your Terraform infrastructure files.
17+
18+
```bash
19+
mkdir dcos-installer
20+
cd dcos-installer
21+
```
22+
23+
Run this command below to have Terraform initialized from this repository. There is **no git clone of this repo required** as Terraform performs this for you.
24+
25+
```
26+
terraform init -from-module github.com/dcos/terraform-dcos/gcp
27+
cp desired_cluster_profile.tfvars.example desired_cluster_profile.tfvars
28+
```
29+
1330
## Setting up access to GCP Project
1431

1532
To access your GCP Project from terraform you have two options:
@@ -64,19 +81,6 @@ gcp_project = "massive-bliss-781"
6481
...
6582
```
6683

67-
## Example Terraform Deployments
68-
69-
### Quick Start
70-
71-
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.
72-
73-
- There is no git clone of this repo required. Terraform does this for you under the hood.
74-
75-
```bash
76-
terraform init -from-module github.com/dcos/terraform-dcos//gcp
77-
terraform apply -var-file desired_cluster_profile.tfvars
78-
```
79-
8084
### Custom terraform-dcos variables
8185

8286
The default variables are tracked in the [variables.tf](/gcp/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](/gcp/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.
@@ -157,6 +161,13 @@ You can upgrade your DC/OS cluster with a single command. This terraform script
157161
#### Rolling Upgrade
158162
###### Supported upgraded by dcos.io
159163

164+
##### Prerequisite:
165+
Update your terraform scripts to gain access to the latest DC/OS version with this command below:
166+
167+
```
168+
terraform get --update
169+
```
170+
160171
##### Masters Sequentially, Agents Parellel:
161172
```bash
162173
terraform apply -var-file desired_cluster_profile.tfvars -var state=upgrade -target null_resource.bootstrap -target null_resource.master -parallelism=1
@@ -170,27 +181,22 @@ terraform apply -var-file desired_cluster_profile.tfvars -var state=upgrade
170181
terraform apply -var-file desired_cluster_profile.tfvars -var state=upgrade
171182
```
172183

173-
174184
## Maintenance
175185

176-
If you would like to add or remove (private) agents or public agents from your cluster, you can do so by telling terraform your desired state and it will make sure it gets you there. For example, if I have 2 private agents and 1 public agent in my `-var-file` I can always override that flag by specifying the `-var` flag. It has higher priority than the `-var-file`.
186+
If you would like to add more or remove (private) agents or public agents from your cluster, you can do so by telling terraform your desired state and it will make sure it gets you there.
177187

178188
### Adding Agents
179189

180190
```bash
181-
terraform apply \
182-
-var-file desired_cluster_profile.tfvars \
183-
-var num_of_private_agents=5 \
184-
-var num_of_public_agents=3
191+
# update num_of_private_agents = "5" in desired_cluster_profile.tfvars
192+
terraform apply -var-file desired_cluster_profile.tfvars
185193
```
186194

187195
### Removing Agents
188196

189197
```bash
190-
terraform apply \
191-
-var-file desired_cluster_profile.tfvars \
192-
-var num_of_private_agents=1 \
193-
-var num_of_public_agents=1
198+
# update num_of_private_agents = "2" in desired_cluster_profile.tfvars
199+
terraform apply -var-file desired_cluster_profile.tfvars
194200
```
195201

196202
**Important**: Always remember to save your desired state in your `desired_cluster_profile.tfvars`

0 commit comments

Comments
 (0)