Skip to content

Commit 2db3939

Browse files
authored
Merge pull request #820 from mboersma/update-azure-docs
docs(quickstart): update Azure ACS installation steps
2 parents dc46480 + 345d5ae commit 2db3939

13 files changed

Lines changed: 97 additions & 78 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ bower_components
2020
venv/
2121

2222
_build/
23+
24+
.DS_Store

mkdocs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ pages:
1313
- Boot: quickstart/provider/aws/boot.md
1414
- DNS: quickstart/provider/aws/dns.md
1515
- Install Workflow: quickstart/provider/aws/install-aws.md
16-
- GKE:
17-
- Boot: quickstart/provider/gke/boot.md
18-
- DNS: quickstart/provider/gke/dns.md
19-
- Install Workflow: quickstart/provider/gke/install-gke.md
2016
- Azure:
2117
- Boot: quickstart/provider/azure-acs/boot.md
2218
- DNS: quickstart/provider/azure-acs/dns.md
2319
- Install Workflow: quickstart/provider/azure-acs/install-azure-acs.md
20+
- GKE:
21+
- Boot: quickstart/provider/gke/boot.md
22+
- DNS: quickstart/provider/gke/dns.md
23+
- Install Workflow: quickstart/provider/gke/install-gke.md
2424
- Minikube:
2525
- Boot: quickstart/provider/minikube/boot.md
2626
- DNS: quickstart/provider/minikube/dns.md
Lines changed: 91 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,55 @@
1-
# Booting Azure Container Service
1+
# Booting Kubernetes on Azure Container Service
22

3-
## Prerequisites
3+
Azure Container Service (ACS) is an optimized container hosting solution that works
4+
with all the open source tools you know. Azure is great for Kubernetes and Deis Workflow.
45

5-
1. Azure Account - An active Azure Cloud account is required for this quick start. Start a trial with $200 of free credit [here](https://azure.microsoft.com/en-us/free/). After completing trial sign up, a credit card for billing must be added, but will not be charged.
6+
If you don't yet have a Microsoft Azure account, start a trial with $200 of free credit
7+
[here](https://azure.microsoft.com/en-us/free/).
68

7-
2. Some form of *nix-based terminal - MacOS, Ubuntu, CentOS, Bash on Windows, etc
8-
<br>Where the following is present:
9+
## Prerequisites
910

10-
3. Azure CLI - The Azure CLI (2.0) provides the `az` command which drives Azure through the command line. Install the CLI by following the instructions on [GitHub for the Azure CLI](https://github.com/Azure/azure-cli).
11+
1. You should be able to run the `az` command, which is used to provision resources in the Azure
12+
cloud. Either [install Azure CLI to your computer][] or open a [Cloud Shell][] by clicking
13+
this icon near the upper right of the [Azure Portal][]: ![Cloud Shell](images/cloudshell.png)
1114

12-
4. SSH Key - This is used to deploy the cluster. [This URL helps to create SSH keys compatible with Linux VMs on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys)
15+
1. You need an SSH key to deploy the Kubernetes cluster. For help, see Microsoft's documentation
16+
about [creating SSH key pairs][] for Linux VMs on Azure.
1317

1418
## Configure the Azure CLI
1519

16-
After installing the CLI, log in to an Azure Account by typing `az login`. Take the code offered, enter it into the text box at [https://aka.ms/devicelogin](https://aka.ms/devicelogin), and login using an Azure account which has ownership or contributor permissions over at least one subscription.
20+
If you use [Cloud Shell][], the `az` client command is already configured.
1721

18-
> Note: If the Azure subscription is configured for 2FA (not done by default), the Azure account used to login must have ownership credentials to create the service principal.
22+
If you installed `az` locally, log in to your Azure account by typing `az login` at a command
23+
prompt and complete the confirmation code process.
1924

20-
```
21-
$ az login
22-
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code F7DLMNOPE to authenticate.
23-
[
24-
{
25-
"cloudName": "AzureCloud",
26-
"id": "57849302-a9f0-4908-b300-31337a0fb205",
27-
"isDefault": true,
28-
"name": "Azure Subscription",
29-
"state": "Enabled",
30-
"tenantId": "591acccc-dddd-4620-8f21-dbbeeeefee21",
31-
"user": {
32-
"name": "jhansen@deis.com",
33-
"type": "user"
34-
}
35-
}
36-
]
37-
```
25+
You can verify which account is active with the `az account show` command.
3826

39-
The `id` field from the `az login` command is the Azure Subscription Id. This id will be used throughout the guide. As a matter of convenience, set an environment variable named `AZURE_SUBSCRIPTION_ID` with the value of the id (e.g. 57849302-a9f0-4908-b300-31337a0fb205). Check the configuration by setting the active subscription with `az account set`:
40-
```
41-
$ export AZURE_SUBSCRIPTION_ID=57849302-a9f0-4908-b300-31337a0fb205
42-
$ az account set --subscription="${AZURE_SUBSCRIPTION_ID}"
43-
```
27+
!!! note
28+
Your Azure account needs ownership or contributor permissions on an Azure subscription.
4429

45-
## Create an ACS Kubernetes Cluster
30+
If the subscription has 2FA enabled, your Azure account must have ownership credentials in
31+
order to create the service principal.
4632

47-
Azure supports two methods to build an ACS Kubernetes cluster, through the Azure Web Portal (UI) or using the Azure command line (CLI). Choose one of the two paths:
33+
## Create an ACS Kubernetes Cluster
4834

49-
### Path 1: Azure 'az' CLI
35+
Azure Container Service can create a Kubernetes cluster using either
36+
[the `az` command line](#option-1-command-line) or [the Azure web portal](#option-2-web-portal).
5037

51-
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`
38+
### Option 1: Command Line
5239

53-
Create an environment variable to hold the resource group name:
40+
Create a group to contain the ACS Kubernetes cluster resources. Export the resource group's name
41+
and location to environment variables for use by later commands:
5442

5543
```
44+
$ # list worldwide datacenter locations so we can pick one
45+
$ az account list-locations --query [].name --output tsv
46+
$ export AZURE_DC_LOCATION=southcentralus # for example
5647
$ export AZURE_RG_NAME=myresourcegroup
57-
$ export AZURE_DC_LOCATION=mylocation
5848
$ az group create --name "${AZURE_RG_NAME}" --location "${AZURE_DC_LOCATION}"
5949
```
6050

61-
Execute the command to deploy the cluster. The `dns-prefix` and `ssh-key-value` must be replaced with your own values.
51+
Run the `az acs create` command to create your Kubernetes cluster, replacing the `--dns-prefix`
52+
and `--ssh-key-value` arguments below with your values:
6253

6354
```
6455
$ export AZURE_SERVICE_NAME=myacs
@@ -71,92 +62,112 @@ $ az acs create --resource-group="${AZURE_RG_NAME}" --location="${AZURE_DC_LOCAT
7162
--ssh-key-value @$HOME/.ssh/id_rsa.pub
7263
```
7364

74-
> Note: When `az acs create` starts, the provisioning process runs in the background by first creating a service principal named ${AZURE_SERVICE_NAME} assigned appropriate permissions. After a few minutes the `az` command should return with information about the deployment created as shown below.
65+
Azure Container Services immediately begins creating the Kubernetes cluster. After a few minutes,
66+
the command returns with information about the new deployment:
7567

7668
```
7769
{
78-
"id": "/subscriptions/ed7cedf5-fcd8-4a5d-9980-96d838f65ab8/resourceGroups/myresourcegroup/providers/Microsoft.Resources/deployments/azurecli1481240849.890798",
79-
"name": "azurecli1481240849.890798",
70+
"id": "/subscriptions/a123b456-1234-1ab2-12ab-12345678abcd/resourceGroups/myresourcegroup/providers/Microsoft.Resources/deployments/azurecli1496357873.8344654",
71+
"name": "azurecli1496357873.8344654",
8072
"properties": {
81-
"correlationId": "61be22d1-28d8-466c-a2ba-7bc11c2a3578",
73+
"correlationId": "eae284bc-4380-484c-9302-f355e278c651",
8274
"debugSetting": null,
8375
"dependencies": [],
8476
"mode": "Incremental",
8577
"outputs": null,
86-
"parameters": null,
87-
"parametersLink": null,
88-
"providers": [
89-
{
90-
"id": null,
91-
"namespace": "Microsoft.ContainerService",
92-
...
78+
...
9379
},
9480
"resourceGroup": "myresourcegroup"
9581
}
9682
```
9783

98-
### Path 2: UI
84+
Your Kubernetes cluster on Azure is ready. Skip the next section and
85+
[connect to the ACS Kubernetes cluster](#connect-to-the-acs-kubernetes-cluster).
86+
87+
### Option 2: Web Portal
9988

100-
Sign into the [Azure Portal](https://portal.azure.com) and create a new Azure Container Service:
89+
Sign in to the [Azure Portal](https://portal.azure.com) and create a new Azure Container Service.
90+
Click on the **+ New** link, then the **Compute** link, then **Azure Container Service**.
10191

10292
![](images/step1.png)
10393

104-
Select "Resource Manager" for the deployment model:
94+
Select **Resource Manager** as the deployment model:
10595

10696
![](images/step2.png)
10797

108-
Provide basic settings for the new ACS Kubernetes cluster.
98+
Then click the **Create** button.
10999

110-
* User name: this is the unix user name that will be added to all master and worker nodes
111-
* SSH public key: provide a public key that will be associated with the user name specified above
112-
* Subscription: choose the Azure Subscription that will be charged for the compute resources
113-
* Resource group: create a new resource group and give the group a unique name
114-
* Location: choose an Azure location for the cluster
100+
### Basics
115101

116-
When the required information is filled out, click "Ok".
102+
Provide these *Basics* for a new Azure Kubernetes cluster:
103+
104+
- Orchestrator: **Kubernetes**
105+
- Subscription: choose the Azure subscription to be charged for cloud resources
106+
- Resource group: "Create new" with a unique name
107+
- Location: choose one of Azure's worldwide datacenters
117108

118109
![](images/step3.png)
119110

120-
Create a new service principal via [instructions at this link](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authenticate-service-principal-cli#create-service-principal-with-password) and put them into the UI.
111+
Then click the **OK** button to move on to [Master configuration](#master-configuration).
112+
113+
### Master configuration
121114

122-
* Service Principal Client ID: the name of the principal created in the example document after the `-n` parameter e.g. `exampleapp`
123-
* Service Principal Client Secret: the password specified after the `-p` parameter or auto-generated in the Azure CLI e.g. 349d4728-438a-52a5-ad25-a740aa0bd240
115+
First take a slight detour to [create a service principal][] to access resources. Then supply the
116+
**Master configuration** options for your Kubernetes cluster:
117+
118+
- DNS name prefix: the first section of the cluster's hostname
119+
- User name: name of a unix user who will be added to all Kubernetes nodes
120+
- SSH public Key: a public key to authenticate the unix user specified above
121+
- Service principal client ID: the `appId` field of the service principal
122+
- Service principal client secret: the `password` field of the service principal
123+
- Master count: number of Kubernetes masters for the cluster
124124

125125
![](images/step4.png)
126126

127-
Next, configure the number of worker nodes, the node size, and DNS prefix for the cluster.
127+
When you are satisfied with your choices, click **OK** to move on to
128+
[Agent Configuration](#agent-configuration).
129+
130+
### Agent configuration
128131

129-
Worker nodes should have at least 7GB of available RAM.
132+
Choose **Agent configuration** options for your Kubernetes cluster:
130133

131-
Click "Ok" to continue.
134+
- Agent count: number of Kubernetes nodes to create
135+
- Agent virtual machine size: "Standard DS2" or better is recommended
136+
- Operating system: Linux
132137

133138
![](images/step5.png)
134139

135-
Review the cluster configuration and click "Ok". After clicking "Purchase" on the next screen the browser will be returned to the Azure Portal dashboard.
140+
When you are satisfied with your choices, click **OK** to move on to [Summary](#summary).
136141

137-
![](images/step6.png)
142+
### Summary
138143

139-
The Kubernetes cluster will take a few minutes to complete provisioning and configure itself. To monitor the progress of the deployment select the "Resource Group" from the nav on the left, then select the cluster name:
144+
Confirm the **Summary** of configuration choices for your Kubernetes cluster:
145+
146+
![](images/step6.png)
140147

141-
![](images/step8.png)
148+
Click **OK** to tell Azure Container Services to start creating your new Kubernetes cluster. You
149+
can monitor the progress of the deployment on the Azure dashboard, or just wait for a
150+
notification that it has completed.
142151

143-
![](images/step9.png)
152+
Your Kubernetes cluster on Azure is ready. Now make sure you can
153+
[connect to the ACS Kubernetes cluster](#connect-to-the-acs-kubernetes-cluster).
144154

145155
## Connect to the ACS Kubernetes Cluster
146156

147157
`kubectl` is the Kubernetes command line client. If you don't already have it installed, you can install it with:
148158

149-
```console
159+
```
150160
az acs kubernetes install-cli
151161
```
152162

153163
Download the master kubernetes cluster configuration to the ~/.kube/config file by running the following command:
154164

155-
```console
165+
```
156166
az acs kubernetes get-credentials --resource-group=$AZURE_RG_NAME --name=$AZURE_SERVICE_NAME
157167
```
168+
158169
> Note: If the cluster was provisioned using any other SSH key than `/home/myusername/.ssh/id_rsa` then the `--ssh-key-file` parameter must be used pointing to the SSH key utilized to provision the cluster.
159-
170+
160171
Verify connectivity to the new ACS Kubernetes cluster by running `kubectl cluster-info`
161172

162173
```
@@ -168,3 +179,9 @@ kubernetes-dashboard is running at https://mydnsprefix.myregion.cloudapp.azure.c
168179
```
169180

170181
You are now ready to [install Deis Workflow](install-azure-acs.md)
182+
183+
[Azure Portal]: https://portal.azure.com/
184+
[install Azure CLI to your computer]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
185+
[Cloud Shell]: https://azure.microsoft.com/en-us/features/cloud-shell/
186+
[create a service principal]: https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-service-principal
187+
[creating SSH key pairs]: https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys
580 Bytes
Loading
121 KB
Loading
185 KB
Loading
31.8 KB
Loading
99.4 KB
Loading
51.3 KB
Loading
58 KB
Loading

0 commit comments

Comments
 (0)