Giter VIP home page Giter VIP logo

cicd-kb8s's Introduction

CI/CD example on Kubernetes

Example of Quarkus CI/CD application using Jenkins on Kubernetes

Requirenments

Start the environment

minikube profile cicd
minikube addons enable metrics-server
minikube config set memory 8192
minikube config set cpus 3

minikube start \
  --extra-config=controller-manager.horizontal-pod-autoscaler-downscale-stabilization=30s \
  --extra-config=controller-manager.horizontal-pod-autoscaler-cpu-initialization-period=30s \
  --extra-config=controller-manager.horizontal-pod-autoscaler-sync-period=10s 
minikube ssh -- "mkdir -p /tmp/m2 && sudo chmod 777 /tmp/m2"

kubectl create namespace cicd

git clone https://github.com/rafabene/cicd-kb8s/
cd cicd-kb8s/

Create the Jenkins slave image

cd jenkins-slave
./build-docker.sh

Deploy Jenkins

cd jenkins/

# Build and deploy Jenkins
./deploy-jenkins.sh

# Open Jenkins Console
./open-jenkins.sh

Perform the first build manually using Jenkins. This will enable the SCM polling.

Open the application

cd webstore/
./open-app.sh

If you want to deploy just the application without Jenkins

cd webstore/
mvn package -Pnative -Dnative-image.docker-build=true  -DskipTests
eval $(minikube docker-env)
docker build -t rafabene/cloudnative -f src/main/docker/Dockerfile.native .
kubectl create -f Deployment.yaml -f Service.yaml
./open-app.sh

cicd-kb8s's People

Contributors

rafabene avatar

Watchers

James Cloos avatar  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.