You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,15 @@ This is a **Github Flow** boilerplate project using **Quarkus** GraalVM native i
9
9
-[Integration Tests](#integration-tests)
10
10
-[Sonar](#sonar)
11
11
-[Wrapping up developer responsabilities](#wrapping-up-developer-responsabilities)
12
-
-[Heroku DEV environment](#heroku-dev-environment)
12
+
-[Heroku DEV environment](#heroku-dev-environment)
13
13
-[Database](#database)
14
14
-[Api docs](#api-docs)
15
15
-[Quarkus](#quarkus)
16
16
-[Running the application in dev mode](#running-the-application-in-dev-mode)
17
17
-[Packaging and running the application](#packaging-and-running-the-application)
18
18
-[Creating a native executable](#creating-a-native-executable)
19
+
-[Continuous Deployment](#continuous-deployment)
20
+
-[How to do this?](#how-to-do-this)
19
21
20
22
## CICD Workflows in place
21
23
[Github Actions](https://github.com/features/actions) is the CICD tool for this project. Under the directory `.github/worflows` 4 workflows are defined:
@@ -80,7 +82,7 @@ Even though the dashboard will always represent the quality status of master, is
80
82
- Make sure integration tests still work. Introduce some if needed.
81
83
- Make sure the technial debt in Sonar is the same or better when your code is merged.
82
84
83
-
###Heroku DEV environment
85
+
## Heroku DEV environment
84
86
As mentioned before, `master.yml` pipeline will deploy to a DEV heroku environment every time new features are merged into master branch using a `push` mechanism.
85
87
86
88
A so called `Add-on` is already active in Heroku, making a `PostgreSQL` database hosted in AWS available through a connection string provided as `DATABASE_URL` environment variable.
@@ -126,3 +128,23 @@ Or, if you don't have GraalVM installed, you can run the native executable build
126
128
You can then execute your native executable with: `./target/quarkus-github-flow-1.0.0-SNAPSHOT-runner`
127
129
128
130
If you want to learn more about building native executables, please consult https://quarkus.io/guides/building-native-image.
131
+
132
+
## Continuous Deployment
133
+
So the whole project is fine and the DEV environment looks very comfy and so, BUT, what if a real production deployment completely automated is needed, with zero downtime and a serious strategy?
134
+
135
+
Well, that's the reason why I'm adding this section here.
136
+
137
+
A very convenient strategy is the so called [BlueGreenDeployment](https://martinfowler.com/bliki/BlueGreenDeployment.html).
138
+
139
+
For our scenario we will have two exact replicas of the production environment, blue and green (active and inactive). New deployments will be performed over the green (inactive) environment (where the router is not pointing to at the moment), and ensure with our integration and load tests from pipeline that the new deployment is working correctly. Then, the swap can be performed (router points now to green, becoming the active one).
Both rollback and stability should be fine following this pattern.
144
+
145
+
### How to do this?
146
+
Your PROD environments can be created at Heroku in the same way you did for DEV. Deployment can be automated editing the `tag.yaml` workflow including the same heroku deployment stages `master.yaml` is using but for the prod release. Afterwards, you should include also the postman integration tests and locust load tests to ensure environment stability.
147
+
148
+
Now the end clients will not call Heroku prod environments directly, but using the **router** url. This router can be implemented using NGINX web server. Both the configuration and the swap script NGINX would use can be found at `bluegreendeployment` directory.
149
+
150
+
This is a very brief description to just give an insight of how this could be done, but don't hesitate to read further or contact me for more details about this specific approach.
0 commit comments