1
0
Форкнуть 0
Reference solution for Production micro-services pipeline built on VSTS, docker, kubernetes and full CI / CD pipeline.
Перейти к файлу
billpratt 9de9e066b4 Added deployment/inception.txt to .gitignore 2018-09-28 15:20:20 -07:00
WebAndLoadTests Edited ReadMes 2018-05-03 20:52:54 -07:00
deployment Update output directory 2018-07-23 14:35:35 -07:00
images Ci cd steps (#82) 2018-05-10 18:02:02 -07:00
kubernetes update ingress login service svc name (#73) 2018-05-04 13:07:58 -07:00
.gitignore Added deployment/inception.txt to .gitignore 2018-09-28 15:20:20 -07:00
ContiniousIntegrationAndDelivery.png update ci/cd diagram (#86) 2018-05-10 18:01:27 -07:00
ContinuousIntegrationAndDeployment.md Ci cd steps (#82) 2018-05-10 18:02:02 -07:00
Deployment.md Update instructions for .pfx certificates without a password. (#105) 2018-06-08 13:24:37 -07:00
LICENSE Initial commit 2018-03-26 16:34:55 -07:00
README.md Removing extra 's' 2018-06-27 10:01:59 -07:00
SecuringSecrets.md Updated and improved root README (#49) 2018-05-01 08:20:03 -07:00
SecurityDiagram.png Added secrets management docs. (#43) 2018-04-20 09:39:35 -07:00
SolutionArchitecture.png Add solution architecture diagram (#55) 2018-05-01 17:59:29 -07:00
TrafficRouting.md Add traffic routing diagram (#88) 2018-05-14 16:07:39 -07:00
TrafficRouting.png Add traffic routing diagram (#88) 2018-05-14 16:07:39 -07:00

README.md

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 opencode@microsoft.com with any additional questions or comments.