Skip to content

Commit ba50b7b

Browse files
authored
Merge pull request #2 from dtzar/acs-quickstart
add cluster connect info
2 parents e052361 + 71dc773 commit ba50b7b

2 files changed

Lines changed: 69 additions & 16 deletions

File tree

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

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
2. Some form of *nix-based terminal - MacOS, Ubuntu, CentOS, Bash on Windows, etc
77
<br>Where the following is present:
88
3. Azure CLI - The Azure CLI (2.0) provides the `az` command and allows you to interact with Azure through the command line. Install the CLI by following the instructions on [GitHub for the Azure CLI](https://github.com/Azure/azure-cli).
9-
4. SSH Key - This is used to deploy the cluster.
9+
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)
1010
5. jq - to parse the JSON responses from the CLI. [jq download page](https://stedolan.github.io/jq/)
1111

1212
## Configure the Azure CLI
@@ -42,11 +42,11 @@ az account set --subscription="${SUBSCRIPTION_ID}"
4242
Next, create an Azure Service Principle that will be used to provision the ACS Kubernetes Cluster. Service Principles are entities that have permission to create resources on your behalf. New Service Principles must be given a unique name, a role, and an Azure subscription that the Service Principle may modify.
4343

4444
```
45-
SP_JSON=`az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/${SUBSCRIPTION_ID}"`
45+
SP_JSON=`az ad sp create-for-rbac -n="http://acsk8sdeis" --role="Contributor" --scopes="/subscriptions/${SUBSCRIPTION_ID}"`
4646
SP_NAME=`echo $SP_JSON | jq -r '.name'`
4747
SP_PASS=`echo $SP_JSON | jq -r '.password'`
4848
SP_TENANT=`echo $SP_JSON | jq -r '.tenant'`
49-
echo SP_JSON
49+
echo $SP_JSON
5050
```
5151

5252
This should display an output similar to this. jq has also automatically extracted these values for use in the creation of the cluster.
@@ -65,7 +65,7 @@ You can build the Kubernetes cluster on ACS using primarily the Azure web Portal
6565

6666
### Path 1: Azure 'az' CLI
6767

68-
1. Create an empty Azure resource group to deploy your cluster. The location of the resource group value can be changed to any datacenter.
68+
1. Create an empty Azure resource group to deploy your cluster. The location of the resource group value can be changed to any datacenter. `az account list-locations` gives the name of all locations.
6969

7070
```
7171
RG_NAME=myresourcegroup
@@ -75,16 +75,41 @@ az resource group create --name "${RG_NAME}" --location southcentralus
7575
2. Execute the command to deploy the cluster. The dns-prefix and ssh-key-value must be replaced with your own values.
7676

7777
```
78-
az acs create --resource-group="${RG_NAME}" --location="southcentralus" /
79-
--service-principal="${SP_NAME}" /
80-
--client-secret="${SP_PASS}" /
81-
--orchestrator-type=kubernetes --master-count=1 --agent-count=2 /
82-
--agent-vm-size="Standard_D2_v2" /
83-
--admin-username="k8sadmin" /
84-
--name="k8sanddeis" --dns-prefix="mydnsprefix" /
78+
az acs create --resource-group="${RG_NAME}" --location="southcentralus" \
79+
--service-principal="${SP_NAME}" \
80+
--client-secret="${SP_PASS}" \
81+
--orchestrator-type=kubernetes --master-count=1 --agent-count=2 \
82+
--agent-vm-size="Standard_D2_v2" \
83+
--admin-username="k8sadmin" \
84+
--name="k8sanddeis" --dns-prefix="mydnsprefix" \
8585
--ssh-key-value @/home/myusername/.ssh/id_rsa.pub
8686
```
8787

88+
> Note: When this is successfully executed, you'll only see this to start: `waiting for AAD role to propogate.done`. It will take a few minutes for the cluster to complete creation.
89+
90+
Finally you should see something like this:
91+
```
92+
{
93+
"id": "/subscriptions/ed7cedf5-fcd8-4a5d-9980-96d838f65ab8/resourceGroups/ascdeis/providers/Microsoft.Resources/deployments/azurecli1481240849.890798",
94+
"name": "azurecli1481240849.890798",
95+
"properties": {
96+
"correlationId": "61be22d1-28d8-466c-a2ba-7bc11c2a3578",
97+
"debugSetting": null,
98+
"dependencies": [],
99+
"mode": "Incremental",
100+
"outputs": null,
101+
"parameters": null,
102+
"parametersLink": null,
103+
"providers": [
104+
{
105+
"id": null,
106+
"namespace": "Microsoft.ContainerService",
107+
...
108+
},
109+
"resourceGroup": "ascdeis"
110+
}
111+
```
112+
88113
### Path 2: UI
89114

90115
Sign into the [Azure Portal](https://portal.azure.com) and create a new Azure Container Service:
@@ -135,15 +160,38 @@ The Kubernetes cluster will take a few minutes to complete provisioning and conf
135160
## Connect to your Kubernetes Cluster
136161

137162
1. Find hostname for the master
138-
2. SCP Kubeconfig from master into place
163+
`az acs list`
164+
Part of the way down the output, copy the fqdn value for your master dns name which will end with cloudapp.azure.com.
165+
```
166+
"masterProfile": {
167+
"count": 1,
168+
"dnsPrefix": "asc-deis-k8s-masters",
169+
"fqdn": "mydnsprefix.myregion.cloudapp.azure.com"
170+
},
171+
```
172+
173+
2. Download the Kubeconfig from the master to your terminal<br>
174+
Update the proper SSH key and fqdn name and then execute:<br>
175+
`scp -i ~/.ssh/id_rsa k8sadmin@mydnsprefix.myregion.cloudapp.azure.com:.kube/config ~/.kube/k8sanddeis.config`<br>
176+
Say yes to the prompt.
177+
```
178+
The authenticity of host 'mydnsprefix.myregion.cloudapp.azure.com (40.78.71.181)' can't be established.
179+
ECDSA key fingerprint is a0:09:ff:59:83:47:70:38:d4:0d:68:b2:cf:0f:2a:cf.
180+
Are you sure you want to continue connecting (yes/no)? yes
181+
Warning: Permanently added 'mydnsprefix.myregion.cloudapp.azure.com,40.78.71.181' (ECDSA) to the list of known hosts.
182+
```
183+
139184
3. Set KUBECONFIG environment value
185+
`export KUBECONFIG=~/.kube/k8sanddeis.config`
186+
187+
4. Verify you can connect to your Kubernetes cluster by running `kubectl cluster-info`
140188

141189
```
142190
$ kubectl cluster-info
143-
Kubernetes master is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com
144-
Heapster is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/heapster
145-
KubeDNS is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/kube-dns
146-
kubernetes-dashboard is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
191+
Kubernetes master is running at https://mydnsprefix.myregion.cloudapp.azure.com
192+
Heapster is running at https://mydnsprefix.myregion.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/heapster
193+
KubeDNS is running at https://mydnsprefix.myregion.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/kube-dns
194+
kubernetes-dashboard is running at https://mydnsprefix.myregion.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
147195
```
148196

149197
You are now ready to [install Deis Workflow](install-azure-acs.md)

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Client: &version.Version{SemVer:"v2.0.0", GitCommit:"51bdad42756dfaf3234f53ef3d3
1010
Server: &version.Version{SemVer:"v2.0.0", GitCommit:"51bdad42756dfaf3234f53ef3d3cb6bcd94144c2", GitTreeState:"clean"}
1111
```
1212

13+
Finally, intialize Helm:
14+
```
15+
helm init
16+
```
17+
1318
Ensure the `kubectl` client is installed and can connect to your Kubernetes cluster.
1419

1520
## Add the Deis Chart Repository

0 commit comments

Comments
 (0)