You will need an Azure subscription with “Contributor” permissions.
Before starting, you should decide how and where you will want to work on the challenges of this hackathon.
You can complete the entirety of this hack’s challenges using the Azure Cloud Shell in a web browser (fastest path), or you can choose to install the necessary tools on your local workstation (Windows/WSL, Mac, or Linux).
We recommend installing the tools on your workstation.
Azure Cloud Shell (using Bash) provides a convenient shell environment with all tools you will need to run these challenges already included such as the Azure CLI, kubectl, helm, and MySQL client tools, and editors such as vim, nano, code, etc.
This is the fastest path. To get started, simply open Azure Cloud Shell in a web browser, and you’re all set!
As an alternative to Azure Cloud Shell, this hackathon can also be run from a Bash shell on your computer. You can use the Windows Subsystem for Linux (WSL2), Linux Bash or Mac Terminal. While Linux and Mac include Bash and Terminal out of the box respectively, on Windows you will need to install the WSL: Windows Subsystem for Linux Installation Guide for Windows 10.
If you choose to run it from your local workstation, you need to install the following tools into your Bash environment (on Windows, install these into the WSL environment, NOT the Windows command prompt!):
Take into consideration how much time you will need to install these tools on your own computer. Depending on your Internet and computer’s speed, this additional local setup will probably take around 30 minutes.
Once the pre-requisites are set up, now it’s time to build the hack’s environment.
This hack is designed to help you learn chaos testing with Azure Chaos Studio, however you should have a basic knowledge of Kubernetes (K8s). The hack uses pre-canned Azure Kubernetes (AKS) environments that you will deploy into your Azure subscription. You many bring your own AKS application versus using the pre-canned AKS Pizza Application.
If you are using the Pizzeria Application, the Pizzeria Application will run in 2 Azure regions and entirely on an AKS cluster, consisting of the following:
The Pizzeria Application is deployed in two steps by scripts that invoke ARM Templates & Helm charts to create the AKS cluster, database, and the sample Pizzeria application. Your coach will provide you with a link to the Pizzeria.zip file that contains deployment files needed to deploy the AKS environment into EastUS and WestUS. Since the end goal is to test a multi-region application, deploy the application into each region. For best results, perform all experiments in your nearest region.
Run the following command to setup the AKS environments (you will do this for each region):
cd ~/REGION-NAME-AKS/ARM-Templates/KubernetesCluster
chmod +x ./create-cluster.sh
./create-cluster.sh
NOTE: Creating the cluster will take around 10 minutes
NOTE: The Kubernetes cluster will consist of one container contosoappmysql.
Deploy the Pizzeria application as follows:
cd ~/REGION-NAME/HelmCharts/ContosoPizza
chmod +x ./*.sh
./deploy-pizza.sh
NOTE: Deploying the Pizzeria application will take around 5 minutes
Once the applications are deployed, you will see a link to a websites running on port 8081. In Azure Cloud Shell, these are clickable links. Otherwise, you can cut and paste the URL in your web browser.
Pizzeria app on MySQL is ready at http://some_ip_address:8081/pizzeria
kubectl -n mysql get svc
There are more useful kubernetes commands in the reference section below.