triple e class devops with hudson, maven, kokki/multiconf and pydev

35
Triple-E’ class DevOps with Hudson, Maven, Kokki Multiconf & PyDev Werner Keil PyUGAT 15 th October 2014

Upload: werner-keil

Post on 13-Jul-2015

122 views

Category:

Technology


0 download

TRANSCRIPT

Triple-E’ class DevOps

with Hudson, Maven, Kokki

Multiconf & PyDevWerner Keil

PyUGAT

15th October 2014

Images © Maersk Line and Others2 © 2012-2013 Creative Arts & Technologies

Overview

• Introduction

• Kokki• Configuration

• Multiconf

• PyDev• Development

• Maven• Build

• Hudson• Automation

• Demo

• Q&A3 © 2012-2013 Creative Arts & Technologies

Who am I?

4 © 2012-2013 Creative Arts & Technologies

Werner Keil

• Consultant – Coach

• Creative Cosmopolitan

• Open Source Evangelist

• Software Architect

• Java Godfather

• UOMo Project Lead

• Mærsk DevOps Guy

Email [email protected]

Twitter @wernerkeil

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

Multiconf | Inspired...

•Started by• Anatole Tresch

(Crédit Suisse)

• Mit etwas Hilfe

u.a. durch den

„Java Godfather“

•Proposal for• An Apache Incubator Project

• See.: https://github.com/java-config

© 2012-2014 Creative Arts & Technologies

Apache Tamaya

Multiconf | ”at Apache”

•Scope• Provide type-safe enterprise-ready configuration standard for SE and EE

(optionally also ME?)

• Ensure it is a simple but extensible

• Ready for complex scenarios like Java EE, Multi-Tenancy etc.

• Ensure interoperability with existing solutions

• Align Configuration Aspects with EE8 and the Java Platform

• Other languages (as Apache is rather polyglot)

© 2012-2014 Creative Arts & Technologies

Apache Tamaya

Multiconf | ”at Apache”

•State• Already running code base

• Large support in User Groups around the world

• Supported by leading industry experts

© 2012-2014 Creative Arts & Technologies

Apache Tamaya

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.

15 © 2012 Creative Arts & Technologies

PyDev Now

• PyDev ist now Open Source Project,

lead by Fabio Zadrozny in Florianópolis, Brasil:

www.pydev.org

© 2012-2014 Creative Arts & Technologies Bilder © FIFA

PyDev | Code Completion

17 © 2012 Creative Arts & Technologies

PyDev | Code Navigation

18 © 2012 Creative Arts & Technologies

PyDev | Code Coverage

19 © 2012 Creative Arts & Technologies

PyDev | Debugging

20 © 2012 Creative Arts & Technologies

PyDev | Unit Tests

21 © 2012 Creative Arts & Technologies

DEMO

PyDev

Maven

The evolution of build systems

23 © 2012 Creative Arts & Technologies

Maven

“Lean” Usage

24 © 2012 Creative Arts & Technologies

•Using Maven for what it’s Best at• Dependency Management

• Nexus

•Managed Environment• Generated / Called by Kokki

• Hudson Plugins

Hudson

25 © 2012 Creative Arts & Technologies

•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)

Hudson | Downloads

26 © 2012 Creative Arts & Technologies

Hudson | Commits

27 © 2012 Creative Arts & Technologies

Hudson | Job Coordination

28 © 2012 Creative Arts & Technologies

Hudson | Job Coordination Triple-E size

29 © 2012 Creative Arts & Technologies

Hudson | Promoted Builds

30 © 2012 Creative Arts & Technologies

The Price of Continuous Integration

32 © 2012 Creative Arts & Technologies

Q & A

Let‘s talk

Kokki

https://github.com/samuel/kokki

Multiconf

https://github.com/lhupfeldt/multiconf

PyDev

http://www.pydev.org

Links

Eclipse – Hudson

http://www.eclipse.org/hudson/

Apache Maven

http://www.apache.org/maven/

Links (2)

Twitter @wernerkeil

36 © 2012 Creative Arts & Technologies Images © Maersk Line

Thank you Email [email protected]