Skip to content

Commit

Permalink
Moved AKS lab out of draft and removed old containers lab
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffprosise committed Oct 29, 2018
1 parent e769a91 commit 0690a97
Show file tree
Hide file tree
Showing 89 changed files with 7 additions and 399 deletions.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
11 changes: 0 additions & 11 deletions Labs/Azure Services/Azure Container Service/resources/Dockerfile

This file was deleted.

This file was deleted.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Running Containerized Applications with the Azure Kubernetes Service (AKS)
# Azure Kubernetes Service (AKS) #

[Containers](https://www.docker.com/what-container) are revolutionizing software development, and [Docker](http://www.docker.com) is the world's most popular containerization platform. Containers allow software and files to be bundled into self-contained packages that can be run on different computers and different operating systems. The following description comes from the Docker Web site:

Expand Down Expand Up @@ -31,13 +31,6 @@ The following are required to complete this hands-on lab:
- An active Microsoft Azure subscription. If you don't have one, [sign up for a free trial](http://aka.ms/WATK-FreeTrial).
- [Minecraft for Windows 10](https://www.microsoft.com/p/minecraft-for-windows-10/9nblggh2jhxj?activetab=pivot%3aoverviewtab), [Minecraft for iOS](https://itunes.apple.com/us/app/minecraft/id479516143?mt=8), or [Minecraft for Android](https://play.google.com/store/apps/details?id=com.mojang.minecraftpe)

<a name="Cost"></a>
### Cost ###

![cost](Images/cost-2.png)

The cost of this lab series is **moderate**. For an overview of cost ratings, refer to [Explanation of Costs](../../../Costs.md).

<a name="Exercises"></a>
## Exercises ##

Expand Down Expand Up @@ -66,7 +59,7 @@ Note that a virtual machine is *not* required for building Docker images. You co

_Creating a Kubernetes service_

1. Select **Create new** to create a new resource group and enter a resource-group name. Enter a cluster name and a DNS name prefix and make sure a green check mark appears next to each. Select the region you wish to deploy to, and set the node count to **1** to minimize the cost of the cluster. Make sure the node size is set to **Standard DS1 v2** to further minimize cost. Then click the **Review + create** button at the bottom of the blade.
1. Click **Create new** to create a new resource group for the cluster. Enter a cluster name and a DNS name prefix and make sure a green check mark appears next to each. Select the region you wish to deploy to, accept the default version of Kubernetes, and set the node count to **1** to minimize the cost of the cluster. Set the node size to **Standard DS1 v2** to further minimize cost. Then click the **Review + create** button at the bottom of the blade.

> You will place all the resources you create in this lab in a single resource group so you can easily delete all those resources simply by deleting the resource group. Resource groups offer other benefits, too, including the ability to view billing information for the resource group as a whole.

Expand All @@ -86,13 +79,13 @@ Note that a virtual machine is *not* required for building Docker images. You co

1. The next step is to create an instance of the Azure Container Registry, which acts as a repository for Docker images in much the same way that [Docker Hub](https://hub.docker.com/) does. The difference is that when you run container images in Azure, the containers start faster if the images that they load are hosted in Azure, too — especially if both reside in the same data center.

To begin, click **+ Create a resource** in the menu on the left side of the portal, followed by **Containers** and then **Container Registry**. Then enter a name for the container registry and make sure a green check mark appears next to it since the name must be unique within Azure. Select the resource group you created in Step 3 to place the container registry in the same resource group. (Be sure to select **Use existing**, too.) Select the same **Location** that you selected for the Kubernetes cluster and the Ubuntu VM and click **Enable** under "Admin user." Then finish up by clicking **Create** at the bottom of the blade.
To begin, click **+ Create a resource** in the menu on the left side of the portal, followed by **Containers** and then **Container Registry**. Enter a name for the container registry and make sure a green check mark appears next to it since the name must be unique within Azure. Place the container registry in the resource group you created in Step 3. Select the same **Location** that you selected for the Kubernetes cluster and the Ubuntu VM and click **Enable** under "Admin user." Then finish up by clicking **Create** at the bottom of the blade.

![Creating a container registry](Images/create-acr.png)

_Creating a container registry_

1. Click **Resource groups** in the menu on the left side of the portal. Then click the resource group containing the resources you deployed in this exercise. Wait until the deployment status changes to "3 Succeeded" indicating that all the resources have been deployed. If necessary, periodically click **Refresh** at the top of the blade to refresh the deployment status.
1. Click **Resource groups** in the menu on the left side of the portal. Click the resource group containing the resources you deployed in this exercise. Wait until the deployment status changes to "3 Succeeded" indicating that all the resources have been deployed. If necessary, periodically click **Refresh** at the top of the blade to refresh the deployment status.

![Monitoring the deployment status](Images/deployment-succeeded.png)

Expand Down Expand Up @@ -171,7 +164,7 @@ Now that the Azure infrastructure you need has been created, it's time to create
docker build --tag REGISTRY_NAME.azurecr.io/minecraft-server .
```

The ```--tag``` parameter assigns the image a name. In this case, since you will be pushing the image to a private repository rather than Docker Hub, the tag name is the location to which the image will be pushed. This lets the ```docker push``` command know where to push to.
The ```--tag``` parameter assigns the image a name. In this case, since you will be pushing the image to a private repository rather than Docker Hub, the tag name is the location to which the image will be pushed.

1. Wait for the build to complete; it will probably take a few minutes. Once the image is built, the next step is to push it to the container registry. Before you can do that, you need a password for logging into the container registry. Return to the resource group that you created in [Exercise 1](#Exercise1) in the Azure Portal and click the container-registry resource.

Expand Down Expand Up @@ -284,7 +277,7 @@ In this exercise, you will use the Docker image that you built in the Ubuntu VM
kubectl create -f minecraft.yaml
```

This command might take several minutes to complete. Behind the scenes, a lot is happening. Kubernetes loads the container image from the container registry and creates a container from the image, creates a [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/) to host the container, connects the pod to the internal Kubernetes network, and creates a [kube proxy](https://kubernetes.io/docs/concepts/cluster-administration/proxies/) to serve as an interface to the network. AKS then creates a virtual IP address in Azure, connects an [Azure Load Balancer](https://azure.microsoft.com/services/load-balancer/) to the IP Address, and connects the load balancer to the kube proxy through an [Azure Virtual Network](https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview), or VNet. The resultant architecture is pictured below.
This command might take several minutes to complete. Behind the scenes, a lot is happening. Kubernetes loads the container image from the container registry and creates a container from the image, creates a [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/) to host the container, connects the pod to the internal Kubernetes network, and creates a [kube proxy](https://kubernetes.io/docs/concepts/cluster-administration/proxies/) to serve as an interface to the network. AKS then creates a virtual IP address in Azure, connects an [Azure Load Balancer](https://azure.microsoft.com/services/load-balancer/) to the IP address, and connects the load balancer to the kube proxy through an [Azure Virtual Network](https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview), or VNet. The resultant architecture is pictured below.

![AKS architecture](Images/aks.png)

Expand Down Expand Up @@ -341,7 +334,7 @@ Now comes the fun part: connecting a Minecraft client to the Minecraft server ru

_Playing Minecraft_

One more, if you're not running Windows 10 but have an iOS or Android device, you can run the Minecraft client there. These clients are available in the respective app stores: in the App Store [here](https://itunes.apple.com/us/app/minecraft/id479516143?mt=8), and in the Google Play store [here](https://play.google.com/store/apps/details?id=com.mojang.minecraftpe). Neither is free, but neither is expensive, either. The Minecraft server that you deployed to AKS uses the [Bedrock](https://minecraft.gamepedia.com/Bedrock_Edition) version of the Minecraft engine, which supports Windows, iOS, and Android.
Once more, if you're not running Windows 10 but have an iOS or Android device, you can run the Minecraft client there. These clients are available in the respective app stores: in the App Store [here](https://itunes.apple.com/us/app/minecraft/id479516143?mt=8), and in the Google Play store [here](https://play.google.com/store/apps/details?id=com.mojang.minecraftpe). Neither is free, but neither is expensive, either. The Minecraft server that you deployed to AKS uses the [Bedrock](https://minecraft.gamepedia.com/Bedrock_Edition) version of the Minecraft engine, which supports Windows, iOS, and Android.

<a name="Exercise5"></a>
## Exercise 5: Delete the resource group ##
Expand All @@ -362,7 +355,3 @@ After a few minutes, the resource group and all of its resources will be deleted
## Summary ##

Azure Kubernetes Service can do more than host Minecraft. It is a general-purpose solution built on top of open-source software that is compatible with third-party Kubernetes tools. It supports enterprise features such as easy scalabilty, high availability, resiliency through self-health checks, and more. Combined with other container services in Azure, it makes Azure a first-rate platform for hosting Docker containers and managing those containers with Kubernetes.

---

Copyright 2018 Microsoft Corporation. All rights reserved. Except where otherwise noted, these materials are licensed under the terms of the MIT License. You may use them according to the license as is most appropriate for your project. The terms of this license can be found at <https://opensource.org/licenses/MIT.>
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

0 comments on commit 0690a97

Please sign in to comment.