구성 파일을 사용하여 Atlas 클러스터 만들기
이 페이지의 내용
이 튜토리얼에서는 Atlas CLI 명령을 사용하여 구성 파일에서 새 Atlas 클러스터를 생성하는 방법을 보여 줍니다. 구체적으로 다음과 같은 방법을 보여줍니다.
기존 Atlas cluster 의 구성 설정을 가져오고 atlas cluster 설명 명령을 사용하여 구성 파일에 설정을 저장합니다.
Atlas cluster 생성 명령을 사용하여 구성 파일에서 cluster를 Atlas 생성합니다.
전제 조건
시작하기 전에 다음이 필요합니다.
기존 클러스터 설정을 검색하고 새 클러스터를 생성하려는 Atlas 조직 및 프로젝트의 ID가 포함 된 프로필 입니다.
구성 파일에서 Atlas 클러스터 만들기
이 섹션의 절차에 따라 구성 파일을 직접 수동으로 생성하는 대신 기존 클러스터에서 설정을 내보내 새 클러스터를 쉽게 생성할 수 있습니다.
기존 클러스터 구성 설정을 파일로 내보내기
1
아직 연결하지 않았다면 프로그래밍 방식의 액세스를 위해 Atlas 계정에 연결하세요.
자세한 내용 은 Atlas CLI에서 연결을 참조하세요.
(선택 사항) 새 클러스터의 구성 파일 편집
1
텍스트 편집기에서 JSON 파일을 열어 구성 설정을 확인합니다.
예제
다음 예시에서는 vi
편집기를 사용하여 myCluster.json
파일에서 mySandbox
라는 이름의 M10
클러스터에 대한 복제본 세트 설정을 확인합니다.
vi myCluster.json
1 { 2 "backupEnabled": true, 3 "biConnector": { 4 "enabled": false, 5 "readPreference": "secondary" 6 }, 7 "clusterType": "REPLICASET", 8 "connectionStrings": { 9 "standard": "<connection-string>" 10 }, 11 "diskSizeGB": 10, 12 "encryptionAtRestProvider": "NONE", 13 "groupId": "<group-id>", 14 "id": "<64403dd1f2a6b45e71527d5a>", 15 "mongoDBMajorVersion": "6.0", 16 "mongoDBVersion": "6.0.5", 17 "name": "mySandbox", 18 "paused": false, 19 "pitEnabled": true, 20 "stateName": "IDLE", 21 "replicationSpecs": [ 22 { 23 "numShards": 1, 24 "id": "64403dbb0a052449df3d04ae", 25 "zoneName": "Zone 1", 26 "regionConfigs": [ 27 { 28 "analyticsAutoScaling": { 29 "diskGB": { 30 "enabled": true 31 }, 32 "compute": { 33 "enabled": true, 34 "scaleDownEnabled": true, 35 "minInstanceSize": "M10", 36 "maxInstanceSize": "M40" 37 } 38 }, 39 "analyticsSpecs": { 40 "diskIOPS": 3000, 41 "ebsVolumeType": "STANDARD", 42 "instanceSize": "M10", 43 "nodeCount": 0 44 }, 45 "electableSpecs": { 46 "diskIOPS": 3000, 47 "ebsVolumeType": "STANDARD", 48 "instanceSize": "M10", 49 "nodeCount": 3 50 }, 51 "readOnlySpecs": { 52 "diskIOPS": 3000, 53 "ebsVolumeType": "STANDARD", 54 "instanceSize": "M10", 55 "nodeCount": 0 56 }, 57 "autoScaling": { 58 "diskGB": { 59 "enabled": true 60 }, 61 "compute": { 62 "enabled": true, 63 "scaleDownEnabled": true, 64 "minInstanceSize": "M10", 65 "maxInstanceSize": "M40" 66 } 67 }, 68 "priority": 7, 69 "providerName": "AWS", 70 "regionName": "US_EAST_1" 71 } 72 ] 73 } 74 ], 75 "createDate": "2023-04-19T19:15:29Z", 76 "rootCertType": "ISRGROOTX1", 77 "versionReleaseSystem": "LTS", 78 "terminationProtectionEnabled": false 79 }
2
(선택 사항) 필요에 따라 구성 파일의 설정을 변경합니다.
선택적 및 필수 설정에 대해 자세히 알아보려면 클러스터 구성 파일을 참조하세요.
구성 파일을 사용하여 새 클러스터 만들기
1
아직 Atlas 계정에 연결되어 있지 않은 경우, 프로그래밍 방식의 액세스를 위해 Atlas 계정에 연결하세요.
자세한 내용 은 Atlas CLI에서 연결을 참조하세요.
2