CI/CD with the conversation

The basic concept

  • Continuous Integration (CI): Continuous Integration Continuous Deployment (CD): Continuous delivery and Deployment

  • DevOps: (Devlelopment & Operations) Development Operations

CI/CD step diagram

  • Steps diagram

  • The services involved in the step

  • Source code management: Github/Gitlab…
  • 2. Build automated tests: Jenkins/ GitLab…
  • 3. Automatic voice publishing image management: Nexus/Docker…
  • 4. Automatic deployment: Ali Cloud, Tencent Cloud…

Docker concept

  • Virtualization Architecture Tools
  • Summary: build -> share -> run
  • Similar to, but more than, virtual machinesefficient,stable,Save a space

The core concept

  • Mirror Image:
  • The Container: the Container
  • The Repository: warehouse

The Image with the Container

  • Hub.docker.com: library of Contanier and Images

  • Docker can customize the configuration of the image using the Dockerfile file

Test in Docker

Portainer

Portainer(Docker interface with visual operation, need to write command line)

  • Installation: Portainer
// Create a hard disk named portainer_data docker volume create portainer_data docker run -d -p 9000:9000 -v portainer_data:/data portainer/portainer Unable to find image 'portainer/portainer:latest'  locally latest: Pulling from portainer/portainer 94cfa856b2b1: Pull complete 49d59ee0881a: Pull complete c71f4038b17b: Pull complete Digest: sha256:fb45b43738646048a0a0cc74fcee2865b69efde857e710126084ee5de9be0f3f Status: Downloaded newer image for portainer/portainer:latest e53a655712e637e527af7715e11c08dde702baa6aec93c0d64b0293b82638edd - Run determines whether there is a local mirror, - -d Background running mode - -P port (9000 port is exposed externally) // Check ~ docker container ls -a Container ID IMAGE COMMAND CREATED STATUS PORTS NAMES E53A655712E6 Portainer /portainer" /portainer" 4 minutes ago Up 4 minutes 0.0.0.0:9000->9000/ TCP, :::9000->9000/tcp silly_gagarinCopy the code
  • Open localhost:9000 in your browser

Then enter the Portainer management interface

Install the mongo

  • DockerHUB – > mongo hub.docker.com/search?q=mo…
  • use
Docker run --name some-mongo -d portainer/portainer docker container ls -a // List all cantainer docker start e53a655712e6 E53a655712e6 Cantainer id after installationCopy the code

MySQL installation

  • DockerHUB-> MySQL hub.docker.com/_/mysql
  • use
$docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest docker container ls -a // List all cantainers Docker start e53A655712e6 // E53A655712e6 Cantainer installation idCopy the code

Docker images // Lists all the local images