Skip to content

How to upgrade XPRESSO to v21.1

Perdita edited this page Feb 4, 2021 · 18 revisions

Steps to upgrade:

  1. docker-compose stop results results-beat results-celery && docker-compose rm results results-beat results-celery

  2. git pull

    • You may have local changes to the following files or more:
      • docker-compose.yml
      • env/database.env
      • initializers/settings.yml
      • ...
    • make sure to git stash, git pull, then git stash apply (to pull and then apply your changes)
  3. Create database for new Aggregator service - s3_aggregator

    • docker-compose exec database bash
    • mysql -u root -p
    • enter your root password (same as MYSQL_ROOT_PASSWORD in env/database.env)
    • execute the following (replace s3_admin with your user if different):
      CREATE DATABASE s3_aggregator;
      GRANT ALL PRIVILEGES ON `s3_aggregator`.* TO 's3_admin'@'localhost'   WITH GRANT OPTION;
      GRANT ALL PRIVILEGES ON `s3_aggregator`.* TO 's3_admin'@'192.168.66.%'   WITH GRANT OPTION;
      
    • exit (twice - shell and container) - back to root
  4. Register new service

    • docker-compose exec requests bash

    •   curl -X POST -H "Content-Type: application/json" -d '{"name": "aggregator", "url": "http://aggregator:8000/aggregator/api/", "description": "A service for aggregating XPRESSO cross group requests."}' http://management:8000/management/api/v1/settings/microservices
      
    •   curl -X PATCH -H "Content-Type: application/json" -d '{"settings":{"DATABASES": { "default": {"NAME": "s3_aggregator"} },"TOPIC":{"name":"s3_aggregator","key": "aggregator_data"},"REQUEST_ID_LENGTH":10,"REQUEST_PREFIX": "AGG"},"url":"http://aggregator:8000/aggregator/api/"}' http://management:8000/management/api/v1/settings/microservices/aggregator
      
  5. Bring up containers

    • docker-compose down
    • docker-compose pull
    • docker-compose up -d
Clone this wiki locally