From bed13f5341b4b0fdb6d07f0fed1e9883f64f81b5 Mon Sep 17 00:00:00 2001 From: Kashiwazaki Tetsuya Date: Wed, 3 Aug 2022 16:10:14 +0900 Subject: [PATCH 1/3] nautible/issues#4 - doc for register master data. --- testdata.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 testdata.md diff --git a/testdata.md b/testdata.md new file mode 100644 index 0000000..5172e83 --- /dev/null +++ b/testdata.md @@ -0,0 +1,35 @@ +# 動作確認用テストデータ +## マスターデータ登録 +### a) ローカル環境 +- ローカル環境では以下のDockerfileでDB構築時に自動的にマスターデータを登録する。 +``` +nautible-app-ms-product-build/src/test/docker/database/Dockerfile +``` + +### b) DEV環境 +- AWS や Azure 環境では、mysql-client の pod を起動して、product の DB と接続を行い、マスターデータを登録する。 + +#### mysql-client の pod 起動 / bash 起動 +``` +kubectl run mysql-client -n nautible-app-ms -it --rm --image=mysql:5.7 --restart=Never -- /bin/bash + +※ bash を exit 後は、pod は削除される +``` + +#### AWS での DB 接続 +``` +mysql -h product-db.vpc.nautible-dev.com -u root -p +rootpassw0rd +``` + +#### Azure での DB 接続 +``` +mysql -h product-fs.product-fs.private.mysql.database.azure.com -u nautible_root -p +Rootpassw0rd +``` + +#### 実行する DDL / DML +``` +nautible-app-ms-product-build/src/main/database/01.schema-product.sql +nautible-app-ms-product-build/src/main/database/02.data-product.sql +``` From 8bedffdb6eb8b960642f605cb69295ce8dc4af66 Mon Sep 17 00:00:00 2001 From: Kashiwazaki Tetsuya Date: Fri, 5 Aug 2022 12:07:56 +0900 Subject: [PATCH 2/3] nautible/issues#4 - doc for register master data. --- testdata.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testdata.md b/testdata.md index 5172e83..49934ce 100644 --- a/testdata.md +++ b/testdata.md @@ -21,12 +21,14 @@ kubectl run mysql-client -n nautible-app-ms -it --rm --image=mysql:5.7 --restart mysql -h product-db.vpc.nautible-dev.com -u root -p rootpassw0rd ``` +_※ ユーザ、パスワードは AWS Secrets Manager で管理_ #### Azure での DB 接続 ``` mysql -h product-fs.product-fs.private.mysql.database.azure.com -u nautible_root -p Rootpassw0rd ``` +_※ ユーザ、パスワードは Azure Key Vault で管理_ #### 実行する DDL / DML ``` From d7e64c189c1e2717d2084c9f167109b682023476 Mon Sep 17 00:00:00 2001 From: Kashiwazaki Tetsuya Date: Fri, 5 Aug 2022 15:10:44 +0900 Subject: [PATCH 3/3] nautible/issues#4 - fix review pointed out. --- testdata.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testdata.md b/testdata.md index 49934ce..9ce1898 100644 --- a/testdata.md +++ b/testdata.md @@ -18,15 +18,15 @@ kubectl run mysql-client -n nautible-app-ms -it --rm --image=mysql:5.7 --restart #### AWS での DB 接続 ``` -mysql -h product-db.vpc.nautible-dev.com -u root -p -rootpassw0rd +mysql -h product-db.vpc.nautible-dev.com -u -p + ``` _※ ユーザ、パスワードは AWS Secrets Manager で管理_ #### Azure での DB 接続 ``` -mysql -h product-fs.product-fs.private.mysql.database.azure.com -u nautible_root -p -Rootpassw0rd +mysql -h product-fs.product-fs.private.mysql.database.azure.com -u -p + ``` _※ ユーザ、パスワードは Azure Key Vault で管理_