Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    • Set up the organization
      • There are unique tokens at the org level that get shared with selected repos. For UC, all repos have access.
        • GH_ACTIONS_PAT - associated with Guest EID 
        • PIP_CONFIG - associated with Guest EID
        • CMP_API_TOKEN - in Stache from CMP team
        • HARBOR_TOKEN - in Stache from CMP team
        • HARBOR_USER - in Stache from CMP team (ours was missing; it was emailed to me)
      • I don't think PIP_CONFIG will need repo-level changes, but it can be done at the repo level if needed. (Repo-level stuff supersedes org-level stuff in GitHub)
    • Set up the repo
      • Set up environments: development, quality, production

Your project's files

    • Add critical files to the project - some of these will help automate GitHub connecting the repo to other pieces of the CMP machinery. Some of these include:
      • .github directory - its contents are critical to GitHub allowing you to run a workflow (deploy) the project. This folder should be in Master to get seen by GitHub, even if you want to deploy a different branch. Adding the directory to Master won't harm Master
      • Workflow
      • Manifests/environment/properties.yml - this is where you specify the name of the secrets file that will be stored in Rancher, in the RUNTIME_SECRETS
        • Make sure to fill in everything you need for all environments (including prod!) in all properties.yaml files before you're ready to deploy to prod! This means deciding the name of your secrets file ahead of time.
      • catalog_info.yml
      • gunicorn.conf.py - this was added in Petitions to avoid inexplicable 504 errors for the first few hours after deployment to qual, and seemed to work.
    • Commit and push these changes to github. Remember that the .github directory and contents need to be in Master for things to work automagically

...

    • To deploy:
      • Go to the Repo's main page in GitHub, and click on the "Actions" tab, then select "Build and Deployment" on the left.
      • Then you want to "Run workflow" on the right. Clicking allows you to choose the branch and environment, and then run (or deploy). This will take a while, because it still hasn't built this image before.
      • Once you see a green check mark, you can click on "Deployments" on the left sidebar and watch the deployment complete
      • A green check mark here indicates completion.
      • If you encounter errors in Build and Deployment, click in to the failed part of the workflow for the stack trace.
      • If you update secrets in Rancher, I think you need to re-deploy to pull the new secrets in to the project.