Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-15387

Design a procedure for updating SQuaSH production instance

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: squash
    • Labels:
      None

      Description

      Procedure for updating the SQuaSH production instance

      Lets use the branch tickets/DM-12345 as and example and pretend that the change is in the squash-bokeh micro service

      1) After implementing a new feature and testing it locally, push all changes to the ticket branch

      cd squash-demo/squash-deployment/squash-bokeh
      git push origin tickets/DM-12345

      2) Exercise the deployment on the squash-demo instance

      Set the kubectl context and deployment namespace to demo

      cd squash-demo/squash-deployment/
      NAMESPACE=demo make switch-namespace

      2.1) Make sure the change works with the current production database

      Clone the squash-db-prod Cloud SQL instance to a new squash-db-demo instance

      Delete the previous squash-db-demo Cloud SQL instance

      2.2) Build a new docker image for the squash-bokeh micro service

      cd squash-bokeh/
      TAG=DM-12345 make build push

      Make a new deployment for the squash-bokeh service

      TAG=DM-12345 make deployment

      2.3) Test the results at https://squash-demo.lsst.codes

      2.4) Assuming everything work as expected and travis tests passes you can merge the change to master.

      3) Make a new deployment of the squash-bokeh micro service to the production instance

      3.1) Set the kubectl context and the deployment namespace to squash-prod

      cd squash-prod/squash-deployment/
      NAMESPACE=squash-prod make switch-namespace

      3.1) Update your local master branch and build a new docker image for the squash-bokeh micro service

      cd squash-bokeh/
      git pull
      TAG=latest make build push

      3.2) deploy to production

      TAG=latest make deployment

        Attachments

          Issue Links

            Activity

            Hide
            jsick Jonathan Sick added a comment -

            Angelo Fausti I like the idea of cloning the production DB and testing against that.

            One thing that might help you is continuous delivery of Docker images to Docker Hub. I'm doing this for my projects and now I no longer do local docker builds and pushes. Check this out:

            Maybe some of that could be reused for SQuaSH?

            Show
            jsick Jonathan Sick added a comment - Angelo Fausti I like the idea of cloning the production DB and testing against that. One thing that might help you is continuous delivery of Docker images to Docker Hub. I'm doing this for my projects and now I no longer do local docker builds and pushes. Check this out: https://github.com/lsst-sqre/ltd-keeper/blob/master/.travis.yml see DEPLOY_DOCKER_IMAGE=true in matrix and make image and make travis-docker-deploy steps https://github.com/lsst-sqre/ltd-keeper/blob/master/Makefile https://github.com/lsst-sqre/ltd-keeper/blob/master/bin/travis-docker-deploy.sh Maybe some of that could be reused for SQuaSH?
            Hide
            afausti Angelo Fausti added a comment -

            Thanks Jonathan Sick, that's a great feedback I will look into that!

            Show
            afausti Angelo Fausti added a comment - Thanks  Jonathan Sick , that's a great feedback I will look into that!

              People

              Assignee:
              afausti Angelo Fausti
              Reporter:
              afausti Angelo Fausti
              Watchers:
              Angelo Fausti, Jonathan Sick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.