개요
The mongocli command requires cluster configuration settings for creating or updating a MongoDB Cloud Manager or MongoDB Ops Manager cluster. The configuration properties can be provided through a .yaml or .json file. The following sections describe the Configuration Properties that are required for creating or updating a cluster and provide a Sample Configuration File that you can copy and modify.
구성 속성
다음 섹션에는 다음이 포함되어 있습니다.
cluster 전체 구성 속성
복제본 세트 멤버 구성 속성
샤드 cluster 구성 속성
cluster 전체 설정
The configuration file for creating or updating a MongoDB Cloud Manager or MongoDB Ops Manager cluster must contain the following cluster-wide settings:
필드 | 유형 | 설명 |
|---|---|---|
| 문자열 | cluster의 이름입니다. |
| 문자열 | Version of the |
| 문자열 | Feature Compatibility Version of the deployment. |
| 객체 배열 | Required for replica sets. An array of objects containing settings for each |
| 객체 배열 | 샤드 cluster에 필요합니다. 각 샤드에 대한 설정이 포함된 객체 배열입니다. |
| 객체 | Required for sharded clusters. Object that contains your config server replica set. |
| 객체 배열 | Required for sharded clusters. An array of objects containing settings for each |
복제본 세트 멤버 설정
MongoDB Cloud Manager 또는 MongoDB Ops Manager 클러스터를 만들거나 업데이트하기 위한 구성 파일에는 각 복제본 세트 멤버에 대한 다음 설정이 포함될 수 있습니다.
필드 | 유형 | 설명 | 필수 사항입니다. |
|---|---|---|---|
| 문자열 | Setting that enables auditing and specifies where to send all audit events. MongoDB CLI accepts the following values:
This setting corresponds to the auditLog.destination configuration file option. | no |
| 문자열 | 감사되는 이벤트를 필터링하는 설정입니다. 이 필터는 지정한 쿼리와 일치하도록 결과를 제한합니다. To learn more about creating filters, see Configure Audit Filters. 이 설정은 auditLog.filter 구성 파일 옵션에 해당합니다. | no |
| 문자열 | Format of the output file for auditing if MongoDB CLI는 다음 값을 허용합니다.
This setting corresponds to the auditLog.format configuration file option. | no |
| 문자열 | Output file for auditing if 이 설정은 auditLog.path 구성 파일 옵션에 해당합니다. | no |
| 문자열 | Hostnames and/or IP addresses and/or full Unix domain socket paths on which This setting corresponds to the net.bindIp configuration file option. | no |
| 부울 | Flag that indicates whether the 이 설정은 net.bindIpAll 구성 파일 옵션에 해당합니다. | no |
| 부울 | Flag that indicates whether to direct the 이 설정은 buildIndexes 복제본 세트 구성 옵션에 해당합니다. | no |
| 문자열 | Directory where the | 네 |
| int | 이 멤버가 프라이머리 멤버보다 지연되어야 하는 시간(초)입니다. 이 설정은 slaveDelay 복제본 세트 구성 옵션에 해당합니다. | no |
| 부울 | Flag that indicates whether MongoDB should use a separate directory to store data for each database. The directories are under the 기본적으로 This setting corresponds to the | no |
| 부울 | Flag that indicates whether or not to enable read concern 기본적으로 This setting corresponds to the replication.enableMajorityReadConcern replica set configuration option. | no |
| 문자열 | Name of the host to add to the replica set. This is the host on which | 네 |
| float | Maximum amount of memory to allocate for in-memory storage engine data, including indexes, oplog if the 값의 범위는 이는 MongoDB Enterprise 에서만 사용할 수 있습니다. This setting corresponds to the | no |
| 부울 | 배포서버가 IPv6을 지원하는지 여부를 나타내는 플래그입니다. MongoDB CLI는 This setting corresponds to the net.ipv6 configuration file option. | no |
| 문자열 | MongoDB가 모든 로그 출력을 전송하는 대상입니다. MongoDB CLI는
이 설정은 systemLog.destination 구성 파일 옵션에 해당합니다. | no |
| 문자열 | Location and name of the log file for the | 네 |
| integer | 복제 oplog 의 최대 크기(MB)입니다. 이 설정은 replication.oplogSizeMB 복제본 세트 구성 옵션에 해당합니다. | no |
| integer | Port for the replica set member. The | 네 |
| integer | 투표 중 복제본 세트 멤버의 우선순위 입니다. 값은 다음과 같습니다.
투표권이 없는 멤버의 우선순위는 | 네 |
| 문자열 |
This setting corresponds to the net.tls.CAFile | no |
| 문자열 |
This setting corresponds to the net.tls.certificateKeyFile | no |
| 문자열 | 인증서 키 파일의 암호를 해독하기 위한 비밀번호입니다. Use the This setting corresponds to the net.tls.certificateKeyFilePassword | no |
| 문자열 | MongoDB Agent가 운영 체제의 인증서 저장소에서 TLS/SSL에 일치하는 인증서를 선택하는 데 사용하는 속성입니다. MongoDB CLI는 다음 키-값 매핑 중 하나를
This setting corresponds to the net.tls.certificateSelector | no |
| 문자열 | Certificate property that the MongoDB Agent uses to select a matching certificate from the operating system’s certificate store to use for internal x.509 membership authentication. MongoDB CLI는 다음 키-값 매핑 중 하나를
This setting corresponds to the net.tls.clustercertificateSelector | no |
| 문자열 |
This setting corresponds to the net.tls.clusterFile | no |
| 문자열 | 0}으로 지정된 x.509 인증서 키 파일의 암호를 해독하기 위한 비밀번호입니다. Use the This setting corresponds to the net.tls.clusterPassword | no |
| 문자열 | 인증서 해지 목록이 포함된 This setting corresponds to the net.tls.CRLFile | no |
| 문자열 | TLS로 실행되는 MongoDB Server가 수신 연결을 거부하는 프로토콜 또는 버전입니다. This setting corresponds to the net.tls.disabledProtocols | no |
| 문자열 | Enable or disable the use of the FIPS mode of the TLS library for the This setting corresponds to the net.tls.FIPSMode | no |
| 문자열 | 모든 네트워크 연결에 대해 TLS를 활성화합니다. MongoDB CLI는 이 설정에 대해 다음 인수를 허용합니다.
This setting corresponds to the net.tls.mode | no |
| 문자열 |
중요: 이 설정은 더 이상 사용되지 않습니다. 대신 This setting corresponds to the net.ssl.PEMKeyFile | no |
| integer | 복제본 세트 멤버가 투표를 하는지 여부를 나타내는 숫자입니다. MongoDB CLI는 다음 값을 허용합니다.
| 네 |
| float | WiredTiger가 모든 데이터에 사용하는 내부 캐시의 최대 크기입니다. 값의 범위는
WiredTiger 내부 캐시 크기를 기본값 이상으로 늘리지 마세요. This setting corresponds to the | no |
| 문자열 | no | |
| 부울 | Flag that indicates whether By using a symbolic link, you can specify a different location for the indexes. Specifically, when the 기본적으로 This setting corresponds to the | no |
| 문자열 | collection 데이터의 기본 압축입니다. collection을 만들 때 collection별로 이 값을 재정의할 수 있습니다. 사용할 수 있는 압축 옵션은 다음과 같습니다.
By default the compressor is snappy. 이 설정은 새로 생성된 모든 collection에 영향을 줍니다. 기존 MongoDB 배포에서 이 설정의 값을 변경하면 모든 새 collection이 지정된 압축기를 사용합니다. 기존 collection은 생성 시 지정된 압축기 또는 당시의 기본 압축기를 계속 사용합니다. This setting corresponds to the | no |
| 부울 | Flag that indicates whether to enable or disable prefix compression for index data. If 기본적으로 이 설정은 생성된 모든 인덱스에 영향을 줍니다. 기존 MongoDB 배포에서 이 설정의 값을 변경하면 모든 새 인덱스가 접두사 압축을 사용합니다. 기존 인덱스는 영향을 받지 않습니다. This setting corresponds to the | no |
샤드 설정
MongoDB Cloud Manager 또는 MongoDB Ops Manager 클러스터를 생성하거나 업데이트하기 위한 구성 파일에는 각 샤드에 대한 다음 설정이 포함될 수 있습니다.
필드 | 유형 | 설명 | 필수 사항입니다. |
|---|---|---|---|
| 문자열 | 샤드의 이름입니다. | 네 |
| 객체 배열 | An array of objects containing settings for each | 네 |
샘플 구성 파일
name: "myCluster" version: 7.0.0 featureCompatibilityVersion: 7.0 processes: - hostname: host0 dbPath: /data/cluster_2/rs1 logPath: /data/cluster_2/rs1/mongodb.log priority: 1 votes: 1 port: 29010 - hostname: host1 dbPath: /data/cluster_2/rs2 logPath: /data/cluster_2/rs2/mongodb.log priority: 1 votes: 1 port: 29020 - hostname: host2 dbPath: /data/cluster_2/rs3 logPath: /data/cluster_2/rs3/mongodb.log priority: 1 votes: 1 port: 29030
{ "name": "myCluster", "version": "7.0.0", "featureCompatibilityVersion": "7.0", "processes": [ { "hostname": "host0", "dbPath": "/data/cluster_3/rs1", "logPath": "/data/cluster_3/rs1/mongodb.log", "priority": 1, "votes": 1, "port": 30010 }, { "hostname": "host1", "dbPath": "/data/cluster_3/rs2", "logPath": "/data/cluster_3/rs2/mongodb.log", "priority": 1, "votes": 1, "port": 30020 }, { "hostname": "host2", "dbPath": "/data/cluster_3/rs3", "logPath": "/data/cluster_3/rs3/mongodb.log", "priority": 1, "votes": 1, "port": 30030 } ] }
{ "name": "myShardedCluster", "version": "7.0.0", "featureCompatibilityVersion": "7.0", "shards": [ { "name": "myShard_0", "processes": [ { "dbPath": "/data/myCluster/myShard_0/27000", "hostname": "host0.example", "logPath": "/data/myCluster/myShard_0/27000/mongodb.log", "port": 27000, "votes": 1 }, { "dbPath": "/data/myCluster/myShard_0/27001", "hostname": "host1.example", "logPath": "/data/myCluster/myShard_0/27001/mongodb.log", "port": 27001, "votes": 1 }, { "dbPath": "/data/myCluster/myShard_0/27002", "hostname": "host2.example", "logPath": "/data/myCluster/myShard_0/27002/mongodb.log", "port": 27002, "version": "7.0.0-ent", "votes": 1 } ] }, { "name": "myShard_1", "processes": [ { "dbPath": "/data/myCluster/myShard_1/28000", "hostname": "host3.example", "logPath": "/data/myCluster/myShard_1/28000/mongodb.log", "port": 28000, "votes": 1 }, { "dbPath": "/data/myCluster/myShard_1/28001", "hostname": "host4.example", "logPath": "/data/myCluster/myShard_1/28001/mongodb.log", "port": 28001, "votes": 1 }, { "dbPath": "/data/myCluster/myShard_1/28002", "hostname": "host5.example", "logPath": "/data/myCluster/myShard_1/28002/mongodb.log", "port": 28002, "votes": 1 } ] } ], "config": { "name": "configRS", "processes": [ { "dbPath": "/data/myCluster/configRS/29000", "hostname": "host6.example", "logPath": "/data/myCluster/configRS/29000/mongodb.log", "port": 29000, "votes": 1 }, { "dbPath": "/data/myCluster/configRS/29001", "hostname": "host7.example", "logPath": "/data/myCluster/configRS/29001/mongodb.log", "port": 29001, "votes": 1 }, { "dbPath": "/data/myCluster/configRS/29002", "hostname": "host8.example", "logPath": "/data/myCluster/configRS/29002/mongodb.log", "port": 29002, "votes": 1 } ] }, "mongos": [ { "hostname": "host9.example", "logPath": "/data/myCluster/mongoses/27015/mongodb.log", "port": 27015 } ] }