SlideShare a Scribd company logo
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
Step 1. Code Driven Development
Step 2. Understanding of how it works
CI-BOX
CI-BOX DevOps
BACK-END part
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
Step 14
Scripts improvements
- Move Drupal files to docroot
- Create reinstal.sh
- Move all settings to settings.sh
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!
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
5. Profit!
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 in a web studio
CI workflow in a web studio

More Related Content

What's hot

Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Jake Borr
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Chris Charlton
 
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-NapocaWP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
4nd4p0p
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
Larry Nung
 
Towards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineTowards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev Machine
Krimson
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
Pantheon
 
Manage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliManage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cli
GetSource
 
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHPBuilding com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
iMasters
 
WordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwaltenWordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwalten
Walter Ebert
 
Drush for drupal website builder
Drush for drupal website builderDrush for drupal website builder
Drush for drupal website builder
Adolfo Nasol
 
HTTPS + Let's Encrypt
HTTPS + Let's EncryptHTTPS + Let's Encrypt
HTTPS + Let's Encrypt
Walter Ebert
 
Terminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interfaceTerminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interface
Jon Peck
 
Npm scripts
Npm scriptsNpm scripts
Npm scripts
정윤 김
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and Drush
Pantheon
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
George Estebe
 
Die .htaccess richtig nutzen
Die .htaccess richtig nutzenDie .htaccess richtig nutzen
Die .htaccess richtig nutzen
Walter Ebert
 
Getting started with gulpjs
Getting started with gulpjsGetting started with gulpjs
Getting started with gulpjs
unmesh dusane
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
Daniel Ku
 
Beginning Jquery In Drupal Theming
Beginning Jquery In Drupal ThemingBeginning Jquery In Drupal Theming
Beginning Jquery In Drupal Theming
Rob Knight
 
Configuring Django projects for multiple environments
Configuring Django projects for multiple environmentsConfiguring Django projects for multiple environments
Configuring Django projects for multiple environments
Apptension
 

What's hot (20)

Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
 
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-NapocaWP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
Towards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev MachineTowards the perfect Drupal Dev Machine
Towards the perfect Drupal Dev Machine
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
Manage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliManage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cli
 
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHPBuilding com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
 
WordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwaltenWordPress mit Composer und Git verwalten
WordPress mit Composer und Git verwalten
 
Drush for drupal website builder
Drush for drupal website builderDrush for drupal website builder
Drush for drupal website builder
 
HTTPS + Let's Encrypt
HTTPS + Let's EncryptHTTPS + Let's Encrypt
HTTPS + Let's Encrypt
 
Terminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interfaceTerminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interface
 
Npm scripts
Npm scriptsNpm scripts
Npm scripts
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and Drush
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
 
Die .htaccess richtig nutzen
Die .htaccess richtig nutzenDie .htaccess richtig nutzen
Die .htaccess richtig nutzen
 
Getting started with gulpjs
Getting started with gulpjsGetting started with gulpjs
Getting started with gulpjs
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
 
Beginning Jquery In Drupal Theming
Beginning Jquery In Drupal ThemingBeginning Jquery In Drupal Theming
Beginning Jquery In Drupal Theming
 
Configuring Django projects for multiple environments
Configuring Django projects for multiple environmentsConfiguring Django projects for multiple environments
Configuring Django projects for multiple environments
 

Viewers also liked

Lviv Euro Drupal Camp 2015_От front-end разработки к темизации в Drupal
Lviv Euro Drupal Camp 2015_От front-end разработки к темизации в DrupalLviv Euro Drupal Camp 2015_От front-end разработки к темизации в Drupal
Lviv Euro Drupal Camp 2015_От front-end разработки к темизации в Drupal
deWeb
 
Responsive grids overview
Responsive grids overviewResponsive grids overview
Responsive grids overview
deWeb
 
Lviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиков
Lviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиковLviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиков
Lviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиков
deWeb
 
Arctic monkeys
Arctic monkeysArctic monkeys
Arctic monkeys
ldevine1234
 
My Construction and Landscaping Projects ( do in spare time )
My Construction and Landscaping Projects ( do in spare time )My Construction and Landscaping Projects ( do in spare time )
My Construction and Landscaping Projects ( do in spare time )
Keith Hamilton
 
Unit 4 fourier series by Abdrehman Ahmed
Unit 4 fourier series by Abdrehman AhmedUnit 4 fourier series by Abdrehman Ahmed
Unit 4 fourier series by Abdrehman Ahmed
Abdrehman Ahmed
 
Arctic monkeys
Arctic monkeysArctic monkeys
Arctic monkeys
ldevine1234
 
TUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWAT
TUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWATTUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWAT
TUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWAT
Richard Owen
 
WE ARE HIRING !
WE ARE HIRING ! WE ARE HIRING !
WE ARE HIRING !
Sharon Libeskind
 
Campaign Snapshot
Campaign SnapshotCampaign Snapshot
Campaign Snapshot
Gia Manieri
 
Timber Retaining Walls
Timber Retaining WallsTimber Retaining Walls
Timber Retaining Walls
Neil Hayter
 
Grammaeng
GrammaengGrammaeng
Grammaeng
Morethan Fern
 
Peer feedback in Higher Education
Peer feedback in Higher EducationPeer feedback in Higher Education
Peer feedback in Higher Education
Weldon Green
 
Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....
Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....
Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....Vivian Jiang
 
Hiring@innominds
Hiring@innomindsHiring@innominds
Hiring@innominds
Hema Latha
 
Communicating effectively with your audience
Communicating effectively with your audienceCommunicating effectively with your audience
Communicating effectively with your audience
Emmaprince
 
Pitching night Mures Startups
Pitching night Mures StartupsPitching night Mures Startups
Pitching night Mures Startups
Ioana Teodora Georgescu
 

Viewers also liked (20)

Lviv Euro Drupal Camp 2015_От front-end разработки к темизации в Drupal
Lviv Euro Drupal Camp 2015_От front-end разработки к темизации в DrupalLviv Euro Drupal Camp 2015_От front-end разработки к темизации в Drupal
Lviv Euro Drupal Camp 2015_От front-end разработки к темизации в Drupal
 
Responsive grids overview
Responsive grids overviewResponsive grids overview
Responsive grids overview
 
Lviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиков
Lviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиковLviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиков
Lviv Euro Drupal Camp 2015_Как подружить дизайнеров и Drupal-разработчиков
 
Arctic monkeys
Arctic monkeysArctic monkeys
Arctic monkeys
 
My Construction and Landscaping Projects ( do in spare time )
My Construction and Landscaping Projects ( do in spare time )My Construction and Landscaping Projects ( do in spare time )
My Construction and Landscaping Projects ( do in spare time )
 
Unit 4 fourier series by Abdrehman Ahmed
Unit 4 fourier series by Abdrehman AhmedUnit 4 fourier series by Abdrehman Ahmed
Unit 4 fourier series by Abdrehman Ahmed
 
Arctic monkeys
Arctic monkeysArctic monkeys
Arctic monkeys
 
TUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWAT
TUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWATTUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWAT
TUGAS IPS KELAS AL FATIH KELOMPOK RICHARD BUMI SHALAWAT
 
WE ARE HIRING !
WE ARE HIRING ! WE ARE HIRING !
WE ARE HIRING !
 
Campaign Snapshot
Campaign SnapshotCampaign Snapshot
Campaign Snapshot
 
Timber Retaining Walls
Timber Retaining WallsTimber Retaining Walls
Timber Retaining Walls
 
Grammaeng
GrammaengGrammaeng
Grammaeng
 
Peer feedback in Higher Education
Peer feedback in Higher EducationPeer feedback in Higher Education
Peer feedback in Higher Education
 
CORREOS ELECTRONICOS
CORREOS ELECTRONICOSCORREOS ELECTRONICOS
CORREOS ELECTRONICOS
 
Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....
Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....
Catalogue of Zhengzhou Gou's Electromagnetic Induction Heating Equipment Cor....
 
Resume-2015
Resume-2015Resume-2015
Resume-2015
 
Hiring@innominds
Hiring@innomindsHiring@innominds
Hiring@innominds
 
teleflora
teleflorateleflora
teleflora
 
Communicating effectively with your audience
Communicating effectively with your audienceCommunicating effectively with your audience
Communicating effectively with your audience
 
Pitching night Mures Startups
Pitching night Mures StartupsPitching night Mures Startups
Pitching night Mures Startups
 

Similar to CI workflow in a web studio

From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
Agile Spain
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
Alan Pinstein
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
Carlos Sanchez
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHP
Robert Lemke
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructure
Michaël Lopez
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
Lindsay Holmwood
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
Achieve Internet
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
Carlos Sanchez
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
hernanibf
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
Alexandre Salomé
 
DevOps in PHP environment
DevOps in PHP environment DevOps in PHP environment
DevOps in PHP environment
Evaldo Felipe
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
Open shift
Open shiftOpen shift
Open shift
marcolof
 
From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011
Carlos Sanchez
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11julien.ponge
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
David Lukac
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
Sylvain Rayé
 

Similar to CI workflow in a web studio (20)

From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHP
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructure
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 
DevOps in PHP environment
DevOps in PHP environment DevOps in PHP environment
DevOps in PHP environment
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Open shift
Open shiftOpen shift
Open shift
 
From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 

Recently uploaded

Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
JeyaPerumal1
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 

Recently uploaded (20)

Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 

CI workflow in a web studio

  • 1.
  • 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.
  • 6.
  • 7. Step 1. Code Driven Development
  • 8. Step 2. Understanding of how it works
  • 12.
  • 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!
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Step 14 Scripts improvements - Move Drupal files to docroot - Create reinstal.sh - Move all settings to settings.sh
  • 35.
  • 36.
  • 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!
  • 39.
  • 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 5. Profit!
  • 43.
  • 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