Skip to content

Reference solution for Production micro-services pipeline built on VSTS, docker, kubernetes and full CI / CD pipeline.

License

Notifications You must be signed in to change notification settings

billpieper/containerized-microservices-pipeline

 
 

Repository files navigation

Containerized Micro-services

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.

Solution Overview

Solution Architecture

Included in this Solution

Deployment scripts

Deployment scripts

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.

Example Angular app micro-service

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.

Example .NET Core api micro-service

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.

Development Prerequisites

  1. Mac - Homebrew

  2. Windows - Powershell & Linux Subsystem

  3. Docker

  4. Azure CLI

  5. 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>]
  6. ACS Engine

  7. JQ

  8. 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 Azure Resources and ACS Kubernetes Cluster

Deployment

Securing Secrets

Deploying secrets to production

Traffic Routing

Routing requests to Azure and within Kubernetes

Using VSTS to set up Continuous Integration and Continuous Deployment

Continuous integration/deployment

Log Analytics

Integrating Log Analytics

Repository Structure and Strategy

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.

Contributing

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.

About

Reference solution for Production micro-services pipeline built on VSTS, docker, kubernetes and full CI / CD pipeline.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 50.4%
  • Shell 47.1%
  • Smarty 2.5%