extreme ci savings with bamboo 3.1: the jira story
Post on 22-Oct-2014
2.717 views
DESCRIPTION
TRANSCRIPT
The JIRA Story
Bryce JohnsonJIRA Build Engineer, Atlassian
2
Extreme CI Savings with Bamboo 3.1
The Story…
• JIRA’s past CI problems
• Create new CI goals
• Staging
• Artifact Passing
• Outsource Infrastructure and Reduce Cost
• The Future of our CI3
Where were we for CI?
4
Compile
11,000 Junit Tests
3000 Functional
Tests
Deploy JIRA Artifacts
Minimum 8 Hours in Serial
Where were we for CI?
5
Compile
11,000 Junit Tests
3000 Functional
Tests
Deploy JIRA Artifacts
We had to break things up
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
We still had to….
7
Compile
11,000 Junit Tests
3000 Functional
Tests
Deploy JIRA Artifacts
Minimum 8 Hours in Serial
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? ? ? ? ?
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
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!
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!
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!
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!
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
CI Feeds Release ValidationThere’s more!!!
15
JIRA Outer Loop CI
Validation
Outer Loop CI for Release
16
46774 Total Tests
17Seems like a mountain of tests to climb and is out of reach
18But we have Bamboo 3.1!
Stages
Job 1 Job 2 Job 3 Job 4 Job 5
Job 6
Job 7 Job 8 Job 9
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
We still had to….
21
Compile
11,000 Junit Tests
3000 Functional
Tests
Deploy JIRA Artifacts
Minimum 8 Hours in Serial
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
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
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
JIRA CI: From 8 hours to…
25
Stages
JIRA Release from 23 hours…
26
Stages
Stages
• Aggregated Results
• Deployed JIRA to Maven
• Other applications can consume
• Deployed JIRA to QA Test Servers
27
Artifact Passing
28
Produce Artifact
Consumer 1
Consumer 2
Consumer 3
Copies original artifact
29
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
How does it work?
1. Producer artifact definitions2. Consumer artifact definitions3. Builder plumbing
31
32
33
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
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
The New Selenium CI Plan
36
Multi Module Application
Module 1
Distribution
Deploy to Test Server 1
Deploy to Test Server 2
Module 2 Module 3 Module 4
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
The Build Infrastructure
39
• Reliability
• Reproducible
• Redundant
• Allow for Growth
• Easy to Administrate
• Cost effective
40
JIRA development cost for using Amazon?
41
$4000 per month!!!
Bamboo 3.1 Saves you Money!
42
Configurable spot price bids
43
Linux Spot Instance
Windows Regular Instance
Windows Spot Instance
What is this worth to JIRA?
44
$2000 per month!!!
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
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