Giter VIP home page Giter VIP logo

simple-java-maven-app's Introduction

simple-java-maven-app

This repository is a CI/CD pipeline example.

This repository uses Git webhooks to trigger a build in a Jenkins installation in a Kubernetes cluster to build/test the Java app and create a Docker image.

Flow:

  • a developer pushes to the "master" branch
  • a Github Webhook calls the build URL (generated by the "Build Authorization Token Root Plugin" plugin with the token)
  • Jenkins starts a build
    • the "Kubernetes" plugin in Jenkins schedules a pod in the Kubernetes cluster to act as an agent (its definition is in the Jenkins file)
  • the post build step takes the .jar file and creates a docker image, pushes it to a Nexus Docker registry and deploys the Helm chart (todo)

There is one Kubernetes installation, created with "minikube". Inside the cluster Jenkins and Nexus are running. There is not any ingress configured since minikube does not expose its IP anyway. Instead, I configured Jenkins and Nexus as NodePort services and exposed those ports using "socat". However, socat only binds to localhost.

There is another container running in the Kubernetes host. (alongside minikube) It is used as a reverse proxy to serve HTTPS certificates (generated by Let's Encrypt) for https://jenkins.tartismaliyiz.com, https://nexus.tartismaliyiz.com and https://docker.tartismaliyiz.com It is based on a fork of NGINX Proxy Manager and run using this CMD: docker run -d --name=nginx-proxy-manager --net=host -v /docker/appdata/nginx-proxy-manager:/config:rw jlesage/nginx-proxy-manager

Nexus is installed using this chart: oteemo-charts/sonatype-nexus Used values are in: nexus-values.yaml

Jenkins is installed using this chart: jenkinsci/jenkins Used values are in: jenkins-values.yaml

Jenkins: https://jenkins.tartismaliyiz.com/ Nexus: https://nexus.tartismaliyiz.com/ Docker Repository Push URL: https://docker.tartismaliyiz.com/ You can contact me to get some demo accounts. (all of the HTTPS certificates are legitimate Let's Encrypt certificates, in fact you can query TXT records to see the obsolete challange)

You can find an overview here of the whole system: https://docs.google.com/presentation/d/1CEEb1Gx7jTTTwxDjCAtq4m0ozR7q0iGtBt95OmqrCK8/edit?usp=sharing

simple-java-maven-app's People

Contributors

mzyil avatar gilesgas avatar

Watchers

James Cloos avatar

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.