Software Factory in a Box

22
Marcello Teodori - [email protected] – JUG Milano Software Factory in a Box Marcello Teodori JUG Milano domenica 6 marzo 2011

description

Are we not lucky enough to enjoy a proper software development process in our team? We can try to improve our working environment with a setup on our local machine of a virtualized "software factory in a box" based on opensource tools (Maven/Redmine/Artifactory/Subversion/Jenkins). Following this approach We'll see how we can experiment on ourselves some integration best practices for these tools and easily introduce them into our company later.

Transcript of Software Factory in a Box

Page 1: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Software Factory in a Box

Marcello Teodori

JUG Milano

domenica 6 marzo 2011

Page 2: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

A few words about the speaker

- one of the JUG Leaders for JUG Milano

- moderator for SpringFramework-IT and Groovy Italian User Group mailing lists

- owner and CTO in ExcogitaNet

- owner, developer and pitcher for Git Enterprise

- now based in London, working as freelancer tech lead for various enterprises and startups

- somewhat twitterer: http://twitter.com/magomarceloand blogger: http://magomarcelo.blogspot.com

domenica 6 marzo 2011

Page 3: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Let’s define a Software Factory

Once upon a time there was a little factory who was able to turn ideas into code...

...and make everyone happy!

domenica 6 marzo 2011

Page 4: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

But inside the factory truth was more often...

Like having a cat

in the waste bin...

domenica 6 marzo 2011

Page 5: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Hang on! It’s never too late to...

domenica 6 marzo 2011

Page 6: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

First get the state we’re in... the Joel test

Let’s assess the status of

our working environment

using the test of Joel Spolsky:

12 Steps to Better Code

(2000)

http://www.joelonsoftware.com/articles/fog0000000043.html

domenica 6 marzo 2011

Page 7: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

And the lesson we can learn is...

domenica 6 marzo 2011

Page 8: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

But trying to introduce tools can lead to some objections...

SOFTWARE FACTORY

TOOLS ARE EXPENSIVE LOTS OF THEM

ARE OSS AND ACTUALLY VERY

GOOD TOO

SETUP ISCOMPLICATED

I COULD TRYAND INSTALL

IN A VM

WHAT ABOUT TRAINING? WE

NEED TO DEFINE WORKFLOWS AND

PROCEDURES WELL...

domenica 6 marzo 2011

Page 9: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

What can we do...?

Software Factory in a Box!

- a Virtual Machine with an OSS OS (Ubuntu Server 10.04 LTS)

- implementing a software factory

- for Maven/Java projects (mostly...)

- built on OSS tools

- we can experiment best practices with

domenica 6 marzo 2011

Page 10: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

What’s inside the Software Factory in a Box...

The VM contents:

- redmine (issue tracker & wiki)

- subversion edge (scm + management tools)

- jenkins (continuous integration)

- artifactory (maven repository)

- sonar (source code reporting)

all configured using PostgreSQL as database

with the same identity across all systems provided by OpenLDAP (directory server)

domenica 6 marzo 2011

Page 11: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Redmine

http://www.redmine.org/

- wiki with markdown syntax

- multi-project issue trackerwith customizable workflow

- milestone planning

- integration with subversion and many more SCM...

- notifications

- GPLv3 license, built on Ruby and Rails

domenica 6 marzo 2011

Page 12: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Jenkins

http://jenkins-ci.org/

- possibly the most widely used OSScontinuous integration server

- can ran as job scripts, ant/maven buildstriggered on specific conditions

- integration with subversion and many more SCM...

- extensible via plugins with rich directory:- sonar plugin- promotion plugin- artifactory plugin

- MIT licensed, built on Java

domenica 6 marzo 2011

Page 13: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Subversion Edge

http://www.open.collab.net/go/csvne2_r2a/

- distribution of Subversion with toolsprovided by CollabNet

- web-based repository management

- web configurable LDAP integration

- basic web permission editing

- includes ViewVC repository viewer

- AGPL licensed, built in Java(excluding Subversion and ViewVC)

domenica 6 marzo 2011

Page 14: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Artifactory

http://www.jfrog.com/products.php

- a generic repository managercan host artifacts and dependencies

- built for Mavenbut supporting also Ivy and Gradle

- remote REST APIssupports publishing via POST of generic files

- cache for external repositories, pre-configured with most used ones: (Maven Central, Codehaus, JBoss, Spring...)

- LDAP support

- LGPLv3 licensed, built on Java

domenica 6 marzo 2011

Page 15: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Sonar

http://www.sonarsource.org/

- static code analysis and reporting

- statistics on code health

- plugin systemto support many languages beyond Java

- integrates well known tools:FindBugs, CheckStyle, PMD, Cobertura...

- LGPL licensed, built on Java and JRuby

domenica 6 marzo 2011

Page 16: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

OpenLDAP + web management provided by Zentyal

http://www.zentyal.org/

- web interface for Small Business Server

- based on Ubuntu Server 10.04 LTS

- all the configuration is on OpenLDAPhttp://www.openldap.org/

- we’re using just its user and group module

- can sync to external LDAP servereven Active Directory with password sync!

- provides self-service change password web

domenica 6 marzo 2011

Page 17: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Let’s experiment with some best practices...

- use a wiki as project knowledge base

- slice requirement documents in issues and track them

- avoid “downloading the internet” with maven

- build project with dedicated maven repository

- one repository per project with standard trunk/tags/branches layout on subversion

- promote and release projects from the CI server

- share common project properties using a parent POM

- publish a documentation site for a project with maven

- monitor health state of source code through static analysis

- create our custom maven archetypes and publish them on artifactory

...and check if they’re fit for us! Let’s see some possible examples...

domenica 6 marzo 2011

Page 18: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

What’s next...

We can move our Software Factory in a Box

VM in the virtualized infrastructure of our

company datacenter!

domenica 6 marzo 2011

Page 19: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

What’s next too...

If we don’t want to host some of these tools...many of them offer a cloud service version...

- DEV@cloud by CloudBees for Jenkins

- Artifactory Online by JFrog

- many more for Redmine and Subversion

...but don’t forget to manage identityacross all services!

domenica 6 marzo 2011

Page 20: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Or yet what’s next again...

We can switch from Subversion to a more advanced SCM.....like Git for example!

And use instead of Subversion Edge as a distribution of Git with web management for user, repositories and permissions available as service and packaged...

http://www.gitenterprise.com

domenica 6 marzo 2011

Page 21: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

SFBOX - The Project

Some references:

- http://tinyurl.com/sfbox - the Software Factory in a Box in OVA format(Open Virtualization Format Archive, runnable on VirtualBox, VMWare Player/Workstation and possibly others...)- login account with sudo privileges is: user/password- hostname is sfbox.local published via DNS-SD

- https://github.com/mteodori/sfbox - the Software Factory in a Box project on GitHub to collect feedback, input and share install scripts...

domenica 6 marzo 2011

Page 22: Software Factory in a Box

Marcello Teodori - [email protected] – JUG Milano

Q&A &... thanks!

- http://www.jugmilano.it/ - JUG Milano & endless discussions on tools and best practices on our mailing list!

- http://www.liludori.com/ - the wonderful world of Liludori providing the pictures in this presentation, courtesy of Mauro Gandini and Eloisa Scichilone

domenica 6 marzo 2011