Back

Andes Post-mission Checklist for Andes Administrators

On the production server

  • Download the SQL file from the production database (e.g., from the server on the vessel)
  • De-active the mission to avoid confusion OR power down the server.
  • Stop recording navigational data and scanmar data (turn-off listeners).
  • Package and download all images from the mission: tar -cvf my_cruise_images.tar /opt/andes_root/andes/media/images
  • Download the image thumbnails

Create a post-production database on andes-db-service

Will be assuming the database name is andes_glf2029001

Bash console
  • upload the SQL file into the instance and set a bash variable for the file: FILE=andes_v3.8_...._mysql.sql
  • set a bash variable for the database: DATABASE=...
  • Then this:
sudo mysql -e "DROP DATABASE $DATABASE;"  # If there is an old version of the db (e.g. from pre-prod), delete it
sudo mysql -e "CREATE DATABASE $DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;"  # create / re-create the database
sudo mysql $DATABASE < $FILE  # load the data

Create an archived mission branch and corresponding docker image

Complete the following commands from a computer with docker build capabilities

# checkout the mission branch (i.e., the branch that the mission was deployed on)
git checkout my_mission_branch  # e.g., `mission/mar`
# store the mission name as a variable. Use archival nomenclature: [glf|iml|arc|mar][YYYY][XYZ] 
MISSION_NUMBER=glf2025001  
git checkout -b archive/$MISSION_NUMBER
# OPTIONAL STEP: pull from stage to incorporate dev work that occurred while mission was underway
git pull origin stage
# push the archival branch to github
git push --set-upstream origin archive/$MISSION_NUMBER
# Now we can create the image and tag it appropriately using the full acr hostname, repository and a useful tag:
docker build -t dmappsdevtestacr.azurecr.io/andes:$MISSION_NUMBER .
#Finally, we authenticate and then push:
docker login dmappsdevtestacr.azurecr.io --username dmappsdevtestacr  # will have to enter pw / access key
docker push  dmappsdevtestacr.azurecr.io/andes:$MISSION_NUMBER
  • Create a kubernetes mission file in the kubernetes git repo in the appropriate folder:
    replicaCount: 1
    missionNumber: $MISSION_NUMBER
    missionName: "verbose-description-no-spaces"
    tier: postprod
    dockerImage: dmappsdevtestacr.azurecr.io/andes:$MISSION_NUMBER
    migrate: "false"
    dbName: name_of_andes_mission_db
    useFakeServices: "false"
    nodePort: .... # [glf=11xx | qc=12xx| mar=13xx| arc=14xx]
    
  • commit changes and push to origin/main
  • log onto iml-science-n0; and do a git pull

Add the thumbnails to the k8s persistant volume (i.e., andes_media NAS) and deploy pod:

  • The andes containers are backended to a SMB share called andes_media. Each node of the k8s cluster has a mounted folder called andes-media and this is that share.
  • Find a clever way to copy the tarball to the share. The address is smb://glfscidm002/andes_media.
  • Be sure to store it in a subdirectory that corresponds to the k8s mission number, e.g., glf2025001
  • extract the tarball via commandline the images to that computer; set bash variable FILE=CAR-...-image-thumbnails.tar
  • extract the tarball to the target dir:tar -xvf $FILE -C ./$MISSION_NUMBER/
  • make sure the images + thumbnails can be found here: //andes_media/$MISSION_NUMBER/images/. There should not be any additional subdirs.
  • goto gulf kubernetes git repo: cd ~/kubernetes and do a git pull
  • run the following to deploy the pod: helm install $MISSION_NUMBER ./andes -f ./andes/missions/.../file.yaml (or better yet, do it through Cruises app)

On the post-production website

  • make sure input streams (Nav, scanmar, etc) are off
  • download the mission export csv
  • download the track csv
  • set the map server location here:
    • Mission Configuration > Time, Dates and Location > Map server domain name >http://glfscidm002.ent.dfo-mpo.ca/maptile_collection
  • test the backups to make sure they work correctly

On DM Apps

  • Import the mission export csv into a new record in the Cruises app
  • Add the mission track to the record
  • Send an email to the chief scientist will all the information
  • Sync up regional catch list with CARL

On Andes Backups NAS share

  • add SQL file to share
  • add SQLite DB to share
  • add images zip file (if applicable)