SlideShare a Scribd company logo
1 of 68
Download to read offline
1
2
Azure DevOps for MicroServices
App – 6 months of Project
Evolution
Igor Sychev
Solution Architect in MSTD BY
https://github.com/SychevIgor/pronet_docker
3
Introduction to our project
• Asp.Net Core based backend microservices
• Reactjs based frontend pp
• The App should be hosted in Azure (AKS- Managed Kubernetes)
• Azure DevOps “sold” as part of fully Azure native app development process.
• Azure Monitor (Application Insights and Log Analytics) “sold” as Azure native monitoring tools
• No clear scope -> Time and Material type of project
4
eShopOnContainers as a reference architecture
• Used to start, but not covered CI/CD/DEVOPS/ALM questions at the moment
https://github.com/dotnet-architecture/eShopOnContainers/issues/949
• Used Mono Repository (developed mainly by 1-2 devs at a time)
5
Mono Build/Release
6
Initial “Trade off” idea – Mono repository
• Situation:
o Domain boundaries not identified, because scope was not well
defined
o Team without experience with docker and microservices
o Team(20+ devs/qa) distributed across 4 locations
• Risk:
o To high level of required skills to begin
o High risk of “slow start”
• Risk Mitigation:
o Start from Mono Repository and sacrifice CI/CD for a 1-2 sprints
o After 1-2 sprints – replace Mono repository with
 sets of repositories for each microservice
 Initial Mono repo converted to Meta repository, with git
submodules
7
MonoRepo -> MonoBuild
• Problem was not in Mono Repository, but in Builds
o Each commit/push generated new build.
o Each build takes 20 minutes.
o Include/Exclude filters for folders doesn’t helped,
because “Docker-Compose build” build/pushed to
registry images all at once
• Can’t release microservices independently
• Hard to test microservices with different versions
with MonoRepo
8
Mono Build -> Mono Release problem
• Can’t deploy
microservices
independently
• Advises about “git
diffs” – is too
sophisticated and
not 100% guarantees.
9
Build/Release per Microservice
10
General Idea
11
After 2 sprints: Meta Repository + Set of Micro Repositories
12
Micro Repositories -> Microservices Build
13
Build Monitoring Board
• It’s hard to track all
BI/Builds for all
microservice independently
• Dashboards – solved this
issue.
• P.S. don’t stop build –
delete. Otherwise will be
marked as red in a report.
14
Microservices Build -> Independent Releases
15
Release Monitoring Board
• It’s hard to track all
CD/Releases for all
microservice independently
• Dashboards – solved this
issue.
16
Challenge of managing CI/CD
• For 8 Microservices – 8 CI pipelines for docker build, and 8 to create helm charts.
• For 8 Microservices – 8 CD pipelines, with 5 Environment each.
• Q: What was the challenge?
• A: Make all CI/CD identical for easy/fast modification and improvement.
• Q: How?
• A:
o Standardize names across different “layers”. Names of repositories should match names of Build
Artifacts, match k8s Deployments/Services/Pods.
o Standardize repository structure(where will be code, where will be helm charts)
o Clone CI/CD from one Microservices, replace Variables and Git Repository
o Use YAML based Builds
o Use Task Groups
17
Small Tricks – variables from Libraries in Build
18
Small Tricks – variables from Libraries in Release
19
Small Tricks – Task Groups in Builds/Release
20
Microservice Contract projects
• Some services calls by another services using REST API.
• API tests calls microservices via REST API as well.
• Each caller created own set of response model classes.
• Result: Code duplication (for some classed find 6 copies across project)
We need a solution!
• Q: Maybe expose Swagger/OpenAPI endpoints and generate client based on OpenAPI API
definitions?
• A: Yes, but we want to customize API (and simplify) clients and use only models, not “API
proxies/clients”.
o Customization may be overwritten by proxy regeneration.
o Store auto-generated code, but not used code in a project – hard to name it “best practice”
21
Nuget packages for Contract projects
22
Nuget as simple as
23
Nuget Package Build/Publish monitoring
24
Tests/Code Coverage Board
• It’s hard to track all Tests pass rate/ code coverage for
all microservice independently
• Dashboard – solved this
25
Automated Tests Trends
28
YAML based Builds
29
Designer based Builds (and Releases)
• Initially we used Designer based builds, because “Click-
>Click” is faster to start
• Designer based Builds don’t require commit/push
changes to git repo.
• YAML based builds were introduced relatively recently
and we were not confident that it’s not yet another
Silverlight, WinPhone
• YAML based releases were not available -> no
consistency between CI and CD
30
YAML based CI
• On a BUILD2019 Microsoft shows
“unified pipelines”, triggered us to
create YAML based builds. *
o Migration of 5 builds takes 2h (without
YAML builds skills)
o YAML builds – give us 99.9%
compatibility between microservices (1
variable is different)
o We store YAML build definitions under
source control -> CI as Code
(infrastructure as Code)
31
Build/Test in Docker
32
Build in Container
• Why, if It’s slower?!
o Have you ever seen errors/bug because on
one machine software was older/newer than
on others?
o Have you ever asked- what this .dll doing
here?
o Do your developers all get the 100%
same(cloned) machines?
o I can build my app in CI, but not locally!
o Concurrency tests may work locally but fail
in docker.
33
Software Installed on Ubuntu Agent
• Do your dev machines have the same version of software that Build
Agent in Azure?
https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/linux/Ubuntu1604-README.md
34
Tests in Container
• Why, if It’s slower?
o Yes, but apps will be executed in a container, not on your machine!
35
Build/Test in Docker as simple as
36
Docker-Compose
37
Run MicroServices App Locally from Meta Repository
• Multiple Docker-Compose files in a meta repository and in each Microservice Repository
• Meta repo:
o Run all
o Run back
o Run front
o Run all tests
o Run back tests
o Run front tests
• For Microservices
o Run microservices
o Run microservice test
38
Special Override file to run docker-compose locally
• Require to store local ports mapping
• In a cluster we used 80-443, but we can’t map on the same port more than 1 MicroService->
we need custom ports mapping from Container ports to Host Ports
39
Integration Tests in container
40
Our approach with Docker-Compose
• Build image with tests
• Pull and Run images with
dependencies
• Pro:
o Code executed in a similar
containerized environment
• Contra:
o Execution is slower than without
containerization
41
Alternative using Docker.Dotnet and testenvironment-docker
• Pro:
o Test infrastructure as code on C#
• Contra:
o Require more lines
o To create a container, container with test
require an access to Docker Engine API.
o To test React application backend, dev
require C# skills.
https://github.com/Deffiss/testenvironment-docker
42
Nodejs unavailable, or you
must can build/deploy app
without CI/CD
43
NodeJs.org unavailable
• Once, 24h before the release, CI started failing
• Analyses shows: nodejs stopped responding.
• No guarantees, that nodejs guys will restore it
on time with any SLA, because it’s free service.
• Conclusion: you always should know how to
run CI/CD from localhost in such cases.
44
SonarQube and technical Debt
journey
45
Considerations
• We will manage technical Debt using SonarQube
• Scans will happen inside docker image as well as builds/tests
• Will be used Epams installation of SonarQube
o This project assumed to be 100% independent from EPAM environment, except of Azure subscription,
but SonarQube installation was also excluded later during development.
• All Microservices must be scanned and tracked (Tests also must be included and covered)
• Will be used 1 (ONE) SonarQube project to track everything.
o Individual Microservices will be tracked additionally as branches.
46
47
SonarQube integration implementation
• Separate DockerfileSonarQube
• Docker-Compose file to simplify run
• Repeated for each Microservice
• All microservice use its own
SonarQube BRANCH to track it’s own
issues
48
As an Architect I want to run update issues from all Microservices
in one command
Run each collection sequentially: Run all in one file:
75
Infrastructure as Code ->CI/CD
76
Infrastructure repository for ARM Templates
• Azure infrastructure modified only from Azure
DevOps CD (releases)
• Infrastructure separated on 2 pieces:
o DevOps infrastructure (Azure Container Registry,
Azure Key Vault)
 2 params sets (1 for all EPAM environments and 1 for
Customer’s environment)
o Main Infrastructure (AKS, Application Insights, Log
Analytics)
 4+ params sets (dev/qa/uat/prod,etc)
78
ARM Template Validation in CI
79
Failed ARM template validation example:
• Network plugin for AKS can’t be modified
• Delete and Recreate
• Problem was found in CI, without CD(real deployment)
83
Helm
84
Each Microservice released via Helm
85
Example of Helm template (used to generate k8s yaml file)
86
Helm template Validation
Both Helm Lint and Dry-Run didn’t catch dummy mistake with “ in Environment Variables
Unclear how to automatically validate Helm Charts before the deployment
87
Helm Values per environment and Infrastructure as Code
• Helm Value per environment implement Infrastructure as Code
• Release(CD) process become simpler across all Microservices
88
Usage of ACR as repository for HELM charts
• Azure Container Registry can be used as Repository for Helm charts
• But this feature is in a PREVIEW
• Feature will GA by Microsoft after HELM 3.0 GA
It’s why we don’t want to use ACR Helm repository,
because migration from Helm 2.* to 3.*
it’s not minor update and require testing
89
Helm: Why tiller version is
important?!
90
One day, our Release Pipelines started crushing
https://status.dev.azure.com/_history
91
Next day: Azure DevOps reported as healthy
• Currently used in CD process:
• Last succeeded:
92
Why version had changed?
https://github.com/helm/helm/releases
93
Tiller version on cluster higher than on Helm on Client
• Once, we updated Tiller on clusters
• But some releases were installed on
Dev before upgrade and waited
approve and installation to QA
94
Summary: Helm/Tiller Version is important!
Helm higher than Tiller almost always will not work
Tiller higher than Helm will not work
103
Performance troubleshooting
or why distributed logging is
important
104
Once, team reported performance issue
• In an application was added Application Insights for
such moments
• Find a lot of nested API calls
105
What’s inside http requests?
• “Count_” should equal to 1
• 1 unique request for data per unique ID
• How to solve: caching http requests.
106
Dummy example how in .Net Core
125
Not clear how to test ModSecurity
• Ok, it’s clear how to test that ModSecurity running
But do ModSecurity protects?
128
Thank you!
Questions!
https://github.com/SychevIgor/pronet_docker

More Related Content

What's hot

Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineSlawa Giterman
 
Your journey into the serverless world
Your journey into the serverless worldYour journey into the serverless world
Your journey into the serverless worldRed Hat Developers
 
Docker Containers for Continuous Delivery
Docker Containers for Continuous DeliveryDocker Containers for Continuous Delivery
Docker Containers for Continuous DeliverySynerzip
 
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartOpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartTobias Schneck
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerBob Killen
 
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...Red Hat Developers
 
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)ITCamp
 
Enabling Cloud Native Buildpacks for Windows Containers
Enabling Cloud Native Buildpacks for Windows ContainersEnabling Cloud Native Buildpacks for Windows Containers
Enabling Cloud Native Buildpacks for Windows ContainersVMware Tanzu
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 
Docker and Containers overview - Docker Workshop
Docker and Containers overview - Docker WorkshopDocker and Containers overview - Docker Workshop
Docker and Containers overview - Docker WorkshopJonas Rosland
 
4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel 4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel Red Hat Developers
 
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...Yusuf Hadiwinata Sutandar
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18Jorge Morales
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeBrian Dawson
 
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10MagaliDavidCruz
 
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies Daniel Oh
 
Modernizing Java Apps with Docker
Modernizing Java Apps with DockerModernizing Java Apps with Docker
Modernizing Java Apps with DockerDocker, Inc.
 
Why Docker
Why DockerWhy Docker
Why DockerdotCloud
 

What's hot (20)

Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
 
Your journey into the serverless world
Your journey into the serverless worldYour journey into the serverless world
Your journey into the serverless world
 
Docker Containers for Continuous Delivery
Docker Containers for Continuous DeliveryDocker Containers for Continuous Delivery
Docker Containers for Continuous Delivery
 
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgartOpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
OpenShift-Build-Pipelines: Build -> Test -> Run! @JavaForumStuttgart
 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
 
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
 
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
 
Enabling Cloud Native Buildpacks for Windows Containers
Enabling Cloud Native Buildpacks for Windows ContainersEnabling Cloud Native Buildpacks for Windows Containers
Enabling Cloud Native Buildpacks for Windows Containers
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Docker and Containers overview - Docker Workshop
Docker and Containers overview - Docker WorkshopDocker and Containers overview - Docker Workshop
Docker and Containers overview - Docker Workshop
 
4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel 4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel
 
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
 
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10
 
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
 
Modernizing Java Apps with Docker
Modernizing Java Apps with DockerModernizing Java Apps with Docker
Modernizing Java Apps with Docker
 
Why Docker
Why DockerWhy Docker
Why Docker
 

Similar to Использование AzureDevOps при разработке микросервисных приложений

Docker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsRightScale
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERIndrajit Poddar
 
Containers and Microservices for Realists
Containers and Microservices for RealistsContainers and Microservices for Realists
Containers and Microservices for RealistsOracle Developers
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realistsKarthik Gaekwad
 
Continuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesContinuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesLuke Marsden
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Weaveworks
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realistsKarthik Gaekwad
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Weaveworks
 
Integration in the Cloud, by Rob Davies
Integration in the Cloud, by Rob DaviesIntegration in the Cloud, by Rob Davies
Integration in the Cloud, by Rob DaviesJudy Breedlove
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDAleksandr Maklakov
 
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
Develop and deploy Kubernetes  applications with Docker - IBM Index 2018Develop and deploy Kubernetes  applications with Docker - IBM Index 2018
Develop and deploy Kubernetes applications with Docker - IBM Index 2018Patrick Chanezon
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...NETWAYS
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design PatternsBilgin Ibryam
 
Efficient Parallel Testing with Docker by Laura Frank
Efficient Parallel Testing with Docker by Laura FrankEfficient Parallel Testing with Docker by Laura Frank
Efficient Parallel Testing with Docker by Laura FrankDocker, Inc.
 

Similar to Использование AzureDevOps при разработке микросервисных приложений (20)

Docker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud Applications
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
Containers and Microservices for Realists
Containers and Microservices for RealistsContainers and Microservices for Realists
Containers and Microservices for Realists
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realists
 
Continuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesContinuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with Kubernetes
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes
 
CICD Azure DevOps
CICD Azure DevOpsCICD Azure DevOps
CICD Azure DevOps
 
Integration in the Cloud, by Rob Davies
Integration in the Cloud, by Rob DaviesIntegration in the Cloud, by Rob Davies
Integration in the Cloud, by Rob Davies
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
Develop and deploy Kubernetes  applications with Docker - IBM Index 2018Develop and deploy Kubernetes  applications with Docker - IBM Index 2018
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design Patterns
 
Efficient Parallel Testing with Docker by Laura Frank
Efficient Parallel Testing with Docker by Laura FrankEfficient Parallel Testing with Docker by Laura Frank
Efficient Parallel Testing with Docker by Laura Frank
 

More from Vitebsk Miniq

Runtime compilation and code execution in groovy
Runtime compilation and code execution in groovyRuntime compilation and code execution in groovy
Runtime compilation and code execution in groovyVitebsk Miniq
 
The 5 Laws of Software Estimates
The 5 Laws of Software EstimatesThe 5 Laws of Software Estimates
The 5 Laws of Software EstimatesVitebsk Miniq
 
Latest & Greatest Observability Release 7.9
Latest & Greatest Observability Release 7.9Latest & Greatest Observability Release 7.9
Latest & Greatest Observability Release 7.9Vitebsk Miniq
 
Тестирование Spring-based приложений
Тестирование Spring-based приложенийТестирование Spring-based приложений
Тестирование Spring-based приложенийVitebsk Miniq
 
Семантический поиск - что это, как работает и чем отличается от просто поиска
Семантический поиск - что это, как работает и чем отличается от просто поискаСемантический поиск - что это, как работает и чем отличается от просто поиска
Семантический поиск - что это, как работает и чем отличается от просто поискаVitebsk Miniq
 
Локализационное тестирование - это не только перевод
Локализационное тестирование - это не только переводЛокализационное тестирование - это не только перевод
Локализационное тестирование - это не только переводVitebsk Miniq
 
ISTQB Сертификация тестировщиков: быть или не быть?
ISTQB Сертификация тестировщиков: быть или не быть?ISTQB Сертификация тестировщиков: быть или не быть?
ISTQB Сертификация тестировщиков: быть или не быть?Vitebsk Miniq
 
Apollo GraphQL Federation
Apollo GraphQL FederationApollo GraphQL Federation
Apollo GraphQL FederationVitebsk Miniq
 
Who is a functional tester
Who is a functional testerWho is a functional tester
Who is a functional testerVitebsk Miniq
 
Вперед в прошлое
Вперед в прошлоеВперед в прошлое
Вперед в прошлоеVitebsk Miniq
 
CloudFormation experience
CloudFormation experienceCloudFormation experience
CloudFormation experienceVitebsk Miniq
 
Learning Intelligence: the story of mine
Learning Intelligence: the story of mineLearning Intelligence: the story of mine
Learning Intelligence: the story of mineVitebsk Miniq
 
Как программисты могут спасти мир
Как программисты могут спасти мирКак программисты могут спасти мир
Как программисты могут спасти мирVitebsk Miniq
 
Distributed tracing system in action. Instana Tracing.
Distributed tracing system in action. Instana Tracing.Distributed tracing system in action. Instana Tracing.
Distributed tracing system in action. Instana Tracing.Vitebsk Miniq
 
Насорил - убери!
Насорил - убери!Насорил - убери!
Насорил - убери!Vitebsk Miniq
 
Styled-components. Что? Когда? И зачем?
Styled-components. Что? Когда? И зачем?Styled-components. Что? Когда? И зачем?
Styled-components. Что? Когда? И зачем?Vitebsk Miniq
 
Красные флаги и розовые очки
Красные флаги и розовые очкиКрасные флаги и розовые очки
Красные флаги и розовые очкиVitebsk Miniq
 
CSS. Практика
CSS. ПрактикаCSS. Практика
CSS. ПрактикаVitebsk Miniq
 
Разделяй и властвуй!
Разделяй и властвуй!Разделяй и властвуй!
Разделяй и властвуй!Vitebsk Miniq
 

More from Vitebsk Miniq (20)

Runtime compilation and code execution in groovy
Runtime compilation and code execution in groovyRuntime compilation and code execution in groovy
Runtime compilation and code execution in groovy
 
The 5 Laws of Software Estimates
The 5 Laws of Software EstimatesThe 5 Laws of Software Estimates
The 5 Laws of Software Estimates
 
Latest & Greatest Observability Release 7.9
Latest & Greatest Observability Release 7.9Latest & Greatest Observability Release 7.9
Latest & Greatest Observability Release 7.9
 
Тестирование Spring-based приложений
Тестирование Spring-based приложенийТестирование Spring-based приложений
Тестирование Spring-based приложений
 
Семантический поиск - что это, как работает и чем отличается от просто поиска
Семантический поиск - что это, как работает и чем отличается от просто поискаСемантический поиск - что это, как работает и чем отличается от просто поиска
Семантический поиск - что это, как работает и чем отличается от просто поиска
 
Локализационное тестирование - это не только перевод
Локализационное тестирование - это не только переводЛокализационное тестирование - это не только перевод
Локализационное тестирование - это не только перевод
 
ISTQB Сертификация тестировщиков: быть или не быть?
ISTQB Сертификация тестировщиков: быть или не быть?ISTQB Сертификация тестировщиков: быть или не быть?
ISTQB Сертификация тестировщиков: быть или не быть?
 
Apollo GraphQL Federation
Apollo GraphQL FederationApollo GraphQL Federation
Apollo GraphQL Federation
 
Who is a functional tester
Who is a functional testerWho is a functional tester
Who is a functional tester
 
Crawling healthy
Crawling healthyCrawling healthy
Crawling healthy
 
Вперед в прошлое
Вперед в прошлоеВперед в прошлое
Вперед в прошлое
 
CloudFormation experience
CloudFormation experienceCloudFormation experience
CloudFormation experience
 
Learning Intelligence: the story of mine
Learning Intelligence: the story of mineLearning Intelligence: the story of mine
Learning Intelligence: the story of mine
 
Как программисты могут спасти мир
Как программисты могут спасти мирКак программисты могут спасти мир
Как программисты могут спасти мир
 
Distributed tracing system in action. Instana Tracing.
Distributed tracing system in action. Instana Tracing.Distributed tracing system in action. Instana Tracing.
Distributed tracing system in action. Instana Tracing.
 
Насорил - убери!
Насорил - убери!Насорил - убери!
Насорил - убери!
 
Styled-components. Что? Когда? И зачем?
Styled-components. Что? Когда? И зачем?Styled-components. Что? Когда? И зачем?
Styled-components. Что? Когда? И зачем?
 
Красные флаги и розовые очки
Красные флаги и розовые очкиКрасные флаги и розовые очки
Красные флаги и розовые очки
 
CSS. Практика
CSS. ПрактикаCSS. Практика
CSS. Практика
 
Разделяй и властвуй!
Разделяй и властвуй!Разделяй и властвуй!
Разделяй и властвуй!
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Использование AzureDevOps при разработке микросервисных приложений

  • 1. 1
  • 2. 2 Azure DevOps for MicroServices App – 6 months of Project Evolution Igor Sychev Solution Architect in MSTD BY https://github.com/SychevIgor/pronet_docker
  • 3. 3 Introduction to our project • Asp.Net Core based backend microservices • Reactjs based frontend pp • The App should be hosted in Azure (AKS- Managed Kubernetes) • Azure DevOps “sold” as part of fully Azure native app development process. • Azure Monitor (Application Insights and Log Analytics) “sold” as Azure native monitoring tools • No clear scope -> Time and Material type of project
  • 4. 4 eShopOnContainers as a reference architecture • Used to start, but not covered CI/CD/DEVOPS/ALM questions at the moment https://github.com/dotnet-architecture/eShopOnContainers/issues/949 • Used Mono Repository (developed mainly by 1-2 devs at a time)
  • 6. 6 Initial “Trade off” idea – Mono repository • Situation: o Domain boundaries not identified, because scope was not well defined o Team without experience with docker and microservices o Team(20+ devs/qa) distributed across 4 locations • Risk: o To high level of required skills to begin o High risk of “slow start” • Risk Mitigation: o Start from Mono Repository and sacrifice CI/CD for a 1-2 sprints o After 1-2 sprints – replace Mono repository with  sets of repositories for each microservice  Initial Mono repo converted to Meta repository, with git submodules
  • 7. 7 MonoRepo -> MonoBuild • Problem was not in Mono Repository, but in Builds o Each commit/push generated new build. o Each build takes 20 minutes. o Include/Exclude filters for folders doesn’t helped, because “Docker-Compose build” build/pushed to registry images all at once • Can’t release microservices independently • Hard to test microservices with different versions with MonoRepo
  • 8. 8 Mono Build -> Mono Release problem • Can’t deploy microservices independently • Advises about “git diffs” – is too sophisticated and not 100% guarantees.
  • 11. 11 After 2 sprints: Meta Repository + Set of Micro Repositories
  • 12. 12 Micro Repositories -> Microservices Build
  • 13. 13 Build Monitoring Board • It’s hard to track all BI/Builds for all microservice independently • Dashboards – solved this issue. • P.S. don’t stop build – delete. Otherwise will be marked as red in a report.
  • 14. 14 Microservices Build -> Independent Releases
  • 15. 15 Release Monitoring Board • It’s hard to track all CD/Releases for all microservice independently • Dashboards – solved this issue.
  • 16. 16 Challenge of managing CI/CD • For 8 Microservices – 8 CI pipelines for docker build, and 8 to create helm charts. • For 8 Microservices – 8 CD pipelines, with 5 Environment each. • Q: What was the challenge? • A: Make all CI/CD identical for easy/fast modification and improvement. • Q: How? • A: o Standardize names across different “layers”. Names of repositories should match names of Build Artifacts, match k8s Deployments/Services/Pods. o Standardize repository structure(where will be code, where will be helm charts) o Clone CI/CD from one Microservices, replace Variables and Git Repository o Use YAML based Builds o Use Task Groups
  • 17. 17 Small Tricks – variables from Libraries in Build
  • 18. 18 Small Tricks – variables from Libraries in Release
  • 19. 19 Small Tricks – Task Groups in Builds/Release
  • 20. 20 Microservice Contract projects • Some services calls by another services using REST API. • API tests calls microservices via REST API as well. • Each caller created own set of response model classes. • Result: Code duplication (for some classed find 6 copies across project) We need a solution! • Q: Maybe expose Swagger/OpenAPI endpoints and generate client based on OpenAPI API definitions? • A: Yes, but we want to customize API (and simplify) clients and use only models, not “API proxies/clients”. o Customization may be overwritten by proxy regeneration. o Store auto-generated code, but not used code in a project – hard to name it “best practice”
  • 21. 21 Nuget packages for Contract projects
  • 24. 24 Tests/Code Coverage Board • It’s hard to track all Tests pass rate/ code coverage for all microservice independently • Dashboard – solved this
  • 27. 29 Designer based Builds (and Releases) • Initially we used Designer based builds, because “Click- >Click” is faster to start • Designer based Builds don’t require commit/push changes to git repo. • YAML based builds were introduced relatively recently and we were not confident that it’s not yet another Silverlight, WinPhone • YAML based releases were not available -> no consistency between CI and CD
  • 28. 30 YAML based CI • On a BUILD2019 Microsoft shows “unified pipelines”, triggered us to create YAML based builds. * o Migration of 5 builds takes 2h (without YAML builds skills) o YAML builds – give us 99.9% compatibility between microservices (1 variable is different) o We store YAML build definitions under source control -> CI as Code (infrastructure as Code)
  • 30. 32 Build in Container • Why, if It’s slower?! o Have you ever seen errors/bug because on one machine software was older/newer than on others? o Have you ever asked- what this .dll doing here? o Do your developers all get the 100% same(cloned) machines? o I can build my app in CI, but not locally! o Concurrency tests may work locally but fail in docker.
  • 31. 33 Software Installed on Ubuntu Agent • Do your dev machines have the same version of software that Build Agent in Azure? https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/linux/Ubuntu1604-README.md
  • 32. 34 Tests in Container • Why, if It’s slower? o Yes, but apps will be executed in a container, not on your machine!
  • 33. 35 Build/Test in Docker as simple as
  • 35. 37 Run MicroServices App Locally from Meta Repository • Multiple Docker-Compose files in a meta repository and in each Microservice Repository • Meta repo: o Run all o Run back o Run front o Run all tests o Run back tests o Run front tests • For Microservices o Run microservices o Run microservice test
  • 36. 38 Special Override file to run docker-compose locally • Require to store local ports mapping • In a cluster we used 80-443, but we can’t map on the same port more than 1 MicroService-> we need custom ports mapping from Container ports to Host Ports
  • 38. 40 Our approach with Docker-Compose • Build image with tests • Pull and Run images with dependencies • Pro: o Code executed in a similar containerized environment • Contra: o Execution is slower than without containerization
  • 39. 41 Alternative using Docker.Dotnet and testenvironment-docker • Pro: o Test infrastructure as code on C# • Contra: o Require more lines o To create a container, container with test require an access to Docker Engine API. o To test React application backend, dev require C# skills. https://github.com/Deffiss/testenvironment-docker
  • 40. 42 Nodejs unavailable, or you must can build/deploy app without CI/CD
  • 41. 43 NodeJs.org unavailable • Once, 24h before the release, CI started failing • Analyses shows: nodejs stopped responding. • No guarantees, that nodejs guys will restore it on time with any SLA, because it’s free service. • Conclusion: you always should know how to run CI/CD from localhost in such cases.
  • 43. 45 Considerations • We will manage technical Debt using SonarQube • Scans will happen inside docker image as well as builds/tests • Will be used Epams installation of SonarQube o This project assumed to be 100% independent from EPAM environment, except of Azure subscription, but SonarQube installation was also excluded later during development. • All Microservices must be scanned and tracked (Tests also must be included and covered) • Will be used 1 (ONE) SonarQube project to track everything. o Individual Microservices will be tracked additionally as branches.
  • 44. 46
  • 45. 47 SonarQube integration implementation • Separate DockerfileSonarQube • Docker-Compose file to simplify run • Repeated for each Microservice • All microservice use its own SonarQube BRANCH to track it’s own issues
  • 46. 48 As an Architect I want to run update issues from all Microservices in one command Run each collection sequentially: Run all in one file:
  • 48. 76 Infrastructure repository for ARM Templates • Azure infrastructure modified only from Azure DevOps CD (releases) • Infrastructure separated on 2 pieces: o DevOps infrastructure (Azure Container Registry, Azure Key Vault)  2 params sets (1 for all EPAM environments and 1 for Customer’s environment) o Main Infrastructure (AKS, Application Insights, Log Analytics)  4+ params sets (dev/qa/uat/prod,etc)
  • 50. 79 Failed ARM template validation example: • Network plugin for AKS can’t be modified • Delete and Recreate • Problem was found in CI, without CD(real deployment)
  • 53. 85 Example of Helm template (used to generate k8s yaml file)
  • 54. 86 Helm template Validation Both Helm Lint and Dry-Run didn’t catch dummy mistake with “ in Environment Variables Unclear how to automatically validate Helm Charts before the deployment
  • 55. 87 Helm Values per environment and Infrastructure as Code • Helm Value per environment implement Infrastructure as Code • Release(CD) process become simpler across all Microservices
  • 56. 88 Usage of ACR as repository for HELM charts • Azure Container Registry can be used as Repository for Helm charts • But this feature is in a PREVIEW • Feature will GA by Microsoft after HELM 3.0 GA It’s why we don’t want to use ACR Helm repository, because migration from Helm 2.* to 3.* it’s not minor update and require testing
  • 57. 89 Helm: Why tiller version is important?!
  • 58. 90 One day, our Release Pipelines started crushing https://status.dev.azure.com/_history
  • 59. 91 Next day: Azure DevOps reported as healthy • Currently used in CD process: • Last succeeded:
  • 60. 92 Why version had changed? https://github.com/helm/helm/releases
  • 61. 93 Tiller version on cluster higher than on Helm on Client • Once, we updated Tiller on clusters • But some releases were installed on Dev before upgrade and waited approve and installation to QA
  • 62. 94 Summary: Helm/Tiller Version is important! Helm higher than Tiller almost always will not work Tiller higher than Helm will not work
  • 63. 103 Performance troubleshooting or why distributed logging is important
  • 64. 104 Once, team reported performance issue • In an application was added Application Insights for such moments • Find a lot of nested API calls
  • 65. 105 What’s inside http requests? • “Count_” should equal to 1 • 1 unique request for data per unique ID • How to solve: caching http requests.
  • 66. 106 Dummy example how in .Net Core
  • 67. 125 Not clear how to test ModSecurity • Ok, it’s clear how to test that ModSecurity running But do ModSecurity protects?