MongoDB 설치 가이드

1. 문서 개요

1.1. 목적

본 문서(Mongodb 서비스팩 설치 가이드)는 전자정부표준프레임워크 기반의 PaaS-TA에서 제공되는 서비스팩인 Mongodb 서비스팩을 Bosh를 이용하여 설치 하는 방법과 PaaS-TA의 SaaS 형태로 제공하는 Application 에서 Mongodb 서비스를 사용하는 방법을 기술하였다. PaaS-TA 3.5 버전부터는 Bosh2.0 기반으로 deploy를 진행하며 기존 Bosh1.0 기반으로 설치를 원할경우에는 PaaS-TA 3.1 이하 버전의 문서를 참고한다.

1.2. 범위

설치 범위는 Mongodb 서비스팩을 검증하기 위한 기본 설치를 기준으로 작성하였다.

1.3. 시스템 구성도

본 문서의 설치된 시스템 구성도입니다. Mongodb Server, Mongodb 서비스 브로커로 최소사항을 구성하였다.
Could not load image
구분
스펙
PaaS-TA-mongodb-broker
1vCPU / 1GB RAM / 8GB Disk
Mongos
1vCPU / 1GB RAM / 8GB Disk
Mongo Config
1vCPU / 1GB RAM / 8GB Disk+4GB(영구적 Disk)
Mongod
1vCPU / 1GB RAM /8GB Disk+4GB(영구적 Disk)

1.4. 참고자료

2. Mongodb 서비스팩 설치

2.1. 설치전 준비사항

본 설치 가이드는 Linux 환경에서 설치하는 것을 기준으로 하였다. 서비스팩 설치를 위해서는 BOSH 2.0과 PaaS-TA 5.0, PaaS-TA 포털이 설치되어 있어야 한다.
  • PaaS-TA에서 제공하는 압축된 릴리즈 파일들을 다운받는다. (PaaSTA-Deployment.zip, PaaSTA-Sample-Apps.zip, PaaSTA-Services.zip)
  • 다운로드 위치
1
# Deployment 다운로드 파일 위치 경로
2
~/workspace/paasta-5.0/deployment/service-deployment/paasta-mongodb-service
3
4
# 릴리즈 다운로드 파일 위치 경로
5
~/workspace/paasta-5.0/release/service
Copied!

2.2. Mongodb 서비스 릴리즈 업로드

  • 업로드 되어 있는 릴리즈 목록을 확인한다.
  • 사용 예시
    ``` $ bosh -e micro-bosh releases Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
Name Version Commit Hash binary-buildpack 1.0.21 d714741 bpm 0.9.0 c9b7136 caas-release 1.0 empty+ capi 1.62.0 22a608c cf-networking 2.8.0 479f4a66 cf-smoke-tests 40.0.5 d6aaf1f cf-syslog-drain 7.0 71b995a cflinuxfs2 1.227.0 60128e1 consul 195 67cdbcd diego 2.13.0 b5644d9 dotnet-core-buildpack 2.1.3 46a41cd garden-runc 1.15.1 75107e7+ go-buildpack 1.8.25 40c60a0 haproxy 8.8.0 9292573 java-buildpack 4.13 c2749d3 loggregator 103.0 05da4e3d loggregator-agent 2.0 2382c90 nats 24 30e7a82 nodejs-buildpack 1.6.28 4cfdb7b paas-ta-portal-release 2.0 non-git paasta-delivery-pipeline-release 1.0 b3ee8f48+ paasta-pinpoint 2.0 2dbb8bf3+ php-buildpack 4.3.57 efc48f3 postgres 29 5de4d63d+ python-buildpack 1.6.18 bcc4f26 routing 0.179.0 18155a5 ruby-buildpack 1.7.21 9d69600 silk 2.9.0 eebed55 staticfile-buildpack 1.4.29 8a82e63 statsd-injector 1.3.0 39e5179 uaa 60.2* ebb5895
(*) Currently deployed (+) Uncommitted changes
31 releases
Succeeded
1
- Mongodb 서비스 릴리즈가 업로드 되어 있지 않은 것을 확인
2
3
- Mongodb 서비스 릴리즈 파일을 업로드한다.
4
5
- **사용 예시**
Copied!
$ bosh -e micro-bosh upload-release paasta-mongodb-shard-2.0.tgz
################################################### 100.00% 93.67 MiB/s 0s
Task 8119
Task 8119 | 06:47:16 | Extracting release: Extracting release (00:00:01) Task 8119 | 06:47:17 | Verifying manifest: Verifying manifest (00:00:00) Task 8119 | 06:47:17 | Resolving package dependencies: Resolving package dependencies (00:00:00) Task 8119 | 06:47:17 | Creating new packages: cli/668cd93a9dc828726341909df08f74dce57478fe (00:00:00) Task 8119 | 06:47:17 | Creating new packages: java7/a6b0fd78eadc51bfbf305a5571a710128fae6fe5 (00:00:05) Task 8119 | 06:47:22 | Creating new packages: mongodb/f48a8e934cc387162028629a196040c17bfa3401 (00:00:01) Task 8119 | 06:47:23 | Creating new packages: mongodb_broker/25bacb6034e74fc63b592c8bb6ba98cf512afbbc (00:00:00) Task 8119 | 06:47:23 | Creating new jobs: mongodb_broker/9d10fbfc09bb211114058ffd16dce044ff27d75e (00:00:01) Task 8119 | 06:47:24 | Creating new jobs: mongodb_broker_deregistrar/d437a344605d23e639a34373c4b2553841c956a5 (00:00:00) Task 8119 | 06:47:24 | Creating new jobs: mongodb_broker_registrar/1f2b27e672ee49de953cf718de841b3018ab9fb2 (00:00:00) Task 8119 | 06:47:24 | Creating new jobs: mongodb_config/1cf1de67d7ffc4c30a573de973a8573e1098d81c (00:00:00) Task 8119 | 06:47:24 | Creating new jobs: mongodb_master/b58a9c73a51c95a98bda70f9884ffbc995fc0a52 (00:00:00) Task 8119 | 06:47:24 | Creating new jobs: mongodb_shard/9e8f61155d16c2f6eb8012278f7be65c26c0c8b5 (00:00:00) Task 8119 | 06:47:24 | Creating new jobs: mongodb_slave/640d6953cba4ac04d17c0e3aa2af6820e5298b8a (00:00:00) Task 8119 | 06:47:24 | Release has been created: paasta-mongodb-shard/2.0 (00:00:00)
Task 8119 Started Thu Sep 13 06:47:16 UTC 2018 Task 8119 Finished Thu Sep 13 06:47:24 UTC 2018 Task 8119 Duration 00:00:08 Task 8119 done
Succeeded
1
- 업로드 된 Mongodb 릴리즈를 확인한다.
2
3
- **사용 예시**
Copied!
$ bosh -e micro-bosh releases Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
Name Version Commit Hash binary-buildpack 1.0.21 d714741 bpm 0.9.0 c9b7136 caas-release 1.0 empty+ capi 1.62.0 22a608c cf-networking 2.8.0 479f4a66 cf-smoke-tests 40.0.5 d6aaf1f cf-syslog-drain 7.0 71b995a cflinuxfs2 1.227.0 60128e1 consul 195 67cdbcd diego 2.13.0 b5644d9 dotnet-core-buildpack 2.1.3 46a41cd garden-runc 1.15.1 75107e7+ go-buildpack 1.8.25 40c60a0 haproxy 8.8.0 9292573 java-buildpack 4.13 c2749d3 loggregator 103.0 05da4e3d loggregator-agent 2.0 2382c90 nats 24 30e7a82 nodejs-buildpack 1.6.28 4cfdb7b paas-ta-portal-release 2.0 non-git paasta-delivery-pipeline-release 1.0 b3ee8f48+ paasta-mongodb-shard 2.0 3c41864+ paasta-pinpoint 2.0 2dbb8bf3+ php-buildpack 4.3.57 efc48f3 postgres 29 5de4d63d+ python-buildpack 1.6.18 bcc4f26 routing 0.179.0 18155a5 ruby-buildpack 1.7.21 9d69600 silk 2.9.0 eebed55 staticfile-buildpack 1.4.29 8a82e63 statsd-injector 1.3.0 39e5179 uaa 60.2* ebb5895
(*) Currently deployed (+) Uncommitted changes
32 releases
Succeeded
1
- Mongodb 서비스 릴리즈가 업로드 되어 있는 것을 확인
2
3
- Deploy시 사용할 을 확인한다.
4
5
- **사용 예시**
Copied!
$ bosh -e micro-bosh stemcells Name Version OS CPI CID bosh-openstack-kvm-ubuntu-xenial-go_agent 315.64* ubuntu-xenial - fb08e389-2350-4091-9b29-41743495e62c
(*) Currently deployed
1 stemcells
Succeeded
1
### <div id='23'> 2.3. Mongodb 서비스 Deployment 파일 수정 및 배포
2
3
BOSH Deployment manifest 는 components 요소 및 배포의 속성을 정의한 YAML 파일이다.
4
Deployment manifest 에는 sotfware를 설치 하기 위해서 어떤 Stemcell (OS, BOSH agent) 을 사용할것이며 Release (Software packages, Config templates, Scripts) 이름과 버전, VMs 용량, Jobs params 등을 정의가 되어 있다.
5
6
deployment 파일에서 사용하는 network, vm_type 등은 cloud config 를 활용하고 해당 가이드는 Bosh2.0 가이드를 참고한다.
7
8
- cloud config 내용 조회
9
10
- **사용 예시**
Copied!
$ bosh -e micro-bosh cloud-config Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
azs:
  • cloud_properties:
    datacenters:
    • clusters:
      • BD-HA:
        resource_pool: CF_BOSH2_Pool
        name: BD-HA
        name: z1
  • cloud_properties:
    datacenters:
    • clusters:
      • BD-HA:
        resource_pool: CF_BOSH2_Pool
        name: BD-HA
        name: z2
  • cloud_properties:
    datacenters:
    • clusters:
      • BD-HA:
        resource_pool: CF_BOSH2_Pool
        name: BD-HA
        name: z3
  • cloud_properties:
    datacenters:
    • clusters:
      • BD-HA:
        resource_pool: CF_BOSH2_Pool
        name: BD-HA
        name: z4
  • cloud_properties:
    datacenters:
    • clusters:
      • BD-HA:
        resource_pool: CF_BOSH2_Pool
        name: BD-HA
        name: z5
  • cloud_properties:
    datacenters:
    • clusters:
      • BD-HA:
        resource_pool: CF_BOSH2_Pool
        name: BD-HA
        name: z6
        compilation:
        az: z1
        network: default
        reuse_compilation_vms: true
        vm_type: large
        workers: 5
        disk_types:
  • disk_size: 1024
    name: default
  • disk_size: 1024
    name: 1GB
  • disk_size: 2048
    name: 2GB
  • disk_size: 4096
    name: 4GB
  • disk_size: 5120
    name: 5GB
  • disk_size: 8192
    name: 8GB
  • disk_size: 10240
    name: 10GB
  • disk_size: 20480
    name: 20GB
  • disk_size: 30720
    name: 30GB
  • disk_size: 51200
    name: 50GB
  • disk_size: 102400
    name: 100GB
  • disk_size: 1048576
    name: 1TB
    networks:
  • name: default
    subnets:
    • azs:
      • z1
      • z2
      • z3
      • z4
      • z5
      • z6
        cloud_properties:
        name: Internal
        dns:
      • 8.8.8.8
        gateway: 10.30.20.23
        range: 10.30.0.0/16
        reserved:
      • 10.30.0.0 - 10.30.111.40
  • name: public
    subnets:
    • azs:
      • z1
      • z2
      • z3
      • z4
      • z5
      • z6
        cloud_properties:
        name: External
        dns:
      • 8.8.8.8
        gateway: 115.68.46.177
        range: 115.68.46.176/28
        reserved:
      • 115.68.46.176 - 115.68.46.188
        static:
      • 115.68.46.189 - 115.68.46.190
        type: manual
  • name: service_private
    subnets:
    • azs:
      • z1
      • z2
      • z3
      • z4
      • z5
      • z6
        cloud_properties:
        name: Internal
        dns:
      • 8.8.8.8
        gateway: 10.30.20.23
        range: 10.30.0.0/16
        reserved:
      • 10.30.0.0 - 10.30.106.255
        static:
      • 10.30.107.1 - 10.30.107.255
  • name: service_public
    subnets:
    • azs:
      • z1
      • z2
      • z3
      • z4
      • z5
      • z6
        cloud_properties:
        name: External
        dns:
      • 8.8.8.8
        gateway: 115.68.47.161
        range: 115.68.47.160/24
        reserved:
      • 115.68.47.161 - 115.68.47.174
        static:
      • 115.68.47.175 - 115.68.47.185
        type: manual
  • name: portal_service_public
    subnets:
    • azs:
      • z1
      • z2
      • z3
      • z4
      • z5
      • z6
        cloud_properties:
        name: External
        dns:
      • 8.8.8.8
        gateway: 115.68.46.209
        range: 115.68.46.208/28
        reserved:
      • 115.68.46.216 - 115.68.46.222
        static:
      • 115.68.46.214
        type: manual
        vm_extensions:
  • cloud_properties:
    ports:
    • host: 3306
      name: mysql-proxy-lb
  • name: cf-router-network-properties
  • name: cf-tcp-router-network-properties
  • name: diego-ssh-proxy-network-properties
  • name: cf-haproxy-network-properties
  • cloud_properties:
    disk: 51200
    name: small-50GB
  • cloud_properties:
    disk: 102400
    name: small-highmem-100GB
    vm_types:
  • cloud_properties:
    cpu: 1
    disk: 8192
    ram: 1024
    name: minimal
  • cloud_properties:
    cpu: 1
    disk: 10240
    ram: 2048
    name: default
  • cloud_properties:
    cpu: 1
    disk: 30720
    ram: 4096
    name: small
  • cloud_properties:
    cpu: 2
    disk: 20480
    ram: 4096
    name: medium
  • cloud_properties:
    cpu: 2
    disk: 20480
    ram: 8192
    name: medium-memory-8GB
  • cloud_properties:
    cpu: 4
    disk: 20480
    ram: 8192
    name: large
  • cloud_properties:
    cpu: 8
    disk: 20480
    ram: 16384
    name: xlarge
  • cloud_properties:
    cpu: 2
    disk: 51200
    ram: 4096
    name: small-50GB
  • cloud_properties:
    cpu: 2
    disk: 51200
    ram: 4096
    name: small-50GB-ephemeral-disk
  • cloud_properties:
    cpu: 4
    disk: 102400
    ram: 8192
    name: small-100GB-ephemeral-disk
  • cloud_properties:
    cpu: 4
    disk: 102400
    ram: 8192
    name: small-highmem-100GB-ephemeral-disk
  • cloud_properties:
    cpu: 8
    disk: 20480
    ram: 16384
    name: small-highmem-16GB
  • cloud_properties:
    cpu: 1
    disk: 4096
    ram: 2048
    name: caas_small
  • cloud_properties:
    cpu: 1
    disk: 4096
    ram: 1024
    name: caas_small_api
  • cloud_properties:
    cpu: 1
    disk: 4096
    ram: 4096
    name: caas_medium
  • cloud_properties:
    cpu: 2
    disk: 8192
    ram: 4096
    name: service_medium
  • cloud_properties:
    cpu: 2
    disk: 10240
    ram: 2048
    name: service_medium_2G
Succeeded
1
- Deployment 파일을 서버 환경에 맞게 수정한다.
2
3
```yml
4
# openpaas-mongodb-shard-aws 설정 파일 내용
5
---
6
name: paasta-mongodb-shard-service # 서비스 배포이름(필수)
7
8
release:
9
name: paasta-mongodb-shard #서비스 릴리즈 이름(필수)
10
version: "2.0" #서비스 릴리즈 버전(필수):latest 시 업로드된 서비스 릴리즈 최신버전
11
12
# this section describes how updates are handled
13
update:
14
canaries: 1 # canary 인스턴스 수(필수)
15
canary_watch_time: 120000 # canary 인스턴스가 수행하기 위한 대기 시간(필수)
16
update_watch_time: 120000 # non-canary 인스턴스가 병렬로 update 하는 최대 개수(필수)
17
max_in_flight: 4
18
19
stemcells:
20
- alias: default
21
os: ubuntu-xenial
22
version: "latest"
23
24
instance_groups:
25
- name: mongodb_slave1 #작업 이름(필수): mongodb replica set의 slave 서버
26
instances: 2 # job 인스턴스 수(필수)
27
vm_type: medium
28
stemcell: default
29
persistent_disk: 10240 # 영구적 디스크 사이즈 정의(옵션): 16G
30
azs:
31
- z3
32
networks: # 네트워크 구성정보
33
- name: default # Networks block에서 선언한 network 이름(필수)
34
static_ips: # 사용할 IP addresses 정의(필수)
35
- 10.0.81.202
36
- 10.0.81.203
37
jobs:
38
- name: mongodb_slave
39
properties:
40
replSetName: op1 # replicaSet1 의 이름
41
mongodb:
42
key: ((key))
43
release: paasta-mongodb-shard
44
- name: mongodb_slave2
45
vm_type: medium
46
stemcell: default
47
azs:
48
- z3
49
instances: 2
50
persistent_disk: 10240
51
networks:
52
- name: default
53
static_ips:
54
- 10.0.81.205
55
- 10.0.81.206
56
jobs:
57
- name: mongodb_slave
58
properties:
59
replSetName: op2 # replicaSet2 의 이름
60
mongodb:
61
key: ((key))
62
release: paasta-mongodb-shard
63
- name: mongodb_slave3
64
instances: 2
65
azs:
66
- z3
67
vm_type: medium
68
stemcell: default
69
persistent_disk: 10240
70
networks:
71
- name: default
72
static_ips:
73
- 10.0.81.208
74
- 10.0.81.209
75
jobs:
76
- name: mongodb_slave
77
properties:
78
replSetName: op3 # replicaSet3 의 이름
79
mongodb:
80
key: ((key))
81
release: paasta-mongodb-shard
82
- name: mongodb_master1 #작업 이름(필수): mongodb replica set의 master 서버
83
instances: 1 # job 인스턴스 수(필수)
84
azs:
85
- z3
86
stemcell: default
87
vm_type: medium
88
persistent_disk: 10240 # 영구적 디스크 사이즈 정의(옵션): 16G
89
networks: # 네트워크 구성정보
90
- name: default # Networks block에서 선언한 network 이름(필수)
91
static_ips:
92
- 10.0.81.201 # 사용할 IP addresses 정의(필수)
93
jobs:
94
- name: mongodb_master
95
properties:
96
replSet_hosts: ["10.0.81.201","10.0.81.202","10.0.81.203"] # 첫번째 Host는 replicaSet1의 master
97
replSetName: op1 # replicaSet1 의 이름
98
mongodb:
99
key: ((key))
100
release: paasta-mongodb-shard
101
- name: mongodb_master2
102
azs:
103
- z3
104
instances: 1
105
vm_type: medium
106
persistent_disk: 10240
107
stemcell: default
108
networks:
109
- name: default
110
static_ips:
111
- 10.0.81.204
112
jobs:
113
- name: mongodb_master
114
properties:
115
replSet_hosts: ["10.0.81.204","10.0.81.205","10.0.81.206"] # 첫번째 Host는 replicaSet2의 master
116
replSetName: op2 # replicaSet2 의 이름
117
mongodb:
118
key: ((key))
119
release: paasta-mongodb-shard
120
- name: mongodb_master3
121
azs:
122
- z3
123
vm_type: medium
124
stemcell: default
125
instances: 1
126
persistent_disk: 10240
127
networks:
128
- name: default
129
static_ips:
130
- 10.0.81.207
131
jobs:
132
- name: mongodb_master
133
properties:
134
replSet_hosts: ["10.0.81.207","10.0.81.208","10.0.81.209"] # 첫번째 Host는 replicaSet2의 master
135
replSetName: op3 # replicaSet3 의 이름
136
mongodb:
137
key: ((key))
138
release: paasta-mongodb-shard
139
- name: mongodb_config
140
azs:
141
- z3
142
stemcell: default
143
vm_type: medium
144
instances: 3
145
persistent_disk: 10240
146
networks:
147
- name: default
148
static_ips:
149
- 10.0.81.210
150
- 10.0.81.211
151
- 10.0.81.212
152
jobs:
153
- name: mongodb_config
154
release: paasta-mongodb-shard
155
- name: mongodb_shard
156
vm_type: medium
157
stemcell: default
158
azs:
159
- z3
160
instances: 1
161
networks:
162
- name: default
163
static_ips:
164
- 10.0.81.213
165
jobs:
166
- name: mongodb_shard
167
properties:
168
mongodb:
169
key: ((key))
170
bindIp: 0.0.0.0
171
configsvr_hosts: # mongodb_config hosts
172
- 10.0.81.210
173
- 10.0.81.211
174
- 10.0.81.212
175
repl_name_host_list: # mongodb_master properties
176
- op1/10.0.81.201 # replicaSet1 의 이름/host
177
- op2/10.0.81.204 # replicaSet2 의 이름/host
178
- op3/10.0.81.207 # replicaSet3 의 이름/host
179
release: paasta-mongodb-shard
180
- name: mongodb_broker #작업 이름(필수): mongodb 서비스 브로커
181
vm_type: medium
182
stemcell: default
183
azs:
184
- z3
185
instances: 1 # job 인스턴스 수(필수)
186
networks: # 네트워크 구성정보
187
- name: default # Networks block에서 선언한 network 이름(필수)
188
static_ips: # 사용할 IP addresses 정의(필수)
189
- 10.0.81.214
190
jobs:
191
- name: mongodb_broker
192
release: paasta-mongodb-shard
193
- name : mongodb_broker_registrar # 작업 이름: 서비스 브로커 등록
194
azs:
195
- z3
196
stemcell: default
197
vm_type: medium
198
instances: 1
199
lifecycle: errand # bosh deploy시 vm에 생성되어 설치 되지 않고 bosh errand 로 실행할때 설정, 주로 테스트 용도에 쓰임
200
networks:
201
- name: default
202
jobs:
203
- name: mongodb_broker_registrar
204
properties:
205
broker: # 서비스 브로커 설정 정보
206
host: 10.0.81.214 # 서비스 브로커 IP
207
name: Mongo-DB # CF에서 서비스 브로커를 생성시 생기는 서비스 이름 브로커에 고정되어있는 값
208
password: cloudfoundry # 브로커 접근 아이디 비밀번호(필수)
209
username: admin # 브로커 접근 아이디(필수)
210
protocol: http
211
port: 8080 # 브로커 포트
212
cf:
213
admin_password: admin # CF 사용자의 패스워드
214
admin_username: admin # CF 사용자 이름
215
api_url: https://api.15.164.20.58.xip.io # CF 설치시 설정한 api uri 정보(필수)
216
release: paasta-mongodb-shard
217
- name : mongodb_broker_deregistrar # 작업 이름: 서비스 브로커 삭제
218
azs:
219
- z3
220
stemcell: default
221
vm_type: medium
222
instances: 1
223
lifecycle: errand
224
networks:
225
- name: default
226
jobs:
227
- name: mongodb_broker_deregistrar
228
properties:
229
broker:
230
host: 10.0.81.214
231
name: Mongo-DB
232
password: cloudfoundry
233
username: admin
234
protocol: http
235
port: 8080
236
cf:
237
admin_password: admin
238
admin_username: admin
239
api_url: https://api.15.164.20.58.xip.io
240
release: paasta-mongodb-shard
241
242
properties:
243
mongodb:
244
key: ((key))
245
user: root # admin 권한 사용자이름
246
passwd: openpaas # admin 권한 사용자 비밀번호
247
port: 27017 # mongodb port
248
mongodb_broker:
249
db_name: mongodb-broker # mongodb broker 관리용 데이터베이스
250
authsource: admin # mongodb broker 관리용 데이터베이스에 접근할 때 인증정보가 있는 데이터베이스
251
hosts: 10.0.81.213 # mongodb Host
252
253
254
meta:
255
apps_domain: 15.164.20.58.xip.io # CF 설치시 설정한 apps 도메인 정보
256
environment: null
257
external_domain: 15.164.20.58.xip.io # CF 설치시 설정한 외부 도메인 정보
258
nats: # CF 설치시 설정한 nats 정보
259
machines:
260
- 10.0.1.232
261
password: nats
262
port: 4222
263
user: nats
264
syslog_aggregator: null
Copied!
1
- nats_password(paasta_nats_password) 입력방법
2
3
## CREDHUB LOGIN
4
$ credhub login --client-name=credhub-admin --client-secret=`bosh int ${PAASTA_BOSH_WORKSPACE}/bosh-deployment/${PAASTA_BOSH_IAAS}/creds.yml --path /credhub_admin_client_secret`
5
6
## CREDHUB GET NATS PASSWORD
7
$ credhub get -n /micro-bosh/paasta/nats_password
Copied!
  • deploy-mongodb-shard-bosh2.0.sh 파일을 서버 환경에 맞게 수정한다.
1
#!/bin/bash
2
3
bosh -d paasta-mongodb-shard-service deploy paasta_mongodb_shard_2.0.yml \
4
-l pem.yml
Copied!
*pem.yml 은 MongoDB자체 pem을 등록해 쓰기 때문에 내용 수정x
  • Mongodb 서비스팩을 배포한다.
  • 사용 예시
    ``` $ ./deploy-mongodb-shard-bosh2.0.sh Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
Using deployment 'paasta-mongodb-shard-service'
  • stemcells:
    • alias: default
  • os: ubuntu-xenial
  • version: '315.64'
  • update:
  • canaries: 1
  • canary_watch_time: 30000-180000
  • max_in_flight: 6
  • update_watch_time: 30000-180000
  • release:
  • name: paasta-mongodb-shard
  • version: '2.0'
  • instance_groups:
    • azs:
    • z5
  • instances: 2
  • name: mongodb_slave1
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.102
    • 10.30.107.103
  • persistent_disk_type: 10GB
  • properties:
  • replSetName: ""
  • stemcell: default
  • templates:
    • name: mongodb_slave
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 2
  • name: mongodb_slave2
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.105
    • 10.30.107.106
  • persistent_disk_type: 10GB
  • properties:
  • replSetName: ""
  • stemcell: default
  • templates:
    • name: mongodb_slave
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 2
  • name: mongodb_slave3
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.108
    • 10.30.107.109
  • persistent_disk_type: 10GB
  • properties:
  • replSetName: ""
  • stemcell: default
  • templates:
    • name: mongodb_slave
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 1
  • name: mongodb_master1
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.101
  • persistent_disk_type: 10GB
  • properties:
  • replSet_hosts:
    • ""
    • ""
    • ""
  • replSetName: ""
  • stemcell: default
  • templates:
    • name: mongodb_master
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 1
  • name: mongodb_master2
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.104
  • persistent_disk_type: 10GB
  • properties:
  • replSet_hosts:
    • ""
    • ""
    • ""
  • replSetName: ""
  • stemcell: default
  • templates:
    • name: mongodb_master
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 1
  • name: mongodb_master3
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.107
  • persistent_disk_type: 10GB
  • properties:
  • replSet_hosts:
    • ""
    • ""
    • ""
  • replSetName: ""
  • stemcell: default
  • templates:
    • name: mongodb_master
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 3
  • name: mongodb_config
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.110
    • 10.30.107.111
    • 10.30.107.112
  • persistent_disk_type: 10GB
  • stemcell: default
  • templates:
    • name: mongodb_config
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 1
  • name: mongodb_shard
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.113
  • properties:
  • bindIp: ""
  • configsvr_hosts:
    • ""
    • ""
    • ""
  • repl_name_host_list:
    • ""
    • ""
    • ""
  • stemcell: default
  • templates:
    • name: mongodb_shard
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 1
  • name: mongodb_broker
  • networks:
    • name: service_private
  • static_ips:
    • 10.30.107.114
  • stemcell: default
  • templates:
    • name: mongodb_broker
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 1
  • lifecycle: errand
  • name: mongodb_broker_registrar
  • networks:
    • name: service_private
  • properties:
  • broker:
  • host: ""
  • name: ""
  • password: ""
  • port: ""
  • protocol: ""
  • username: ""
  • cf:
  • admin_password: ""
  • admin_username: ""
  • api_url: ""
  • stemcell: default
  • templates:
    • name: mongodb_broker_registrar
  • release: paasta-mongodb-shard
  • vm_type: minimal
    • azs:
    • z5
  • instances: 1
  • lifecycle: errand
  • name: mongodb_broker_deregistrar
  • networks:
    • name: service_private
  • properties: