myspotontheweb / argocd-springboot-demo1

Spring Boot demo application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

springboot-demo1

Spring Boot demo application generated using the Spring Initializr

Getting Started

Software

Install Docker

Using Arkade install additional dependencies

ark get kubectl helm buildx devspace k3d crane jq yq 

Start cluster

k3d cluster create demo1

Build and Deploy

devspace use namespace dev-01
devspace deploy

Cleanup

devspace purge
k3d cluster delete demo1

Install using Helm

This repository pushes both a docker image and an associoated helm chart to Github packages. This enables the software to be installed as follows:

helm upgrade demo1 oci://ghcr.io/myspotontheweb/argocd-workloads-demo/prod/charts/demo1 --version 1.0.14 --install --namespace demo1 --create-namespace

Continuous Integration

flowchart 
    ci(CI engine) --> | CI build |reg1[(Pre-prod Registry)]
    ci --> |Tagged image+chart build| reg1
    reg1 --> |Release promotion| reg2[(Prod Registry)]
    reg1 --> |Pull latest chart| k8spprod(Kubernetes Pre-Prod)
    reg2 --> |Pull latest chart| k8sprod(Kubernetes Prod)
Loading

The CI logic is captured here

A successfull build will trigger sync workflow in the GitOps workloads repo, controller ArgoCD

CI build

When code is merged to "main" branch a Docker image is built and pushed to the Pre-prod Docker registry. This image is tagged using the SHA checksum of the latest Github commit.

Tagged image+chart build

A new version is generated by pushing a tag on the main branch as follows:

git tag vX.Y.Z -a -m "New release"
git push --tags

This results in a new Docker image and chart being pushed into the pre-prod docker registry

Release promotion

When is release is ready to be deployed to production a workflow copies the Docker image and Helm chart from the pre-prod docker registry into the prod docker registry

Pull latest chart

We run two docker registries. One holds the releases for pre-production and the other holds the approved production releases. A tool like ArgoCD allows us to run the latest helm chart on the matching Kubernetes cluster.

Reference Documentation

For further reference, please consider the following sections:

About

Spring Boot demo application

License:Apache License 2.0


Languages

Language:Smarty 40.7%Language:Shell 28.8%Language:Java 19.8%Language:Dockerfile 10.7%