Aleksandr Matkovskiy – Head of IT Department lives and works with the motto "Scaling and load balancing is our all!". Therefore, he has 3 sons and dreams to find DEV for his OPS.
You will be able to see how the CI / CD was created and saved our lives. From concept to the final product.
Vladislav Anikin – Team Leader & Software Architect, specializing in SAAS flexible and scalable solutions for business. Driving DDD/TDD oriented squad of awesome SOLID developers.
You will be able to see how the CI / CD was created and saved our lives. From concept to the final product.
How to implement authorization in your backend with AWS IAM
"How to build powerful CI / CD based on GitLab and Docker", Aleksandr Matkovskiy & Vladislav Anikin
1. Continuous Integration & Delivery
To Infinity and Beyond…
How to build powerful CI / CD based on GitLab and Docker
2. Vladislav Anikin Aleksandr Matkovskiy
Team Leader & Software architect
in OrbitLift a Provectus company
Head of IT Department in Provectus
Say Hello!
Уже не Dev :( Вряд ли OPs :)
3. OrbitLift Department
Before
• 3 Developers
• 1 QA (manual)
• 1 DevOps (part time)
• 1 Team Lead
Service model
Now
• 6 Developers
• 1 QA (automation)
• 1 DevOps (part time)
• 1 Team Lead
Product model
+ +
Jenkins GitLab WebHooks
+ +
GitLabDocker Aleksandr
4. Jenkins + GitLab + WebHooks
✓ Price - it’s free :)
✓ Кастомизация и поддержка плагинов
✓ Устоявшееся CI решение на рынке
✓ Выполняет все необходимые задачи
✓ Интегрируется с Docker
- Price of Setup - it’s NOT free
- Ужасный UI / UX
- Where is my car memory, dude!
- Время на конфигурацию / кастомизацию
- Иногда доводит до слез
Pros Cons
How It Works
commit hook build trigger wait…………..
5. Service Product Model & Git Flow
• Reduce routine costs
• Semantic Versioning 2.0.0
• Unit Test & Automation
• Clean & Simple QA phase
• Ability to Revert
• Ability to Revert of Revert
10. Как «Я» понял ТЗ от Dev Team
• Проект на PHP
• Один репозиторий
• Конечное количество веток
• Хранение билдов в абстрактном
хранилище
• Возможность развернуть любой билд
на одной из площадок (QA, Dev, RC)
• Привязка ветки к площадке для
разворачивания
11. Реали …
• 2 различных репозитория
• 2 разных проекта: Backend -
PHP+nodejs, Frontend - Angular
• Не должно быть ограничений по
количеству веток
• Разное окружение на build и
execute серверах
• Нет жесткой привязки к веткам
21. Capabilities CI/CD
✓ Не зависит от проекта/языка.
✓ Передача переменных Project -> CI/CD через Secret variables (GitLab)
✓ Гибкое управление процессом развертывания
✓ Подготовка окружения для сборки и тестирования
✓ Разное окружение на Execute и Build серверах
✓ Сборка по расписанию
22. GitLab CI Logic Scheme and Pipeline
GitLab CI Logical scheme
Pipeline on Feature branch
Pipeline on Develop branch
23. Cleanup
• Инструкция «пока» НЕ
хранится в репозитории
проекта
• Dev команда сама решает, как
прибраться
• Индивидуальный набор
инструкция для каждого
проекта
24. Save build in storage
• Разделение прав - только на запись и только на чтение - AWS IAM
• Уникальное имя архива по шаблону _имяВетки-хешКоммита_
• Шифрование архива (Опция)
• Перенос старых билдов из S3 в Glacier (Опция)
25. Требования к CI / CD
✓ GitLab v10+
✓ Storage for builds
✓ Compute capacity : 1vCPU, 1GB RAM, 5GB Storage and more
✓ Software requirements: Docker, Docker-compose, GitLab-Runner on servers
We use:
✓ GitLab - 10.4.1
✓ Storage - AWS S3 (+AWS Glacier in future)
✓ Compute capacity: AWS EC2 - t2.micro
✓ Software requirements:
✓ Ubuntu 16.04
✓ Docker version 17.09.0-ce
✓ docker-compose version 1.17.0
33. Bugs and Problem
1. Выполнение нескольких
Pipeline одновременно.
Привет ночным сборкам
2. Миграция cleanup
инструкции в
репозиторий проекта
3. Сделать CD для
CI/CD
35. Jenkins VS GitLab
Jenkins GitLab CI
Average Build Time
6m 27s 0m 31s
excluding unit tests excluding unit tests
Memory Consumption
~1,3Gb per build ~100Mb
AWS Instance (minimal requirement)
m3.medium t2.micro
36. Where is my money?
~ 21 build per day
6m 27s 0m 31s
$15.65 per hour
(DOU Dec 2017)
$34,27 per day $2,66 per day
$685,4 per month $53,2 per month
$8464,69 per year $657,02 per year
37. Where is my money?
AWS
m3.medium t2.micro
$0.077 per hour
$1.84 per day $0.27 per day
$55.44 per month $8.35 per month
$674.52 per year $101.6 per year
$0.0116 per hour
40. Vladislav Anikin Aleksandr Matkovskiy
Team Leader & Software architect
in Orbitlift a Provectus company
Head of IT Department in Provectus
Thanks for patience
email: vanikin@provectus.com
skype: just__a__man1
email: amatkovsky@provectus.com
skype: matkovskiy.aleksandr