Data Infuser/ Loader ํ๋ก์ ํธ ์ ๋๋ค.
Data Infuser ํ๋ก์ ํธ์์ ์์ฒ ๋ฐ์ดํฐ๋ฅผ ํ๋ก์ ํธ DB๋ด์ ๋ก๋ํ๊ณ , ์์ฒ ๋ฐ์ดํฐ์ Meta data๋ฅผ ์ฝ๋ ๋ชจ๋์ ๋๋ค.
Scheduled Queue๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์์ ์ ์ฒ๋ฆฌํฉ๋๋ค.
- nodeJS v12.16.3
- MySQL 8.0.x
- ormconfig-sample.json์ ๋ณต์ฌํ์ฌ ormconfig.json ์ค์
- property-sample.json์ ๋ณต์ฌํ์ฌ property.json ์ค์
- typeorm global ์ค์น
npm install typeorm -g
- package ์ค์น
npm install
- ํ์ผ ์ ์ฅ์ S3 ๋๋ local file system ๋๊ฐ์ง๊ฐ ์ ํ์ด ๊ฐ๋ฅํฉ๋๋ค.
| ํ์ | ์ค๋ช |
|---|---|
| local | ๋ก์ปฌ ํ์ผ ์์คํ ์ ํ์ผ์ ์ ์ฅํ๋ ๊ฒฝ์ฐ ์ฌ์ฉํฉ๋๋ค. node js ๊ธฐ๋ณธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ธ fs๋ฅผ ์ฌ์ฉํฉ๋๋ค. |
| s3 | AWS s3 ๋๋ ncloud ObjStrg๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ์ฌ์ฉํฉ๋๋ค. aws-sdk๋ฅผ ์ฌ์ฉํ์ฌ ํ์ผ ๊ด๋ฆฌ๋ฅผ ํฉ๋๋ค. |
| ncloud | ์ค์ ๋ฐฉ๋ฒ์ S3์ ๋์ผ. ncloud๋ก ์ค์ ํ๋ ๊ฒฝ์ฐ Ncloud ๊ณต๊ณต์กด Object storage๋ฅผ ์ฌ์ฉํ๋๋ก ์ค์ ํฉ๋๋ค. |
- ํ์ผ ์ ์ฅ์ ์ฌ์ฉ์ ์ค์ ์์
"uploadDist": {
"type": "local",
"localPath": "/Users/chunghyup/projects/api-gen/api-designer/server/upload",
"awsConfigPath": "",
"s3Bucket": ""
}
- S3 ์ ์ฅ์ ์ฌ์ฉ์ ์ค์ ์์
"uploadDist": {
"type": "s3",
"localPath": "",
"awsConfigPath": "./src/config/aws-config.json",
"s3Bucket": "data-infuser-test"
}
ํ๊ฒฝ ๋ณ์๋ฅผ ์ด์ฉํ์ฌ AWS๋ฅผ ์ค์ ํ๋ ๊ฒฝ์ฐ awsConfigPath๋ฅผ 'aws'๋ก ์ค์
| ํ๊ฒฝ๋ณ์ | ์ค๋ช |
|---|---|
| AWS_ACCESS_KEY_ID | aws credential access key id |
| AWS_SECRET_ACCESS_KEY | aws credential secret access key |
npm start
ts-node-dev๋ฅผ ์ด์ฉํ์ฌ ์คํํ๊ธฐ ๋๋ฌธ์ ์ฝ๋ ์์ ํ ์ ์ฅ์ ํ๋ ๊ฒฝ์ฐ ์๋์ผ๋ก ์ฌ์์๋ฉ๋๋ค.
cp property-sample.json property-stage
์คํ ์ด์ง์ฉ property ํ์ผ ์์ฑ ํ ๊ฐ ์ค์
npm run deploy-stage
- Stage ์๋ฒ ์ ๊ทผ ๊ถํ์ด ํ์ํฉ๋๋ค.
Promptechnology - @Homepage - dev@promptech.co.kr
ํ๋ก์ ํธ๋ GPL 2.0 ๋ผ์ด์ผ์ค๋ก ๋ฐฐํฌ๋์์ต๋๋ค. ์์ธํ ์ฌํญ์ LICENSE ํ์ผ์ ํ์ธํด์ฃผ์ธ์.
Distributed under the GPL 2.0 license. See LICENSE for more information.
