Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piomin/sample-spring-bluegreen-with-db
Demo applications and Kubernetes manifests for illustrating blue-green deployment strategy with database schema changes using tools like Liquibase and Istio
https://github.com/piomin/sample-spring-bluegreen-with-db
bluegreen-deployment database-migrations istio jpa kubernetes liquibase liveness readiness spring-boot
Last synced: 4 months ago
JSON representation
Demo applications and Kubernetes manifests for illustrating blue-green deployment strategy with database schema changes using tools like Liquibase and Istio
- Host: GitHub
- URL: https://github.com/piomin/sample-spring-bluegreen-with-db
- Owner: piomin
- Created: 2021-02-18T11:11:51.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T16:53:08.000Z (4 months ago)
- Last Synced: 2024-10-26T00:01:30.539Z (4 months ago)
- Topics: bluegreen-deployment, database-migrations, istio, jpa, kubernetes, liquibase, liveness, readiness, spring-boot
- Language: Java
- Homepage: https://piotrminkowski.com/
- Size: 54.7 KB
- Stars: 18
- Watchers: 2
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Blue-green deployment with a database on Kubernetes [](https://twitter.com/piotr_minkowski)
[](https://circleci.com/gh/piomin/sample-spring-bluegreen-with-db)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-bluegreen-with-db)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-bluegreen-with-db)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-bluegreen-with-db)
[](https://sonarcloud.io/dashboard?id=piomin_sample-spring-bluegreen-with-db)Detailed description can be found here: [Blue-green deployment with a database on Kubernetes](https://piotrminkowski.com/2021/02/18/blue-green-deployment-with-a-database-on-kubernetes/)
## Quick Start using Minikube
> For Windows, all minikube and kubectl commands should be run in an Administrator CMD shell.
### Install and start minikube
`minikube start`
Start the minikube dashboard
`minikube dashboard`
> Consider doing this in another shell as it
#### Install Istio on the host machine and install in Minikube
Installation instructions for Istio are [here.]((https://istio.io/latest/docs/setup/install/istioctl/))
`istioctl install`
### Install Postgres in Minikube
`kubectl create -f postgresql-deployment.yaml `
### Create a Liquibase container with environment information
> See the Dockerfile for more details
`docker build -t liquibase/bg-k8s-liquibase .`
`docker push liquibase/bg-k8s-liquibase`
> You will want to change this to match your Docker Hub username.
### Create Liquibase Config Maps and Jobs
> The config map is the Liquibase changelog.
`kubectl create -f liquibase-cm-v1.yaml`
> The Job runs liquibase with the config map.
`kubectl create -f liquibase-job-v1.yaml`
> Repeat for Version 2
`kubectl create -f liquibase-cm-v2.yaml`
`kubectl create -f liquibase-job-v2.yaml`