Skip to content

Education & lessons learned from the field. Mainly focusing on AKS and Containers.

Notifications You must be signed in to change notification settings

razi-rais/microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This repository contains content that will help you get started with building Microservices using Docker Containers, Kubernetes as technologies and Microsoft Azure as a platform.

The strucure of the content is bit losse, but here is the list of artifacts availalbe.

Azure Kubernetes Service (AKS)

What to download the source code?

Download Sample Application (ASP.NET Core & Node.JS) - Histroic Events Microservice

Azure Container Service (ACS)*

What to download the source code?

Download Sample Application - ASP.NET Core 2.0 UI + API

*Microsoft is now recommeding AKS instead of ACS. If you are focusing on hybrid workloads or workloads that require customizations that are not supported by AKS, then you should look into acs-engine.

Artifacts

If you are new to Azure and wanted to quick start development with Docker containers and k8s, check out following Azure ARM templates/scripts. These resources will help you spend less time installing/setup components but rather using them to build/test your application.

Azure - Linux Docker Developer Virtual Machine

Azure ARM template that creates Azure Linux VM with following software installed:

  • Ubuntu Server 16.04 LTS
  • Docker (includes docker engine, client and docker compose)
  • Git
  • Nodejs
  • Dotnetcore
  • Azure Cli
  • Yeoman
  • Bower

After the virtual machine is created and running use the following command to find out versions of all of the installed software:

echo 'nodejs version ' $(node -v)  && echo 'npm version ' $(npm -v)  &&  echo 'dotnet version ' $(dotnet --version) && $(git --version) && az --version && printf "docker Client & Server version \n $(docker version)" 

Azure - Windows Container Developer Virtual Machine

Azure ARM template that creates Azure Windows Server 2016 VM with following software installed:

  • Windows Server 2016
  • Windows Containers - Docker Engine and Docker Compose (NOTE: This template does not support Docker Linux containers running on Windows Server 2016. If you need both Docker Linux containers and Windows Containers use the ARM template below that install Docker for Windows - it does require nested virtualization)
  • Chocolatey
  • Putty
  • Node
  • Dotnetcore
  • Azure Cli
  • Sql Server Management Studio (SMSS) 17
  • Visual Studio Code
  • Visual Studio 2017 Community Edition

Azure - Windows Container Developer Virtual Machine (with Docker for Windows)

Azure ARM template that creates Azure Windows Server 2016 VM with following software installed. Please note that Docker for Windows require nested virtualization. That is the reason behind using Standard_D2s_v3 for this ARM template.

  • Windows Server 2016
  • Docker for Windows - Docker Engine and Docker Compose (NOTE: This supports both Docker Linux containers and Windows containers. If you are looking for Windows containers only then use the ARM template above)
  • Chocolatey
  • Putty
  • Node
  • Dotnetcore
  • Azure Cli
  • Sql Server Management Studio (SMSS) 17
  • Visual Studio Code
  • Visual Studio 2017 Community Edition

Scripts

Various Bash and PowerShell scripts.

If you are working with K8s and Docker, use this script to have following software installed on your machine.

  • Docker
  • Minikube
  • Kubectl
  • Helm
  • Azure CLI

Simple script that help you stress test containers. You run the script on the host and pass the number of cores (e.g. StressCPUCores.ps1 2 ) and it will hit each core with 100% utlization. If you want to have all cores to reach 100% utlization then leave the parameter empty (e.g. StressCPUCores.ps1 - Note: make sure you know what you are doing because script will choke the CPU and operating system may become non-responsive)

Stress Test Memory - Windows Containers

Simple one line command that will help you stress test container's memory. Please note that you need to download SysInternals utlity testlimit64 first and make sure its available inside the running container.

//NOTE: In the command below, testlimit64.exe is available inside C:/Downloads/ directory on the host. 
//Also, -m switch limits the container memory usage to 1024 MB max. 

docker run -it -m 1024M -v C:/Downloads/:C:/utils/ microsoft/windowsservercore powershell

> C:\utils\testlimit64 -d -c 1024

Allows you to open IE automatically and browse to the Container IP Address and Port (default is 80). You need to pass valid container name. docker run --name swtich gives you ability to do that.