pipeline-frameworks-cromwell-03.数据库配置

mysql 镜像获取

https://github.com/PSC-PublicHealth/mysql-singularity-container/blob/master/README.md

启动singularity 服务

一次执行如下shell

  1. sh instance.sh
1
2
3
4
5
6
#!/bin/bash
mkdir -p ${PWD}/mysql/var/lib/mysql ${PWD}/mysql/run/mysqld
/share/app/singularity/3.8.1/bin/singularity instance start \
--bind ${PWD}/mysql/var/lib/mysql/:/var/lib/mysql \
--bind ${PWD}/mysql/run/mysqld:/run/mysqld \
./mysql.simg mysql
  1. sh mysql_server.sh 启动mysql 服务
1
/share/app/singularity/3.8.1/bin/singularity run instance://mysql
  1. 创建文件 cromwell.sql
1
2
3
4
5
6
CREATE DATABASE IF NOT EXISTS cromwell default charset utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS 'cromwell'@'localhost' IDENTIFIED BY 'cromwell';
GRANT all privileges ON cromwell.* TO 'cromwell'@'localhost';
grant all privileges on *.* to 'root'@'127.0.0.1' identified by 'root';
grant all privileges on *.* to 'cromwell'@'127.0.0.1' identified by 'cromwell';
flush privileges;
  1. sh cromwell_init.sh 创建mysql中的cromwel调度相关表结构
1
/share/app/singularity/3.8.1/bin/singularity exec instance://mysql mysql < cromwell.sql
-------------本文结束感谢您的阅读-------------