Skip to content

Updating the deployment

Pascal edited this page Jan 18, 2023 · 3 revisions

These are the steps needed to deploy a new version of the service. The service currently runs on a GCE VM (testing.exaworks.org). The first steps you run on your local machine, until you get to the ssh step.

  • [OPTIONAL] If you do not have a clone of the repo, create one:

    git clone [email protected]:ExaWorks/psij-testing-service.git
  • [OPTIONAL] Change directory to the root directory of the repository (exact command might be different depending on what your CWD is):

    cd psij-testing-service
  • [OPTIONAL] Ensure that you are on the main branch:

    git checkout main
  • Update the version (exact numbers will vary, existing releases are at https://github.com/ExaWorks/psij-testing-service/tags):

    echo "0.2.10" > RELEASE
  • Run the release script; this will create a tag named "v0.2.10" and build and publish the docker image (this step may fail if you don't have permission to the docker hub repo - if so, ignore)

    ./release.sh
  • Log into the VM (you will need your SSH keys added to the VM - ask in the exaworks.slack.com#psij channel if needed)

    ssh <username>@testing.exaworks.org
  • Run the upgrade script; this will upgrade both the psij and sdk service to the specified version:

    sudo -- sh -c "cd /opt/psi-j-testing-service/deployment/deploy && ./upgrade.sh 0.2.10"

    where 0.2.10 is the version you want to upgrade to and should match the version specified above in the RELEASE file. You should then see something like this:

    Upgrade from 0.2.9 to 0.2.10 (y/n)?
    y
    Collecting https://github.com/ExaWorks/psi-j-testing-service/archive/refs/tags/v0.2.10.tar.gz
      Downloading https://github.com/ExaWorks/psi-j-testing-service/archive/refs/tags/v0.2.10.tar.gz
         | 21 kB 3.9 MB/s
    Requirement already satisfied: cherrypy in /usr/local/lib/python3.8/dist-packages (from psij-testing-service==0.2.10) (18.6.1)
    [...]
    Requirement already satisfied: zipp>=3.1.0; python_version < "3.10" in /usr/local/lib/python3.8/dist-packages (from importlib-resources; python_version < "3.9"->jaraco.text->jaraco.collections->cherrypy->psij-testing-service==0.2.10) (3.7.0)
    Building wheels for collected packages: psij-testing-service
      Building wheel for psij-testing-service (setup.py) ... done
      Created wheel for psij-testing-service: filename=psij_testing_service-0.2.10-py3-none-any.whl size=18260 sha256=1f8f7c2fc3789b652277c41b16766405f85cecbc2e8597fdf15335f48971667a
      Stored in directory: /tmp/pip-ephem-wheel-cache-yast_ckj/wheels/f8/ef/7c/e3fa803237c04f7abfd9bfac8d20ffc901f9d83b55e4764327
    Successfully built psij-testing-service
    Installing collected packages: psij-testing-service
    Successfully installed psij-testing-service-0.2.10
     * Restarting PSI/J testing service psi-j-testing-service                                                                                                                                                
    1... * Restarting PSI/J testing service psi-j-testing-service                                                                             [ OK ]
    Upgrade from 0.2.9 to 0.2.10 (y/n)?
    y
    Collecting https://github.com/ExaWorks/psi-j-testing-service/archive/refs/tags/v0.2.10.tar.gz
    [...]
    Successfully installed psij-testing-service-0.2.10
     * Restarting PSI/J testing service psi-j-testing-service                                                                                                                                                
    1... * Restarting PSI/J testing service psi-j-testing-service
    

    You will see (and need to confirm) the same process twice, once for the psij dashboard and once for the sdk dashboard.

Clone this wiki locally