Skip to main content

Reading time: 10 minutes

Termius setup guide

This guide provides instructions on how to download, install configure and use Termius for our three environments: development (Mars), pre-release (Venus), and production.

Prerequisites

  1. Download Termius and create an account: Termius Download
  2. Ask Dima or AntonS for PEM keys.

Configuring environments

  1. Open Termius.
  2. Open Settings ( icon in the top left) -> Keychain
  3. Add PEM keys in the Keychain (Key -> New Key -> Fill in the fields and add some labels like “mars-frontend” and “venus-frontend”)
  4. Add a new host and fill in these fields:
  • Domain
  • Username
  • Select the correct PEM key. (keys for Mars and Venus are the same for all the platforms)

Students-web

EnvironmentDomainUserPEM
Marsstudents.eu-north-1.mars.matteappen.seubuntumars-frontend.pem
Venusstudents.eu-north-1.venus.matteappen.seubuntuvenus-frontend.pem
Production EUstudents.eu-north-1.matteappen.seubuntu
Production USstudents.us-east-1.matteappen.seubuntu

Teachers-web

EnvironmentDomainUserPEM
Marsteachers.eu-north-1.mars.matteappen.seubuntumars-frontend.pem
Venusteachers.eu-north-1.venus.matteappen.seubuntuvenus-frontend.pem
Production EUteachers.eu-north-1.matteappen.seubuntu
Production USteachers.us-east-1.matteappen.seubuntu

Auth-web

EnvironmentDomainUserPEM
Marsapp.eu-north-1.mars.matteappen.seubuntumars-frontend.pem
Venusapp.eu-north-1.venus.matteappen.seubuntuvenus-frontend.pem
Production EUapp.eu-north-1.matteappen.seubuntu
Production USapp.us-east-1.matteappen.seubuntu

District-dash

EnvironmentDomainUserPEM
Marsdistrict.eu-north-1.mars.matteappen.seubuntumars-frontend.pem
Venusdistrict.eu-north-1.venus.matteappen.seubuntuvenus-frontend.pem
Production EUdistrict.eu-north-1.magmamath.comubuntu
Production USdistrict.us-east-1.magmamath.comubuntu

Releasing changes

Before releasing any changes, it’s important to ensure that the build is successful. Here are the steps to follow:

  1. Check for a Successful Build:

    • Monitor the build status on Amplify, repository Github or devbots channel on Slack for build notifications.
  2. Releasing to Mars or Venus:

    • Once you decide to release any of those environments simply connect to already created hosts and connect to the server and run this command:

./update-app-version.sh latest - this will release changes on latest commit.

or

./update-app-version.sh c6fdb89f9d9af41c3829decd20b77a8fcb5c1369 - commit hash you want to use for releasing. It is helpful in case of fast rollbacks since you do not have to wait for a build to finish - simply use the previous commit that worked.

  1. Releasing to Production:
    • Merge changes to the master branch and wait for the build to pass.
    • Draft a new release and create a tag for it.
    • Connect to Production hosts and run the script with the new tag version from the Github draft for example: ./update-app-version.sh v1.5.6, do it for both environments US and EU.

Remember, releasing changes to production environments should be done cautiously and typically during designated release windows to minimize the impact on users (check Magma calendar to see release windows) and double-check with PM.

Additional notes

  • 🚨⚠️ Ensure to not leak PEM keys and keep them very secure. It is super sensitive data that cannot be leaked. 🚨⚠️
  • If you encounter any issues, reach out to Dima (or AntonS) on Slack.