drupal development workflow in details

27
Drupal Development workflow with Drupal, Gerrit, Ægir & Jenkins at EASME. Pol Dellaiera - @drupol

Upload: pol-dellaiera

Post on 17-Jul-2015

160 views

Category:

Services


3 download

TRANSCRIPT

Page 1: Drupal Development Workflow in details

Drupal Development workflow with Drupal, Gerrit, Ægir & Jenkins at EASME.

Pol Dellaiera - @drupol

Page 2: Drupal Development Workflow in details

June 2014

• One server hosted by DG-GROW • No versioning • Command-line upgrades through SSH • No deployment strategy • One production site • No development server • No Drupal profile

Page 4: Drupal Development Workflow in details

• 3 servers • Easily extendable • Deployment strategies • No need of an SSH access • No need of local XAMP • As many Drupal instances as we want • Source(custom only)under versioning

Advantages

Page 5: Drupal Development Workflow in details

• Might take a lot of time to build a platform • Workflow depending on multiple computers

Disadvantages

Page 6: Drupal Development Workflow in details

The big picture

• Git • Gerrit

Development server

Production server

• Jenkins • Ægir

Versioning server

• XAMP

Page 7: Drupal Development Workflow in details

Gerrit

Gerrit is a web based code review system, facilitating online code reviews for projects using the Git version control system. Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer. Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer. This functionality enables a more centralized usage of Git.

Page 8: Drupal Development Workflow in details

Jenkins

Jenkins, formerly known as "Hudson Labs", is the leading open-source continuous integration server. Jenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, Jenkins focuses on the following two jobs: Building/testing software projects continuously Monitoring executions of externally-run jobs Jenkins keeps those outputs and makes it easy for you to notice when something is wrong.

Page 9: Drupal Development Workflow in details

Ægir

The Ægir hosting system allows developers and site administrators to automate many of the common tasks associated with deploying and managing large websites. Ægir makes it easy to install, upgrade, deploy, and backup an entire network of Drupal sites. Support for multi-server site deployment and management allows for migrating sites between servers, including large sites spread across multiple web servers.

Page 10: Drupal Development Workflow in details

Workflow of a change, from the user to the server.

1.Writing the code locally, 2.Testing the code on a test instance by synchronizing with SSH the

local profile directory with the remote, 3.Committing and pushing the code on the Git server, 4.Jenkins starts building a new instance with only your changes, 5.Aegir is notified of that new platform, 6.Code review and merge the patch into the master branch.

Page 11: Drupal Development Workflow in details

s-eci-idev.easme.cec.eu.int • Drupal instances

1. Writing the code locally, 2. Testing the code on a test instance by synchronizing with SSH the

local profile directory with the remote,

Page 12: Drupal Development Workflow in details

s-eci-versn.easme.cec.eu.int • Git/Gerrit

$ git commit –am "Feature update for demonstration purpose." $ git push

3. Committing and pushing the code on the Git server,

$ git commit –am "Feature update for demonstration purpose." $ git push

Page 13: Drupal Development Workflow in details

Gerrit list the changes on the "open change" page.

Page 14: Drupal Development Workflow in details

Gerrit: details, online review and history of the change.

Page 15: Drupal Development Workflow in details

You can also review the change in your IDE.

Page 16: Drupal Development Workflow in details

4. Jenkins will trigger a build of the project with only your change. It will also report to Gerrit the result of that new build.

Page 17: Drupal Development Workflow in details

5. Ægir is notified of that new build and will verify it.

Page 18: Drupal Development Workflow in details

The platform has been verified and is now available.

Page 19: Drupal Development Workflow in details

Creation of a new site on that new platform.

Page 20: Drupal Development Workflow in details

A new "install" task has been created and will be processed soon.

Page 22: Drupal Development Workflow in details

6. Code review and merge the patch into the master branch.

Page 23: Drupal Development Workflow in details

Dependencies[]

•Composer: Dependency Manager for PHP •Phing: PHP project build system •Drush: Command line tool, "Drupal is the GUI for Drush"

Page 24: Drupal Development Workflow in details

Available platforms

Any Drupal distributions like: • COD • Commerce Kickstart • Commons • Openatrium • Openfed • Openpublic • Panopoly • Restaurant

Custom distribution:

• EASME Intranet • … more to come soon.

Page 25: Drupal Development Workflow in details

Going further

• Tests, Behat, reporting • Include FPFIS-Multisite as a platform

Page 26: Drupal Development Workflow in details

Random ideas

• Use git instead of rsync/SSH for synchronizing platforms ? (pull VS push)

Page 27: Drupal Development Workflow in details