DevOps with JHipster

Continuous Integration and Delivery

Pascal GRIMAUD

Java Consultant

Open Source Developer

@pascalgrimaud
github.com/pascalgrimaud

Summary

  • JHipster Continuous Integration
  • How JHipster can help DevOps teams

Part 1

JHipster Continuous Integration

JHipster Organization
on

  • More than 50 projects
  • Top languages
    • Java
    • JavaScript
    • Shell
    • HTML
    • TypeScript

JHipster Organization

 Main projects

  • generator-jhipster
  • jhipster.github.io
  • jdl-studio
  • jhipster-registry
  • jhipster-online

JHipster Organization

 Libraries

  • ng-jhipster
  • react-jhipster
  • jhipster-core
  • jhipster (lib)
  • jhipster-uml

JHipster Organization

 Sample applications

  • jhipster-sample-app-X (18 apps)
  • jdl-samples

JHipster Organization

 Tools

  • jhipster-console
  • jhipster-devbox
  • jhipster-ide
  • chocolatey-package
  • jhipster-oh-my-zsh-plugin
  • jhipster-fisherman-plugin

Continuous Integration

  •  What do we use ?
  •  What happens when someone summits a PR ?
  •  What happens when it's merged into master ?

  • Travis CI is free for Open Source
  • Each push will trigger 15 builds
  • More than 12200 builds since 2013

What do we need to test ?

  • The installation of tools
  • The generator itself
  • The generated application
    • Backend tests
    • Frontend tests
    • End-to-end tests

Hard to test everything

  • Front : Angular / React
  • Back : Maven / Gradle
  • Security : JWT, OAuth2, Session
  • CSS : sass
  • Cache
  • Database : MySQL, MariaDB, PostgreSQL, MongoDB, Cassandra, CouchBase
  • Option : Kafka, ElasticSearch, WebSocket
  • Microservices : Eureka, Consul, UAA, OAuth2

 Daily builds at Hipster-Labs

 Tips for contributors

Link your GitHub account to Travis CI 

  • Work on your fork
  • Push in a branch of your fork
  • A build will be triggered in your Travis CI
  • If everything passed, you can pull request

Docker Hub

Overview

Road Map

Use other free CI

to increase the number of builds to test JHipster with Windows

SonarCloud organization

  • Migrate to Organization
  • Add more applications

Other tests


About releases ?

  • Release notes
  • Tweet

Our Dream

    Automate:
  • Tag
  • Push to NPM
  • Generation of all jhipster-sample-app-X
  • DevBox

Part 2

How JHipster can help DevOps teams

Setting up Continuous Integration

  • Use CICD Sub Generator
  • Answer all questions

Choose your pipeline

  • Jenkins 2
  • Travis CI
  • GitLab CI
  • CircleCI (v1)

Tasks / Integrations to include

  • Artifactory
  • Sonar Analyze
  • 🐳 Docker Image
  • Deploy to Heroku

Demo

GitHub

CICD Sub Generator

Jenkins 2

JFrog Artifactory

Sonar Analyze

Slides: pascalgrimaud.github.io/jhipster-conf-2018