This project is a reference solution for building out a full Production ready micro-services solution. This solution is hosted in Kubernetes running on Azure. All apps and services have a small (micro-service) footprint of responsibilities and are run in Docker containers. This solution is meant to be a best practice example of a micro-service development and hosting solution ready for Production.
- Cross platform solution (runs on Linux, Windows and Mac)
- Source repositories hosted in Git
- Continuous Integration (CI) including unit & integration tests via VSTS (Visual Studio Team Services)
- Continuous Deployment (CD) via VSTS
- Containerized services hosted in Kubernetes (k8)
- Secrets management via Azure KeyVault, k8 secrets and Hexadite
- Azure Active Directory Service Principal identities and least privilege access policies
- Helm chart k8 package deployments
- Azure Traffic Manager DNS request routing
- Traefik ingress controller k8 traffic routing
- Canary deployments
- Azure k8 cluster deployment via ACS Engine
- Application Insights telemetry
- Log Analytics k8 cluster health dashboard
Deployment scripts are provided as part of the reference solution that will setup a new Azure Subscription with all of the necessary resources, create Azure Active Directory Service Principal service accounts, grant needed access and deploy out n number of k8 clusters. Documentation for CI / CD setup in VSTS is provided to enable you to get a full end-to-end pipeline micro-service pipeline setup in no time.
https://github.com/Microsoft/containerized-microservices-pipeline-app
An example front end web app written in Angular is provided as part of the solution, including a suite of unit and integration tests that are run when a Pull Request is created for a robust CI process. Changes to the app micro-service is automatically deployed to the canary pods as part of the CD process.
https://github.com/Microsoft/containerized-microservices-pipeline-service
An example cross platform middle tier api is provided as part of the solution, including a suite of unit and integration tests that are run when a Pull Request is created for a robust CI process. Changes to the api micro-service is automatically deployed to the canary pods as part of the CD process.
-
Mac - Homebrew
-
Windows - Powershell & Linux Subsystem
-
Docker
-
Azure CLI
- Install Azure CLI on Mac with Homebrew
brew install brew install azure-cli
- Install Azure CLI on Windows: Download and run AZ Installer
- For more information on installing Azure CLI
- Install Azure CLI on Mac with Homebrew
-
kubectl
- Install kubectl on Mac with Homebrew
brew install kubectl
- Install kubectl on Windows with PowerShell
Install-Script -Name install-kubectl -Scope CurrentUser -Force install-kubectl.ps1 [-DownloadLocation <path>]
- Install kubectl on Mac with Homebrew
-
ACS Engine
-
JQ
-
Visual Studio
- Will be used for editing and executing web and load tests. There's an option to run the tests locally or in the cloud through VSTS. Web and load tests examples found here.
- Download and install Visual Studio
Deploying secrets to production
Routing requests to Azure and within Kubernetes
Continuous integration/deployment
We have one repository for the front end solution, one for our middle tier, and one common repository for deployment scripts. Because we are dealing with microservices, this approach allows the project to be both modular and scalable. The smaller codebases help developers contribute with faster execution and innovate rapidly due to fewer merge conflicts and clear ownership. Additionally, it allows the project to take full advantage of helm charts, helping control Kubernetes objects and application versioning. Using this structure as a reference solution, it is recommended that each additional microservice uses separate repositories for each of its respective services.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.