SlideShare a Scribd company logo
Alexander Schedrov aka sanchiz
DrupalCamp Lviv, Sep 2016
Build your application in
seconds and optimize workflow
as much as you can using
DevOps
What is build?
Build is the process of integrating, building
and compiling the software that is produced.
– Кузьма Иванович, водовоз
“Без воды - и не туды, и не
сюды”
– Кузьма Иванович, водовоз
“Без воды - и не туды, и не
сюды”
– Щедров Александр, билдовоз :)
“Без билда - и не туда, и не
сюда”
How to accelerate
builds?
Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps
Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps
What is a big project?
Big data?
Big codebase?
Big team?
Big client?
Big money!
Big money!
What is the most valuable
thing for client in project?
Clean and structurized
code?
Custom modules?
Tests coverage?
Product, speed and
deliverability!
– Andrii Podanenko, FFW
“Success depends on how fast
you can show changes to client.”
Our project
In terms of build
• $$$ :)
• Huge database
• ~300mb *.sql.gz
• ~ 4gb *.sql
• D8 multisite - 3 sites
• Automated tests
• Code sniffers
In terms of workflow
• Builds queue
• ~50 per day
• Server space
• 80GB droplet
• ~10 active builds + 5 feature dev sites
Old build timeline
PR build timeline
Primary build timeline
+ 2 subsites :(
Let The Machines Do
The Work
Lazy builders
Primary build and
secondary builds
1. Primary build
2. Other builds in parallel
• Slave sites
• Sniffers
• Tests
Lazy builder timeline
Post build actions
GitHub API for lazy builders
sudo jo state=pending target_url=http://URL/job/PR_BUILDER_TESTS/$
{BUILD_NUMBER}/console description="Tests run has been started."
context="CIBox tests" > pending.json
curl -u [bot_name]:[token] https://api.github.com/repos/[org]/
[repo]/statuses/${PR_SHA1} --request POST --data @pending.json
Pending status
Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps
GitHub API for lazy builders
# Run tests.
cd /var/www/build${PARENT_BUILD_NUMBER}
ansible-playbook tests.yml -i 'localhost,' --connection=local
# Set status and post comment to GitHub.
cd ${WORKSPACE}
sudo jo body="Behat test results file URL: http://URL/build$
{PARENT_BUILD_NUMBER}/build_reports/behat_report.html" >
comment.json
curl -u [bot_name]:[bot_token] https://api.github.com/repos/[org]/
[repo]/issues/${PR_ID}/comments --request POST --data @comment.json
sudo jo state=success target_url=http://URL/job/PR_BUILDER_TESTS/$
{BUILD_NUMBER}/console description="Tests run has been finished."
context="CIBox tests" > success.json
curl -u [bot_name]:[bot_token] https://api.github.com/repos/[org]/
[repo]/statuses/${PR_SHA1} --request POST --data @success.json
Tests + success status
https://wiki.jenkins-ci.org/display/JENKINS/Post+build+task
GitHub API for lazy builders
cd ${WORKSPACE}
sudo jo state=failure target_url=http://URL/job/PR_BUILDER_TESTS/$
{BUILD_NUMBER}/console description="Tests run has been failed."
context="CIBox tests" > failed.json
curl -u [bot_name]:[bot_token] https://api.github.com/repos/[org]/
[repo]/statuses/${PR_SHA1} --request POST --data @failed.json
Failed status
Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps
Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps
Build hierarchy
Primary Build
Slave 1 Slave 2 Sniffers Tests
Comment + status
on GitHub
Comment +
status
on GitHub
Comment +
status
on GitHub
Comment +
status
on GitHub
Comment +
status
on GitHub
Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps
Database optimisation
Optimize SQL import
SQL import is the most intensive operation
• Warm up databases for build?
• Bandwidth speed for downloading dumps
locally?
• Maintenance?
Virtualization with Docker
Create Docker Image
1. Run local Docker
repository(per project)
2. Pull base image cibox/mysql
3. Import database from
production dump
4. Create/Update image after
import
5. Push to local Docker
repository(per project)
Build pipeline
1.Pull changes from Docker Hub + Custom
Repository
2.Run Docker container
3.Specify in settings container’s IP
4.Container will be killed via cleaner
Benefits
1. Seconds to spin up container
2. Non-blocking operations for concurrent builds
3. Pull only changes(commits) to local environment
4. Update Docker Image daily
New build timeline
New build timeline
New Primary build timeline
Drush cr optimization
Why it faster now?
• ~2 seconds to spin up container
• ~2 seconds to clear Drupal 8 cache
• Non-Blocking operation in filesystem
• Isolated MySQL
• Run fast tests on build
• Run full tests on demo/dev site
Statistics
Start date
Numbers
• Primary build
• ~15 mins -> ~3 mins
• Overall time
• ~3 mins before testing of main product
• ~6-8 mins before testing of secondary products
• ~6-8 mins before sniffers & test results
Metrics - measure
your success
https://wiki.jenkins-ci.org/display/JENKINS/Timestamper
Time in comments
https://wiki.jenkins-ci.org/display/JENKINS/Global+Build
+Stats+Plugin
Remote access API
http://[JENKINS_URL]/job/[JOB_NAME]/api/json?tree=allBuilds[*]
DevOps life
– Chang Xiao, FFW
“I swear to god our vagrant is
like the nerdiest thing ever.”
“It should be like making a
ANSCII sandwich, brewing some
tea, waiting for your local
environment to be fully baked.”
Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps
Drupal.org: https://www.drupal.org/u/sanchiz
GitHub: https://github.com/Sanchiz
Blog: http://sanchiz.net
Email: alexander.schedrov@gmail.com
Twitter: @alexschedrov
Thank you!

More Related Content

What's hot (20)

PDF
Rule jenkins with configuration as code
Christian Rasp
 
PDF
Managing Jenkins with Python
Vijay Kumar Bagavath Singh
 
PDF
Sponia with QingCloud
Gong Haibing
 
PDF
Neotys PAC - Wilson Mar
Neotys_Partner
 
PDF
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
CloudBees
 
PDF
DockerCon SF 2015: Scaling New Services
Docker, Inc.
 
PPTX
Docs as Part of the Product - Open Source Summit North America 2018
Den Delimarsky
 
PPTX
Global Azure Bootcamp - Vancouver (2018) - Testing with Containers
Den Delimarsky
 
PDF
Web Performance Part 4 "Client-side performance"
Binary Studio
 
PDF
Jenkinsfileのlintで救える命がある
Jumpei Miyata
 
PDF
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Max Andersen
 
PDF
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
謝 宗穎
 
PDF
Jenkins Best Practices
Gergely Brautigam
 
PDF
Labels, Labels, Labels
Docker, Inc.
 
PDF
Immutable infrastructure:觀念與實作 (建議)
William Yeh
 
PPTX
Ci of js and apex using jasmine, phantom js and drone io df14
Kevin Poorman
 
PDF
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
Tikal Knowledge
 
PDF
Rundeck's History and Future
dev2ops
 
PDF
Jenkins Best Practices Meetup Slides
Gergely Brautigam
 
PDF
Git and GitHub for Documentation
Anne Gentle
 
Rule jenkins with configuration as code
Christian Rasp
 
Managing Jenkins with Python
Vijay Kumar Bagavath Singh
 
Sponia with QingCloud
Gong Haibing
 
Neotys PAC - Wilson Mar
Neotys_Partner
 
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
CloudBees
 
DockerCon SF 2015: Scaling New Services
Docker, Inc.
 
Docs as Part of the Product - Open Source Summit North America 2018
Den Delimarsky
 
Global Azure Bootcamp - Vancouver (2018) - Testing with Containers
Den Delimarsky
 
Web Performance Part 4 "Client-side performance"
Binary Studio
 
Jenkinsfileのlintで救える命がある
Jumpei Miyata
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Max Andersen
 
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
謝 宗穎
 
Jenkins Best Practices
Gergely Brautigam
 
Labels, Labels, Labels
Docker, Inc.
 
Immutable infrastructure:觀念與實作 (建議)
William Yeh
 
Ci of js and apex using jasmine, phantom js and drone io df14
Kevin Poorman
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
Tikal Knowledge
 
Rundeck's History and Future
dev2ops
 
Jenkins Best Practices Meetup Slides
Gergely Brautigam
 
Git and GitHub for Documentation
Anne Gentle
 

Viewers also liked (15)

PPTX
Юлія Снітко — Як подружити дизайнерів і Drupal розробників. Досвід ефективної...
LEDC 2016
 
PPTX
Олександр Щедров та Альбіна Тюпа — Magic button. Can production releases be s...
LEDC 2016
 
PPTX
Артем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheel
LEDC 2016
 
PPTX
Тарас Цюпер - Методы кеширования и оптимизация Drupal 7 проектов
LEDC 2016
 
PPTX
Віталій Бобров — Web components, Polymer and Drupal
LEDC 2016
 
PPTX
Костянтин Чаус — Monitoring of huge Drupal site. Tools and tips
LEDC 2016
 
PDF
Andy Postnikov - Drupal 7 vs Drupal 8: от бутстрапа до рендера
LEDC 2016
 
PDF
Олексій Калініченко — Configuration Management in Drupal8
LEDC 2016
 
PPTX
Артем Доценко — Deploy Plus. Better UI and more control for deploy module
LEDC 2016
 
PPTX
Олександр Лінивий — Multisite platform with continuous delivery process for m...
LEDC 2016
 
PPTX
Андрій Юн — Воркшоп "Docker use cases for developers"
LEDC 2016
 
PDF
Слава Мережко — Практикум: "Як ростити розробників"
LEDC 2016
 
PDF
Тарас Круц — Open Social: brand new Drupal 8 distro for building social netwo...
LEDC 2016
 
PDF
Ігор Карпиленко — PHPStorm for drupal developer
LEDC 2016
 
PPTX
Анатолій Поляков — Subdomains everywhere
LEDC 2016
 
Юлія Снітко — Як подружити дизайнерів і Drupal розробників. Досвід ефективної...
LEDC 2016
 
Олександр Щедров та Альбіна Тюпа — Magic button. Can production releases be s...
LEDC 2016
 
Артем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheel
LEDC 2016
 
Тарас Цюпер - Методы кеширования и оптимизация Drupal 7 проектов
LEDC 2016
 
Віталій Бобров — Web components, Polymer and Drupal
LEDC 2016
 
Костянтин Чаус — Monitoring of huge Drupal site. Tools and tips
LEDC 2016
 
Andy Postnikov - Drupal 7 vs Drupal 8: от бутстрапа до рендера
LEDC 2016
 
Олексій Калініченко — Configuration Management in Drupal8
LEDC 2016
 
Артем Доценко — Deploy Plus. Better UI and more control for deploy module
LEDC 2016
 
Олександр Лінивий — Multisite platform with continuous delivery process for m...
LEDC 2016
 
Андрій Юн — Воркшоп "Docker use cases for developers"
LEDC 2016
 
Слава Мережко — Практикум: "Як ростити розробників"
LEDC 2016
 
Тарас Круц — Open Social: brand new Drupal 8 distro for building social netwo...
LEDC 2016
 
Ігор Карпиленко — PHPStorm for drupal developer
LEDC 2016
 
Анатолій Поляков — Subdomains everywhere
LEDC 2016
 
Ad

Similar to Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps (20)

PDF
CIbox - OpenSource solution for making your #devops better
Andrii Podanenko
 
PDF
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
PPTX
MoldCamp - multidimentional testing workflow. CIBox.
Andrii Podanenko
 
PDF
DrupalCon Los Angeles - Continuous Integration Toolbox
Andrii Podanenko
 
PDF
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
PDF
Continous Delivering a PHP application
Javier López
 
PDF
Continuous Integration
Joerg Henning
 
PDF
The Self-Service Developer - GOTOCon CPH
Laszlo Fogas
 
PDF
Continuous Integration on my work
Mu Chun Wang
 
PDF
One commit, one release. Continuously delivering a Symfony project.
Javier López
 
PDF
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
mdevtalk
 
PDF
DevOps for Drupal: Why We Cook With Chef
Promet Source
 
PPTX
Containers @ KitchenStories - DevOps 201704
Trung Phan
 
PPTX
Continuos Integration @Knetminer
Rothamsted Research, UK
 
PDF
DevOps: Cooking Drupal Deployment
Gerald Villorente
 
PDF
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
PDF
CI workflow in a web studio
deWeb
 
PDF
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
LeanIX GmbH
 
PDF
Jenkins-CI
Gong Haibing
 
PDF
Groovy there's a docker in my application pipeline
Kris Buytaert
 
CIbox - OpenSource solution for making your #devops better
Andrii Podanenko
 
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
MoldCamp - multidimentional testing workflow. CIBox.
Andrii Podanenko
 
DrupalCon Los Angeles - Continuous Integration Toolbox
Andrii Podanenko
 
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
Continous Delivering a PHP application
Javier López
 
Continuous Integration
Joerg Henning
 
The Self-Service Developer - GOTOCon CPH
Laszlo Fogas
 
Continuous Integration on my work
Mu Chun Wang
 
One commit, one release. Continuously delivering a Symfony project.
Javier López
 
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
mdevtalk
 
DevOps for Drupal: Why We Cook With Chef
Promet Source
 
Containers @ KitchenStories - DevOps 201704
Trung Phan
 
Continuos Integration @Knetminer
Rothamsted Research, UK
 
DevOps: Cooking Drupal Deployment
Gerald Villorente
 
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
CI workflow in a web studio
deWeb
 
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
LeanIX GmbH
 
Jenkins-CI
Gong Haibing
 
Groovy there's a docker in my application pipeline
Kris Buytaert
 
Ad

More from LEDC 2016 (17)

PPTX
A. Postnikov & P. Mahrinsky — Drupal Community — це ми
LEDC 2016
 
PDF
Генадій Колтун — Комунізм наступає: що будемо робити, коли машини навчаться п...
LEDC 2016
 
PDF
Андрій Поданенко — Воркшоп "Розвертання CIBox"
LEDC 2016
 
PDF
Юрій Герасімов — Editorial experience in Drupal8
LEDC 2016
 
PPTX
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
LEDC 2016
 
PPTX
Тарас Кирилюк — Docker basics. How-to for Drupal developers
LEDC 2016
 
PPTX
Сергій Бондаренко — Тестування Drupal сайтiв з допогою TqExtension
LEDC 2016
 
PPTX
Вадим Абрамчук — Big Drupal: Issues We Met
LEDC 2016
 
PDF
Юрій Герасимов — Delayed operations with queues
LEDC 2016
 
PDF
Андрій Юн — Drupal contributor HOWTO
LEDC 2016
 
PPTX
Генадій Колтун — Перехід від фрілансера в стадію компанії
LEDC 2016
 
PPTX
Олена Ольховик — Від frontend розробки до Drupal-темізації. Основи і специфіка
LEDC 2016
 
PPTX
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
LEDC 2016
 
PDF
Тарас Круц - Tips On Getting Everything You Can Out of Drupal Form API
LEDC 2016
 
PPTX
Анатолий Поляков - Drupal.ajax framework from a to z
LEDC 2016
 
PDF
Андрей Поданенко - Start using Vagrant now!
LEDC 2016
 
PPTX
Александр Даниленко - Panels как философия
LEDC 2016
 
A. Postnikov & P. Mahrinsky — Drupal Community — це ми
LEDC 2016
 
Генадій Колтун — Комунізм наступає: що будемо робити, коли машини навчаться п...
LEDC 2016
 
Андрій Поданенко — Воркшоп "Розвертання CIBox"
LEDC 2016
 
Юрій Герасімов — Editorial experience in Drupal8
LEDC 2016
 
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
LEDC 2016
 
Тарас Кирилюк — Docker basics. How-to for Drupal developers
LEDC 2016
 
Сергій Бондаренко — Тестування Drupal сайтiв з допогою TqExtension
LEDC 2016
 
Вадим Абрамчук — Big Drupal: Issues We Met
LEDC 2016
 
Юрій Герасимов — Delayed operations with queues
LEDC 2016
 
Андрій Юн — Drupal contributor HOWTO
LEDC 2016
 
Генадій Колтун — Перехід від фрілансера в стадію компанії
LEDC 2016
 
Олена Ольховик — Від frontend розробки до Drupal-темізації. Основи і специфіка
LEDC 2016
 
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
LEDC 2016
 
Тарас Круц - Tips On Getting Everything You Can Out of Drupal Form API
LEDC 2016
 
Анатолий Поляков - Drupal.ajax framework from a to z
LEDC 2016
 
Андрей Поданенко - Start using Vagrant now!
LEDC 2016
 
Александр Даниленко - Panels как философия
LEDC 2016
 

Recently uploaded (20)

PDF
Cleaning up your RPKI invalids, presented at PacNOG 35
APNIC
 
PPTX
PHIPA-Compliant Web Hosting in Toronto: What Healthcare Providers Must Know
steve198109
 
PDF
The Internet - By the numbers, presented at npNOG 11
APNIC
 
PDF
BRKSP-2551 - Introduction to Segment Routing.pdf
fcesargonca
 
PPTX
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
PPTX
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
PDF
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
PPTX
Networking_Essentials_version_3.0_-_Module_3.pptx
ryan622010
 
PPTX
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
PDF
Boardroom AI: The Next 10 Moves | Cerebraix Talent Tech
ssuser73bdb11
 
PPTX
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
PDF
Digital burnout toolkit for youth workers and teachers
asociatiastart123
 
PDF
FutureCon Seattle 2025 Presentation Slides - You Had One Job
Suzanne Aldrich
 
PDF
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
PPTX
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
PPTX
西班牙巴利阿里群岛大学电子版毕业证{UIBLetterUIB文凭证书}文凭复刻
Taqyea
 
DOCX
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
PDF
Enhancing Parental Roles in Protecting Children from Online Sexual Exploitati...
ICT Frame Magazine Pvt. Ltd.
 
PPTX
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
PDF
Top 10 Testing Procedures to Ensure Your Magento to Shopify Migration Success...
CartCoders
 
Cleaning up your RPKI invalids, presented at PacNOG 35
APNIC
 
PHIPA-Compliant Web Hosting in Toronto: What Healthcare Providers Must Know
steve198109
 
The Internet - By the numbers, presented at npNOG 11
APNIC
 
BRKSP-2551 - Introduction to Segment Routing.pdf
fcesargonca
 
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
Networking_Essentials_version_3.0_-_Module_3.pptx
ryan622010
 
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
Boardroom AI: The Next 10 Moves | Cerebraix Talent Tech
ssuser73bdb11
 
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
Digital burnout toolkit for youth workers and teachers
asociatiastart123
 
FutureCon Seattle 2025 Presentation Slides - You Had One Job
Suzanne Aldrich
 
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
西班牙巴利阿里群岛大学电子版毕业证{UIBLetterUIB文凭证书}文凭复刻
Taqyea
 
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
Enhancing Parental Roles in Protecting Children from Online Sexual Exploitati...
ICT Frame Magazine Pvt. Ltd.
 
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
Top 10 Testing Procedures to Ensure Your Magento to Shopify Migration Success...
CartCoders
 

Олександр Щедров — Build your application in seconds and optimize workflow as much as you can using DevOps