Slide 1

Slide 1 text

CI before and after Chef Chef Users London Meetup

Slide 2

Slide 2 text

Disclaimer

Slide 3

Slide 3 text

Xavier Fernandez CTO and proud founder at Abiquo Ignasi Barrera Senior Engineer at Abiquo Apache jclouds committer & PMC @IgnasiBarrera @xfernandez

Slide 4

Slide 4 text

● About abiquo ● Why CI is important in abiquo ● Infrastructure software needs ● Our CI/CD pipelines ● jclouds-chef ● Lessons learned Agenda

Slide 5

Slide 5 text

abiquo - anycloud.abiquo.com ● Founded 2006 ● Venture Capital Funded – $24.5m ● 25 employees, with 16 in Engineering ○ 7 in UK ○ 18 in Spain ● Locations ○ Headquartered in Heathrow, UK ○ R&D in Barcelona, Catalonia, Spain ● + 3000 customers around the world

Slide 6

Slide 6 text

Why CI is important in abiquo ● We introduced Agile Programming (something like scrum) from the beginning. ● TDD and other test techniques are good to ensure the quality of a new feature but… CI helps preserving quality over time

Slide 7

Slide 7 text

Nexenta NetApp Generic NFS Generic iSCSI Infrastructure software LVM Monolithic Distributed Multi-datacenter ESX Hyper-V KVM XenServer OracleVM Amazon Rackspace HP Google DigitalOcean ElasticHosts CloudSigma DEPLOYMENTS HYPERVISORS PUBLIC CLOUDS STORAGE

Slide 8

Slide 8 text

Nexenta NetApp Generic NFS Generic iSCSI Infrastructure software LVM Monolithic Distributed Multi-datacenter ESX Hyper-V KVM XenServer OracleVM Amazon Rackspace HP Google DigitalOcean ElasticHosts CloudSigma DEPLOYMENTS HYPERVISORS PUBLIC CLOUDS STORAGE HOW MANY COMBINATIONS?

Slide 9

Slide 9 text

● Too many infrastructure combinations to have static staging / testing environments ● Too many resources required ● Continuous evolution of third party products to be aligned with the evolution of your product Infrastructure software

Slide 10

Slide 10 text

CI/CD pipelines needs ● Customizable ● Scalable ● Extensible ● User friendly ● End-to-end Jenkins provides everything we need

Slide 11

Slide 11 text

Continuous integration Provision Jenkins Slaves Commit Integration tests Build

Slide 12

Slide 12 text

Continuous deployment CI Create OS packages & build repo Provision staging environment Functional + UI tests ISO

Slide 13

Slide 13 text

Configurable pipelines

Slide 14

Slide 14 text

jclouds-chef ● Chef is not only for ruby fans! ● Complete Chef API for Java ● Open Source & Enterprise Chef ● Chef Solo ● knife bootstrap

Slide 15

Slide 15 text

Bootstrap example ChefContext ctx = ContextBuilder.newBuilder("chef") .endpoint(“http://abiquo-chef.bcn.abiquo.com”) .credentials("provisioner", readFile (“provisioner.pem”)) .buildView(ChefContext.class); ChefService chef = ctx.getChefService(); BootstrapConfig bootstrapConfig = BootstrapConfig.builder() .runList(new RunListBuilder().addRole("abiquo-nightly").build()); .attributes(new JsonBall(readFile (“attributes.json”)))); .environment(“Staging”); .build(); chef.updateBootstrapConfigForGroup(“staging”, bootstrapConfig); Statement bootstrap = chef.createBootstrapScriptForGroup(“staging”); compute.runScriptOnNodesMatching(inGroup (“staging”), bootstrap); attributes.json { "set_fqdn": "{{hostname}}", "abiquo": { "license": "{{license}}", "yum": { "nightly-repo": "http://staging.bcn.abiquo.com/{{version}}/rpm" } } } Dynamic run lists Dynamic environments Dynamic attributes Reusable & persistent configuration

Slide 16

Slide 16 text

Lessons learned ● Infrastructure as code ● Test everything ● Use the right tools ● Think big

Slide 17

Slide 17 text

Thank you! Q&A