Slide 1

Slide 1 text

CD@ZT

Slide 2

Slide 2 text

OURPRODUCT • XRebel Hub (now in public beta!) collects performance metrics using Java agents in test environments • APM (Application Performance Management) service, but for pre-prod • Real-time overview of performance changes • Good old XRebel under the hood @bsideup

Slide 3

Slide 3 text

@bsideup

Slide 4

Slide 4 text

@bsideup

Slide 5

Slide 5 text

WEDELIVER @bsideup • Front-End - SPA, hosted as static site, consumes REST APIs • Auth & management API service • Analytics service • (Upcoming) Collector service (lambda architecture) • Java agent

Slide 6

Slide 6 text

But we started with…

Slide 7

Slide 7 text

Monolith!

Slide 8

Slide 8 text

SOA, micro-
 services, SPA Monolith! But… Hipsters say….

Slide 9

Slide 9 text

No customers
 = No worries!

Slide 10

Slide 10 text

One CI job for everything!

Slide 11

Slide 11 text

Monorepo!

Slide 12

Slide 12 text

Commits to master!

Slide 13

Slide 13 text

Single delivery pipeline!

Slide 14

Slide 14 text

But then…

Slide 15

Slide 15 text

MONOREPOFAIL • More merge commits than real ones • Hard to track changes. Partial solution - Jenkins’s subdirectory polling • Java build tools vs JavaScript build tools @bsideup

Slide 16

Slide 16 text

DELIVERYFAIL • Can’t deliver a quickfix on front-end without delivering back-end • Rollback of back-end will affect front-end • Long-running releases because scope of changes usually was big - not good for Continuous Delivery @bsideup

Slide 17

Slide 17 text

SOA

Slide 18

Slide 18 text

MULTIPLEPIPELINES • Everything is a service • Front-end consumes them as REST APIs • Each deliverable artifact has it’s own repo, Jenkins Job DSL, delivery pipeline • Artifacts are stored on Jenkins as build artifacts • At most one non-production build on staging (aka delivery gate) • Once change in master it must be delivered ASAP @bsideup

Slide 19

Slide 19 text

SEPARATEFRONTEND • Jenkins S3 plugin for deployment • Protractor tests with Selenium and Xvfb in a container (Docker) @bsideup

Slide 20

Slide 20 text

BACKENDDELIVERY • All endpoints are covered with integration tests • We run integration tests during the CI job • environment prepared with Docker Compose as a shell step and runs on Jenkins @bsideup

Slide 21

Slide 21 text

PULLREQUESTS • Each change - is a pull request • Should be approved by both code reviewer and QA • BitBucket pull request builder plugin for Jenkins rules! Run tests before you merge and see status in PR’s UI: @bsideup

Slide 22

Slide 22 text

SYSTEMTESTS • We’re running selenium tests on Jenkins inside a container with Chromium and Xvfb • during the test, it starts many Tomcat instances with our Java Agent attached, verifies that our system works fine - all with one simple Jenkins job @bsideup

Slide 23

Slide 23 text

LESSONSLEARNED • Visualize your pipelines (i.e. delivery pipeline plugin) • Automate your tests, but keep QA as a gate keeper (i.e. use Jenkins manual step) • Test all stages - pull request builders, integration and system tests • Make use of notifications (i.e. Slack plugin) • Configure jobs as a code - easier to split things and create more micro- services • Create clean environments for tests (i.e. with Docker) @bsideup

Slide 24

Slide 24 text

FUTUREPLANS • More micro–services, using the same job definitions • Migrate to Pipeline plugin (aka workflow, aka Jenkins 2.0) • Integrate multi-branch plugin to get earlier feedback about the commits (instead of pull request builders) • Release our plugin for better pipelines visualization (aka Delivery Center) • Deliver CloudFormation templates with Jenkins pipeline • Deliver Logstash reindexers with Jenkins as pipeline (plugin?) @bsideup

Slide 25

Slide 25 text

THANKYOU!