Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can watch [this online meetup](https://youtu.be/ifNitKh-L0o?t=2231) about Te

* It is assumed that you have a functioning Azure client installed. You can do so [here](https://github.com/Azure/azure-cli)

* Install [Terraform](https://www.terraform.io/downloads.html) and create credentials for Terraform to access Azure. To do so, you will need to following environment variables :
* Install [Terraform](https://www.terraform.io/downloads.html) and create credentials for Terraform to access Azure. To do so, you will need to following environment variables:

* ARM_SUBSCRIPTION_ID=<subscription id>
* ARM_CLIENT_ID=<client id>
Expand Down Expand Up @@ -52,16 +52,15 @@ $ az account show
}
}

export SUBSCRIPTIONID=`az account show --output tsv | cut -f2`

export ARM_SUBSCRIPTION_ID=`az account show --output tsv | cut -f2`
```

* Create an Azure application

```bash
$ export PASSWORD=`openssl rand -base64 24`

$ az ad app create --display-name dcosterraform--identifier-uris http://docs.mesosphere.com --homepage http://www.mesosphere.com --password $PASSWORD
$ az ad app create --display-name dcosterraform --identifier-uris http://docs.mesosphere.com --homepage http://www.mesosphere.com --password $PASSWORD

$ unset PASSWORD
```
Expand All @@ -77,7 +76,7 @@ $ az ad sp create --id $APPID
* Grant Permissions To Your Application

```bash
$ az role assignment create --assignee http://docs.mesosphere.com --role "Owner" --scope /subscriptions/$SUBSCRIPTIONID
$ az role assignment create --assignee http://docs.mesosphere.com --role "Owner" --scope /subscriptions/$ARM_SUBSCRIPTION_ID

```

Expand All @@ -89,7 +88,7 @@ $ az ad app list --display-name dcosterraform

*NOTE: A more detailed overview can be found on the [Terraform Site](https://www.terraform.io/docs/providers/azurerm/index.html)*

## Deploy the Azure infrastructure and DC/OS
## Deploy the Azure infrastructure and DC/OS ##

* First, review the default configuratiion. Most common options are available in `terraform/dcos/terraform.tfvars`. The full list of available options are in `terraform/dcos/variables.tf`. CoreOS is the default as it has pre-requirements built in.

Expand Down
11 changes: 6 additions & 5 deletions terraform/agent_private.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
resource "azurerm_storage_account" "agent_private" {
name = "${substr(sha1(uuid()), 0, 20)}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
count = 5
account_type = "Standard_LRS"
name = "${substr(sha1(uuid()), 0, 20)}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
count = 5
account_tier = "Standard"
account_replication_type = "LRS"

lifecycle {
ignore_changes = ["name"]
Expand Down
11 changes: 6 additions & 5 deletions terraform/agent_public.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ resource "azurerm_lb_rule" "agent_public_9090" {
}

resource "azurerm_storage_account" "agent_public" {
name = "${substr(sha1(uuid()), 0, 20)}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
count = 5
account_type = "Standard_LRS"
name = "${substr(sha1(uuid()), 0, 20)}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
count = 5
account_tier = "Standard"
account_replication_type = "LRS"

lifecycle {
ignore_changes = ["name"]
Expand Down
9 changes: 5 additions & 4 deletions terraform/bootstrap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ resource "azurerm_network_interface" "bootstrap" {
}

resource "azurerm_storage_account" "bootstrap" {
name = "bootstrapstorage${var.resource_suffix}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
account_type = "Standard_LRS"
name = "bootstrapstorage${var.resource_suffix}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
account_tier = "Standard"
account_replication_type = "LRS"
}

resource "azurerm_virtual_machine" "bootstrap" {
Expand Down
9 changes: 5 additions & 4 deletions terraform/master.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ resource "azurerm_availability_set" "master" {
}

resource "azurerm_storage_account" "master" {
name = "masterstorage${var.resource_suffix}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
account_type = "Standard_LRS"
name = "masterstorage${var.resource_suffix}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
account_tier = "Standard"
account_replication_type = "LRS"
}

resource "azurerm_virtual_machine" "master" {
Expand Down
9 changes: 5 additions & 4 deletions terraform/state.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ resource "azurerm_resource_group" "dcos" {
}

resource "azurerm_storage_account" "dcos" {
name = "sa${var.resource_base_name}${var.resource_suffix}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
account_type = "Standard_LRS"
name = "sa${var.resource_base_name}${var.resource_suffix}"
resource_group_name = "${azurerm_resource_group.dcos.name}"
location = "${azurerm_resource_group.dcos.location}"
account_tier = "Standard"
account_replication_type = "LRS"
}

resource "azurerm_storage_container" "state" {
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ variable "resource_suffix" {}

variable "dcos_download_url" {}

variable "install_script_url" {}

variable "bootstrap_script_url" {}

variable "private_key_path" {}

variable "public_key_path" {}
Expand Down