Upgrade to Pro — share decks privately, control downloads, hide ads and more …

werf — наш инструмент для CI-CD в Kubernetes

flant
May 27, 2019

werf — наш инструмент для CI-CD в Kubernetes

Доклад технического директора компании «Флант» (https://flant.ru/) Дмитрия Столярова на секции «Непрерывная поставка» конференции DevOpsConf 2019, проходившей в рамках фестиваля РИТ++ 2019 в Москве. О проблемах и вызовах, с которыми сталкиваются при деплое в Kubernetes, возможных путях их решения и реализации в Open Source-утилите для DevOps-инженеров https://github.com/flant/werf

* Текстовый обзор доклада: https://habr.com/ru/company/flant/blog/460351/
* Видео с выступления: https://youtu.be/cK3ackGUTLw
* Анонс доклада на сайте конференции: https://devopsconf.io/moscow-rit/2019/abstracts/5136

flant

May 27, 2019
Tweet

More Decks by flant

Other Decks in Technology

Transcript

  1. v4

  2. лет Linux в production 11 лет с контейнерами в Linux

    10 лет Docker в production 5 года Kubernetes в production 3
  3. лет Linux в production 11 лет с контейнерами в Linux

    10 лет Docker в production 5 года Kubernetes в production 3 кластеров Kubernetes 100+ приложений 1000+ серверов 2000+
  4. лет Linux в production 11 лет с контейнерами в Linux

    10 лет Docker в production 5 года Kubernetes в production 3 кластеров Kubernetes 100+ приложений 1000+ серверов 2000+
  5. лет Linux в production 11 лет с контейнерами в Linux

    10 лет Docker в production 5 года Kubernetes в production 3 кластеров Kubernetes 100+ приложений 1000+ серверов 2000+
  6. Kubernetes для enterprise Архитектура Внедрение On-premise Обучение использованию Поддержка 24/7

    SLA Консалтинг и экспертиза подробности На стенде Фланта запрос услуги K8S@flant.ru
  7. Soft Production Практики Continuous Delivery с Docker youtu.be/mT5U862_ydU май 2016

    Наш опыт с Kubernetes в небольших проектах youtu.be/CgCLPYJRxbU июнь 2017
  8. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test
  9. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test
  10. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests build publish deploy deploy unit test test CI
  11. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests build publish deploy deploy unit test test CI
  12. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests CI build publish deploy deploy unit test test
  13. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test
  14. Docker-image Docker Registry Kubernetes test Kubernetes production build publish git

    image pull image pull deploy deploy unit test test Код IaC build IaC run Tests Важная деталь #2
  15. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test
  16. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test Вырожденный случай #1 – “Чужой” софт
  17. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull Tests unit test test Вырожденный случай #2 – “Java” deploy deploy
  18. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull deploy deploy Tests Вырожденный случай #3 – Мне повезёт! image pull
  19. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test
  20. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test
  21. IaC run Docker Registry Kubernetes test Kubernetes production publish git

    image pull image pull deploy deploy Tests unit test test Docker-image Код IaC build build
  22. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git Нюансы сборки Вес образа 76MB +553MB
  23. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app Нюансы сборки Вес образа 76MB +553MB +1MB
  24. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app RUN go get -d Нюансы сборки Вес образа 76MB +553MB +1MB +3MB
  25. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB
  26. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB
  27. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB
  28. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB
  29. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB
  30. FROM ubuntu:18.04 RUN apt update && apt install -y golang-go

    git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] FROM alpine:3.9 Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB 6MB
  31. FROM ubuntu:18.04 as build RUN apt update && apt install

    -y golang-go git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] FROM alpine:3.9 Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB 6MB
  32. FROM ubuntu:18.04 as build RUN apt update && apt install

    -y golang-go git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] FROM alpine:3.9 COPY --from=build /app/main . Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB 6MB +9MB
  33. FROM ubuntu:18.04 as build RUN apt update && apt install

    -y golang-go git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] FROM alpine:3.9 COPY --from=build /app/main . Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB 6MB +9MB
  34. FROM ubuntu:18.04 as build RUN apt update && apt install

    -y golang-go git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] FROM alpine:3.9 COPY --from=build /app/main . CMD ["/app/main"] Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB 6MB +9MB
  35. FROM ubuntu:18.04 as build RUN apt update && apt install

    -y golang-go git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] FROM alpine:3.9 COPY --from=build /app/main . CMD ["/app/main"] Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB 6MB +9MB = 15MB
  36. FROM ubuntu:18.04 as build RUN apt update && apt install

    -y golang-go git ADD . /app/ WORKDIR /app RUN go get -d RUN go build -o main . CMD ["/app/main"] FROM alpine:3.9 COPY --from=build /app/main . CMD ["/app/main"] Нюансы сборки Вес образа 76MB +553MB +1MB +3MB +9MB = 644MB 6MB +9MB = 15MB 42 раза!
  37. FROM ubuntu:xenial RUN addgroup --system nginx RUN adduser --system --ingroup

    nginx nginx RUN apt-get update RUN apt-get install -y curl patch git build-essential libexpat-dev libgd-dev RUN curl -fSL http://nginx.org/download/nginx-$V.tar.gz -o nginx.tar.gz RUN tar -zx -f nginx.tar.gz RUN rm nginx.tar.gz RUN git clone https://github.com/haosdent/nginx-limit-upstream.git RUN patch -p1 < nginx-limit-upstream/nginx-1.12.1.patch RUN ./configure $C --with-debug RUN make -j$(getconf _NPROCESSORS_ONLN) RUN mv objs/nginx objs/nginx-debug RUN mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so RUN mv objs/ngx_http_image_filter_module.so bjs/ngx_http_image_filter_module-debug.so RUN mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so RUN mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so RUN ./configure $CONFIG RUN make -j$(getconf _NPROCESSORS_ONLN) RUN make install RUN rm -rf /etc/nginx/html/ RUN mkdir /etc/nginx/conf.d/ RUN mkdir -p /usr/share/nginx/html/ RUN install -m644 html/index.html /usr/share/nginx/html/ ... Нюансы сборки Вес образа Количество слоёв
  38. FROM ubuntu:xenial RUN addgroup --system nginx && \ adduser --system

    --ingroup nginx nginx && \ apt-get update && \ apt-get install -y curl patch git build-essential libexpat-dev libgd-dev curl -fSL http://nginx.org/download/nginx-$V.tar.gz -o nginx.tar.gz tar -zx -f nginx.tar.gz && \ rm nginx.tar.gz RUN git clone https://github.com/haosdent/nginx-limit-upstream.git && \ patch -p1 < nginx-limit-upstream/nginx-1.12.1.patch && \ ./configure $C --with-debug && \ make -j$(getconf _NPROCESSORS_ONLN) && \ mv objs/nginx objs/nginx-debug && \ mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so mv objs/ngx_http_image_filter_module.so bjs/ngx_http_image_filter_module-debug.so mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so ./configure $C && \ make -j$(getconf _NPROCESSORS_ONLN) && \ make install && \ rm -rf /etc/nginx/html/ && \ mkdir /etc/nginx/conf.d/ && \ mkdir -p /usr/share/nginx/html/ && \ install -m644 html/index.html /usr/share/nginx/html/ && \ ... Нюансы сборки Вес образа Количество слоёв
  39. FROM ubuntu:xenial RUN addgroup --system nginx && \ adduser --system

    --ingroup nginx nginx && \ apt-get update && \ apt-get install -y curl patch git build-essential libexpat-dev libgd-dev curl -fSL http://nginx.org/download/nginx-$V.tar.gz -o nginx.tar.gz tar -zx -f nginx.tar.gz && \ rm nginx.tar.gz RUN git clone https://github.com/haosdent/nginx-limit-upstream.git && \ patch -p1 < nginx-limit-upstream/nginx-1.12.1.patch && \ ./configure $C --with-debug && \ make -j$(getconf _NPROCESSORS_ONLN) && \ mv objs/nginx objs/nginx-debug && \ mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so mv objs/ngx_http_image_filter_module.so bjs/ngx_http_image_filter_module-debug.so mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so ./configure $C && \ make -j$(getconf _NPROCESSORS_ONLN) && \ make install && \ rm -rf /etc/nginx/html/ && \ mkdir /etc/nginx/conf.d/ && \ mkdir -p /usr/share/nginx/html/ && \ install -m644 html/index.html /usr/share/nginx/html/ && \ ... Нюансы сборки Вес образа Количество слоёв Дебаг
  40. FROM ubuntu:xenial RUN addgroup --system nginx && \ adduser --system

    --ingroup nginx nginx && \ apt-get update && \ apt-get install -y curl patch git build-essential libexpat-dev libgd-dev curl -fSL http://nginx.org/download/nginx-$V.tar.gz -o nginx.tar.gz tar -zx -f nginx.tar.gz && \ rm nginx.tar.gz RUN git clone https://github.com/haosdent/nginx-limit-upstream.git && \ patch -p1 < nginx-limit-upstream/nginx-1.12.1.patch && \ ./configure $C --with-debug && \ make -j$(getconf _NPROCESSORS_ONLN) && \ mv objs/nginx objs/nginx-debug && \ mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so mv objs/ngx_http_image_filter_module.so bjs/ngx_http_image_filter_module-debug.so mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so ./configure $C && \ make -j$(getconf _NPROCESSORS_ONLN) && \ make install && \ rm -rf /etc/nginx/html/ && \ mkdir /etc/nginx/conf.d/ && \ mkdir -p /usr/share/nginx/html/ && \ install -m644 html/index.html /usr/share/nginx/html/ && \ ... Нюансы сборки Вес образа Количество слоёв Дебаг
  41. FROM ubuntu:xenial RUN addgroup --system nginx && \ adduser --system

    --ingroup nginx nginx && \ apt-get update && \ apt-get install -y curl patch git build-essential libexpat-dev libgd-dev curl -fSL http://nginx.org/download/nginx-$V.tar.gz -o nginx.tar.gz tar -zx -f nginx.tar.gz && \ rm nginx.tar.gz RUN git clone https://github.com/haosdent/nginx-limit-upstream.git && \ patch -p1 < nginx-limit-upstream/nginx-1.12.1.patch && \ ./configure $C --with-debug && \ make -j$(getconf _NPROCESSORS_ONLN) && \ mv objs/nginx objs/nginx-debug && \ mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so mv objs/ngx_http_image_filter_module.so bjs/ngx_http_image_filter_module-debug.so mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so ./configure $C && \ make -j$(getconf _NPROCESSORS_ONLN) && \ make install && \ rm -rf /etc/nginx/html/ && \ mkdir /etc/nginx/conf.d/ && \ mkdir -p /usr/share/nginx/html/ && \ install -m644 html/index.html /usr/share/nginx/html/ && \ ... Нюансы сборки Вес образа Количество слоёв Дебаг
  42. FROM ubuntu:xenial RUN addgroup --system nginx && \ adduser --system

    --ingroup nginx nginx && \ apt-get update && \ apt-get install -y curl patch git build-essential libexpat-dev libgd-dev curl -fSL http://nginx.org/download/nginx-$V.tar.gz -o nginx.tar.gz tar -zx -f nginx.tar.gz && \ rm nginx.tar.gz RUN git clone https://github.com/haosdent/nginx-limit-upstream.git && \ patch -p1 < nginx-limit-upstream/nginx-1.12.1.patch && \ ./configure $C --with-debug && \ make -j$(getconf _NPROCESSORS_ONLN) && \ mv objs/nginx objs/nginx-debug && \ mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so mv objs/ngx_http_image_filter_module.so bjs/ngx_http_image_filter_module-debug.so mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so ./configure $C && \ make -j$(getconf _NPROCESSORS_ONLN) && \ make install && \ rm -rf /etc/nginx/html/ && \ mkdir /etc/nginx/conf.d/ && \ mkdir -p /usr/share/nginx/html/ && \ install -m644 html/index.html /usr/share/nginx/html/ && \ ... Нюансы сборки Вес образа Количество слоёв Дебаг
  43. FROM ubuntu:xenial RUN addgroup --system nginx && \ adduser --system

    --ingroup nginx nginx && \ apt-get update && \ apt-get install -y curl patch git build-essential libexpat-dev libgd-dev curl -fSL http://nginx.org/download/nginx-$V.tar.gz -o nginx.tar.gz tar -zx -f nginx.tar.gz && \ rm nginx.tar.gz RUN git clone https://github.com/haosdent/nginx-limit-upstream.git && \ patch -p1 < nginx-limit-upstream/nginx-1.12.1.patch && \ ./configure $C --with-debug && \ make -j$(getconf _NPROCESSORS_ONLN) && \ mv objs/nginx objs/nginx-debug && \ mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so mv objs/ngx_http_image_filter_module.so bjs/ngx_http_image_filter_module-debug.so mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so ./configure $C && \ make -j$(getconf _NPROCESSORS_ONLN) && \ make install && \ rm -rf /etc/nginx/html/ && \ mkdir /etc/nginx/conf.d/ && \ mkdir -p /usr/share/nginx/html/ && \ install -m644 html/index.html /usr/share/nginx/html/ && \ ... ? Нюансы сборки Вес образа Количество слоёв Дебаг
  44. Step 1/3 : FROM ubuntu:18.04 ---> 7698f282e524 Step 2/3 :

    RUN addgroup --system nginx && adduser --system --ingrou ---> Running in 1ea00c8fa53d ... Removing intermediate container 1ea00c8fa53d ---> f39a30da45b1 Step 3/3 : RUN git clone https://github.com/haosdent/nginx-limit- ---> Running in 473357642c3f ... The command 'git clone ...' returned a non-zero code: 1 Нюансы сборки Вес образа Количество слоёв Дебаг
  45. Step 1/3 : FROM ubuntu:18.04 ---> 7698f282e524 Step 2/3 :

    RUN addgroup --system nginx && adduser --system --ingrou ---> Running in 1ea00c8fa53d ... Removing intermediate container 1ea00c8fa53d ---> f39a30da45b1 Step 3/3 : RUN git clone https://github.com/haosdent/nginx-limit- ---> Running in 473357642c3f ... The command 'git clone ...' returned a non-zero code: 1 Нюансы сборки Вес образа Количество слоёв Дебаг
  46. Step 1/3 : FROM ubuntu:18.04 ---> 7698f282e524 Step 2/3 :

    RUN addgroup --system nginx && adduser --system --ingrou ---> Running in 1ea00c8fa53d ... Removing intermediate container 1ea00c8fa53d ---> f39a30da45b1 Step 3/3 : RUN git clone https://github.com/haosdent/nginx-limit- ---> Running in 473357642c3f ... The command 'git clone ...' returned a non-zero code: 1 $ docker run -ti f39a30da45b1 /bin/bash ... Нюансы сборки Вес образа Количество слоёв Дебаг
  47. FROM python:3.4 ADD . /app WORKDIR /app RUN pip install

    -r requirements.txt Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  48. FROM python:3.4 ADD . /app WORKDIR /app RUN pip install

    -r requirements.txt Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  49. FROM python:3.4 ADD . /app WORKDIR /app RUN pip install

    -r requirements.txt Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  50. FROM python:3.4 RUN mkdir /app WORKDIR /app Нюансы сборки Вес

    образа Количество слоёв Дебаг Скорость сборки
  51. FROM python:3.4 RUN mkdir /app WORKDIR /app ADD requirements.txt /app/

    RUN pip install -r requirements.txt Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  52. FROM python:3.4 RUN mkdir /app WORKDIR /app ADD requirements.txt /app/

    RUN pip install -r requirements.txt ADD . /app Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  53. FROM python:3.4 RUN mkdir /app WORKDIR /app ADD requirements.txt /app/

    RUN pip install -r requirements.txt ADD . /app Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  54. FROM python:3.4 RUN mkdir /app WORKDIR /app ADD requirements.txt /app/

    RUN pip install -r requirements.txt ADD . /app Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  55. FROM python:3.4 RUN mkdir /app WORKDIR /app ADD requirements.txt /app/

    RUN pip install -r requirements.txt ADD . /app Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  56. FROM python:3.4 RUN mkdir /app WORKDIR /app ADD requirements-basic.txt /app/

    RUN pip install -r requirements-basic.txt ADD requirements.txt /app/ RUN pip install -r requirements.txt ADD . /app Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки
  57. FROM php:7.3-fpm ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY

    index.php /app COPY lib /app/lib WORKDIR /app FROM nginx:latest ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/ FROM php:7.3 RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app Dockerfile-backend Dockerfile-frontend Dockerfile-consumer Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки Много образов
  58. FROM php:7.3-fpm ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY

    index.php /app COPY lib /app/lib WORKDIR /app Dockerfile-backend FROM nginx:latest ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/ FROM php:7.3 RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app Dockerfile-frontend Dockerfile-consumer #!/bin/bash docker build -f Dockerfile.frontend . -t frontend:latest docker build -f Dockerfile.backend . -t backend:latest docker build -f Dockerfile.consumer . -t consumer:latest Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки Много образов
  59. FROM nginx:latest ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/ FROM php:7.3

    RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app Dockerfile-frontend Dockerfile-consumer FROM php:7.3-fpm ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY index.php /app COPY lib /app/lib WORKDIR /app Dockerfile-backend Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки Много образов
  60. FROM nginx:latest ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/ FROM php:7.3

    RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app FROM php:7.3-fpm ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY index.php /app COPY lib /app/lib WORKDIR /app Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки Много образов
  61. FROM nginx:latest ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/ FROM php:7.3

    RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app FROM php:7.3-fpm ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY index.php /app COPY lib /app/lib WORKDIR /app Dockerfile Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки Много образов
  62. FROM nginx:latest as frontend ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/

    FROM php:7.3 as consumer RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app FROM php:7.3-fpm as backend ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY index.php /app COPY lib /app/lib WORKDIR /app Dockerfile Нюансы сборки Вес образа Количество слоёв Дебаг Скорость сборки Много образов
  63. FROM nginx:latest as frontend ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/

    FROM php:7.3 as consumer RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app Нюансы сборки Вес образа Количество слоёв FROM php:7.3-fpm as backend ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY index.php /app COPY lib /app/lib WORKDIR /app Dockerfile #!/bin/bash docker build --target frontend . -t frontend:latest docker build --target backend . -t backend:latest docker build --target consumer . -t consumer:latest Дебаг Скорость сборки Много образов
  64. FROM nginx:latest as frontend ADD sys/nginx.conf /etc/nginx/nginx.conf ADD static/ /usr/share/nginx/html/

    FROM php:7.3 as consumer RUN mkdir -p /app/consumer COPY consumer /app/consumer WORKDIR /app Нюансы сборки Вес образа Количество слоёв FROM php:7.3-fpm as backend ADD sys/php-fpm.conf /etc/php/7.1/fpm/php-fpm.conf RUN mkdir -p /app/lib COPY index.php /app COPY lib /app/lib WORKDIR /app Dockerfile #!/bin/bash docker build --target frontend . -t frontend:latest docker build --target backend . -t backend:latest docker build --target consumer . -t consumer:latest Дебаг Скорость сборки Много образов
  65. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка
  66. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка Автомагия
  67. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка moby/buildkit Автомагия
  68. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка moby/buildkit Автомагия
  69. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка moby/buildkit Автомагия
  70. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка moby/buildkit genuinetools/img Автомагия
  71. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка ? Автомагия
  72. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка ? Параллельная сборка Автомагия
  73. Вес образа Количество слоёв Дебаг Скорость сборки Много образов Mount

    Ansible Сборка без Docker Параллельная сборка Распределенная сборка ? Параллельная сборка Автомагия
  74. IaC run Docker Registry Kubernetes test Kubernetes production publish git

    image pull image pull deploy deploy Tests unit test test Docker-image Код IaC build build
  75. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish
  76. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish №1: Как тегировать образ?
  77. myimage: v1.0 Stage Docker Registry myimage: v1.0 1.0 myimage: v1.0

    Production Стратегии тегирования git tag
  78. myimage: v1.0 Stage myimage: v1.0 Docker Registry 1.0 myimage: v1.0

    Production Стратегии тегирования git tag
  79. myimage: v1.0 Stage myimage: v1.0 Docker Registry master 1.0 myimage:

    v1.0 Production Стратегии тегирования git tag
  80. myimage: v1.0 Stage master myimage: v1.0 Docker Registry 1.0 myimage:

    v1.0 Production Стратегии тегирования git tag
  81. myimage: v1.0 Stage master myimage: v1.0 Docker Registry 1.0 myimage:

    v1.0 Production Стратегии тегирования git tag
  82. myimage: v1.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    git tag myimage: v1.0 Production Стратегии тегирования git tag
  83. IaC run Code IaC build git myimage: v1.0 Production myimage:

    v1.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0 git tag Стратегии тегирования git tag
  84. myimage: v1.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 build myimage: v1.0 Production Стратегии тегирования git tag
  85. myimage: v1.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 myimage: v2.0 2.0 publish myimage: v1.0 Production Стратегии тегирования git tag
  86. myimage: v1.0 Stage master myimage: v1.0 Docker Registry 1.0 myimage:

    v2.0 publish myimage: v1.0 Production 2.0 myimage: v2.0 2.0 Стратегии тегирования git tag
  87. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 myimage: v1.0 Production Стратегии тегирования git tag
  88. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 deploy myimage: v2.0 myimage: v1.0 Production Стратегии тегирования git tag
  89. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 myimage: v1.0 Production Стратегии тегирования git tag
  90. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 deploy myimage: v2.0 Production myimage: v2.0 Стратегии тегирования git tag
  91. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 myimage: v2.0 Production Стратегии тегирования git tag
  92. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 myimage: v2.0 Production 1. Поставить тег Стратегии тегирования git tag
  93. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 myimage: v2.0 Production 1. Поставить тег 2. Протестировать Стратегии тегирования git tag
  94. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 myimage: v2.0 Production 1. Поставить тег 2. Протестировать 3. Выкатить на прод Стратегии тегирования git tag
  95. myimage: v2.0 Stage master myimage: v1.0 Docker Registry 1.0 2.0

    myimage: v2.0 2.0 myimage: v2.0 Production Воспроизводимо, но жутко неудобно 1. Поставить тег 2. Протестировать 3. Выкатить на прод Стратегии тегирования git tag
  96. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview Стратегии тегирования git tag git commit + tag
  97. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop Стратегии тегирования git tag git commit + tag
  98. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 Стратегии тегирования git tag git commit + tag
  99. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage: #c1 myimage #c1 publish build Стратегии тегирования git tag git commit + tag
  100. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop myimage: #c1 myimage publish build #c1 #c1 Стратегии тегирования git tag git commit + tag
  101. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop myimage #c1 #c1 Стратегии тегирования git tag git commit + tag
  102. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c1 deploy myimage: #c1 Стратегии тегирования git tag git commit + tag
  103. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c1 Стратегии тегирования git tag git commit + tag
  104. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c1 #c2 Стратегии тегирования git tag git commit + tag
  105. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c2 #c2 myimage #c2 Стратегии тегирования git tag git commit + tag
  106. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 Стратегии тегирования git tag git commit + tag
  107. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 Стратегии тегирования git tag git commit + tag
  108. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c3 Стратегии тегирования git tag git commit + tag
  109. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 release_1.1 myimage #c3 #c3 Стратегии тегирования git tag git commit + tag
  110. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Preview

    develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c3 Staging myimage: #c3 deploy myimage: #c3 Стратегии тегирования git tag git commit + tag
  111. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Preview

    develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c3 Staging myimage: #c3 Стратегии тегирования git tag git commit + tag
  112. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Preview

    develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 Staging myimage: #c3 #c3 Стратегии тегирования git tag git commit + tag
  113. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Preview

    develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 Staging myimage: #c3 #c3 Стратегии тегирования git tag git commit + tag
  114. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Preview

    develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 Staging myimage: #c3 Стратегии тегирования git tag git commit + tag
  115. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Preview

    develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 publish build Staging myimage: #c3 Стратегии тегирования git tag git commit + tag
  116. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c3 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 deploy myimage: #c4 myimage: #c4 Стратегии тегирования git tag git commit + tag
  117. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 Стратегии тегирования git tag git commit + tag
  118. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 Стратегии тегирования git tag git commit + tag
  119. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 Стратегии тегирования git tag git commit + tag
  120. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 Стратегии тегирования git tag git commit + tag
  121. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 Стратегии тегирования git tag git commit + tag
  122. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 Стратегии тегирования git tag git commit + tag
  123. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c4 #c25 Стратегии тегирования git tag git commit + tag
  124. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c24 #c25 myimage: #c25 publish build myimage #c25 ... Стратегии тегирования git tag git commit + tag
  125. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Production

    myimage: v1.0 Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 deploy myimage: #c25 Стратегии тегирования git tag git commit + tag
  126. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 myimage #c25 ... Стратегии тегирования git tag git commit + tag
  127. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 #c25 myimage #c25 ... Стратегии тегирования git tag git commit + tag
  128. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 myimage #c25 ... Стратегии тегирования git tag git commit + tag
  129. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 myimage #c25 #c25 Стратегии тегирования git tag git commit + tag
  130. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 myimage #c25 #c25 1.1 Стратегии тегирования git tag git commit + tag
  131. ... Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0

    Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 myimage #c25 #c25 1.1 1.1 Стратегии тегирования git tag git commit + tag
  132. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Production

    myimage: v1.0 Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 1.1 1.1 Стратегии тегирования git tag git commit + tag
  133. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Production

    myimage: v1.1 Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 1.1 deploy myimage: v1.1 1.1 Стратегии тегирования git tag git commit + tag
  134. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Preview

    develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 #c25 1.1 1.1 Production myimage: v1.1 Staging myimage: #c25 Стратегии тегирования git tag git commit + tag
  135. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Preview

    develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 #c25 1.1 1.1 Production myimage: v1.1 Staging myimage: #c25 Стратегии тегирования git tag git commit + tag
  136. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Preview

    develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 #c25 1.1 1.1 Production myimage: v1.1 Staging myimage: #c25 Стратегии тегирования git tag git commit + tag
  137. ... Docker Registry myimage 1.0 master 1.0 Preview develop #c1

    myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 #c25 1.1 Production myimage: v1.1 Staging myimage: #c25 myimage #c25 1.1 Стратегии тегирования git tag git commit + tag
  138. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Production

    myimage: v1.1 Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 1.1 1.1 Стратегии тегирования git tag git commit + tag
  139. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Production

    myimage: v1.1 Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 1.1 1.1 Стратегии тегирования git tag git commit + tag
  140. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Production

    myimage: v1.1 Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 1.1 1.1 И воспроизводимо, и удобно! Стратегии тегирования git tag git commit + tag
  141. myimage #c25 ... Docker Registry myimage 1.0 master 1.0 Production

    myimage: v1.1 Staging Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 1.1 1.1 И воспроизводимо, и удобно! Но, только fast forward! Стратегии тегирования git tag git commit + tag
  142. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public Стратегии тегирования Перезапись git tag git commit + tag Content addressable
  143. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public 8c62b065252f2bc1c6a859acd18df1bb2aba260c47a593d6a7de9b34239727e5 Стратегии тегирования git tag git commit + tag Content addressable
  144. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public 8c62b065252f2bc1c6a859acd18df1bb2aba260c47a593d6a7de9b34239727e5 ab738dd6e9a8fdf3808928b349ec93a2ed2eab03ebffb53cdcedc54f5419024a Стратегии тегирования git tag git commit + tag Content addressable
  145. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public 8c62b065252f2bc1c6a859acd18df1bb2aba260c47a593d6a7de9b34239727e5 ab738dd6e9a8fdf3808928b349ec93a2ed2eab03ebffb53cdcedc54f5419024a RUN mkdir -p /app WORKDIR /app Стратегии тегирования git tag git commit + tag Content addressable
  146. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public 8c62b065252f2bc1c6a859acd18df1bb2aba260c47a593d6a7de9b34239727e5 ab738dd6e9a8fdf3808928b349ec93a2ed2eab03ebffb53cdcedc54f5419024a RUN mkdir -p /app WORKDIR /app RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb Стратегии тегирования git tag git commit + tag Content addressable
  147. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public 8c62b065252f2bc1c6a859acd18df1bb2aba260c47a593d6a7de9b34239727e5 ab738dd6e9a8fdf3808928b349ec93a2ed2eab03ebffb53cdcedc54f5419024a RUN mkdir -p /app WORKDIR /app RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb COPY --from=assets /app/public/usr/share/ nginx/www/public Стратегии тегирования git tag git commit + tag Content addressable
  148. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public 8c62b065252f2bc1c6a859acd18df1bb2aba260c47a593d6a7de9b34239727e5 ab738dd6e9a8fdf3808928b349ec93a2ed2eab03ebffb53cdcedc54f5419024a RUN mkdir -p /app WORKDIR /app RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb COPY --from=assets /app/public/usr/share/ nginx/www/public 261d2204dfe93eb7e59ca7182c7e07d34f97336804679da 90a07e2c8a2ed6c24 SHA256 Стратегии тегирования git tag git commit + tag Content addressable
  149. FROM ruby:2.3 as assets RUN mkdir -p /app WORKDIR /app

    COPY . ./ RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb FROM nginx:alpine COPY --from=assets /app/public /usr/share/nginx/www/public 8c62b065252f2bc1c6a859acd18df1bb2aba260c47a593d6a7de9b34239727e5 ab738dd6e9a8fdf3808928b349ec93a2ed2eab03ebffb53cdcedc54f5419024a RUN mkdir -p /app WORKDIR /app RUN gem install bundler && bundle install RUN bundle exec rake assets:precompile CMD bundle exec puma -C config/puma.rb COPY --from=assets /app/public/usr/share/ nginx/www/public 261d2204dfe93eb7e59ca7182c7e07d34f97336804679da 90a07e2c8a2ed6c24 f0dac297477bfe0c3d0bf1d2bfed61101e4a72910fba90b01ae0c3c29807f252 SHA256 Стратегии тегирования git tag git commit + tag Content addressable
  150. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 myimage #c25 ... Стратегии тегирования git tag git commit + tag Content addressable
  151. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage #c1 myimage: #c18 #c2 myimage #c2 #c3 myimage #c3 release_1.1 #c4 myimage #c4 myimage: #c25 #c25 myimage #c25 ... #sig1 #sig2 #sig3 #sig4 #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  152. #c1 #c2 #c3 #c4 #c25 Docker Registry myimage 1.0 master

    1.0 Production myimage: v1.0 Staging Preview develop myimage myimage: #sig18 myimage myimage release_1.1 myimage myimage: #sig25 myimage ... #sig1 #sig2 #sig3 #sig4 #sig25 #sig1 #sig2 #sig3 #sig4 #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  153. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage myimage: #sig18 #c2 myimage #c3 myimage release_1.1 #c4 myimage myimage: #sig25 myimage ... #sig1 #sig2 #sig3 #sig4 #sig25 #sig1 #sig2 #sig3 #sig4 #c25 #sig25 #c26 #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  154. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage myimage: #sig18 #c2 myimage #c3 myimage release_1.1 #c4 myimage myimage: #sig25 ... #sig1 #sig2 #sig3 #sig4 #sig1 #sig2 #sig3 #sig4 #c25 #sig25 #c26 #sig25 myimage #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  155. Docker Registry myimage 1.0 master 1.0 Production myimage: v1.0 Staging

    Preview develop #c1 myimage myimage: #sig18 #c2 myimage #c3 myimage release_1.1 #c4 myimage myimage: #sig25 ... #sig1 #sig2 #sig3 #sig4 #sig1 #sig2 #sig3 #sig4 #c25 #sig25 #c26 #sig25 myimage #sig25 deploy myimage: #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  156. Docker Registry myimage 1.0 master 1.0 Production myimage: #sig25 Staging

    Preview develop #c1 myimage myimage: #sig18 #c2 myimage #c3 myimage release_1.1 #c4 myimage myimage: #sig25 ... #sig1 #sig2 #sig3 #sig4 #sig1 #sig2 #sig3 #sig4 #c25 #sig25 #c26 #sig25 myimage #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  157. Docker Registry myimage 1.0 master 1.0 Production myimage: #sig25 Staging

    Preview develop #c1 myimage myimage: #sig18 #c2 myimage #c3 myimage release_1.1 #c4 myimage myimage: #sig25 ... #sig1 #sig2 #sig3 #sig4 #sig1 #sig2 #sig3 #sig4 #c25 #sig25 #c26 #sig25 myimage #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  158. Docker Registry myimage 1.0 master 1.0 Production myimage: #sig25 Staging

    Preview develop #c1 myimage myimage: #sig18 #c2 myimage #c3 myimage release_1.1 #c4 myimage myimage: #sig25 ... #sig1 #sig2 #sig3 #sig4 #sig1 #sig2 #sig3 #sig4 myimage #sig25 #c25 #sig25 #c26 #sig25 Стратегии тегирования git tag git commit + tag Content addressable
  159. Docker Registry myimage 1.0 master 1.0 Production myimage: #sig25 Staging

    Preview develop #c1 myimage myimage: #sig18 #c2 myimage #c3 myimage release_1.1 #c4 myimage myimage: #sig25 ... #sig1 #sig2 #sig3 #sig4 #sig1 #sig2 #sig3 #sig4 myimage #sig25 #c25 #sig25 #c26 #sig25 SHA256 ??? Стратегии тегирования git tag git commit + tag Content addressable
  160. master Code from git beforeInstall install beforeSetup setup IaC build

    Стратегии тегирования git tag git commit + tag Content addressable
  161. master beforeInstall Code from git beforeInstall install beforeSetup setup IaC

    build Стратегии тегирования git tag git commit + tag Content addressable
  162. master beforeInstall Code git install beforeSetup setup IaC build #sig1

    from beforeInstall Стратегии тегирования git tag git commit + tag Content addressable
  163. master beforeInstall Code git install beforeSetup setup IaC build from

    beforeInstall #sig1 id образа SHA256 Стратегии тегирования git tag git commit + tag Content addressable
  164. master beforeInstall #sig1 Code from git beforeInstall install beforeSetup setup

    IaC build Стратегии тегирования git tag git commit + tag Content addressable
  165. master beforeInstall #sig1 git archive Code from git beforeInstall install

    beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  166. master beforeInstall #sig1 git archive Code from git beforeInstall install

    beforeSetup setup IaC build #sig2 Стратегии тегирования git tag git commit + tag Content addressable
  167. master beforeInstall git archive from git beforeInstall install beforeSetup setup

    IaC build #sig1 Code #sig2 SHA256 Стратегии тегирования git tag git commit + tag Content addressable
  168. master beforeInstall #sig1 git archive #sig2 Code from git beforeInstall

    install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  169. master beforeInstall #sig1 git archive #sig2 install #sig3 Code from

    git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  170. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  171. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup setup

    #sig5 #sig4 Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  172. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup setup

    #sig5 #sig4 Code from git beforeInstall install beforeSetup setup IaC build image Стратегии тегирования git tag git commit + tag Content addressable
  173. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup setup

    #sig5 #sig4 Code from git beforeInstall install beforeSetup setup IaC build image tag Стратегии тегирования git tag git commit + tag Content addressable
  174. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup setup

    #sig5 #sig4 image tag Стратегии тегирования git tag git commit + tag Content addressable
  175. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup #sig5 image tag Стратегии тегирования git tag git commit + tag Content addressable
  176. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup #sig5 image tag Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  177. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup #sig5 git patch #sig6 image tag Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  178. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup #sig5 git patch #sig6 image tag Code from git beforeInstall install beforeSetup setup IaC build diff Стратегии тегирования git tag git commit + tag Content addressable
  179. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup git patch image tag from git beforeInstall install beforeSetup setup IaC build SHA256 (diff) #sig5 #sig6 Code Стратегии тегирования git tag git commit + tag Content addressable
  180. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup #sig5 git patch #sig6 image tag Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  181. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup #sig5 git patch #sig6 image tag image tag Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  182. master beforeInstall #sig1 git archive #sig2 install #sig3 beforeSetup #sig4

    setup #sig5 git patch #sig6 image tag image tag Стратегии тегирования git tag git commit + tag Content addressable
  183. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag Стратегии тегирования git tag git commit + tag Content addressable
  184. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  185. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  186. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag git patch #sig7 Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  187. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag git patch #sig7 Code from git beforeInstall install beforeSetup setup IaC build diff Стратегии тегирования git tag git commit + tag Content addressable
  188. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag git patch #sig7 beforeSetup #sig8 Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  189. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag git patch #sig7 beforeSetup #sig8 setup #sig9 Code from git beforeInstall install beforeSetup setup IaC build Стратегии тегирования git tag git commit + tag Content addressable
  190. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag git patch #sig7 beforeSetup #sig8 setup #sig9 Code from git beforeInstall install beforeSetup setup IaC build image tag Стратегии тегирования git tag git commit + tag Content addressable
  191. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag git patch #sig7 beforeSetup #sig8 setup #sig9 image tag Стратегии тегирования git tag git commit + tag Content addressable
  192. beforeSetup #sig4 master setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 image tag image tag git patch #sig7 beforeSetup #sig8 setup #sig9 image tag Docker Registry Stages Storage Стратегии тегирования git tag git commit + tag Content addressable
  193. master image tag image tag image tag Docker Registry beforeSetup

    #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage Стратегии тегирования git tag git commit + tag Content addressable
  194. master image tag image tag image tag Docker Registry beforeSetup

    #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage Стратегии тегирования git tag git commit + tag Content addressable
  195. master beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag image tag image tag Docker Registry Стратегии тегирования git tag git commit + tag Content addressable
  196. master beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag image tag image tag Docker Registry Стратегии тегирования git tag git commit + tag Content addressable
  197. master beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1

    git archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag image tag image tag Docker Registry Стратегии тегирования git tag git commit + tag Content addressable
  198. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish
  199. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish
  200. test build Код IaC build git image pull image pull

    Tests unit test IaC run Docker-image Docker Registry Kubernetes test Kubernetes production deploy deploy rgstr.exm.pl/some/image/name:<tag> + annotations! publish
  201. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish
  202. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish №2: Очистка
  203. Docker Registry Repo v1.0 v1.1 v1.2 v2.0 v2.1 v3.1 layer

    layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer
  204. Docker Registry Repo v1.0 v1.1 v1.2 v2.0 v2.1 v3.1 layer

    layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer
  205. Docker Registry Repo v1.0 v1.1 v1.2 v2.0 v2.1 v3.1 layer

    layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer Удаление старых тегов
  206. ?

  207. #1 Git head теги: 0.1, 0.2, 1.0 бранчи: master develop

    release-1.0 hotfix-xxx feature-yyy Production myimage: v1.0 Staging Preview myimage: #c18 myimage: #c25
  208. Production myimage: v1.0 Staging Preview myimage: #c18 myimage: #c25 #1

    Git head теги: 0.1, 0.2, 1.0 бранчи: master develop release-1.0 hotfix-xxx feature-yyy #2 Выкачено сейчас pod
  209. Production myimage: v1.0 Staging Preview myimage: #c18 myimage: #c25 #1

    Git head теги: 0.1, 0.2, 1.0 бранчи: master develop release-1.0 hotfix-xxx feature-yyy #2 Выкачено сейчас #3 “Было” выкачено старые ReplicaSet’ы (deploy) helm-релизы pod
  210. #1 Git head теги: 0.1, 0.2, 1.0 бранчи: master develop

    release-1.0 hotfix-xxx feature-yyy #2 Выкачено сейчас #3 “Было” выкачено старые ReplicaSet’ы (deploy) helm-релизы pod whitelist
  211. beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git

    archive #sig2 install #sig3 image tag image tag git patch #sig7 beforeSetup #sig8 setup #sig9 image tag Docker Registry Stages Storage
  212. beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git

    archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag image tag image tag Docker Registry
  213. beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git

    archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag image tag image tag Docker Registry whitelist
  214. beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git

    archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag image tag image tag Docker Registry whitelist
  215. beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git

    archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag Docker Registry
  216. beforeSetup #sig4 setup #sig5 git patch #sig6 beforeInstall #sig1 git

    archive #sig2 install #sig3 git patch #sig7 beforeSetup #sig8 setup #sig9 Stages Storage image tag Docker Registry
  217. beforeInstall #sig1 git archive #sig2 install #sig3 git patch #sig7

    beforeSetup #sig8 setup #sig9 Stages Storage image tag Docker Registry beforeSetup #sig4 setup #sig5 git patch #sig6 сироты
  218. beforeInstall #sig1 git archive #sig2 install #sig3 git patch #sig7

    beforeSetup #sig8 setup #sig9 Stages Storage image tag Docker Registry beforeSetup #sig4 setup #sig5 git patch #sig6 сироты
  219. beforeInstall #sig1 git archive #sig2 install #sig3 git patch #sig7

    beforeSetup #sig8 setup #sig9 Stages Storage image tag Docker Registry
  220. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish
  221. test IaC run Docker-image Docker Registry build publish Код IaC

    build git image pull image pull Tests unit test deploy deploy Kubernetes production Kubernetes test
  222. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80
  223. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: 2019-05-25T14:54:22Z generation: 1 name: nginx-deployment namespace: default resourceVersion: "248221274" selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment uid: fb75f366-7efc-11e9-ac27-52540035a73b spec: minReadySeconds: 5 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: nginx strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: nginx spec: containers: - image: nginx:1.7.9 imagePullPolicy: IfNotPresent name: nginx ports: - containerPort: 80 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 status: conditions: [ ... ] observedGeneration: 1 readyReplicas: 1 replicas: 1 unavailableReplicas: 1 updatedReplicas: 1
  224. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: 2019-05-25T14:54:22Z generation: 1 name: nginx-deployment namespace: default resourceVersion: "248221274" selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment uid: fb75f366-7efc-11e9-ac27-52540035a73b spec: minReadySeconds: 5 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: nginx strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: nginx spec: containers: - image: nginx:1.7.9 imagePullPolicy: IfNotPresent name: nginx ports: - containerPort: 80 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 status: conditions: [ ... ] observedGeneration: 1 readyReplicas: 1 replicas: 1 unavailableReplicas: 1 updatedReplicas: 1 Идентификаторы 1.
  225. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: 2019-05-25T14:54:22Z generation: 1 name: nginx-deployment namespace: default resourceVersion: "248221274" selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment uid: fb75f366-7efc-11e9-ac27-52540035a73b spec: minReadySeconds: 5 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: nginx strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: nginx spec: containers: - image: nginx:1.7.9 imagePullPolicy: IfNotPresent name: nginx ports: - containerPort: 80 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 status: conditions: [ ... ] observedGeneration: 1 readyReplicas: 1 replicas: 1 unavailableReplicas: 1 updatedReplicas: 1 Идентификаторы 1. Служебная информация 2.
  226. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: 2019-05-25T14:54:22Z generation: 1 name: nginx-deployment namespace: default resourceVersion: "248221274" selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment uid: fb75f366-7efc-11e9-ac27-52540035a73b spec: minReadySeconds: 5 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: nginx strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: nginx spec: containers: - image: nginx:1.7.9 imagePullPolicy: IfNotPresent name: nginx ports: - containerPort: 80 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 status: conditions: [ ... ] observedGeneration: 1 readyReplicas: 1 replicas: 1 unavailableReplicas: 1 updatedReplicas: 1 Идентификаторы 1. Служебная информация 2. Значения по-умолчанию 3.
  227. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: 2019-05-25T14:54:22Z generation: 1 name: nginx-deployment namespace: default resourceVersion: "248221274" selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment uid: fb75f366-7efc-11e9-ac27-52540035a73b spec: minReadySeconds: 5 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: nginx strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: nginx spec: containers: - image: nginx:1.7.9 imagePullPolicy: IfNotPresent name: nginx ports: - containerPort: 80 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 status: conditions: [ ... ] observedGeneration: 1 readyReplicas: 1 replicas: 1 unavailableReplicas: 1 updatedReplicas: 1 Идентификаторы 1. Служебная информация 2. Значения по-умолчанию 3. Статус 4.
  228. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: 2019-05-25T14:54:22Z generation: 1 name: nginx-deployment namespace: default resourceVersion: "248221274" selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment uid: fb75f366-7efc-11e9-ac27-52540035a73b spec: minReadySeconds: 5 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: nginx strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: nginx spec: containers: - image: nginx:1.7.9 imagePullPolicy: IfNotPresent name: nginx ports: - containerPort: 80 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 status: conditions: [ ... ] observedGeneration: 1 readyReplicas: 1 replicas: 1 unavailableReplicas: 1 updatedReplicas: 1 Идентификаторы 1. Служебная информация 2. Значения по-умолчанию 3. Статус 4. Admission webhook 5.
  229. apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels:

    app: nginx minReadySeconds: 5 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: 2019-05-25T14:54:22Z generation: 1 name: nginx-deployment namespace: default resourceVersion: "248221274" selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment uid: fb75f366-7efc-11e9-ac27-52540035a73b spec: minReadySeconds: 5 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: nginx strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null labels: app: nginx spec: containers: - image: nginx:1.7.9 imagePullPolicy: IfNotPresent name: nginx ports: - containerPort: 80 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 status: conditions: [ ... ] observedGeneration: 1 readyReplicas: 1 replicas: 1 unavailableReplicas: 1 updatedReplicas: 1 Идентификаторы 1. Служебная информация 2. Значения по-умолчанию 3. Статус 4. Admission webhook 5. Контроллеры всех видов и планировщик 6.
  230. last-applied new live 2. Что добавлено или изменено? 1. Что

    удалено? last-applied new live 1. Diff 2. Patch 2-way merge 3-way merge
  231. last-applied new live 2. Что добавлено или изменено? 1. Что

    удалено? 3. Patch last-applied new live 1. Diff 2. Patch 2-way merge 3-way merge
  232. last-applied new live 2. Что добавлено или изменено? 1. Что

    удалено? 3. Patch last-applied new live 1. Diff 2. Patch 2-way merge 3-way merge
  233. CI event YAML or JSON templates start job deploy Template

    Engine Jsonnet ... > sed > envsubst Helm
  234. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration apply Kubernetes API
  235. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration apply > kubectl apply > helm Kubernetes API ...
  236. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration apply Kubernetes API N-way merge magic
  237. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration apply Kubernetes API okay N-way merge magic
  238. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration apply Kubernetes API okay okay N-way merge magic
  239. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration apply Kubernetes API okay okay okay N-way merge magic
  240. CI event YAML or JSON templates start job deploy Template

    Engine images info Rendered Configuration apply Kubernetes API okay okay okay N-way merge magic Применено != Выкачено
  241. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  242. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  243. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  244. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  245. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  246. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  247. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  248. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  249. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :v0.8.14 -> 0.8.15
  250. Rendered Configuration apply okay okay okay Frontend Backend MongoDB N-way

    merge magic :v0.8.14 -> 0.8.15 :0.8.15 Пуля вылетела, проблемы на вашей стороне!
  251. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Kubernetes API
  252. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Tracker Kubernetes API events logs
  253. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Tracker Kubernetes API events logs
  254. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Tracker Kubernetes API events logs apply N-way merge magic
  255. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Tracker Kubernetes API events logs fail apply N-way merge magic fail fail
  256. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Tracker Kubernetes API events logs apply N-way merge magic okay
  257. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Tracker Kubernetes API events logs apply N-way merge magic okay okay
  258. CI event YAML or JSON templates start job deploy Template

    Engine Rendered Configuration Tracker Kubernetes API events logs apply okay
  259. okay apply CI event YAML or JSON templates start job

    deploy Template Engine Rendered Configuration Tracker Kubernetes API events logs okay okay
  260. okay apply CI event YAML or JSON templates start job

    deploy Template Engine Rendered Configuration Tracker Kubernetes API events logs okay okay 108 github.com/flant/kubedog kubedog Go library for “state tracking” simple CLI +
  261. events logs Frontend Backend MongoDB metadata: ... annotations: werf.io/fail-mode: IgnoreAndContinueDeployProcess

    FailWholeDeployProcessImmediately HopeUntilEndOfDeployProcess Deployment/StatefullSet YAML
  262. Надежная декларативность 1. А что мы вообще хотим? Реальный статус

    2. Логи (только полезные) 3. Прогресс 4. Автоматический откат 5.
  263. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test
  264. IaC run Docker Registry Kubernetes test Kubernetes production publish git

    image pull image pull deploy deploy Tests unit test test Docker-image Код IaC build build
  265. IaC run Kubernetes test Kubernetes production build Код IaC build

    git image pull image pull deploy deploy Tests unit test test Docker-image Docker Registry publish
  266. test IaC run Docker-image Docker Registry build publish Код IaC

    build git image pull image pull Tests unit test deploy deploy Kubernetes production Kubernetes test
  267. IaC run Docker-image Docker Registry Kubernetes test Kubernetes production build

    publish Код IaC build git image pull image pull deploy deploy Tests unit test test
  268. Попробуйте werf.io Automagic Helm Tiller kubedog client-go single binary go-containerregistry

    сделано с во Фланте Оцените v1.0.1-beta.8 784 Дайте фидбек Присоединяйтесь
  269. Всё сложнее, чем кажется с первого взгляда. Дьявол кроется в

    деталях! Любой софт – сырое и глючное говно... пока им не начнут пользоваться.
  270. Всё сложнее, чем кажется с первого взгляда. Дьявол кроется в

    деталях! Любой софт – сырое и глючное говно... пока им не начнут пользоваться. Давайте вместе добьем эту тему! И пойдем дальше, решать другие вопросы!
  271. Спасибо! Дмитрий Столяров dmitry.stolyarov@flant.com Тимофей Кириллов timofey.kirillov@flant.com Алексей Игрычев alexey.igrychev@flant.com

    Иван Михейкин ivan.mikheykin@flant.com Наш блог на Хабре habr.com/company/flant Наш YouTube-канал youtube.com/c/Флант github.com/flant/werf 784 werf.io