Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dstrebel authored Sep 18, 2018
2 parents 9e80677 + 0c1f43a commit 0e9d16c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 18 deletions.
7 changes: 0 additions & 7 deletions labs/build-application/reg-acr.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#!/bin/bash

AKS_RESOURCE_GROUP=$1
AKS_CLUSTER_NAME=$2
ACR_NAME=$3

#accept incoming values of Resource Group, Cluster Name and ACR Name

# Get the id of the service principal configured for AKS
CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query "servicePrincipalProfile.clientId" --output tsv)
Expand Down
36 changes: 28 additions & 8 deletions labs/create-aks-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,36 @@

> Note: In the cloud shell, you are automatically logged into your Azure subscription.

5. Create a unique identifier suffix for resources to be created in this lab.
5. Create Azure Service Prinicpal to use through the labs

```bash
az ad sp create-for-rbac --skip-assignment
```
This will return the following

```
"appId": "7248f250-0000-0000-0000-dbdeb8400d85",
"displayName": "azure-cli-2017-10-15-02-20-15",
"name": "http://azure-cli-2017-10-15-02-20-15",
"password": "77851d2c-0000-0000-0000-cb3ebc97975a",
"tenant": "72f988bf-0000-0000-0000-2d7cd011db47"
```

!!!IMPORTANT!!! - Please copy this information down as you'll need it for labs going forward

6. Create a unique identifier suffix for resources to be created in this lab.

```bash
export UNIQUE_SUFFIX=$USER$RANDOM
```
#### *** Write Value To .bashrc to persist through lab
```bash
echo export UNIQUE_SUFFIX=$UNIQUE_SUFFIX >> .bashrc
echo export UNIQUE_SUFFIX=$UNIQUE_SUFFIX >> ~/.bashrc
```

*** Note this value and it will be used in the next couple labs. The variable may reset if your shell times out, so PLEASE WRITE IT DOWN. ***

6. Create an Azure Resource Group in East US.
7. Create an Azure Resource Group in East US.

```bash
export RGNAME=kubernetes-hackfest
Expand All @@ -46,7 +63,7 @@
az group create -n $RGNAME -l $LOCATION
```

7. Create your AKS cluster in the resource group created above with 3 nodes, targeting Kubernetes version 1.10.3, with Container Insights, and HTTP Application Routing Enabled.
8. Create your AKS cluster in the resource group created above with 3 nodes, targeting Kubernetes version 1.10.3, with Container Insights, and HTTP Application Routing Enabled. You will use the Service Principal information from step 5.
* Use unique CLUSTERNAME

```bash
Expand All @@ -57,12 +74,14 @@

```bash
az aks create -n $CLUSTERNAME -g $RGNAME -k 1.10.3 \
--service-principal <appId> \
--client-secret <password> \
--generate-ssh-keys -l $LOCATION \
--node-count 3 \
--enable-addons http_application_routing,monitoring
```

8. Verify your cluster status. The `ProvisioningState` should be `Succeeded`
9. Verify your cluster status. The `ProvisioningState` should be `Succeeded`
```bash
az aks list -o table
```
Expand All @@ -73,13 +92,13 @@
ODLaks-v2-gbb-16502 eastus ODL_aks-v2-gbb-16502 1.8.6 Succeeded odlaks-v2--odlaks-v2-gbb-16-b23acc-17863579.hcp.centralus.azmk8s.io
```

9. Get the Kubernetes config files for your new AKS cluster
10. Get the Kubernetes config files for your new AKS cluster

```bash
az aks get-credentials -n $CLUSTERNAME -g $RGNAME
```

10. Verify you have API access to your new AKS cluster
11. Verify you have API access to your new AKS cluster

> Note: It can take 5 minutes for your nodes to appear and be in READY state. You can run `watch kubectl get nodes` to monitor status.

Expand Down Expand Up @@ -114,7 +133,7 @@


## Troubleshooting / Debugging
To further debug and diagnose cluster problems, use `cluster-info dump` command
<!--To further debug and diagnose cluster problems, use `cluster-info dump` command

`cluster-info dump` dumps cluster info out suitable for debugging and diagnosing cluster problems. By default, dumps everything to stdout. You can optionally specify a directory with --output-directory. If you specify a directory, kubernetes will build a set of files in that directory. By default only dumps things in the 'kube-system' namespace, but you can switch to a different namespace with the --namespaces flag, or specify --all-namespaces to dump all namespaces.

Expand All @@ -123,6 +142,7 @@ The command also dumps the logs of all of the pods in the cluster, these logs ar
```bash
kubectl cluster-info dump
```
-->

## Docs / References

Expand Down
12 changes: 9 additions & 3 deletions labs/helm-setup-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ In this lab we will setup Helm in our AKS cluster and deploy our application wit
```
* Replace the `acrServer` value below with the Login server from previous step. You will make this change in all of the charts (except cache-api)
* Replace the `acrServer` value below with the Login server from previous step. You will make this change in all of the charts below (except cache-api)
<!--->
[charts/service-tracker-ui/values.yaml](../../charts/service-tracker-ui/values.yaml)
[charts/service-tracker-ui/values.yaml](../../charts/weather-api/values.yaml)
[charts/service-tracker-ui/values.yaml](../../charts/service-tracker-ui/values.yaml)
[charts/service-tracker-ui/values.yaml](../../charts/service-tracker-ui/values.yaml)
[charts/service-tracker-ui/values.yaml](../../charts/service-tracker-ui/values.yaml)
--->
Example:
```
```yaml
# Default values for chart
service:
Expand Down

0 comments on commit 0e9d16c

Please sign in to comment.