Skip to content

Commit 1f7eade

Browse files
authored
updating REAME.md to include latest changes
1 parent e6cecfb commit 1f7eade

File tree

1 file changed

+43
-33
lines changed

1 file changed

+43
-33
lines changed

azure/README.md

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@
22

33
# Open DC/OS on Azure with Terraform
44

5+
## Prerequisites
6+
- [Terraform 0.11.x](https://www.terraform.io/downloads.html)
7+
- Azure SSH Private Key
8+
- Azure SSH Public Key
9+
- Azure ID Keys
10+
511
## Getting Started
612

13+
1. Create directory
14+
2. Initialize Terraform
15+
3. Configure Azure SSH and Azure ID keys
16+
4. Configure settings
17+
5. Apply Terraform
18+
719
### Install Terraform
820

921
If you're on a Mac environment with homebrew installed, run this command.
@@ -13,6 +25,20 @@ brew install terraform
1325
```
1426

1527
If you want to leverage the terraform installer, feel free to check out https://www.terraform.io/downloads.html.
28+
### Create Installer Directory
29+
30+
Make your directory where Terraform will download and place your Terraform infrastructure files.
31+
32+
```bash
33+
mkdir dcos-installer
34+
cd dcos-installer
35+
```
36+
37+
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.
38+
```
39+
terraform init -from-module github.com/dcos/terraform-dcos/azure
40+
cp desired_cluster_profile.tfvars.example desired_cluster_profile.tfvars
41+
```
1642

1743
### Configure your Cloud Provider Credentials
1844

@@ -25,10 +51,8 @@ ssh-add ~/.ssh/your_private_key.pem
2551
```
2652

2753
```bash
28-
cat desired_cluster_profile
29-
...
54+
cat desired_cluster_profile.tfvars
3055
ssh_pub_key = "INSERT_PUBLIC_KEY_HERE"
31-
...
3256
```
3357

3458
#### Configure your Azure ID Keys
@@ -56,23 +80,6 @@ $ source ~/.azure/credentials
5680
```
5781

5882

59-
## Example Terraform Deployments
60-
#### Pull down the DC/OS terraform scripts below
61-
62-
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.
63-
64-
### Quick Start
65-
66-
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.
67-
68-
- There is no git clone of this repo required. Terraform does this for you under the hood.
69-
70-
_*Note:* Create a new directory before the command below as terraform will write its files within the current directory._
71-
72-
```bash
73-
terraform init -from-module github.com/dcos/terraform-dcos//azure
74-
terraform apply
75-
```
7683

7784
### Custom terraform-dcos variables
7885

@@ -162,6 +169,13 @@ You can upgrade your DC/OS cluster with a single command. This terraform script
162169
#### Rolling Upgrade
163170
###### Supported upgraded by dcos.io
164171

172+
##### Prerequisite:
173+
Update your terraform scripts to gain access to the latest DC/OS version with this command below:
174+
175+
```
176+
terraform get --update
177+
```
178+
165179
##### Masters Sequentially, Agents Parellel:
166180
```bash
167181
terraform apply -var-file desired_cluster_profile.tfvars -var state=upgrade -target null_resource.bootstrap -target null_resource.master -parallelism=1
@@ -182,22 +196,18 @@ If you would like to add more or remove (private) agents or public agents from y
182196
### Adding Agents
183197

184198
```bash
185-
terraform apply \
186-
-var-file desired_cluster_profile \
187-
--var num_of_private_agents=5 \
188-
--var num_of_public_agents=3
199+
# update num_of_private_agents = "5" in desired_cluster_profile.tfvars
200+
terraform apply -var-file desired_cluster_profile.tfvars
189201
```
190202

191203
### Removing Agents
192204

193205
```bash
194-
terraform apply \
195-
-var-file desired_cluster_profile \
196-
--var num_of_private_agents=1 \
197-
--var num_of_public_agents=1
206+
# update num_of_private_agents = "2" in desired_cluster_profile.tfvars
207+
terraform apply -var-file desired_cluster_profile.tfvars
198208
```
199209

200-
**Important**: Always remember to save your desired state in your `desired_cluster_profile`
210+
**Important**: Always remember to save your desired state in your `desired_cluster_profile.tfvars`
201211

202212
## Redeploy an existing Master
203213

@@ -216,7 +226,7 @@ terraform taint azurerm_virtual_machine.master.0 # The number represents the age
216226
#### Redeploy Master Node
217227

218228
```bash
219-
terraform apply -var-file desired_cluster_profile
229+
terraform apply -var-file desired_cluster_profile.tfvars
220230
```
221231

222232
## Redeploy an existing Agent
@@ -235,7 +245,7 @@ terraform taint azurerm_virtual_machine.agent.0 # The number represents the agen
235245
#### Redeploy Agent
236246

237247
```bash
238-
terraform apply -var-file desired_cluster_profile
248+
terraform apply -var-file desired_cluster_profile.tfvars
239249
```
240250

241251

@@ -250,7 +260,7 @@ terraform taint azurerm_virtual_machine.public-agent.0 # The number represents t
250260
#### Redeploy Agent
251261

252262
```bash
253-
terraform apply -var-file desired_cluster_profile
263+
terraform apply -var-file desired_cluster_profile.tfvars
254264
```
255265

256266
### Experimental
@@ -264,7 +274,7 @@ Coming soon!
264274
You can shutdown/destroy all resources from your environment by running this command below
265275

266276
```bash
267-
terraform destroy -var-file desired_cluster_profile
277+
terraform destroy -var-file desired_cluster_profile.tfvars
268278
```
269279

270280
# Roadmaps

0 commit comments

Comments
 (0)