-
Notifications
You must be signed in to change notification settings - Fork 55
[Deprecated] Update MySQL in Cromwell on Azure
NOTE!!! As of 4.0.0 Cromwell on Azure has moved to PostgreSQL. These instructions are relevant for versions prior to 4.0.0
-
Stop CromwellOnAzure while leaving the VM up and running
-
Start MySQL container using the previous version, let it process the logs and shut it down
-
Start latest MySQL container, let it process the update and shut it down
-
Start CoA
-
Connect to Cromwell on Azure VM via SSH. Default CoA deployment creates Network security group with SSH port closed. To connect to a VM follow instructions Connect to a Linux VM.
-
Have 2 terminals with SSH connection open.
-
In terminal 1
-
Stop Cromwell on Azure
sudo systemctl stop cromwellazure
-
List docker containers
sudo docker container ls -a
-
mysql:latest
will be listed there, start itsudo docker run -e MYSQL_ROOT_PASSWORD=<Your MySQL root password> -e MYSQL_DATABASE=<Your MySQL database name> -v /data/mysql:/var/lib/mysql -v /data/cromwellazure/mysql-init:/mysql-init mysql:latest
You can find values for
MYSQL_ROOT_PASSWORD
andMYSQL_DATABASE
in Blob containerconfiguration
that is located in the deployed Storage account. Open filecromwell-application.conf
and search for database sectiondatabase { db.url = "jdbc:mysql://mysqldb/<Your MySQL database name>?<Properties>" db.user = <Your MySQL root user> db.password = <Your MySQL root password> ... }
-
It is supposed to fail. If it keeps running, follow instructions in step 6 to stop the container, and return to terminal 1
-
Find MySQL version that was used to create the log (see above in red), start this version, and let it process the log
sudo docker run -e MYSQL_ROOT_PASSWORD=<Your MySQL root password> -e MYSQL_DATABASE=<Your MySQL database name> -v /data/mysql:/var/lib/mysql -v /data/cromwellazure/mysql-init:/mysql-init mysql:8.0.28
- Switch to terminal 2
-
List docker containers and find CONTAINER ID for MySQL version you just started
sudo docker container ls -a
-
Stop this container
sudo docker container stop a235404427a5
- Switch to terminal 1
-
Check that MySQL shutdown complete
-
Start the latest MySQL image and let it process the update
sudo docker run -e MYSQL_ROOT_PASSWORD=<Your MySQL root password> -e MYSQL_DATABASE=<Your MySQL database name> -v /data/mysql:/var/lib/mysql -v /data/cromwellazure/mysql-init:/mysql-init mysql:latest
- Switch to terminal 2
-
List docker containers and find CONTAINER ID for latest MySQL you just started
sudo docker container ls -a
-
Stop this container
sudo docker container stop 071ee4796cd0
- Switch to terminal 1
-
Check that MySQL shutdown complete
-
Start Cromwell on Azure
sudo systemctl start cromwellazure
- Go to Network security group and close SSH port.
To search, expand the Pages section above.