-
Notifications
You must be signed in to change notification settings - Fork 31
Akvo Flow deployments
We're using trunk based development with short-lived feature branches.
A deployed version can be live or dark.
A live version is a version that is serving our users when they visit https://<org>.akvoflow.org
A dark version is a deployed version that does not get traffic, unless its accessed via a different URL. A dark URL follows this pattern https://VERSION_ID-dot-SERVICE_ID-dot-PROJECT_ID.REGION_ID.r.appspot.com
. Akvo Flow uses only 1 service (default
).
More info at: Google App Engine Overview
Our CI pipeline follows the following logic in reaction to changes pushed our git repository:
Any commit made to a feature branch gets build and tested. We deploy Akvo Flow core classes to Clojars in order to have them available for testing Flow services.
When a feature branch gets merged to master our CI pipeline:
- Build and tests
- Deploy core classes to Clojars
- Deploy the built version to UAT2 live, accessible via: https://uat2.akvoflow.org
This instance can be used for developer testing integrated with all the rest of changes
A tagged version is a candidate version. Similar to other services
we're using the tag name scheme YYYYMMDD-HHmmSS
(e.g. 20200403-073034
).
The CI pipeline do:
- Build and test
- Deploy core classes to Clojars
- Deploy the built version to UAT1 live (accessible via: https://uat1.akvoflow.org)
- Deploy the built version to all production instances in dark
- If we want to test a particular bug-fix/feature in a production instance we must use the dark URL pattern
This allow us to do a regression testing in UAT1.
When we tag a version with the prefix promote-
the CI pipeline:
- Expects that a versions is already deployed,
e.g.
promote-20200403-073034
expects that the version20200403-073034
is already deployed in all instances. - Skips
- Build and test
- Deploy to Clojars
- Deploy to UAT instances
- Migrate the traffic of all production instances to the promoted version
In order rollback to the previous version, you need to execute the deploy script promoting the previous version, e.g.
[akvo-flow]$ ./scripts/deploy/run.sh promote-<previous-version> all
You can get the list of available versions:
gcloud app versions list --project=akvoflow-uat1
You'll get something output like this:
$ gcloud app versions list --project=akvoflow-uat1
SERVICE VERSION.ID TRAFFIC_SPLIT LAST_DEPLOYED SERVING_STATUS
default 1 0.00 2020-03-20T14:01:05+01:00 SERVING
default 20200325-143651 0.00 2020-03-25T18:02:23+01:00 SERVING
default 20200402-183144 0.00 2020-04-02T18:37:38+02:00 SERVING
default 20200402-184619 0.00 2020-04-02T18:52:08+02:00 SERVING
default 20200402-191702 0.00 2020-04-02T19:23:05+02:00 SERVING
default 20200403-062203 1.00 2020-04-03T06:27:30+02:00 SERVING
About Akvo Flow
Akvo Flow API
Developer Guides
- Deployments
- Development tools
- Android emulator setup
- Creating New Dashboard Instances
- Disabling Dashboard Instances
- Adding Translations to Dashboards
- Setup your development environment with IntelliJ IDEA
- Setup your development environment on Windows OS
Technical Specification
Regression Tests