drupal's development workflow with git, jenkins, aegir and chiliproject

17
Development workflow with Drupal featuring Git, Ægir, Jenkins & Chiliproject. © 2012 Pol Dell'Aiera (http://about. me/drupol), Pierre Buyle (http://about. me/pbuyle)

Upload: pol-dellaiera

Post on 08-May-2015

4.405 views

Category:

Technology


3 download

DESCRIPTION

Development workflow with Drupal, featuring Git, Ægir, Jenkins & Chiliproject.

TRANSCRIPT

Page 1: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Development workflow with Drupal

featuring Git, Ægir, Jenkins & Chiliproject.

© 2012 Pol Dell'Aiera (http://about.me/drupol), Pierre Buyle (http://about.me/pbuyle)

Page 2: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

What is Git ?

Git is a distributed revision control system (VSC or SCM).

Git was initially designed and developed by Linus Torvalds for Linux kernel development.

Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.

Page 3: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Why Git is better ?

● Everything is local● Easy branching● Fast and small● Distributed● Staging area● Any workflow is possible● Easy to learn● Free●Open Source

● :-)

Pros Cons

Source: http://whygitisbetterthanx.com/

Page 4: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

What is Jenkins ?

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:

1. Building/testing software projects continuously2.Monitoring executions of externally-run jobs

Jenkins keeps those outputs and makes it easy for you to notice when something is wrong.

Jenkins, formerly known as "Hudson Labs", is the leading open-source continuous integration server. 

Page 5: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

What is Æ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 6: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

What is Chiliproject ?

It supports your team throughout the complete project life cycle, from setting up and discussing a project plan, over tracking issues and reporting work progress to collaboratively sharing knowledge through a wiki.

ChiliProject is a web based project management system written in Ruby. 

Page 7: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

HowTo

LinkThem

AllTogether

?

Page 8: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

The big picture

Page 9: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Users & Git

Users communicate with Git.

You can use Git in command line or your favorite IDE.

Page 10: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Git &Jenkins

It's Jenkins who check at regular interval the state of the repositories.

According to the job configuration, Jenkins can be triggered upon a change in a repository or at regular interval.

In this setup, Git is polled by Jenkins.

Page 11: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Jenkins

When a job is runned, it can be either Success or Failed.

Jobs starts Phing, a PHP builder tool who will● Populate the Drupal tree with code from Drupal.org and

your repositories● Runs checks and tests to validate the code● Deploy the validated code using Fabric, a python library.

Repositories are linked to one or more Jenkins jobs.

Page 12: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Jenkins: Phing

You can do anything with it that you could do with a traditional build system like GNU make, and its use of simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework.

The whole Drupal project is built thanks to this tools called within and by Jenkins.

Jenkins exhaustively use a tool called Phing, a PHP project build system.

Page 13: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Jenkins: Phing: Fabric

It provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution.

Fabric is a python library and command-line tool for streamlining the use of SSH for application deployement.

Page 14: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Jenkins

Jenkins will check code from the repository with multiple tools (PHP_CodeSniffer, JSLInt, etc.). It will also produce code statistics and review.

Errors are often triggered by a syntax errors in the code.

If the build is successful, Jenkins will run a python script and specific command to import the site into Ægir.

If the job failed to build, Jenkins will not continue and you'll be able to review the log and fix the problem. 

Page 15: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Ægir

With Ægir, you can manage sites, platforms and servers through the command line and/or the web interface.

This is the perfect tool to deploy Drupal.

Ægir will import Drupal websites into it's database and create Apache virtualhosts automatically.

Page 16: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

Details: Apache

Apache will be reloaded by Ægir and the new virtualhost newly created will be taken in account.

You'll be able to log-in to the new site for the first time and set the administrator password.

Page 17: Drupal's Development workflow with Git, Jenkins, Aegir and Chiliproject

References / More information● Git

○ http://git-scm.com○ https://drupal.org/documentation/git

● Continuous Integration○ http://www.martinfowler.com/articles/continuousIntegration.html○ https://en.wikipedia.org/wiki/Continuous_Integration

● Jenkins○ http://jenkins-ci.org○ http://reload.github.com/jenkins-drupal-template

● Phing○ http://www.phing.info○ http://reload.github.com/phing-drupal-template/

● Fabric○  http://fabfile.org

● Ægir○ http://www.aegirproject.org○ http://mig5.net/content/aegir-video-drupaldownunder-2012

● Chiliproject○ https://www.chiliproject.org/