Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

Continuous Delivery of Microservices using

Jenkins, Spinnaker and Kubernetes

Agenda

  • Overview of our CI/CD architecture and process
  • Dive into our approach to automated testing
  • Review of key discoveries
  • Look into next steps to further improve our CI/CD process
  • Founded in 2004
  • Provides software solutions for the entertainment industry
  • Supports many aspects of business operations
  • Transitioning more and more operations to the cloud

Greg Baker

  • Software Manager at CenterEdge Software
  • Industry Experience in Finance, Healthcare, Pharmaceuticals and Entertainment
  • Real-Time Data and High Availability Software

Brant Burnett

  • Systems Architect at CenterEdge Software
  • Couchbase Community Expert
  • Open source contributor

@btburnett3

Pull Request

Production Pods

Approve & Merge

Docker

Trigger

ConfigMaps /

Secrets

Primary Build

Master Branch

Branch Strategy

  • Regularly merge into master branch
  • No long-lived feature branches
  • Testing happens before the merge

Continuous Integration

  • Output container artifacts to private Docker registry
  • Output static content artifacts to S3
  • Credentials stored in Jenkins, not the code
  • Do all work requiring tools in Docker containers
  • Use "Jenkinsfile" pipelines defined in the repository
  • Similar options in TravisCI, Appveyor, Azure, and more

Spinnaker Pipeline

  • Triggered when new image is pushed to Docker registry
  • We use Google Container Registry for _catalog support
  • Uses the Kubernetes v1 provider (v2 wasn't an option yet)
  • Red/Black (aka Blue/Green) Deployment
  • Succeeds when Pod liveness and readiness probes pass
  • Still balancing the nature of "healthy" for each type

Configuration

  • We store most configuration in the repository
  • Some configuration is better in Kubernetes
  • Connection info for shared infrastructure
  • Security credentials, shared keys, etc
  • Configuration is applied via env variables in pipelines
  • We plan to switch to volume mounts

Pull Request

Templates

Production Pods

Approve & Merge

Unit Tests +

Iso Integration Tests

Docker

Trigger

ConfigMaps /

Secrets

Primary Build

Master Branch

Smoke Tests

Pre-production Pods

Unit & ISO Integration Tests

Pull Request

ISO Integration Tests

Unit Tests

Smoke Tests

{ REST }

Pre-Production

Smoke Tests

API Gateway

{ SUCCESS }

Production

Spinnaker Pipelines

The UI is really easy to use. You just create a new application, then add a new pipeline. Add all the stages like the others and just tweak the values. Takes a few hours - easy.

What about when we have a few hundred of these of things and we need to change the settings for all of them?

Spinnaker Pipeline Templates

Template

Spinnaker Pipeline

Configs

Spinnaker Pipeline Benefits

  • Increase Speed
  • Eliminate Duplication
  • Reduce Errors & Maintenance Costs
  • Consolidate Pipeline Updates
  • Lower Learning Curve
  • Version Controlled

What We Learned

  • Focus Your Testing Effort
  • Pipeline Templates!
  • Code First Swagger Definitions
  • Automate Everything!

Big Wins

Code Commit to Deployment

Big Wins -

8 Minutes

New Spinnaker Applications

Big Wins -

Time to create new Spinnaker Applications and pipelines used to take us:

1.5 Days

Thanks to pipeline templates, it now takes only:

20 Minutes

New Microservices

Big Wins -

Time to create new Microservice Applications used to take us:

2 - 3 weeks

Thanks to code first API definitions and automation, we're down to:

2 - 3 Days

Summary

Big Wins -

By investing our tools and infrastructure, we've increased developer productivity 300%

New feature code can be in production within 4-5 Days

Feature enhancements to existing code can be in production in a few hours.

Bug fixes in production in 10 - 15 minutes.

Future Plans

Areas for Improvement

  • Template Partials
  • Volume Mount Configuration
  • Move to Spin CLI. . . ?
  • Improved Baseline Monitoring & Automated Rollbacks
  • Canary Deployments

Code Samples

Code Samples

https://github.com/CenterEdge/SpinnakerSummit2018

https://github.com/spinnaker/orca

https://github.com/spinnaker/roer

Thanks!

Thank You!

  • The Spinnaker Team

  • All the Spinnaker Open Source Contributors

  • Team at Modev

Questions?

Questions

Learn more about creating dynamic, engaging presentations with Prezi