Skip to content

Commit 205f571

Browse files
authored
Merge pull request #4 from dtzar/acs-quickstart
Streamline Az commands, add azure storage accounts to helm install
2 parents c2f7f1c + bb54bef commit 205f571

2 files changed

Lines changed: 21 additions & 36 deletions

File tree

src/quickstart/provider/azure-acs/boot.md

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Next, create an Azure Service Principal that will be used to provision the ACS K
5252
$ export SP_JSON=`az ad sp create-for-rbac -n="http://acsk8sdeis" --role="Contributor" --scopes="/subscriptions/${SUBSCRIPTION_ID}"`
5353
$ export SP_NAME=`echo $SP_JSON | jq -r '.name'`
5454
$ export SP_PASS=`echo $SP_JSON | jq -r '.password'`
55-
$ export SP_TENANT=`echo $SP_JSON | jq -r '.tenant'`
5655
$ echo $SP_JSON
5756
```
5857

@@ -72,39 +71,20 @@ Azure supports two methods to build an ACS Kubernetes cluster, through the Azure
7271

7372
### Path 1: Azure 'az' CLI
7473

75-
Create an empty Azure resource group to hold the ACS Kubernetes cluster. The location of the resource group can be set to any available Azure datacenter. To see the possible locations use `az account list-locations`. Remember to reference the location by the `name` attribute:
76-
77-
```
78-
{
79-
"displayName": "West Central US",
80-
"id": "/subscriptions/57ac26cf-a9f0-4908-b300-9a4e9a0fb205/locations/westcentralus",
81-
"latitude": "40.890",
82-
"longitude": "-110.234",
83-
"name": "westcentralus",
84-
"subscriptionId": null
85-
},
86-
{
87-
"displayName": "West US 2",
88-
"id": "/subscriptions/57ac26cf-a9f0-4908-b300-9a4e9a0fb205/locations/westus2",
89-
"latitude": "47.233",
90-
"longitude": "-119.852",
91-
"name": "westus2",
92-
"subscriptionId": null
93-
}
94-
]
95-
```
74+
Create an empty Azure resource group to hold the ACS Kubernetes cluster. The location of the resource group can be set to any available Azure datacenter. To see the possible locations run `az account list-locations --query [].name --output tsv`
9675

9776
Create an environment variable to hold the resource group name:
9877

9978
```
10079
$ export RG_NAME=myresourcegroup
101-
$ az resource group create --name "${RG_NAME}" --location southcentralus
80+
$ export DC_LOCATION=mylocation
81+
$ az group create --name "${RG_NAME}" --location "${DC_LOCATION}"
10282
```
10383

10484
Execute the command to deploy the cluster. The `dns-prefix` and `ssh-key-value` must be replaced with your own values.
10585

10686
```
107-
$ az acs create --resource-group="${RG_NAME}" --location="southcentralus" \
87+
$ az acs create --resource-group="${RG_NAME}" --location="${DC_LOCATION}" \
10888
--service-principal="${SP_NAME}" \
10989
--client-secret="${SP_PASS}" \
11090
--orchestrator-type=kubernetes --master-count=1 --agent-count=2 \
@@ -114,7 +94,7 @@ $ az acs create --resource-group="${RG_NAME}" --location="southcentralus" \
11494
--ssh-key-value @/home/myusername/.ssh/id_rsa.pub
11595
```
11696

117-
> Note: When `az acs create` starts the only output will be `waiting for AAD role to propagate..`. This verifies the service principal is propagated and has appropriate permissions. If this passes the output will change to `... propagate.done`, the provisioning process runs silently in the background, and after a few minutes the `az` command should return with information about the deployment created as shown below. If `... propagate.done` is not displayed after a few minutes, then there is a problem with the service principal credentials.
97+
> Note: When `az acs create` starts, the provisioning process runs entirely silent in the background. After a few minutes the `az` command should return with information about the deployment created as shown below.
11898
11999
```
120100
{
@@ -187,22 +167,17 @@ The Kubernetes cluster will take a few minutes to complete provisioning and conf
187167

188168
## Connect to the ACS Kubernetes Cluster
189169

190-
Find the fully qualified domain name (FQDN) for the Kubernetes master:
170+
Retrieve the fully qualified domain name (FQDN) for the Kubernetes master.
191171

192172
```
193-
$ az acs list
194-
# Part of the way down the output, find and copy the FQDN for the master, it should end with `cloudapp.azure.com`:
195-
"masterProfile": {
196-
"count": 1,
197-
"dnsPrefix": "asc-deis-k8s-masters",
198-
"fqdn": "mydnsprefix.myregion.cloudapp.azure.com"
199-
},
173+
$ export K8S_FQDN=`az acs list -g $RG_NAME --query [0].masterProfile.fqdn --output tsv`
174+
$ echo $K8S_FQDN
200175
```
201176

202-
Download the Kubeconfig from the master to the local machine, make sure to use the right SSH identity and master FQDN:
177+
Download the Kubeconfig from the master to the local machine, make sure to use the same SSH credentials used to create the cluster:
203178

204179
```
205-
$ scp -i ~/.ssh/id_rsa k8sadmin@mydnsprefix.myregion.cloudapp.azure.com:.kube/config ~/.kube/k8sanddeis.config
180+
$ scp -i ~/.ssh/id_rsa k8sadmin@$K8S_FQDN:.kube/config ~/.kube/k8sanddeis.config
206181
The authenticity of host 'mydnsprefix.myregion.cloudapp.azure.com (40.78.71.181)' can't be established.
207182
ECDSA key fingerprint is a0:09:ff:59:83:47:70:38:d4:0d:68:b2:cf:0f:2a:cf.
208183
Are you sure you want to continue connecting (yes/no)? yes

src/quickstart/provider/azure-acs/install-azure-acs.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,22 @@ Add this repository to Helm:
2727
$ helm repo add deis https://charts.deis.com/workflow
2828
```
2929

30+
## Create New Azure Storage Account
31+
32+
It is recommended to have a storage account for the operational aspects of running DEIS (i.e. holding images, Disaster Recovery, Backup). This storage account can be passed as parameters during the helm install on the next step. Replace the SA_NAME variable with a unique name for your storage account and execute these commands.
33+
```
34+
$ export SA_NAME=YourGlobalUniqueName
35+
$ az storage account create -n $SA_NAME -l $DC_LOCATION -g $RG_NAME --sku Premium_LRS
36+
$ export SA_KEY=`az storage account keys list -n $SA_NAME -g RG_NAME --query keys[0].value --output tsv`
37+
38+
```
39+
3040
## Install Deis Workflow
3141

3242
Now that Helm is installed and the repository has been added, install Workflow by running:
3343

3444
```
35-
$ helm install deis/workflow --namespace deis --set controller.docker_tag=v2.9.0-acs,controller.org=kmala
45+
$ helm install deis/workflow --namespace=deis --set controller.docker_tag=v2.9.0-acs,controller.org=kmala,global.storage=azure,azure.accountname=$SA_NAME,azure.accountkey=$SA_KEY,azure.registry_container=registry,azure.database_container=database,azure.builder_container=builder
3646
```
3747

3848
Helm will install a variety of Kubernetes resources in the `deis` namespace.

0 commit comments

Comments
 (0)