Automatic Deployment
Most of our projects (see list below) have automatic deployment enabled.
We are using a pull based deployment, where we publish new versions to the appropriate Docker / APT repositories and nodes are automatically pulling the new version.
We can distinguish two types of servers / nodes:
| Managed nodes | Validator OS nodes | |
|---|---|---|
| Hosted by | Mosaic Chain team | Users / Validators |
| Installed with | Chain Server Install | Validator OS ISO |
| Update Period | Every 10 minutes | Every 24 hours |
Steps
1. Canary Release
When you push a new commit to the main branch, the CI/CD automatically builds a new Docker image and an APT package.
- For Docker we create a new Docker image in the
europe-docker.pkg.dev/mosaicchain-general/docker-registryDocker registry with the short commit hash (8 characters) as tag. We also tag this image with thelatesttag. - For APT we build a new APT package and push it to the
https://europe-apt.pkg.dev/projects/mosaicchain-general/apt-canary-repositoryrepository. The package version is set up in the following way:- Format:
MAJOR_VERSION.MINOR_VERSION.FIX_VERSION.CI_BUILD_INDEX+SHORT_COMMIT_HASH(e.g.0.7.0.252+b1039488) MAJOR_VERSION,MINOR_VERSIONandFIX_VERSIONparts are managed manually.CI_BUILD_INDEXis an auto incremented integer.SHORT_COMMIT_HASHis the first 8 character of the Git commit's hash.
- Format:
2. Testnet Release
We have a manual CI/CD job to "promote" these canary releases to testnet.
- For Docker: We tag the Docker image created in the previous step with the
testnettag. - For Debian: We copy the APT package to the
https://europe-apt.pkg.dev/projects/mosaicchain-general/apt-testnet-repository
After successful deployment, a new approve-testnet manual job will be available that is a prerequisite for Devnet deployment.
3. Devnet Release
Works the same way as Testnet Release.
- For Docker: We tag the Docker image created in the previous step with the
devnettag. - For Debian: We copy the APT package to the
https://europe-apt.pkg.dev/projects/mosaicchain-general/apt-devnet-repository
After successful deployment, a new approve-devnet manual job will be available that is a prerequisite for Mainnet deployment.
4. Mainnet Release
Works the same way as Testnet Release.
- For Docker: We tag the Docker image created in the previous step with the
mainnettag. - For Debian: We copy the APT package to the
https://europe-apt.pkg.dev/projects/mosaicchain-general/apt-mainnet-repository
Projects
- Blockchain (excluding runtime)
- Indexer
- Gateway Backend
- VPN Controller Backend
- VPN Controller Frontend
- Explorer
- Telemetry Backend
- Telemetry Frontend
- Minting Service
- Admin Backend
- Metrics
- Faucet Backend
- Faucet Frontend