Project:Release Portal
The portal-compose repository configures the deployment of all the different containers and defines how they interact with each other. The most important files for the portal deployment are:
The specific images and tags that are pulled for each service are defined at the top of each of these two files.
The Mediawiki image is additionally configured through an attached volume that reads the contents defined in the mediawiki directory. This directory contains mainly the php files that configure each extension in the MediaWiki image.
Modifying portal-compose
Any change in the portal-compose requires a Pull Request that has to be reviewed by another member to enable the merge to the main branch.
Deploying a new version
Deploy to staging
Once the changes have been merged to the main branch it is possible to deploy it to the staging server. It is recommended to do this before deploying to production to make sure nothing breaks.
The deployment process for staging is defined in the srv-mardi03 repository. This contains a deploy script that logs into the staging server and pulls the main branch of portal-compose.
To trigger the deployment just navigate to the Actions tab in the srv-mardi03 repository, click ZIB Deployment via GitHub Actions in the left column and then Run workflow.
Deploy to production
It is only possible to deploy tagged versions of the main branch to the production server. Thus, before deploying to production the latest state in the main branch has to be tagged with the latest version number.
- 1) Make sure you are in the main branch and have pulled the latest state
git checkout main git pull
- 2) Create a new tag with the latest version (check the latest released version and just increase it by one number.
git tag -s <tag_version> git push origin <tag_version>
- 3) Create a new release by 'Draft new release' in Releases. Select the tag number you've just pushed and click 'Generate release notes' and 'Publish release'.
- After the latest release has been created it can be deployed in the production server. This follows the same logic used in staging but with a deploy script defined in the srv-mardi02 repository. This deploy script contains a line such as
git checkout v1.4.65
- that defines the version to be deployed. To deploy a new version just update the script with the right version and push the changes to the repository. The push of new code to main will automatically trigger a GitHub action to apply the latest version of the deploy script.