7 - CI-CD MicroService Application (Mono and Polyrepo)

01 - What are Microservices?

How to break down a monolithic code base into microservices?

Downsides of Microservices Architecture

02 - Monorepo vs. Polyrepo

Monorepo

Best suited for smaller microservice applications

Polyrepo

Best suited for microservice applications with separate teams.

Monorepo Example

05 - Prepare Deployment Server

Create an ubuntu machine, log into it and:

# update application repositories
sudo apt update

# install docker
sudo apt install docker.io

# install docker-compose
sudo apt install docker-compose

# add current user to the 'docker' group
sudo usermod -aG docker $USER

06 - Build Micro Services (Monorepo)

Run a job only when there are changes in the frontend/ directory:

build_frontend:
  # ...
  only:
    changes:
      - "frontend/**/*" # can NOT use variables here

Basically, the techniques used to create a pipeline for microservices in a a monorepo setup involves:

07 - Deploy Micro Services (Monorepo)

In this lecture there are some interesting docker network tricks.

08 - CI-CD Pipeline for a Polyrepo

Main takeaway: use include to get the yaml files from a dedicated repo.