Code Monkey home page Code Monkey logo

basic-azure-demo's Introduction

azure-aks-demo

This is a basic cloud demo. It showcases Azure Container instances (ACI) and Azure Kubernetes Service (AKS)

How it works?

There are 4 demos in total, 2 for ACI and 2 for AKS. The scripts are expected to be executed in numerical order.

.env

A dot-env file is required for this demo to run. Fill it with the following contents:

export location="westeurope" # Location to be used by the demo. Terraform resources might get created outside of this!
export rgstate="rg-xxx" # Name of the resource group to be created for the storage account below
export sastate="saxxx" # Storage account name to be created to hold the terraform state for this demo
export subscription="xxx-xxx-xxx-xxx-xxx" # Subscription ID where this demo needs to be deployed
export tenant="xxx-xxx-xxx-xxx-xxx" # Tenant ID used for this demo (needed for some TF configuration)
export ARM_TENANT_ID=$tenant # This is needed to pass the tenant ID to the Terraform setup. 

0-prepare.sh

This is a utility script that will create a resource group and storage account to use for the Terraform state. It also creates the required files for that information to be passed to the other scripts.

1-apply-aci.sh

This script creates a demo ACI setup. It launches a single ACI instance with a Snake game demo. After the Terraform changes have been applied, it will automatically launch the resulting ACI link in the default webbrowser.

2-apply-aci-postgres.sh

This script launches the 2nd ACI demo. This demo contains a setup with a Azure Databases for PostgreSQL database, a Key Vault and an ACI container PhpPgAdmin. After the demo is applied, the browser will launch the website to PhPPgAdmin and the username and password of the database will be shown in the output of the command. In this demo, you can show that it's possible to setup a database, connect to if from a service within Azure without exposing it to the public world.

3-apply-cluster.sh

This utility script creates an AKS cluster. It a preparation setup for the 4th script. Launch this while explaining the use case, as it might take 5-10 minutes to spin up the cluster.

4-deploy-demos.sh

This launches the 2 AKS demos that are available in this repo.

The first one is a simple hello kubernetes application. This demo can be used to show how Kubernetes works (through k9s). Scaling out the hello-world application clearly shows that multiple pods are used (Tip: use CURL if the session is sticky in Chrome or Safari) Restarting the service is another good demo.

The second demo shows that Kubernetes can also be used for complex workloads with a lot of different components. This demo uses a version of the Google Microservices demo.

After deploying the applications, a browser will automatically be opened towards both demos.

99-terraform-destroy.sh

This is a utility cleanup script. It cleans up both the cluster and the aci demo. All data in the database or cluster WILL BE LOST when executing this

100-destroy.sh

This final utility script is the inverse of the first 0-prepare.sh script. It removes the storage account and resource group used for storing the Terraform state.

basic-azure-demo's People

Contributors

pietervincken avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.