Giter Site home page Giter Site logo

eddiewebb / demo-blueskygreenbuilds Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 13.0 4.83 MB

A demo project for CircleCI using Java, Spring, Sauce Labs and SonarQube

Home Page: http://www.blueskygreenbuilds.com/build-info

License: MIT License

Shell 3.25% Java 47.60% HTML 15.41% CSS 6.12% JavaScript 1.31% Python 8.95% HCL 17.36%
circleci circleci2 java cloud-foundry sonarqube saucelabs maven

demo-blueskygreenbuilds's Introduction

Circle CI Demo

Build, Test and Deploy a modern webapp using CircleCI.

Technologies covered:

  • Build a Spring Boot app with Maven (and caching maven repos!)
  • Packaged as docker image (without daemon!) using Google Jib
  • Browser testing with Selenium and Saucelabs (disabled account :( )
  • Static Code Analysis with SonarQube (disabled account :( )
  • Manual Approval/Promotion
  • Canary deployment to Kubernetes cluster using Vamp.io Release Orchestration policies.

CircleCI Maintainability Test Coverage

Testing

To test simple UI functionality we're using Spring Boot's test starter and SauceLabs Connect Tunnel binaries driven through Selenium's WebDriver interface. The use of SauceLabs let's us run several browser combinations in parallel.

You can see these simple tests in HomePagesTests.java

Release Orchestration example

We can use a PaaS/FaaS cluster and canary or blue/green releases for zero-downtime deployments using Blue/Green strategy.

  1. deploy new version of service as container image (i.e. in dockerhub, ecr, etc)
  2. Rollout new image to XX% of traffice, or by cohort
  3. Monitor key metrics like heatlh and activity to determine validity of new version
  4. Automatically fail or proceed rollout.

Viewing

And live app visible on http://blueskygreenbuilds.com

Interesting Things

  • We're using a service account in CircleCI to apply the deployment
  • Traffic is shaped via contour as influence by Vamp policies
  • We grab a visual of the routes from contour and save as artifact in build
  • Spring Boot app is exposing a metrics API that prometheus scrape, which can drive custom policy metrics.

A completed release with healthy metrics

Running locally

This project uses spring boot, so run as you would any other like project to start on port :8080 locally.

mvn spring-boot:run

Demo

See demo-assets

demo-blueskygreenbuilds's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

demo-blueskygreenbuilds's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.