From 359f2957c1daaaa8ff91be1bfc0e5b5b5717ec1a Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Fri, 21 Feb 2020 17:29:37 +0100 Subject: [PATCH] Use oef_test db for AWS load testing --- bash/rds-connect.bash | 8 ++++---- bash/rds-import.bash | 6 ++++++ config/config.aws.yaml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 bash/rds-import.bash diff --git a/bash/rds-connect.bash b/bash/rds-connect.bash index 1e83ea37..00d1dbec 100755 --- a/bash/rds-connect.bash +++ b/bash/rds-connect.bash @@ -1,6 +1,6 @@ #!/bin/bash -RDSHOST="oef-free-tier.cjsemjfwbreb.eu-central-1.rds.amazonaws.com" -TOKEN="$(aws rds generate-db-auth-token --hostname $RDSHOST --port 3306 --region eu-central-1 --username admin)" -echo $TOKEN -mysql --host=$RDSHOST --port=3306 --ssl-ca=/sample_dir/rds-combined-ca-bundle.pem --enable-cleartext-plugin --user=admin --password=$TOKEN +RDSHOST="oef-micro.cjsemjfwbreb.eu-central-1.rds.amazonaws.com" +echo -n Password: +read -s password +mysql --host=$RDSHOST --port=3306 --user=admin --password=$password diff --git a/bash/rds-import.bash b/bash/rds-import.bash new file mode 100755 index 00000000..77513e1b --- /dev/null +++ b/bash/rds-import.bash @@ -0,0 +1,6 @@ +#!/bin/bash + +RDSHOST="oef-micro.cjsemjfwbreb.eu-central-1.rds.amazonaws.com" +echo -n Password: +read -s password +mysql --host=$RDSHOST --port=3306 --user=admin --password=$password $1 < $2 diff --git a/config/config.aws.yaml b/config/config.aws.yaml index 39f39c30..e9ac5d83 100644 --- a/config/config.aws.yaml +++ b/config/config.aws.yaml @@ -9,7 +9,7 @@ keys: jwt_signing_key: "ytOC>3," orm: - connection: "admin:remaccio1607@tcp(oef-micro.cjsemjfwbreb.eu-central-1.rds.amazonaws.com:3306)/oef_prod" + connection: "admin:remaccio1607@tcp(oef-micro.cjsemjfwbreb.eu-central-1.rds.amazonaws.com:3306)/oef_test" options: "charset=utf8&parseTime=True&loc=Local" automigrate: true reset: false