Skip to content

Commit 19b9ec1

Browse files
committed
feat(azure): skeleton for Azure Container Service quickstart
1 parent 1a5b9cc commit 19b9ec1

4 files changed

Lines changed: 185 additions & 0 deletions

File tree

src/quickstart/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Cloud-based options:
2121

2222
* [Google Container Engine](provider/gke/boot.md): provides a managed Kubernetes environment, available with a few clicks.
2323
* [Amazon Web Services](provider/aws/boot.md): uses Kubernetes upstream `kube-up.sh` to boot a cluster on AWS EC2.
24+
* [Azure Container Service](provider/azure-acs/boot.md): uses Azure Container Service to provision Kubernetes and install Workflow.
2425

2526
If you would like to test on your local machine follow, our guide for [Vagrant](provider/vagrant/boot.md).
2627

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Booting Azure Container Service
2+
3+
If you do not already have a Azure Cloud account, you can start a trial with $200 of free credit [here](https://azure.microsoft.com/en-us/free/). After completing sign up, you must add your billing information.
4+
5+
## Install and configure the Azure CLI
6+
7+
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).
8+
9+
After installing the CLI, log in to your Azure Account:
10+
```
11+
~ $ az login
12+
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code F7DLMNOPE to authenticate.
13+
[
14+
{
15+
"cloudName": "AzureCloud",
16+
"id": "57849302-a9f0-4908-b300-31337a0fb205",
17+
"isDefault": true,
18+
"name": "Azure Subscription",
19+
"state": "Enabled",
20+
"tenantId": "591acccc-dddd-4620-8f21-dbbeeeefee21",
21+
"user": {
22+
"name": "jhansen@deis.com",
23+
"type": "user"
24+
}
25+
}
26+
]
27+
```
28+
29+
TODO: handle multiple subscriptions?
30+
31+
## Create an Azure Service Principle
32+
33+
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.
34+
35+
```
36+
$ az ad sp create-for-rbac --name="http://workflow-on-acs" --role="Contributor" --scopes="/subscriptions/<SUBSCRIPTION ID>"
37+
{
38+
"appId": "58b21231-3dd7-4546-bd37-9df88812331f",
39+
"name": "http://workflow-on-acs",
40+
"password": "349d4728-438a-52a5-ad25-a740aa0bd240",
41+
"tenant": "891a9ddc-477a-4620-8f21-db22ffd3ffea"
42+
}
43+
```
44+
45+
## Create Your ACS Kubernetes Cluster
46+
47+
Path 1: UI
48+
49+
Path 2: ACS Engine
50+
51+
## Connect to your Kubernetes Cluster
52+
53+
1. Find hostname for the master
54+
2. SCP Kubeconfig from master into place
55+
3. Set KUBECONFIG environment value
56+
57+
```
58+
$ kubectl cluster-info
59+
Kubernetes master is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com
60+
Heapster is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/heapster
61+
KubeDNS is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/kube-dns
62+
kubernetes-dashboard is running at https://slack-acs-1mgmt.eastus.cloudapp.azure.com/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
63+
```
64+
65+
You are now ready to [install Deis Workflow](install-azure-acs.md)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Find Your Load Balancer Address
2+
3+
On Azure Container Engine, Deis Workflow will automatically provision and
4+
attach a Azure Load Balancer to the router component. This component is
5+
responsible for routing HTTP and HTTPS requests from the public internet to
6+
applications that are deployed and managed by Deis Workflow.
7+
8+
By describing the `deis-router` service, you can see what IP address has been
9+
allocated by Azure Cloud for your Deis Workflow cluster:
10+
11+
```
12+
$ kubectl --namespace=deis get service deis-router
13+
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
14+
deis-router 10.0.60.172 13.82.148.57 80/TCP,443/TCP,2222/TCP,9090/TCP 54m
15+
```
16+
17+
TODO: mention `<pending>` state
18+
19+
## Prepare the Hostname
20+
21+
Now that you have the ip address of your load balancer we can use the `nip.io`
22+
DNS service to route arbitrary hostnames to the Deis Workflow edge router. This
23+
lets us point the Workflow CLI at your cluster without having to either use
24+
your own domain or update DNS!
25+
26+
To verify the Workflow API server and nip.io, construct your hostname by taking
27+
the ip address for your load balancer and adding `nip.io`. For our example
28+
above, the address would be: `13.82.148.57.nip.io`.
29+
30+
Nip answers with the ip address no matter the hostname:
31+
```
32+
$ host 13.82.148.57.nip.io
33+
13.82.148.57.nip.io has address 13.82.148.57
34+
$ host something-random.13.82.148.57.nip.io
35+
something-random.13.82.148.57.nip.io has address 13.82.148.57
36+
```
37+
38+
By default, any HTTP traffic for the hostname `deis` will be sent to the Workflow API service. To test that everything is connected properly you may validate connectivity using `curl`:
39+
40+
```
41+
$ curl http://deis.13.82.148.57.nip.io/v2/ && echo
42+
{"detail":"Authentication credentials were not provided."}
43+
```
44+
45+
You should see a failed request because we provided no credentials to the API server.
46+
47+
Remember the hostname, we will use it in the next step.
48+
49+
You are now ready to [register an admin user and deploy your first app](../../deploy-an-app.md).
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Install Deis Workflow on Azure Container Service
2+
3+
## Check Your Setup
4+
5+
First check that the `helm` command is available and the version is v2.0.0 or newer.
6+
7+
```
8+
$ helm version
9+
Client: &version.Version{SemVer:"v2.0.0", GitCommit:"51bdad42756dfaf3234f53ef3d3cb6bcd94144c2", GitTreeState:"clean"}
10+
Server: &version.Version{SemVer:"v2.0.0", GitCommit:"51bdad42756dfaf3234f53ef3d3cb6bcd94144c2", GitTreeState:"clean"}
11+
```
12+
13+
Ensure the `kubectl` client is installed and can connect to your Kubernetes cluster.
14+
15+
## Add the Deis Chart Repository
16+
17+
The Deis Chart Repository contains everything needed to install Deis Workflow onto a Kubernetes cluster, with a single `helm install deis/workflow --namespace deis` command.
18+
19+
Add this repository to Helm:
20+
21+
```
22+
$ helm repo add deis https://charts.deis.com/workflow
23+
```
24+
25+
## Install Deis Workflow
26+
27+
Now that Helm is installed and the repository has been added, install Workflow by running:
28+
29+
```
30+
$ helm install deis/workflow --namespace deis --set controller.docker_tag=v2.9.0-acs,controller.org=kmala
31+
```
32+
33+
Helm will install a variety of Kubernetes resources in the `deis` namespace.
34+
Wait for the pods that Helm launched to be ready. Monitor their status by running:
35+
36+
```
37+
$ kubectl --namespace=deis get pods
38+
```
39+
40+
If it's preferred to have `kubectl` automatically update as the pod states change, run (type Ctrl-C to stop the watch):
41+
42+
```
43+
$ kubectl --namespace=deis get pods -w
44+
```
45+
46+
Depending on the order in which the Workflow components initialize, some pods may restart. This is common during the
47+
installation: if a component's dependencies are not yet available, that component will exit and Kubernetes will
48+
automatically restart it.
49+
50+
Here, it can be seen that the controller, builder and registry all took a few loops before they were able to start:
51+
52+
```
53+
$ kubectl --namespace=deis get pods
54+
NAME READY STATUS RESTARTS AGE
55+
deis-builder-hy3xv 1/1 Running 5 5m
56+
deis-controller-g3cu8 1/1 Running 5 5m
57+
deis-database-rad1o 1/1 Running 0 5m
58+
deis-logger-fluentd-1v8uk 1/1 Running 0 5m
59+
deis-logger-fluentd-esm60 1/1 Running 0 5m
60+
deis-logger-sm8b3 1/1 Running 0 5m
61+
deis-minio-4ww3t 1/1 Running 0 5m
62+
deis-registry-asozo 1/1 Running 1 5m
63+
deis-router-k1ond 1/1 Running 0 5m
64+
deis-workflow-manager-68nu6 1/1 Running 0 5m
65+
```
66+
67+
Once all of the pods are in the `READY` state, Deis Workflow is up and running!
68+
69+
Next, [configure dns](dns.md) so you can register your first user and deploy an application.
70+

0 commit comments

Comments
 (0)