Concourse - CI for the cloud

JohannesRudolph 128 views 17 slides Jun 28, 2017
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

Continuous Deployment presents new challenges that traditional CI systems can rarely meet. Concourse is designed from the ground up for the Continuous Delivery of Cloud native Software.


Slide Content

Concourse
CI for the Cloud
June 27th 2017

Agenda
-Why Concourse?
-Concourse Core Concepts
-Demo
-Scaling to Complex Pipelines

Continuous Integration

Integrate code in a shared repository
several times a day

Automate building and testing

Run builds in a controlled
environment
Continuous Delivery

Deliver functionality to customers several times a day
Short feedback cycles reduce risk, cost and time
Reduce “software inventory”

Continuous Deployment

Deploy several times a day

Automate the deployment of
software

Infrastructure and Configuration as
Code reduce risk

Challenges of “Traditional” CI Systems
●Builds use an ever increasing amount of resources
○git repos, docker images, credentials, …

●Cloud Native: Build Agents as Pets vs. Cattle
○Repeatable builds?
○Clear build step inputs and outputs?

●(Ab?)using CI to orchestrate deployment
○Modelling “deployment destinations”

●Configuration as Code vs. manually built Pipelines

Concourse: Solutions
●Builds use an ever increasing amount of resources
○git repos, docker images, credentials, …

●Cloud Native: Build Agents as Pets vs. Cattle
○Repeatable builds?
○Clear build step inputs and outputs?

●(Ab?)using CI to orchestrate deployment
○Modelling “deployment destinations”

●Configuration as Code vs. manually built Pipelines

Resources
Jobs and
Pipelines
Tasks and
Workers

The Three Core Concepts of Concourse
●Resources
○any entity that can be checked for new versions
○Pull at a specific version
○Push up to idempotently create new versions

●Tasks
○execution of a script in a container
○well-defined inputs and outputs via volume mounts

●Jobs
○connect tasks and resources and can depend on other Jobs
○Jobs define the shape of your delivery pipeline.

Demo
Based on https://github.com/starkandwayne/concourse-tutorial

Scaling to Complex Pipelines

Scaling to complex Pipelines
Use an Artifacts Store:
-e.g. S3, Swift, HTTP
-FTP, rsync, …
Use custom Caches:
-e.g. for npm, yarn, mvn, bundler...
-with custom versioning (e.g. last git ref
that changed a yarn.lock file)
-https://www.meshcloud.io/en/2017/05/25/caching-dir
ectories-in-concourse-ci-pipelines/

Scaling to complex Pipelines
Extend your Pipeline with Resources
There’s likely already a
Resource for almost anything
●SCM: git, hg, perforce, ...
●Notifications: Slack,
Twitter, Email, HipChat…
●Deploy: Cloud Foundry,
Kubernetes, BOSH

Scaling to complex Pipelines
Use Resources to update your Team about Build Status

Scaling to complex Pipelines
aggregate: execute steps in parallel

Scaling to complex Pipelines
do: eliminate repetition with YAML Anchors

Scaling to complex Pipelines
Grouping Jobs

Scaling to complex Pipelines
Implement custom Resources

●Sounds scary, but it’s easy. All you need is
○A docker image...
○which supports three executables that consume/return simple
JSON
■check: check if new versions of a resource are available
■in: fetch a specific version of a resource
■out: idempotently push a specific version
●Resources may “nop” operations

End
Johannes Rudolph <[email protected]>


www.meshcloud.io

@meshstack

@meshstack

Links
●Great interactive Tutorial with many Samples
○https://github.com/starkandwayne/concourse-tutorial
●Official Concourse Docs
○https://concourse.ci/
●Setting up Concourse with docker-compose
○https://concourse.ci/docker-repository.html (local install)
○https://www.meshcloud.io/en/2016/12/22/deploying-concourse-ci-on-openstack-usin
g-docker/ (semi production-ready setup)
●Concourse Tricks
○https://github.com/pivotalservices/concourse-pipeline-samples