- ์ด ๋ฒ์ ์ ๋ฌธ์๋ ๋ณด๊ด๋์ด ๋ ์ด์ ์ง์๋์ง ์์ต๋๋ค. ์ต์ ๋ฌธ์ ๋ฅผ ์ฐธ์กฐํ์ฌ Atlas CLI ๋ฒ์ ์ ์ ๊ทธ๋ ์ด๋ ํ๋ ๋ฐฉ๋ฒ์ ํ์ต ๋ณด์ธ์.
์ง์ ๋ ์ผ์ ์ค์ง๋ MongoDB cluster๋ฅผ ์์ํฉ๋๋ค.
๊ณต๊ฐ ๋ฏธ๋ฆฌ ๋ณด๊ธฐ: MongoDB Atlas ๊ด๋ฆฌ์ API ์์ ์๋์ผ๋ก ์์ฑ๋ Atlas API ํ์ ๋ช ๋ น์ ๊ด๋ฆฌ์ API ์ ๋ํ ์ ์ฒด ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ฉฐ ํ์ฌ ๊ณต๊ฐ ๋ฏธ๋ฆฌ ๋ณด๊ธฐ๋ก ์ ๊ณต๋ฉ๋๋ค( ํผ๋๋ฐฑ https://feedback.mongodb.com/forums/930808-Atlas-cli). ๊ด๋ฆฌ์ API ๊ธฐ๋ฅ์๋ ์์ฒด ์ถ์ํ๋ค ์๋ช ์ฃผ๊ธฐ๊ฐ ์์ผ๋ฉฐ, ์ด๋ ์ ๊ณต๋ API ์๋ํฌ์ธํธ ๋ฌธ์ ๋งํฌ๋ฅผ ํตํด ํ์ธํ ์ ์์ต๋๋ค.
์ด ๋ช ๋ น์ ์ฌ์ฉํ๋ ค๋ฉด ํ๋ก์ ํธ cluster ๊ด๋ฆฌ์ ์ญํ ์ด ์๋ ์ฌ์ฉ์ ๊ณ์ ๋๋ API ํค๋ก ์ธ์ฆํด์ผ ํฉ๋๋ค. Atlas๋ M10+ ํด๋ฌ์คํฐ์ ๋ํด์๋ง ์ด ๋ช ๋ น์ ์ง์ํฉ๋๋ค.
๊ตฌ๋ฌธ
atlas clusters start <clusterName> [options]
arguments
์ด๋ฆ | ์ ํ | ํ์ ์ฌํญ | ์ค๋ช
|
|---|---|---|---|
clusterName | ๋ฌธ์์ด | true | ์์ํ cluster์ ์ด๋ฆ์ ๋๋ค. |
์ต์
์ด๋ฆ | ์ ํ | ํ์ ์ฌํญ | ์ค๋ช
|
|---|---|---|---|
--autoScalingMode | ๋ฌธ์์ด | ๊ฑฐ์ง | ํด๋ฌ์คํฐ ํ์ฅ๋๋ ๋ชจ๋์ ๋๋ค. ์ ํจํ ๊ฐ์ clusterWideScaling ๋๋ standaloneShardScaling์ ๋๋ค. ์ด ๊ฐ์ ๊ธฐ๋ณธ๊ฐ์ 'clusterWideScaling'์ ๋๋ค. |
-h, --help | ๊ฑฐ์ง | ์์ ๋์๋ง | |
-o, --output | ๋ฌธ์์ด | ๊ฑฐ์ง | ์ถ๋ ฅ ํ์์ ๋๋ค. ์ ํจํ ๊ฐ์ json, json-path, go-ํ ํ๋ฆฟ ๋๋ go-ํ ํ๋ฆฟ ํ์ผ์ ๋๋ค. ์ ์ฒด ์ถ๋ ฅ์ ๋ณด๋ ค๋ฉด -o json ์ต์ ์ ์ฌ์ฉํฉ๋๋ค. |
--projectId | ๋ฌธ์์ด | ๊ฑฐ์ง | ์ฌ์ฉํ ํ๋ก์ ํธ๋ฅผ ์๋ณํ๋ 16์ง์ ๋ฌธ์์ด์ ๋๋ค. ์ด ์ต์ ์ ๊ตฌ์ฑ ํ์ผ ๋๋ ํ๊ฒฝ ๋ณ์์ ์ค์ ์ ์ฌ์ ์ํฉ๋๋ค. |
์์๋ ์ต์
์ด๋ฆ | ์ ํ | ํ์ ์ฌํญ | ์ค๋ช
|
|---|---|---|---|
-P, --profile | ๋ฌธ์์ด | ๊ฑฐ์ง | ๊ตฌ์ฑ ํ์ผ ์์ ์ฌ์ฉํ ํ๋กํ์ ์ด๋ฆ์ ๋๋ค. Atlas CLI ์ ํ๋กํ์ ๋ํด ํ์ต https://dochub.mongodb.org/core/atlas-cli-save-connection-settings๋ฅผ ์ฐธ์กฐํ์ธ์. |
์ถ๋ ฅ
๋ช ๋ น์ด ์ฑ๊ณตํ๋ฉด Atlas CLI๋ ๋ค์ ์ํ๊ณผ ์ ์ฌํ ์ถ๋ ฅ์ ๋ฐํํฉ๋๋ค. ๊ดํธ ์์ ๊ฐ์ ์ฌ์ฉ์์ ๊ฐ์ ๋ํ๋ ๋๋ค.
Starting cluster '<Name>'.
์์
# Start a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: atlas clusters start myCluster --projectId 5e2211c17a3e5a48f5497de3 --output json