SlideShare a Scribd company logo
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Development Team StructureOur Production Team
Problems
Back-ups. The only thing for your protection;
creating one thing, you can make a mess somewhere else;
yet we know we can make a minor change in 5 min - we have a
lot of them;
you can’t even imagine how many bugs you’ll meet during the
last testing before deadline;
where is our time?!;
while you don’t have rules - your client gives them to you;
panic during deadline/deploy;
Continuous Integration Workflow
CI - is the practice, in software
engineering, of merging all
developer working copies to a
shared mainline several times a
day.
What it gives to you:
- better developing processes;
- smooth deploy process;
- deploy is possible every day.
Continuous Integration Workflow
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Step 1. Code Driven Development
Step 2. Understanding of how it works
CI-BOX
CI-BOX DevOps
BACK-END part
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Principles
Be lazy
Be productive
The big picture
Step 1
Goodbye old friends!
Step 2
Start working with Console, Learn SSH
Step 3
Learn how to move sites between servers…
1. rsync -avh -e 'ssh -p [port]' [ssh_user]@[server_name]:/path/to/drupal/ ./
2. nano sites/default/settings.php
3. drush sql-drop
4. gunzip < sites/../../../dump_name.mysql.gz | drush sql-cli
Learn how to automate server provisioning
Step 4
Step 5
Learn about Vagrant
Step 6
Start working locally
+
Default:
Apache 2.4.x (or Nginx 1.x),
PHP 5.6.x, MySQL 5.5.x, Drush,
Drupal 6.x, 7.x, or 8.x.x.
Other cool stuff:
Varnish 4.x, Apache Solr 4.10.x,
Node.js 0.12,
Selenium, Ruby
Memcached
XHProf, XDebug, Adminer,
Pimp my Log, MailHog
Step 7
Start using Git and Bitbucket
+ pull requests
+ manual Code review
Step 8
Code driven development
- features
- strongarm
- hook_update_N()
Step 9: STAGE + PROD environment
Step 10: Deploy Continuously
1. cd /path/to/docroot
2. drush vset maintenance_mode 1
3. drush bb
4. git pull
5. drush rr
6. drush updb -y
7. drush cc all
8. drush vset maintenance_mode 0
Step 11
1. Check if "$HOSTNAME" == "$CURRENT_HOSTNAME" (run it only on DEV)
2. cp local.settings.php settings.php
3. rsync -avh --delete -e "$SSH_OPT"
$REMOTE_USER@$REMOTE_SERVER:$PATH_TO_SITEROOT/sites/default/files/
./sites/default/files
4. drush sql-drop -y
5. BASE_DUMP=$(ls -t $PATH_TO_BM_MANUAL/*.mysql.gz | head -1)
6. gunzip < $BASE_DUMP | drush sql-cli
First DEV-STAGE sync script
Step 12
1. Check if "$HOSTNAME" == "$CURRENT_HOSTNAME" (run it only on STAGE)
2. rsync -avh --delete -e "$SSH_OPT"
$REMOTE_USER@$REMOTE_SERVER:$PATH_TO_SITEROOT/sites/default/files/
./sites/default/files
3. drush sql-drop -y
4. BASE_DUMP=$(ls -t $PATH_TO_BM_MANUAL/*.mysql.gz | head -1)
5. gunzip < $BASE_DUMP | drush sql-cli
First STAGE-PROD sync script
Let's count
2 projects at a time
2 servers (STAGE and PROD) on each project to deploy
9 commands to deploy (1 ssh + 8 deploy)
2 * 2 * 9 = 36
Manual actions / day (minimum)
And be sure to don’t mess up anything!
Step 13
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Step 14
Scripts improvements
- Move Drupal files to docroot
- Create reinstal.sh
- Move all settings to settings.sh
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Testing environment
How to create testing environment?
1.Pull files from Bitbucket
2.Get Database dump from STAGE-server
3.Restore database from dump
4.Install Stage File Proxy module (or rsync
files folder)
5.Send link somewhere
6.Profit!
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
The Idea!
Step N
Create script to create testing environments
How it works?
1.Jenkins checks Bitbucket repo (by schedule)
2.Jenkins merges branches when there is pull request
3.Jenkins runs BASH script after branches are merged
4.BASH:
- Create folder
- Copy merged files
- Copy base dump from STAGE-server
- Create database and restore dump
- Install Stage File Proxy module
- Post comment on Bitbucket with the link to created site
1.Profit!
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Links to the source code:
Local environment (based on Drupal VM):
https://bitbucket.org/deweb-studio/code-driven-starter.kit
Tool to create testing environment:
https://bitbucket.org/deweb-studio/jenkins_ci_drupal
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії
Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії

More Related Content

PDF
CI workflow in a web studio
KEY
Write php deploy everywhere
PDF
Automating Front-End Workflow
PDF
Dev to Delivery with Puppet - PuppetConf 2014
ODP
Chef training - Day3
PPTX
Bower - A package manager for the web
ODP
Chef training Day5
PDF
Write php deploy everywhere tek11
CI workflow in a web studio
Write php deploy everywhere
Automating Front-End Workflow
Dev to Delivery with Puppet - PuppetConf 2014
Chef training - Day3
Bower - A package manager for the web
Chef training Day5
Write php deploy everywhere tek11

What's hot (20)

PDF
Getting Started with Ansible
PDF
Provisioning with Puppet
PPTX
Ansible - Why and what
PDF
Service worker: discover the next web game changer
PDF
Sw install with_without_docker
PDF
Network Automation: Ansible 102
PDF
V2 and beyond
PDF
Buildout - Alles im Griff
PDF
Automating OSD and Post-OSD Configuration with Powershell and Orchestrator
PDF
Introduction to Express and Grunt
PDF
Bower & Grunt - A practical workflow
PDF
CasperJS and PhantomJS for Automated Testing
PDF
Continuous Integration with Robot Sweatshop
PDF
ASP.NET SignalR によるクイズWebアプリ 「みんなで同時プレイするWebアプリでCodeQuizに挑戦!」
ZIP
Zenoss: Buildout
PPTX
Using Ansible Dynamic Inventory with Amazon EC2
PDF
Magical WordPress Development with Vagrant
PPTX
Grunt and Bower
PDF
Towards the perfect Drupal Dev Machine
ODP
Linuxday.at - Lightning Talk
Getting Started with Ansible
Provisioning with Puppet
Ansible - Why and what
Service worker: discover the next web game changer
Sw install with_without_docker
Network Automation: Ansible 102
V2 and beyond
Buildout - Alles im Griff
Automating OSD and Post-OSD Configuration with Powershell and Orchestrator
Introduction to Express and Grunt
Bower & Grunt - A practical workflow
CasperJS and PhantomJS for Automated Testing
Continuous Integration with Robot Sweatshop
ASP.NET SignalR によるクイズWebアプリ 「みんなで同時プレイするWebアプリでCodeQuizに挑戦!」
Zenoss: Buildout
Using Ansible Dynamic Inventory with Amazon EC2
Magical WordPress Development with Vagrant
Grunt and Bower
Towards the perfect Drupal Dev Machine
Linuxday.at - Lightning Talk
Ad

Viewers also liked (16)

PDF
Vinculacion con la Sociedad uniandes 2012
PPTX
Генадій Колтун — Перехід від фрілансера в стадію компанії
PPTX
Сергій Бондаренко — Тестування Drupal сайтiв з допогою TqExtension
PDF
Андрій Юн — Drupal contributor HOWTO
PPTX
Вадим Абрамчук — Big Drupal: Issues We Met
PPTX
Олена Ольховик — Від frontend розробки до Drupal-темізації. Основи і специфіка
PDF
Vinculacion con lasociedad uniandes 2012
PPTX
Тарас Кирилюк — Docker basics. How-to for Drupal developers
PDF
Генадій Колтун — Комунізм наступає: що будемо робити, коли машини навчаться п...
PDF
Юрій Герасимов — Delayed operations with queues
PDF
Юрій Герасімов — Editorial experience in Drupal8
PPTX
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
PDF
Андрій Поданенко — Воркшоп "Розвертання CIBox"
PPTX
A. Postnikov & P. Mahrinsky — Drupal Community — це ми
PDF
Peluang Usaha Waralaba Kegaenan Pulsa PT Duta network Indonesia
PPTX
Assignment 1: Conventions when Scriptwriting for Radio
Vinculacion con la Sociedad uniandes 2012
Генадій Колтун — Перехід від фрілансера в стадію компанії
Сергій Бондаренко — Тестування Drupal сайтiв з допогою TqExtension
Андрій Юн — Drupal contributor HOWTO
Вадим Абрамчук — Big Drupal: Issues We Met
Олена Ольховик — Від frontend розробки до Drupal-темізації. Основи і специфіка
Vinculacion con lasociedad uniandes 2012
Тарас Кирилюк — Docker basics. How-to for Drupal developers
Генадій Колтун — Комунізм наступає: що будемо робити, коли машини навчаться п...
Юрій Герасимов — Delayed operations with queues
Юрій Герасімов — Editorial experience in Drupal8
Валентин Мацвейко та Владислав Мойсеєнко — D8: Migrate Yourself: code->module...
Андрій Поданенко — Воркшоп "Розвертання CIBox"
A. Postnikov & P. Mahrinsky — Drupal Community — це ми
Peluang Usaha Waralaba Kegaenan Pulsa PT Duta network Indonesia
Assignment 1: Conventions when Scriptwriting for Radio
Ad

Similar to Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії (20)

PDF
From Dev to DevOps
PPTX
drupal ci cd concept cornel univercity.pptx
PDF
Chef - industrialize and automate your infrastructure
PDF
Deployer - Deployment tool for PHP
PPTX
Harmonious Development: Via Vagrant and Puppet
PDF
Lean Php Presentation
KEY
From Dev to DevOps - ApacheCON NA 2011
PDF
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PDF
A General Purpose Docker Image for PHP
PDF
Docker, c'est bonheur !
PDF
Burn down the silos! Helping dev and ops gel on high availability websites
PDF
From Dev to DevOps - Codemotion ES 2012
PDF
Open shift
KEY
From Dev to DevOps - FOSDEM 2012
PDF
Tools and Process for Streamlining Mac Deployment
PDF
The Modern Developer Toolbox
PDF
Automatisation in development and testing - within budget
KEY
From Dev to DevOps - Apache Barcamp Spain 2011
PDF
DevOps in PHP environment
PDF
Ansible new paradigms for orchestration
From Dev to DevOps
drupal ci cd concept cornel univercity.pptx
Chef - industrialize and automate your infrastructure
Deployer - Deployment tool for PHP
Harmonious Development: Via Vagrant and Puppet
Lean Php Presentation
From Dev to DevOps - ApacheCON NA 2011
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
A General Purpose Docker Image for PHP
Docker, c'est bonheur !
Burn down the silos! Helping dev and ops gel on high availability websites
From Dev to DevOps - Codemotion ES 2012
Open shift
From Dev to DevOps - FOSDEM 2012
Tools and Process for Streamlining Mac Deployment
The Modern Developer Toolbox
Automatisation in development and testing - within budget
From Dev to DevOps - Apache Barcamp Spain 2011
DevOps in PHP environment
Ansible new paradigms for orchestration

More from LEDC 2016 (18)

PDF
Слава Мережко — Практикум: "Як ростити розробників"
PDF
Олексій Калініченко — Configuration Management in Drupal8
PPTX
Олександр Лінивий — Multisite platform with continuous delivery process for m...
PPTX
Андрій Юн — Воркшоп "Docker use cases for developers"
PDF
Тарас Круц — Open Social: brand new Drupal 8 distro for building social netwo...
PDF
Ігор Карпиленко — PHPStorm for drupal developer
PDF
Олександр Щедров — Build your application in seconds and optimize workflow as...
PPTX
Анатолій Поляков — Subdomains everywhere
PPTX
Артем Доценко — Deploy Plus. Better UI and more control for deploy module
PPTX
Віталій Бобров — Web components, Polymer and Drupal
PPTX
Олександр Щедров та Альбіна Тюпа — Magic button. Can production releases be s...
PPTX
Юлія Снітко — Як подружити дизайнерів і Drupal розробників. Досвід ефективної...
PPTX
Костянтин Чаус — Monitoring of huge Drupal site. Tools and tips
PDF
Тарас Круц - Tips On Getting Everything You Can Out of Drupal Form API
PPTX
Тарас Цюпер - Методы кеширования и оптимизация Drupal 7 проектов
PPTX
Анатолий Поляков - Drupal.ajax framework from a to z
PDF
Андрей Поданенко - Start using Vagrant now!
PPTX
Александр Даниленко - Panels как философия
Слава Мережко — Практикум: "Як ростити розробників"
Олексій Калініченко — Configuration Management in Drupal8
Олександр Лінивий — Multisite platform with continuous delivery process for m...
Андрій Юн — Воркшоп "Docker use cases for developers"
Тарас Круц — Open Social: brand new Drupal 8 distro for building social netwo...
Ігор Карпиленко — PHPStorm for drupal developer
Олександр Щедров — Build your application in seconds and optimize workflow as...
Анатолій Поляков — Subdomains everywhere
Артем Доценко — Deploy Plus. Better UI and more control for deploy module
Віталій Бобров — Web components, Polymer and Drupal
Олександр Щедров та Альбіна Тюпа — Magic button. Can production releases be s...
Юлія Снітко — Як подружити дизайнерів і Drupal розробників. Досвід ефективної...
Костянтин Чаус — Monitoring of huge Drupal site. Tools and tips
Тарас Круц - Tips On Getting Everything You Can Out of Drupal Form API
Тарас Цюпер - Методы кеширования и оптимизация Drupal 7 проектов
Анатолий Поляков - Drupal.ajax framework from a to z
Андрей Поданенко - Start using Vagrant now!
Александр Даниленко - Panels как философия

Recently uploaded (20)

PPTX
Internet___Basics___Styled_ presentation
PPTX
artificial intelligence overview of it and more
PDF
Testing WebRTC applications at scale.pdf
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
innovation process that make everything different.pptx
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
Funds Management Learning Material for Beg
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PPT
tcp ip networks nd ip layering assotred slides
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Internet___Basics___Styled_ presentation
artificial intelligence overview of it and more
Testing WebRTC applications at scale.pdf
Paper PDF World Game (s) Great Redesign.pdf
Job_Card_System_Styled_lorem_ipsum_.pptx
innovation process that make everything different.pptx
Slides PPTX World Game (s) Eco Economic Epochs.pptx
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
522797556-Unit-2-Temperature-measurement-1-1.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Decoding a Decade: 10 Years of Applied CTI Discipline
Design_with_Watersergyerge45hrbgre4top (1).ppt
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Funds Management Learning Material for Beg
RPKI Status Update, presented by Makito Lay at IDNOG 10
tcp ip networks nd ip layering assotred slides
Cloud-Scale Log Monitoring _ Datadog.pdf
QR Codes Qr codecodecodecodecocodedecodecode
The New Creative Director: How AI Tools for Social Media Content Creation Are...

Тарас Кирилюк та Олена Пустовойт — CI workflow у веб-студії

  • 3. Problems Back-ups. The only thing for your protection; creating one thing, you can make a mess somewhere else; yet we know we can make a minor change in 5 min - we have a lot of them; you can’t even imagine how many bugs you’ll meet during the last testing before deadline; where is our time?!; while you don’t have rules - your client gives them to you; panic during deadline/deploy;
  • 4. Continuous Integration Workflow CI - is the practice, in software engineering, of merging all developer working copies to a shared mainline several times a day. What it gives to you: - better developing processes; - smooth deploy process; - deploy is possible every day.
  • 7. Step 1. Code Driven Development
  • 8. Step 2. Understanding of how it works
  • 15. Step 1 Goodbye old friends!
  • 16. Step 2 Start working with Console, Learn SSH
  • 17. Step 3 Learn how to move sites between servers… 1. rsync -avh -e 'ssh -p [port]' [ssh_user]@[server_name]:/path/to/drupal/ ./ 2. nano sites/default/settings.php 3. drush sql-drop 4. gunzip < sites/../../../dump_name.mysql.gz | drush sql-cli
  • 18. Learn how to automate server provisioning Step 4
  • 20. Step 6 Start working locally +
  • 21. Default: Apache 2.4.x (or Nginx 1.x), PHP 5.6.x, MySQL 5.5.x, Drush, Drupal 6.x, 7.x, or 8.x.x. Other cool stuff: Varnish 4.x, Apache Solr 4.10.x, Node.js 0.12, Selenium, Ruby Memcached XHProf, XDebug, Adminer, Pimp my Log, MailHog
  • 22. Step 7 Start using Git and Bitbucket + pull requests + manual Code review
  • 23. Step 8 Code driven development - features - strongarm - hook_update_N()
  • 24. Step 9: STAGE + PROD environment
  • 25. Step 10: Deploy Continuously 1. cd /path/to/docroot 2. drush vset maintenance_mode 1 3. drush bb 4. git pull 5. drush rr 6. drush updb -y 7. drush cc all 8. drush vset maintenance_mode 0
  • 26. Step 11 1. Check if "$HOSTNAME" == "$CURRENT_HOSTNAME" (run it only on DEV) 2. cp local.settings.php settings.php 3. rsync -avh --delete -e "$SSH_OPT" $REMOTE_USER@$REMOTE_SERVER:$PATH_TO_SITEROOT/sites/default/files/ ./sites/default/files 4. drush sql-drop -y 5. BASE_DUMP=$(ls -t $PATH_TO_BM_MANUAL/*.mysql.gz | head -1) 6. gunzip < $BASE_DUMP | drush sql-cli First DEV-STAGE sync script
  • 27. Step 12 1. Check if "$HOSTNAME" == "$CURRENT_HOSTNAME" (run it only on STAGE) 2. rsync -avh --delete -e "$SSH_OPT" $REMOTE_USER@$REMOTE_SERVER:$PATH_TO_SITEROOT/sites/default/files/ ./sites/default/files 3. drush sql-drop -y 4. BASE_DUMP=$(ls -t $PATH_TO_BM_MANUAL/*.mysql.gz | head -1) 5. gunzip < $BASE_DUMP | drush sql-cli First STAGE-PROD sync script
  • 28. Let's count 2 projects at a time 2 servers (STAGE and PROD) on each project to deploy 9 commands to deploy (1 ssh + 8 deploy) 2 * 2 * 9 = 36 Manual actions / day (minimum) And be sure to don’t mess up anything!
  • 34. Step 14 Scripts improvements - Move Drupal files to docroot - Create reinstal.sh - Move all settings to settings.sh
  • 38. How to create testing environment? 1.Pull files from Bitbucket 2.Get Database dump from STAGE-server 3.Restore database from dump 4.Install Stage File Proxy module (or rsync files folder) 5.Send link somewhere 6.Profit!
  • 41. Step N Create script to create testing environments
  • 42. How it works? 1.Jenkins checks Bitbucket repo (by schedule) 2.Jenkins merges branches when there is pull request 3.Jenkins runs BASH script after branches are merged 4.BASH: - Create folder - Copy merged files - Copy base dump from STAGE-server - Create database and restore dump - Install Stage File Proxy module - Post comment on Bitbucket with the link to created site 1.Profit!
  • 44. Links to the source code: Local environment (based on Drupal VM): https://bitbucket.org/deweb-studio/code-driven-starter.kit Tool to create testing environment: https://bitbucket.org/deweb-studio/jenkins_ci_drupal

Editor's Notes

  • #3: команда - это единое целое из таких составляющих как фронт-енд, бек-енд, дизайн, нет выделенной команды на проект, часто проект может быть начат одним составом, продолжиться другим, а заканчиваться будет всем скопом.. И хотя мы находимся все в одном офисе, мы постоянно работали со скидкой на “специфику работы” - этим термином мы прикрывали постоянные проблемы, которые не удивят ни одну команду разработчиков. команда - это единое целое из таких составляющих как фронт-енд, бек-енд, дизайн, нет выделенной команды на проект, часто проект может быть начат одним составом, продолжиться другим, а заканчиваться будет всем скопом.. И хотя мы находимся все в одном офисе, мы постоянно работали со скидкой на “специфику работы” - этим термином мы прикрывали постоянные проблемы, которые не удивят ни одну команду разработчиков.