Triple-E class Continuous Delivery with Hudson, Maven, Kokki and PyDev Werner Keil Eclipse Day Delft 27 th September 2012
2 2012 Creative Arts & Technologies Images Maersk Line and Others
Overview Introduction Kokki Configuration Multiconf PyDev Development Maven Build Hudson Automation Demo Q&A 3 2012 Creative Arts & Technologies
Who am I? Werner Keil Consultant Coach Creative Cosmopolitan Open Source Evangelist Software Architect Java Godfather UOMo Project Lead Email werner@catmedia.us Twitter @wernerkeil 4 2012 Creative Arts & Technologies
Kokki Infrastructure Automation Configuration Management Part of Provisioning Library and simple command line tool Currently no client/server component Can use GitHub in place of client/server Alternative to Puppet/Chef/Cfengine Implemented in Python 5 2012 Creative Arts & Technologies
Kokki Terms Kokki is a configuration management framework. It can be used standalone or as a part of a more complex system. It means cook in Finnish Environment: Execution environment Resource: Describes a file, service, package, etc.. Provider: Knows how to execute a resource Kitchen: Container for cookbooks Cookbook: Container for recipes and libraries Recipe: group of resource definitions Library: utility methods, resources, and providers 6 2012 Creative Arts & Technologies
Kokki Quick Example from kokki import * with Environment() as env: Package("vim", action="upgrade") File("/etc/hosts", owner = "root", group = "root", content = "127.0.0.1 localhost\n" "255.255.255.255 broadcasthost\n" "::1 localhost\n" "fe80::1%lo0 localhost\n") env.run() 7 2012 Creative Arts & Technologies
Kokki++ Multiconf Multiconf is a framework for describing complex environments using Python. Why It started from a simple need of continuous deployment of Java EE projects. Using a bunch of Python scripts, and a bunch of plain text property files. When number of property files increased number of scripts increased, too Out of this dilemma Multiconf was born. 8 2012 Creative Arts & Technologies
Multiconf How Imagine a project, using multiple servers like Tomcat, Jetty, JBoss, Glassfish or Weblogic. You are going to use database connections and four environments: Local (for developer's local machine) Dev Test Prod Project configuration will be similar on different environments, but something will be different (databases and ports, for example). 9 2012 Creative Arts & Technologies
Multiconf (2) What Multiconf is not Multiconf itself doesn't know how to create environments. Multiconf doesn't know how to create any of the environment's components Multiconf has nothing to execute Perfect match for a system such as Kokki Same language Pluggable recipes and Libraries make Kokki open to such Extensions What Multiconf is Multiconf allows you to define your software stack and get early warning that something within your definition is wrong. Other tools use YAML or JSON to define settings of the components, but then you need something to validate those settings. Multiconf is both - definition and validation. 10 2012 Creative Arts & Technologies
Multiconf JSF Example from javax_faces import ProjectStage from valid_envs import local, dev, test, pp, prod def jsf_stages(): with ProjectStage() as ps: ps.name(local= Development, dev= Development, test= UnitTest, pp= SystemTest, prod= Production ) 11 2012 Creative Arts & Technologies
PyDev PyDev is a product of Appcelerator, a platform and services company that is enabling Web developers to build cross-platform / native applications for Mobile, Tablet and Desktop platforms Winner of 2011 Eclipse Award for Best Developer Tool Appcelerator also makes Aptana Studio and Titanium Studio, Eclipse-based IDEs targeting Web and Mobile platforms. 12 2012 Creative Arts & Technologies
PyDev Code Completion 13 2012 Creative Arts & Technologies
PyDev Code Navigation 14 2012 Creative Arts & Technologies
PyDev Code Coverage 15 2012 Creative Arts & Technologies
PyDev Debugging 16 2012 Creative Arts & Technologies
PyDev Unit Tests 17 2012 Creative Arts & Technologies
PyDev DEMO
Maven The evolution of build systems 19 2012 Creative Arts & Technologies
Maven Lean Usage Using Maven for what it s Best at Dependency Management Nexus Managed Environment Generated / Called by Kokki Hudson Plugins 20 2012 Creative Arts & Technologies
Hudson Hudson is a powerful and widely used open source continuous integration server providing development teams with a reliable way to monitor changes in source control and trigger a variety of builds. (The Hudson Book) 21 2012 Creative Arts & Technologies
Hudson Downloads 22 2012 Creative Arts & Technologies
Hudson Commits 23 2012 Creative Arts & Technologies
Hudson Job Coordination 24 2012 Creative Arts & Technologies
Hudson Job Coordination Triple-E size 25 2012 Creative Arts & Technologies
Hudson Promoted Builds 26 2012 Creative Arts & Technologies
Hudson DEMO
The Price of Continuous Integration 28 2012 Creative Arts & Technologies
Let s talk Q & A
Links Kokki https://github.com/samuel/kokki Multiconf https://github.com/lhupfeldt/multiconf PyDev http://www.pydev.org
Links (2) Eclipse Hudson http://www.eclipse.org/hudson/ Apache Maven http://www.apache.org/maven/
Thank you 32 2012 Creative Arts & Technologies Images Maersk Line