extreme ci savings with bamboo 3.1: the jira story

46

Post on 22-Oct-2014

2.717 views

Category:

Technology


5 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Extreme CI Savings with Bamboo 3.1: The JIRA Story
Page 2: Extreme CI Savings with Bamboo 3.1: The JIRA Story

The JIRA Story

Bryce JohnsonJIRA Build Engineer, Atlassian

2

Extreme CI Savings with Bamboo 3.1

Page 3: Extreme CI Savings with Bamboo 3.1: The JIRA Story

The Story…

• JIRA’s past CI problems

• Create new CI goals

• Staging

• Artifact Passing

• Outsource Infrastructure and Reduce Cost

• The Future of our CI3

Page 4: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Where were we for CI?

4

Compile

11,000 Junit Tests

3000 Functional

Tests

Deploy JIRA Artifacts

Minimum 8 Hours in Serial

Page 5: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Where were we for CI?

5

Compile

11,000 Junit Tests

3000 Functional

Tests

Deploy JIRA Artifacts

We had to break things up

Page 6: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Where were we for CI?

6

Test 1

SCM Trigger

Test 6

Test 11

Test 2

Test 7

Test 12

Test 3

Test 8

Test 13

Test 4

Test 9

Test 5

Test 10

Test 14

Test 15

Page 7: Extreme CI Savings with Bamboo 3.1: The JIRA Story

We still had to….

7

Compile

11,000 Junit Tests

3000 Functional

Tests

Deploy JIRA Artifacts

Minimum 8 Hours in Serial

Page 8: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Unable to Aggregate Results

815 builds with 15 results

Test 1

SCM Trigger

Test 6

Test 11

Test 2

Test 7

Test 12

Test 3

Test 8

Test 13

Test 4

Test 9

Test 5

Test 10

Test 14

Test 15? ? ? ? ?

Page 9: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Old JIRA Release Build

9

Compile

11,000 Junit Tests

3000 Functional Standalone

3000 Functional

War

3000 Functional Windows

3000 Functional

Source

23 HOURS

1 Build

1. Chance of infrastructure or test failure

2. Impacts Validation time

3. Release slip

Page 10: Extreme CI Savings with Bamboo 3.1: The JIRA Story

What do we want?

10

• Run all tests as a fast CI loop

• QA Engineers focused on feature stories

• Deploy JIRA on green builds

• Release JIRA faster!

Page 11: Extreme CI Savings with Bamboo 3.1: The JIRA Story

What do we want?

11

• Run all tests as a fast CI loop

• QA Engineers focused on feature stories

• Deploy JIRA on green builds

• Release JIRA faster!

Page 12: Extreme CI Savings with Bamboo 3.1: The JIRA Story

What do we want?

12

• Run all tests as a fast CI loop

• QA Engineers focused on feature stories

• Deploy JIRA on green builds

• Release JIRA faster!

Page 13: Extreme CI Savings with Bamboo 3.1: The JIRA Story

What do we want?

13

• Run all tests as a fast CI loop

• QA Engineers focused on feature stories

• Deploy JIRA on green builds

• Release JIRA faster!

Page 14: Extreme CI Savings with Bamboo 3.1: The JIRA Story

JIRA CI Design Goals

14

Functional Tests

Selenium Web Browser Tests

Performance Tests

Database Tests

Supported Plugins Tests

Inner Loop CI

Outer Loop CI

Distribution Tests

Page 15: Extreme CI Savings with Bamboo 3.1: The JIRA Story

CI Feeds Release ValidationThere’s more!!!

15

JIRA Outer Loop CI

Validation

Page 16: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Outer Loop CI for Release

16

46774 Total Tests

Page 17: Extreme CI Savings with Bamboo 3.1: The JIRA Story

17Seems like a mountain of tests to climb and is out of reach

Page 18: Extreme CI Savings with Bamboo 3.1: The JIRA Story

18But we have Bamboo 3.1!

Page 19: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Stages

Job 1 Job 2 Job 3 Job 4 Job 5

Job 6

Job 7 Job 8 Job 9

Page 20: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Stages transforms our old CI

2015 builds with 15 results

Test 1

SCM Trigger

Test 6

Test 11

Test 2

Test 7

Test 12

Test 3

Test 8

Test 13

Test 4

Test 9

Test 5

Test 10

Test 14

Test 15

Page 21: Extreme CI Savings with Bamboo 3.1: The JIRA Story

We still had to….

21

Compile

11,000 Junit Tests

3000 Functional

Tests

Deploy JIRA Artifacts

Minimum 8 Hours in Serial

Page 22: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Stages transforms our old CI

2215 builds with 15 results

Test 1

SCM Trigger

Test 3

Test 11

Test 2

Test 7

Test 12

Test 3

Test 8

Test 13

Test 4

Test 9

Test 5

Test 10

Test 14

Test 15

1 build 15 jobs 1 result

Page 23: Extreme CI Savings with Bamboo 3.1: The JIRA Story

New CI Plan: Add a Stage

23

Test 1

Test 3

Test 11

Test 2

Test 7

Test 12

Test 3

Test 8

Test 13

Test 4

Test 9

Test 5

Test 10

Test 14

Test 15

Deploy Artifacts to Maven Nexus Repository

Continue to Next Stage if Previous Passes

One Build Plan

Page 24: Extreme CI Savings with Bamboo 3.1: The JIRA Story

JIRA CI as a Producer

24

JIRA CI Build Plan

Maven Deploy

Studio JIRA Integration

Greenhopper Plugin

Deploy JIRA to Test Server

Distro, Perf, DB Tests

Nexus Maven Repository

Consumers depend on

Maven Deploy

Page 25: Extreme CI Savings with Bamboo 3.1: The JIRA Story

JIRA CI: From 8 hours to…

25

Stages

Page 26: Extreme CI Savings with Bamboo 3.1: The JIRA Story

JIRA Release from 23 hours…

26

Stages

Page 27: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Stages

• Aggregated Results

• Deployed JIRA to Maven

• Other applications can consume

• Deployed JIRA to QA Test Servers

27

Page 28: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Artifact Passing

28

Produce Artifact

Consumer 1

Consumer 2

Consumer 3

Copies original artifact

Page 29: Extreme CI Savings with Bamboo 3.1: The JIRA Story

29

Page 30: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Remove Redundancies

30

Test 1

Test 3

Test 11

Test 2

Test 7

Test 12

Test 3

Test 8

Test 13

Test 4

Test 9

Test 5

Test 10

Test 14

Test 15

Produce Application Artifacts

Page 31: Extreme CI Savings with Bamboo 3.1: The JIRA Story

How does it work?

1. Producer artifact definitions2. Consumer artifact definitions3. Builder plumbing

31

Page 32: Extreme CI Savings with Bamboo 3.1: The JIRA Story

32

Page 33: Extreme CI Savings with Bamboo 3.1: The JIRA Story

33

Page 34: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Maven Plumbing<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-webapp-dist</artifactId> <version>${project.version}</version> <type>war</type>

<scope>system</scope> <systemPath>${basedir}/PassedArtifacts/jira-webapp-dist-${project.version}.war</systemPath>

</dependency>

34

Page 35: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Maven Plumbing<dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-webapp-dist</artifactId> <version>${project.version}</version> <type>war</type>

<scope>system</scope> <systemPath>${basedir}/PassedArtifacts/jira-webapp-dist-${project.version}.war</systemPath>

</dependency>

35

Page 36: Extreme CI Savings with Bamboo 3.1: The JIRA Story

The New Selenium CI Plan

36

Page 37: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Multi Module Application

Module 1

Distribution

Deploy to Test Server 1

Deploy to Test Server 2

Module 2 Module 3 Module 4

Page 38: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Artifact Passing

• Helped to improve JIRA’s Selenium CI testing build

• Remove redundant checkouts and compilation

• Over 10 minutes saving compute time per job!

38

Page 39: Extreme CI Savings with Bamboo 3.1: The JIRA Story

The Build Infrastructure

39

• Reliability

• Reproducible

• Redundant

• Allow for Growth

• Easy to Administrate

• Cost effective

Page 40: Extreme CI Savings with Bamboo 3.1: The JIRA Story

40

Page 41: Extreme CI Savings with Bamboo 3.1: The JIRA Story

JIRA development cost for using Amazon?

41

$4000 per month!!!

Page 42: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Bamboo 3.1 Saves you Money!

42

Configurable spot price bids

Page 43: Extreme CI Savings with Bamboo 3.1: The JIRA Story

43

Linux Spot Instance

Windows Regular Instance

Windows Spot Instance

Page 44: Extreme CI Savings with Bamboo 3.1: The JIRA Story

What is this worth to JIRA?

44

$2000 per month!!!

Page 45: Extreme CI Savings with Bamboo 3.1: The JIRA Story

Our CI Future

45

Infrastructure Improvements

DVCS Bamboo upgrade from 3.0 to 3.1.1: Tasks

Personal Builds

Bamboo 3.2 Amazon enhancements

Bamboo 3.2 restart failed tasks

Page 46: Extreme CI Savings with Bamboo 3.1: The JIRA Story

The Story…

46

JIRA CI Past Problems Slow, unreliable

Created New CI Goals Faster promotional CI

Bamboo Staging Aggregated Results, Deployment

Bamboo Artifact Passing Speed, Re-use, Deployment

Outsourcing Infrastructure Amazon, Admin, Attractive Pricing

Deliver Awesome