Pinpoint 서비스팩 설치 가이드

1. 문서 개요

1.1. 목적

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

1.2. 범위

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

1.3. 시스템 구성도

본 문서의 설치된 시스템 구성도입니다. Pinpoint Server, HBase의 HBase Master2, HBase Slave2, Collector 2, Pinpoint 서비스 브로커, WebUI3로 최소사항을 구성하였다.
구분
Resource Pool
스펙
Collector/0
pinpoint\_medium
2vCPU / 2GB RAM / 8GB Disk
Collector/1
pinpoint\_medium
2vCPU / 2GB RAM / 8GB Disk
h\_master/0
pinpoint\_medium
2vCPU / 2GB RAM / 8GB Disk
h\_secondary
pinpoint\_ small
1vCPU / 1GB RAM / 4GB Disk
h\_slave/0
services-small
1vCPU / 1GB RAM / 4GB Disk
h\_slave/1
services-small
1vCPU / 1GB RAM / 4GB Disk
haproxy\_webui/0
services-small
1vCPU / 1GB RAM / 4GB Disk
pinpoint\_broker/0services-small
1vCPU / 1GB RAM / 4GB Disk
webui/0
services-small
1vCPU / 1GB RAM / 4GB Disk
webui/1
services-small
1vCPU / 1GB RAM / 4GB Disk

1.4. 참고자료

2. Pinpoint 서비스팩 설치

2.1. 설치전 준비사항

본 설치 가이드는 Linux 환경에서 설치하는 것을 기준으로 하였다. 서비스팩 설치를 위해서는 먼저 BOSH CLI v2 가 설치 되어 있어야 하고 BOSH 에 로그인이 되어 있어야 한다. BOSH CLI v2 가 설치 되어 있지 않을 경우 먼저 BOSH2.0 설치 가이드 문서를 참고 하여 BOSH CLI v2를 설치를 하고 사용법을 숙지 해야 한다.
  • PaaS-TA에서 제공하는 압축된 릴리즈 파일들을 다운받는다. (PaaSTA-Deployment.zip, PaaSTA-Sample-Apps.zip, PaaSTA-Services.zip)
  • 다운로드 위치

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

  • 업로드 되어 있는 릴리즈 목록을 확인한다.
  • 사용 예시
    1
    $ bosh -e micro-bosh releases
    2
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    3
    4
    Name Version Commit Hash
    5
    binary-buildpack 1.0.21* d714741
    6
    bpm 0.9.0* c9b7136
    7
    caas-release 1.0* empty+
    8
    capi 1.62.0* 22a608c
    9
    cf-networking 2.8.0* 479f4a66
    10
    cf-smoke-tests 40.0.5* d6aaf1f
    11
    cf-syslog-drain 7.0* 71b995a
    12
    cflinuxfs2 1.227.0* 60128e1
    13
    consul 195* 67cdbcd
    14
    diego 2.13.0* b5644d9
    15
    dotnet-core-buildpack 2.1.3* 46a41cd
    16
    garden-runc 1.15.1* 75107e7+
    17
    go-buildpack 1.8.25* 40c60a0
    18
    haproxy 8.8.0* 9292573
    19
    java-buildpack 4.13* c2749d3
    20
    loggregator 103.0* 05da4e3d
    21
    loggregator-agent 2.0* 2382c90
    22
    nats 24* 30e7a82
    23
    nodejs-buildpack 1.6.28* 4cfdb7b
    24
    paas-ta-portal-release 2.0* non-git
    25
    paasta-delivery-pipeline-release 1.0* b3ee8f48+
    26
    php-buildpack 4.3.57* efc48f3
    27
    postgres 29* 5de4d63d+
    28
    python-buildpack 1.6.18* bcc4f26
    29
    routing 0.179.0* 18155a5
    30
    ruby-buildpack 1.7.21* 9d69600
    31
    silk 2.9.0* eebed55
    32
    staticfile-buildpack 1.4.29* 8a82e63
    33
    statsd-injector 1.3.0* 39e5179
    34
    uaa 60.2* ebb5895
    35
    36
    (*) Currently deployed
    37
    (+) Uncommitted changes
    38
    39
    30 releases
    40
    41
    Succeeded
    Copied!
  • Pinpoint 서비스 릴리즈가 업로드 되어 있지 않은 것을 확인
  • Pinpoint 서비스 릴리즈 파일을 업로드한다.
  • 사용 예시
    1
    $ bosh -e micro-bosh upload-release paasta-pinpoint-2.0.tgz
    2
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    3
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    4
    5
    ######################################################## 100.00% 144.14 MiB/s 2s
    6
    Task 4460
    7
    8
    Task 4460 | 04:31:41 | Extracting release: Extracting release (00:00:04)
    9
    Task 4460 | 04:31:45 | Verifying manifest: Verifying manifest (00:00:00)
    10
    Task 4460 | 04:31:45 | Resolving package dependencies: Resolving package dependencies (00:00:00)
    11
    Task 4460 | 04:31:45 | Creating new packages: gra-log-purger/f02fa5774ab54dbb1b1c3702d03cb929b85d60e6 (00:00:00)
    12
    Task 4460 | 04:31:45 | Creating new packages: cf-mysql-broker/250c6466bdaff96677e501ed5219d92ce4e61bd8 (00:00:00)
    13
    Task 4460 | 04:31:45 | Creating new packages: mysqlclient/ce95f8ac566f76b650992987d5282ee473356e43 (00:00:00)
    14
    Task 4460 | 04:31:45 | Creating new packages: acceptance-tests/1cb3ce7e20f5a8395b43fc6f0e3f2e92b0dc27bd (00:00:00)
    15
    Task 4460 | 04:31:45 | Creating new packages: galera/d15a1d2d15e5e7417278d4aa1b908566022b9623 (00:00:01)
    16
    Task 4460 | 04:31:46 | Creating new packages: galera-healthcheck/3da4dedbcd7d9f404a19e7720e226fd472002266 (00:00:00)
    17
    Task 4460 | 04:31:46 | Creating new packages: quota-enforcer/e2c4c9e7d7bbbe4bfdc0866962461b00e654cca3 (00:00:00)
    18
    Task 4460 | 04:31:46 | Creating new packages: python/4e255efa754d91b825476b57e111345f200944e1 (00:00:01)
    19
    Task 4460 | 04:31:47 | Creating new packages: ruby/ff79c965224b4160c1526bd704b3b21e4ad7c362 (00:00:00)
    20
    Task 4460 | 04:31:47 | Creating new packages: route-registrar/f3fdfb8c940e7227a96c06e413ae6827aba8eeda (00:00:00)
    21
    Task 4460 | 04:31:47 | Creating new packages: check/d6811f25e9d56428a9b942631c27c9b24f5064dc (00:00:01)
    22
    Task 4460 | 04:31:48 | Creating new packages: cli/24305e50a638ece2cace4ef4803746c0c9fe4bb0 (00:00:00)
    23
    Task 4460 | 04:31:48 | Creating new packages: mariadb/43aa3547bc5a01dd51f1501e6b93c215dd7255e9 (00:00:01)
    24
    Task 4460 | 04:31:49 | Creating new packages: openjdk-1.8.0_45/57e0ee876ea9d90f5470e3784ae1171bccee850a (00:00:02)
    25
    Task 4460 | 04:31:51 | Creating new packages: mariadb_ctrl/7658290da98e2cad209456f174d3b9fa143c87fc (00:00:01)
    26
    Task 4460 | 04:31:52 | Creating new packages: scons/11e7ad3b28b43a96de3df7aa41afddde582fcc38 (00:00:00)
    27
    Task 4460 | 04:31:52 | Creating new packages: syslog_aggregator/078da6dcb999c1e6f5398a6eb739182ccb4aba25 (00:00:00)
    28
    Task 4460 | 04:31:52 | Creating new packages: xtrabackup/2e701e7a9e4241b28052d984733de36aae152275 (00:00:01)
    29
    Task 4460 | 04:31:53 | Creating new packages: boost/3eb8bdb1abb7eff5b63c4c5bdb41c0a778925c31 (00:00:01)
    30
    Task 4460 | 04:31:54 | Creating new packages: common/ba480a46c4b2aa9484fb24ed01a8649453573e6f (00:00:00)
    31
    Task 4460 | 04:31:54 | Creating new packages: switchboard/fad565dadbb37470771801952001c7071e55a364 (00:00:01)
    32
    Task 4460 | 04:31:55 | Creating new packages: op-mysql-java-broker/3bf47851b2c0d3bea63a0c58452df58c14a15482 (00:00:01)
    33
    Task 4460 | 04:31:56 | Creating new packages: golang/f57ddbc8d55d7a0f08775bf76bb6a27dc98c7ea7 (00:00:01)
    34
    Task 4460 | 04:31:57 | Creating new jobs: cf-mysql-broker/9828ead15eabdc33b2c27fe275b463735edb115d (00:00:00)
    35
    Task 4460 | 04:31:57 | Creating new jobs: acceptance-tests/48c00c36ec5210cbdd3b125ae6a72cfdf6eaf4e2 (00:00:00)
    36
    Task 4460 | 04:31:57 | Creating new jobs: broker-deregistrar/b5f6f776d46eb1ac561ab1e8f58d8ddedb97f86e (00:00:00)
    37
    Task 4460 | 04:31:57 | Creating new jobs: proxy/7907d8759aa11dfcbbe79220dc945c96b5562ac1 (00:00:00)
    38
    Task 4460 | 04:31:57 | Creating new jobs: mysql/078561f02f2516212ed59c48e1dd45360f93871c (00:00:00)
    39
    Task 4460 | 04:31:57 | Creating new jobs: op-mysql-java-broker/6e47c9ea6fbe0867d4a476af5abf157830c03024 (00:00:00)
    40
    Task 4460 | 04:31:57 | Creating new jobs: broker-registrar/e1f5e30b87e70e916ea74ea8eb63a7b6ff6ff643 (00:00:00)
    41
    Task 4460 | 04:31:57 | Release has been created: paasta-mysql/2.0 (00:00:00)
    42
    43
    Task 4460 Started Fri Aug 31 04:31:41 UTC 2018
    44
    Task 4460 Finished Fri Aug 31 04:31:57 UTC 2018
    45
    Task 4460 Duration 00:00:16
    46
    Task 4460 done
    47
    48
    Succeeded
    Copied!
  • 업로드 된 Pinpoint 릴리즈를 확인한다.
  • 사용 예시
    1
    $ bosh -e micro-bosh releases
    2
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    3
    4
    Name Version Commit Hash
    5
    binary-buildpack 1.0.21* d714741
    6
    bpm 0.9.0* c9b7136
    7
    caas-release 1.0* empty+
    8
    capi 1.62.0* 22a608c
    9
    cf-networking 2.8.0* 479f4a66
    10
    cf-smoke-tests 40.0.5* d6aaf1f
    11
    cf-syslog-drain 7.0* 71b995a
    12
    cflinuxfs2 1.227.0* 60128e1
    13
    consul 195* 67cdbcd
    14
    diego 2.13.0* b5644d9
    15
    dotnet-core-buildpack 2.1.3* 46a41cd
    16
    garden-runc 1.15.1* 75107e7+
    17
    go-buildpack 1.8.25* 40c60a0
    18
    haproxy 8.8.0* 9292573
    19
    java-buildpack 4.13* c2749d3
    20
    loggregator 103.0* 05da4e3d
    21
    loggregator-agent 2.0* 2382c90
    22
    nats 24* 30e7a82
    23
    nodejs-buildpack 1.6.28* 4cfdb7b
    24
    paas-ta-portal-release 2.0* non-git
    25
    paasta-delivery-pipeline-release 1.0* b3ee8f48+
    26
    paasta-mysql 2.0 85e3f01e+
    27
    paasta-pinpoint 2.0* 2dbb8bf3+
    28
    php-buildpack 4.3.57* efc48f3
    29
    postgres 29* 5de4d63d+
    30
    python-buildpack 1.6.18* bcc4f26
    31
    routing 0.179.0* 18155a5
    32
    ruby-buildpack 1.7.21* 9d69600
    33
    silk 2.9.0* eebed55
    34
    staticfile-buildpack 1.4.29* 8a82e63
    35
    statsd-injector 1.3.0* 39e5179
    36
    uaa 60.2* ebb5895
    37
    38
    (*) Currently deployed
    39
    (+) Uncommitted changes
    40
    41
    31 releases
    42
    43
    Succeeded
    Copied!
  • Pinpoint 서비스 릴리즈가 업로드 되어 있는 것을 확인
  • Deploy시 사용할 Stemcell을 확인한다.
  • 사용 예시
    1
    $ bosh -e micro-bosh stemcells
    2
    Name Version OS CPI CID
    3
    bosh-vsphere-esxi-ubuntu-trusty-go_agent 3586.26* ubuntu-trusty - sc-109fbdb0-f663-49e8-9c30-8dbdd2e5b9b9
    4
    ~ 3445.2* ubuntu-trusty - sc-025c70b5-7d6e-4ba3-a12b-7e71c33dad24
    5
    ~ 3309* ubuntu-trusty - sc-22429dba-e5cc-4469-ab3a-882091573277
    6
    7
    (*) Currently deployed
    8
    9
    3 stemcells
    10
    11
    Succeeded
    Copied!
Stemcell 목록이 존재 하지 않을 경우 BOSH 설치 가이드 문서를 참고 하여 Stemcell을 업로드를 해야 한다. (pinpoint는 stemcell 3309 버전을 사용)

2.3. MySQL 서비스 Deployment 파일 및 deploy-mysql-bosh2.0.sh 수정 및 배포

BOSH Deployment manifest 는 components 요소 및 배포의 속성을 정의한 YAML 파일이다. Deployment manifest 에는 sotfware를 설치 하기 위해서 어떤 Stemcell (OS, BOSH agent) 을 사용할것이며 Release (Software packages, Config templates, Scripts) 이름과 버전, VMs 용량, Jobs params 등을 정의가 되어 있다.
deployment 파일에서 사용하는 network, vm_type 등은 cloud config 를 활용하고 해당 가이드는 Bosh2.0 가이드를 참고한다.
  • cloud config 내용 조회
  • 사용 예시
    1
    $ bosh -e micro-bosh cloud-config
    2
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    3
    4
    azs:
    5
    - cloud_properties:
    6
    datacenters:
    7
    - clusters:
    8
    - BD-HA:
    9
    resource_pool: CF_BOSH2_Pool
    10
    name: BD-HA
    11
    name: z1
    12
    - cloud_properties:
    13
    datacenters:
    14
    - clusters:
    15
    - BD-HA:
    16
    resource_pool: CF_BOSH2_Pool
    17
    name: BD-HA
    18
    name: z2
    19
    - cloud_properties:
    20
    datacenters:
    21
    - clusters:
    22
    - BD-HA:
    23
    resource_pool: CF_BOSH2_Pool
    24
    name: BD-HA
    25
    name: z3
    26
    - cloud_properties:
    27
    datacenters:
    28
    - clusters:
    29
    - BD-HA:
    30
    resource_pool: CF_BOSH2_Pool
    31
    name: BD-HA
    32
    name: z4
    33
    - cloud_properties:
    34
    datacenters:
    35
    - clusters:
    36
    - BD-HA:
    37
    resource_pool: CF_BOSH2_Pool
    38
    name: BD-HA
    39
    name: z5
    40
    - cloud_properties:
    41
    datacenters:
    42
    - clusters:
    43
    - BD-HA:
    44
    resource_pool: CF_BOSH2_Pool
    45
    name: BD-HA
    46
    name: z6
    47
    compilation:
    48
    az: z1
    49
    network: default
    50
    reuse_compilation_vms: true
    51
    vm_type: large
    52
    workers: 5
    53
    disk_types:
    54
    - disk_size: 1024
    55
    name: default
    56
    - disk_size: 1024
    57
    name: 1GB
    58
    - disk_size: 2048
    59
    name: 2GB
    60
    - disk_size: 4096
    61
    name: 4GB
    62
    - disk_size: 5120
    63
    name: 5GB
    64
    - disk_size: 8192
    65
    name: 8GB
    66
    - disk_size: 10240
    67
    name: 10GB
    68
    - disk_size: 20480
    69
    name: 20GB
    70
    - disk_size: 30720
    71
    name: 30GB
    72
    - disk_size: 51200
    73
    name: 50GB
    74
    - disk_size: 102400
    75
    name: 100GB
    76
    - disk_size: 1048576
    77
    name: 1TB
    78
    networks:
    79
    - name: default
    80
    subnets:
    81
    - azs:
    82
    - z1
    83
    - z2
    84
    - z3
    85
    - z4
    86
    - z5
    87
    - z6
    88
    cloud_properties:
    89
    name: Internal
    90
    dns:
    91
    - 8.8.8.8
    92
    gateway: 10.30.20.23
    93
    range: 10.30.0.0/16
    94
    reserved:
    95
    - 10.30.0.0 - 10.30.111.40
    96
    - name: public
    97
    subnets:
    98
    - azs:
    99
    - z1
    100
    - z2
    101
    - z3
    102
    - z4
    103
    - z5
    104
    - z6
    105
    cloud_properties:
    106
    name: External
    107
    dns:
    108
    - 8.8.8.8
    109
    gateway: 115.68.46.177
    110
    range: 115.68.46.176/28
    111
    reserved:
    112
    - 115.68.46.176 - 115.68.46.188
    113
    static:
    114
    - 115.68.46.189 - 115.68.46.190
    115
    type: manual
    116
    - name: service_private
    117
    subnets:
    118
    - azs:
    119
    - z1
    120
    - z2
    121
    - z3
    122
    - z4
    123
    - z5
    124
    - z6
    125
    cloud_properties:
    126
    name: Internal
    127
    dns:
    128
    - 8.8.8.8
    129
    gateway: 10.30.20.23
    130
    range: 10.30.0.0/16
    131
    reserved:
    132
    - 10.30.0.0 - 10.30.106.255
    133
    static:
    134
    - 10.30.107.1 - 10.30.107.255
    135
    - name: service_public
    136
    subnets:
    137
    - azs:
    138
    - z1
    139
    - z2
    140
    - z3
    141
    - z4
    142
    - z5
    143
    - z6
    144
    cloud_properties:
    145
    name: External
    146
    dns:
    147
    - 8.8.8.8
    148
    gateway: 115.68.47.161
    149
    range: 115.68.47.160/24
    150
    reserved:
    151
    - 115.68.47.161 - 115.68.47.174
    152
    static:
    153
    - 115.68.47.175 - 115.68.47.185
    154
    type: manual
    155
    - name: portal_service_public
    156
    subnets:
    157
    - azs:
    158
    - z1
    159
    - z2
    160
    - z3
    161
    - z4
    162
    - z5
    163
    - z6
    164
    cloud_properties:
    165
    name: External
    166
    dns:
    167
    - 8.8.8.8
    168
    gateway: 115.68.46.209
    169
    range: 115.68.46.208/28
    170
    reserved:
    171
    - 115.68.46.216 - 115.68.46.222
    172
    static:
    173
    - 115.68.46.214
    174
    type: manual
    175
    vm_extensions:
    176
    - cloud_properties:
    177
    ports:
    178
    - host: 3306
    179
    name: mysql-proxy-lb
    180
    - name: cf-router-network-properties
    181
    - name: cf-tcp-router-network-properties
    182
    - name: diego-ssh-proxy-network-properties
    183
    - name: cf-haproxy-network-properties
    184
    - cloud_properties:
    185
    disk: 51200
    186
    name: small-50GB
    187
    - cloud_properties:
    188
    disk: 102400
    189
    name: small-highmem-100GB
    190
    vm_types:
    191
    - cloud_properties:
    192
    cpu: 1
    193
    disk: 8192
    194
    ram: 1024
    195
    name: minimal
    196
    - cloud_properties:
    197
    cpu: 1
    198
    disk: 10240
    199
    ram: 2048
    200
    name: default
    201
    - cloud_properties:
    202
    cpu: 1
    203
    disk: 30720
    204
    ram: 4096
    205
    name: small
    206
    - cloud_properties:
    207
    cpu: 2
    208
    disk: 20480
    209
    ram: 4096
    210
    name: medium
    211
    - cloud_properties:
    212
    cpu: 2
    213
    disk: 20480
    214
    ram: 8192
    215
    name: medium-memory-8GB
    216
    - cloud_properties:
    217
    cpu: 4
    218
    disk: 20480
    219
    ram: 8192
    220
    name: large
    221
    - cloud_properties:
    222
    cpu: 8
    223
    disk: 20480
    224
    ram: 16384
    225
    name: xlarge
    226
    - cloud_properties:
    227
    cpu: 2
    228
    disk: 51200
    229
    ram: 4096
    230
    name: small-50GB
    231
    - cloud_properties:
    232
    cpu: 2
    233
    disk: 51200
    234
    ram: 4096
    235
    name: small-50GB-ephemeral-disk
    236
    - cloud_properties:
    237
    cpu: 4
    238
    disk: 102400
    239
    ram: 8192
    240
    name: small-100GB-ephemeral-disk
    241
    - cloud_properties:
    242
    cpu: 4
    243
    disk: 102400
    244
    ram: 8192
    245
    name: small-highmem-100GB-ephemeral-disk
    246
    - cloud_properties:
    247
    cpu: 8
    248
    disk: 20480
    249
    ram: 16384
    250
    name: small-highmem-16GB
    251
    - cloud_properties:
    252
    cpu: 1
    253
    disk: 4096
    254
    ram: 2048
    255
    name: caas_small
    256
    - cloud_properties:
    257
    cpu: 1
    258
    disk: 4096
    259
    ram: 1024
    260
    name: caas_small_api
    261
    - cloud_properties:
    262
    cpu: 1
    263
    disk: 4096
    264
    ram: 4096
    265
    name: caas_medium
    266
    - cloud_properties:
    267
    cpu: 2
    268
    disk: 8192
    269
    ram: 4096
    270
    name: service_medium
    271
    - cloud_properties:
    272
    cpu: 2
    273
    disk: 10240
    274
    ram: 2048
    275
    name: service_medium_2G
    276
    277
    Succeeded
    Copied!
  • Deployment 파일을 서버 환경에 맞게 수정한다.
1
# paasta-pinpoint 설정 파일 내용
2
name: paasta-pinpoint-service # 서비스 배포이름(필수)
3
4
releases:
5
- name: paasta-pinpoint # 서비스 릴리즈 이름(필수)
6
version: "2.0" # 서비스 릴리즈 버전(필수):latest 시 업로드된 서비스 릴리즈 최신버전
7
8
stemcells:
9
- alias: default
10
os: ((stemcell_os)) # 배포시 사용할 stemcell OS 이름
11
version: "((stemcell_version))" # 배포시 사용할 stemcell OS 버전
12
13
update:
14
canaries: 1 # canary 인스턴스 수(필수)
15
canary_watch_time: 30000-120000 # canary 인스턴스가 수행하기 위한 대기 시간(필수)
16
max_in_flight: 8 # non-canary 인스턴스가 병렬로 update 하는 최대 개수(필수)
17
update_watch_time: 30000-120000 # non-canary 인스턴스가 수행하기 위한 대기 시간(필수)
18
19
instance_groups:
20
- name: h_slave #작업 이름(필수) : Hadoop slave
21
azs: #설치 할 zone 이름
22
- z5
23
instances: 2 # job 인스턴스 수(필수)
24
vm_type: ((vm_type_small)) # cloud config 에 정의한 vm_type
25
stemcell: default
26
networks:
27
- name: ((default_network_name)) # cloud config 에 정의한 network 이름
28
static_ips: # 사용할 IP addresses
29
- 10.30.107.190
30
- 10.30.107.191
31
templates:
32
- name: h_slave # job template 이름(필수)
33
release: paasta-pinpoint
34
35
- name: h_secondary #작업 이름(필수) : Hadoop secondary server
36
azs: #설치 할 zone 이름
37
- z5
38
instances: 1 # job 인스턴스 수(필수)
39
vm_type: ((vm_type_small)) # cloud config 에 정의한 vm_type
40
stemcell: default
41
networks:
42
- name: ((default_network_name))
43
static_ips:
44
- 10.30.107.176
45
templates:
46
- name: h_secondary
47
release: paasta-pinpoint
48
49
- name: h_master #작업 이름(필수) : Hadoop master server
50
azs:
51
- z5
52
instances: 1
53
vm_type: ((vm_type_small))
54
stemcell: default
55
networks:
56
- name: ((default_network_name))
57
static_ips:
58
- 10.30.107.175
59
templates:
60
- name: h_master
61
release: paasta-pinpoint
62
63
- name: collector #작업 이름(필수) : pinpoint collector server
64
azs:
65
- z5
66
instances: 2
67
vm_type: ((vm_type_small))
68
stemcell: default
69
networks:
70
- name: ((default_network_name))
71
static_ips:
72
- 10.30.107.145
73
- 10.30.107.146
74
templates:
75
- name: collector
76
release: paasta-pinpoint
77
78
- name: haproxy_webui #작업 이름(필수) : pinpoint webui haproxy
79
azs:
80
- z5
81
instances: 1
82
vm_type: ((vm_type_small))
83
stemcell: default
84
networks:
85
- name: ((default_network_name))
86
static_ips:
87
- 10.30.107.178
88
- name: ((public_network_name))
89
static_ips:
90
- 115.68.47.183
91
templates:
92
- name: haproxy_webui
93
release: paasta-pinpoint
94
95
- name: webui #작업 이름(필수) : pinpoint webui server
96
azs:
97
- z5
98
instances: 2
99
vm_type: ((vm_type_small))
100
stemcell: default
101
networks:
102
- name: ((default_network_name))
103
static_ips:
104
- 10.30.107.179
105
- 10.30.107.180
106
templates:
107
- name: webui
108
release: paasta-pinpoint
109
110
- name: pinpoint_broker #작업 이름(필수) : pinpoint service broker
111
azs:
112
- z5
113
instances: 1
114
vm_type: ((vm_type_small))
115
stemcell: default
116
networks:
117
- name: ((default_network_name))
118
static_ips:
119
- 10.30.107.182
120
templates:
121
- name: broker
122
release: paasta-pinpoint
123
124
properties: # Pinpoint 설정정보
125
master:
126
host_name: h-master # Pinpoint master 설정정보
127
host_ip: 10.30.107.175
128
port: 9000
129
http_port: 50070
130
replication: 2 # Pinpoint master 복제개수
131
tcp_listen_port: 29994
132
udp_stat_listen_port: 29995
133
udp_span_listen_port: 29996
134
broker: # Pinpoint broker 설정정보
135
collector_ips:
136
- 10.30.107.145
137
- 10.30.107.146
138
collector_tcp_port: 29994 #
139
collector_stat_port: 29995
140
collector_span_port: 29996
141
dashboard_uri: http://115.68.47.183:80/#/main # Pinpoint dashboard url 설정정보
142
secondary: # Pinpoint secondary 설정정보
143
host_name: h-secondary
144
host_ip: 10.30.107.176
145
http_port: 50090
146
yarn: # Pinpoint yarn 설정정보
147
host_name: h-master
148
host_ip: 10.30.107.175
149
resource_tracker_port: 8025
150
scheduler_port: 8030
151
resourcemanager_port: 8040
152
slave: # Pinpoint slave 설정정보
153
host_names:
154
- h-slave0
155
- h-slave1
156
host_ips:
157
- 10.30.107.190
158
- 10.30.107.191
159
collector: # Pinpoint collector 설정정보
160
host_names:
161
- h-collector0
162
- h-collector1
163
host_ips:
164
- 10.30.107.145
165
- 10.30.107.146
166
haproxy: # Pinpoint haproxy 설정정보
167
host_name: haproxy-webui
168
host_ip: 10.30.107.178
169
http_port: 80
170
webui: # Pinpoint webui 설정정보
171
host_names:
172
- h-webui0
173
- h-webui1
174
host_ips:
175
- 10.30.107.179
176
- 10.30.107.180
Copied!
  • deploy-pinpoint-bosh2.0.sh 파일을 서버 환경에 맞게 수정한다.
1
#!/bin/bash
2
# stemcell 버전은 3309 버전으로 사용하시고 https://github.com/PaaS-TA/Guide-2.0-Linguine-/blob/master/Download_Page.md 에서 다운받아 쓰십시요.
3
# vsphere 인 경우 에는 use-public-network-vsphere.yml 사용하여 public ip를 설정 하고 그 이외의 IaaS는 use-public-network.yml 사용한다.
4
5
bosh -e micro-bosh -d paasta-pinpoint-service deploy paasta_pinpoint_bosh2.0.yml \
6
-o use-public-network-vsphere.yml \
7
-v default_network_name=service_private \
8
-v public_network_name=service_public \
9
-v stemcell_os=ubuntu-trusty \
10
-v stemcell_version=3309 \
11
-v vm_type_small=minimal
Copied!
  • Pinpoint 서비스팩을 배포한다.
  • 사용 예시
    1
    $ ./deploy-pinpoint-bosh2.0.sh
    2
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    3
    4
    Using deployment 'paasta-pinpoint-service'
    5
    6
    + azs:
    7
    + - cloud_properties:
    8
    + datacenters:
    9
    + - clusters:
    10
    + - BD-HA:
    11
    + resource_pool: CF_BOSH2_Pool
    12
    + name: BD-HA
    13
    + name: z1
    14
    + - cloud_properties:
    15
    + datacenters:
    16
    + - clusters:
    17
    + - BD-HA:
    18
    + resource_pool: CF_BOSH2_Pool
    19
    + name: BD-HA
    20
    + name: z2
    21
    + - cloud_properties:
    22
    + datacenters:
    23
    + - clusters:
    24
    + - BD-HA:
    25
    + resource_pool: CF_BOSH2_Pool
    26
    + name: BD-HA
    27
    + name: z3
    28
    + - cloud_properties:
    29
    + datacenters:
    30
    + - clusters:
    31
    + - BD-HA:
    32
    + resource_pool: CF_BOSH2_Pool
    33
    + name: BD-HA
    34
    + name: z4
    35
    + - cloud_properties:
    36
    + datacenters:
    37
    + - clusters:
    38
    + - BD-HA:
    39
    + resource_pool: CF_BOSH2_Pool
    40
    + name: BD-HA
    41
    + name: z5
    42
    + - cloud_properties:
    43
    + datacenters:
    44
    + - clusters:
    45
    + - BD-HA:
    46
    + resource_pool: CF_BOSH2_Pool
    47
    + name: BD-HA
    48
    + name: z6
    49
    50
    + vm_types:
    51
    + - cloud_properties:
    52
    + cpu: 1
    53
    + disk: 8192
    54
    + ram: 1024
    55
    + name: minimal
    56
    + - cloud_properties:
    57
    + cpu: 1
    58
    + disk: 10240
    59
    + ram: 2048
    60
    + name: default
    61
    + - cloud_properties:
    62
    + cpu: 1
    63
    + disk: 30720
    64
    + ram: 4096
    65
    + name: small
    66
    + - cloud_properties:
    67
    + cpu: 2
    68
    + disk: 20480
    69
    + ram: 4096
    70
    + name: medium
    71
    + - cloud_properties:
    72
    + cpu: 2
    73
    + disk: 20480
    74
    + ram: 8192
    75
    + name: medium-memory-8GB
    76
    + - cloud_properties:
    77
    + cpu: 4
    78
    + disk: 20480
    79
    + ram: 8192
    80
    + name: large
    81
    + - cloud_properties:
    82
    + cpu: 8
    83
    + disk: 20480
    84
    + ram: 16384
    85
    + name: xlarge
    86
    + - cloud_properties:
    87
    + cpu: 2
    88
    + disk: 51200
    89
    + ram: 4096
    90
    + name: small-50GB
    91
    + - cloud_properties:
    92
    + cpu: 2
    93
    + disk: 51200
    94
    + ram: 4096
    95
    + name: small-50GB-ephemeral-disk
    96
    + - cloud_properties:
    97
    + cpu: 4
    98
    + disk: 102400
    99
    + ram: 8192
    100
    + name: small-100GB-ephemeral-disk
    101
    + - cloud_properties:
    102
    + cpu: 4
    103
    + disk: 102400
    104
    + ram: 8192
    105
    + name: small-highmem-100GB-ephemeral-disk
    106
    + - cloud_properties:
    107
    + cpu: 8
    108
    + disk: 20480
    109
    + ram: 16384
    110
    + name: small-highmem-16GB
    111
    + - cloud_properties:
    112
    + cpu: 1
    113
    + disk: 4096
    114
    + ram: 2048
    115
    + name: caas_small
    116
    + - cloud_properties:
    117
    + cpu: 1
    118
    + disk: 4096
    119
    + ram: 1024
    120
    + name: caas_small_api
    121
    + - cloud_properties:
    122
    + cpu: 1
    123
    + disk: 4096
    124
    + ram: 4096
    125
    + name: caas_medium
    126
    + - cloud_properties:
    127
    + cpu: 2
    128
    + disk: 8192
    129
    + ram: 4096
    130
    + name: service_medium
    131
    + - cloud_properties:
    132
    + cpu: 2
    133
    + disk: 10240
    134
    + ram: 2048
    135
    + name: service_medium_2G
    136
    137
    + vm_extensions:
    138
    + - cloud_properties:
    139
    + ports:
    140
    + - host: 3306
    141
    + name: mysql-proxy-lb
    142
    + - name: cf-router-network-properties
    143
    + - name: cf-tcp-router-network-properties
    144
    + - name: diego-ssh-proxy-network-properties
    145
    + - name: cf-haproxy-network-properties
    146
    + - cloud_properties:
    147
    + disk: 51200
    148
    + name: small-50GB
    149
    + - cloud_properties:
    150
    + disk: 102400
    151
    + name: small-highmem-100GB
    152
    153
    + compilation:
    154
    + az: z1
    155
    + network: default
    156
    + reuse_compilation_vms: true
    157
    + vm_type: large
    158
    + workers: 5
    159
    160
    + networks:
    161
    + - name: default
    162
    + subnets:
    163
    + - azs:
    164
    + - z1
    165
    + - z2
    166
    + - z3
    167
    + - z4
    168
    + - z5
    169
    + - z6
    170
    + cloud_properties:
    171
    + name: Internal
    172
    + dns:
    173
    + - 8.8.8.8
    174
    + gateway: 10.30.20.23
    175
    + range: 10.30.0.0/16
    176
    + reserved:
    177
    + - 10.30.0.0 - 10.30.111.40
    178
    + - name: public
    179
    + subnets:
    180
    + - azs:
    181
    + - z1
    182
    + - z2
    183
    + - z3
    184
    + - z4
    185
    + - z5
    186
    + - z6
    187
    + cloud_properties:
    188
    + name: External
    189
    + dns:
    190
    + - 8.8.8.8
    191
    + gateway: 115.68.46.177
    192
    + range: 115.68.46.176/28
    193
    + reserved:
    194
    + - 115.68.46.176 - 115.68.46.188
    195
    + static:
    196
    + - 115.68.46.189 - 115.68.46.190
    197
    + type: manual
    198
    + - name: service_private
    199
    + subnets:
    200
    + - azs:
    201
    + - z1
    202
    + - z2
    203
    + - z3
    204
    + - z4
    205
    + - z5
    206
    + - z6
    207
    + cloud_properties:
    208
    + name: Internal
    209
    + dns:
    210
    + - 8.8.8.8
    211
    + gateway: 10.30.20.23
    212
    + range: 10.30.0.0/16
    213
    + reserved:
    214
    + - 10.30.0.0 - 10.30.106.255
    215
    + static:
    216
    + - 10.30.107.1 - 10.30.107.255
    217
    + - name: service_public
    218
    + subnets:
    219
    + - azs:
    220
    + - z1
    221
    + - z2
    222
    + - z3
    223
    + - z4
    224
    + - z5
    225
    + - z6
    226
    + cloud_properties:
    227
    + name: External
    228
    + dns:
    229
    + - 8.8.8.8
    230
    + gateway: 115.68.47.161
    231
    + range: 115.68.47.160/24
    232
    + reserved:
    233
    + - 115.68.47.161 - 115.68.47.174
    234
    + static:
    235
    + - 115.68.47.175 - 115.68.47.185
    236
    + type: manual
    237
    + - name: portal_service_public
    238
    + subnets:
    239
    + - azs:
    240
    + - z1
    241
    + - z2
    242
    + - z3
    243
    + - z4
    244
    + - z5
    245
    + - z6
    246
    + cloud_properties:
    247
    + name: External
    248
    + dns:
    249
    + - 8.8.8.8
    250
    + gateway: 115.68.46.209
    251
    + range: 115.68.46.208/28
    252
    + reserved:
    253
    + - 115.68.46.216 - 115.68.46.222
    254
    + static:
    255
    + - 115.68.46.214
    256
    + type: manual
    257
    258
    + disk_types:
    259
    + - disk_size: 1024
    260
    + name: default
    261
    + - disk_size: 1024
    262
    + name: 1GB
    263
    + - disk_size: 2048
    264
    + name: 2GB
    265
    + - disk_size: 4096
    266
    + name: 4GB
    267
    + - disk_size: 5120
    268
    + name: 5GB
    269
    + - disk_size: 8192
    270
    + name: 8GB
    271
    + - disk_size: 10240
    272
    + name: 10GB
    273
    + - disk_size: 20480
    274
    + name: 20GB
    275
    + - disk_size: 30720
    276
    + name: 30GB
    277
    + - disk_size: 51200
    278
    + name: 50GB
    279
    + - disk_size: 102400
    280
    + name: 100GB
    281
    + - disk_size: 1048576
    282
    + name: 1TB
    283
    284
    + name: paasta-pinpoint-service
    285
    286
    Continue? [yN]: y
    287
    288
    Task 4506
    289
    290
    Task 4506 | 06:04:10 | Preparing deployment: Preparing deployment (00:00:01)
    291
    Task 4506 | 06:04:12 | Preparing package compilation: Finding packages to compile (00:00:00)
    292
    Task 4506 | 06:04:12 | Compiling packages: cli/24305e50a638ece2cace4ef4803746c0c9fe4bb0
    293
    Task 4506 | 06:04:12 | Compiling packages: openjdk-1.8.0_45/57e0ee876ea9d90f5470e3784ae1171bccee850a
    294
    Task 4506 | 06:04:12 | Compiling packages: op-mysql-java-broker/3bf47851b2c0d3bea63a0c58452df58c14a15482
    295
    Task 4506 | 06:04:12 | Compiling packages: syslog_aggregator/078da6dcb999c1e6f5398a6eb739182ccb4aba25
    296
    Task 4506 | 06:04:12 | Compiling packages: common/ba480a46c4b2aa9484fb24ed01a8649453573e6f
    297
    Task 4506 | 06:06:53 | Compiling packages: syslog_aggregator/078da6dcb999c1e6f5398a6eb739182ccb4aba25 (00:02:41)
    298
    Task 4506 | 06:06:53 | Compiling packages: golang/f57ddbc8d55d7a0f08775bf76bb6a27dc98c7ea7
    299
    Task 4506 | 06:06:55 | Compiling packages: common/ba480a46c4b2aa9484fb24ed01a8649453573e6f (00:02:43)
    300
    Task 4506 | 06:06:55 | Compiling packages: python/4e255efa754d91b825476b57e111345f200944e1
    301
    Task 4506 | 06:06:55 | Compiling packages: cli/24305e50a638ece2cace4ef4803746c0c9fe4bb0 (00:02:43)
    302
    Task 4506 | 06:06:55 | Compiling packages: check/d6811f25e9d56428a9b942631c27c9b24f5064dc
    303
    Task 4506 | 06:07:05 | Compiling packages: op-mysql-java-broker/3bf47851b2c0d3bea63a0c58452df58c14a15482 (00:02:53)
    304
    Task 4506 | 06:07:05 | Compiling packages: boost/3eb8bdb1abb7eff5b63c4c5bdb41c0a778925c31
    305
    Task 4506 | 06:07:10 | Compiling packages: openjdk-1.8.0_45/57e0ee876ea9d90f5470e3784ae1171bccee850a (00:02:58)
    306
    Task 4506 | 06:07:53 | Compiling packages: golang/f57ddbc8d55d7a0f08775bf76bb6a27dc98c7ea7 (00:01:00)
    307
    Task 4506 | 06:07:53 | Compiling packages: switchboard/fad565dadbb37470771801952001c7071e55a364
    308
    Task 4506 | 06:07:53 | Compiling packages: route-registrar/f3fdfb8c940e7227a96c06e413ae6827aba8eeda
    309
    Task 4506 | 06:07:55 | Compiling packages: check/d6811f25e9d56428a9b942631c27c9b24f5064dc (00:01:00)
    310
    Task 4506 | 06:07:55 | Compiling packages: gra-log-purger/f02fa5774ab54dbb1b1c3702d03cb929b85d60e6
    311
    Task 4506 | 06:08:30 | Compiling packages: route-registrar/f3fdfb8c940e7227a96c06e413ae6827aba8eeda (00:00:37)
    312
    Task 4506 | 06:08:30 | Compiling packages: galera-healthcheck/3da4dedbcd7d9f404a19e7720e226fd472002266
    313
    Task 4506 | 06:08:31 | Compiling packages: gra-log-purger/f02fa5774ab54dbb1b1c3702d03cb929b85d60e6 (00:00:36)
    314
    Task 4506 | 06:08:31 | Compiling packages: mariadb_ctrl/7658290da98e2cad209456f174d3b9fa143c87fc
    315
    Task 4506 | 06:08:32 | Compiling packages: switchboard/fad565dadbb37470771801952001c7071e55a364 (00:00:39)
    316
    Task 4506 | 06:08:58 | Compiling packages: galera-healthcheck/3da4dedbcd7d9f404a19e7720e226fd472002266 (00:00:28)
    317
    Task 4506 | 06:08:59 | Compiling packages: mariadb_ctrl/7658290da98e2cad209456f174d3b9fa143c87fc (00:00:28)
    318
    Task 4506 | 06:09:42 | Compiling packages: boost/3eb8bdb1abb7eff5b63c4c5bdb41c0a778925c31 (00:02:37)
    319
    Task 4506 | 06:11:27 | Compiling packages: python/4e255efa754d91b825476b57e111345f200944e1 (00:04:32)
    320
    Task 4506 | 06:11:27 | Compiling packages: scons/11e7ad3b28b43a96de3df7aa41afddde582fcc38 (00:00:22)
    321
    Task 4506 | 06:11:49 | Compiling packages: galera/d15a1d2d15e5e7417278d4aa1b908566022b9623 (00:13:18)
    322
    Task 4506 | 06:25:07 | Compiling packages: mariadb/43aa3547bc5a01dd51f1501e6b93c215dd7255e9 (00:18:49)
    323
    Task 4506 | 06:43:56 | Compiling packages: xtrabackup/2e701e7a9e4241b28052d984733de36aae152275 (00:10:26)
    324
    Task 4506 | 06:55:22 | Creating missing vms: mysql/ea075ae6-6326-478b-a1ba-7fbb0b5b0bf5 (0)
    325
    Task 4506 | 06:55:22 | Creating missing vms: mysql/e8c52bf2-cd48-45d0-9553-f6367942a634 (2)
    326
    Task 4506 | 06:55:22 | Creating missing vms: proxy/023edddd-418e-46e4-8d40-db452c694e16 (0)
    327
    Task 4506 | 06:55:22 | Creating missing vms: mysql/8a830154-25b6-432a-ad39-9ff09d015760 (1)
    328
    Task 4506 | 06:55:22 | Creating missing vms: paasta-mysql-java-broker/bb5676ca-efba-48fc-bc11-f464d0ae9c78 (0)
    329
    Task 4506 | 06:57:18 | Creating missing vms: mysql/ea075ae6-6326-478b-a1ba-7fbb0b5b0bf5 (0) (00:01:56)
    330
    Task 4506 | 06:57:23 | Creating missing vms: proxy/023edddd-418e-46e4-8d40-db452c694e16 (0) (00:02:01)
    331
    Task 4506 | 06:57:23 | Creating missing vms: mysql/e8c52bf2-cd48-45d0-9553-f6367942a634 (2) (00:02:01)
    332
    Task 4506 | 06:57:23 | Creating missing vms: paasta-mysql-java-broker/bb5676ca-efba-48fc-bc11-f464d0ae9c78 (0) (00:02:01)
    333
    Task 4506 | 06:57:23 | Creating missing vms: mysql/8a830154-25b6-432a-ad39-9ff09d015760 (1) (00:02:01)
    334
    Task 4506 | 06:57:24 | Updating instance mysql: mysql/ea075ae6-6326-478b-a1ba-7fbb0b5b0bf5 (0) (canary) (00:02:32)
    335
    Task 4506 | 06:59:56 | Updating instance mysql: mysql/8a830154-25b6-432a-ad39-9ff09d015760 (1) (00:03:03)
    336
    Task 4506 | 07:02:59 | Updating instance mysql: mysql/e8c52bf2-cd48-45d0-9553-f6367942a634 (2) (00:03:04)
    337
    Task 4506 | 07:06:03 | Updating instance proxy: proxy/023edddd-418e-46e4-8d40-db452c694e16 (0) (canary) (00:01:01)
    338
    Task 4506 | 07:07:04 | Updating instance paasta-mysql-java-broker: paasta-mysql-java-broker/bb5676ca-efba-48fc-bc11-f464d0ae9c78 (0) (canary) (00:01:02)
    339
    340
    Task 4506 Started Fri Aug 31 06:04:10 UTC 2018
    341
    Task 4506 Finished Fri Aug 31 07:08:06 UTC 2018
    342
    Task 4506 Duration 01:03:56
    343
    Task 4506 done
    344
    345
    Succeeded
    Copied!
  • 배포된 Pinpoint 서비스팩을 확인한다.
  • 사용 예시
    1
    $ bosh -e micro-bosh -d paasta-pinpoint-service vms
    2
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    3
    4
    Task 5006. Done
    5
    6
    Deployment 'paasta-pinpoint-service'
    7
    8
    Instance Process State AZ IPs VM CID VM Type Active
    9
    collector/5f10f9cf-67ed-4c08-8c14-99d7f7a818c2 running z5 10.30.107.145 vm-1714d225-85fa-4236-94db-7ed26baa52b3 minimal true
    10
    collector/79d48854-7eb3-4f50-92aa-8b2df8380653 running z5 10.30.107.146 vm-415e14ed-5304-40ec-9529-3f3f7c1902b4 minimal true
    11
    h_master/723a34d6-0756-41e2-b11e-1530596cbb09 running z5 10.30.107.175 vm-037e021b-3dba-4ea3-961c-6bd259d25c4b minimal true
    12
    h_secondary/78b552e3-9b38-4f92-864f-8457e6d0673d running z5 10.30.107.176 vm-54d4848a-8001-49e5-8be7-37fd6ca06d6c minimal true
    13
    h_slave/984ea017-9495-4402-8057-613bdee868be running z5 10.30.107.190 vm-9cdeec0d-d71a-4133-942b-7439ef0df359 minimal true
    14
    h_slave/d32b818e-9d2d-4dbe-856d-f7027605865f running z5 10.30.107.191 vm-6aebc5a9-8a78-4388-b876-2c6dc192de71 minimal true
    15
    haproxy_webui/22999f9c-0798-43a5-b93b-bc5d44c4d210 running z5 10.30.107.178 vm-294e229c-aa89-4a5c-9960-4009579bbf54 minimal true
    16
    115.68.47.183
    17
    pinpoint_broker/7a9d8423-c5f9-4e3c-be16-42e9215f8268 running z5 10.30.107.182 vm-1b9b0891-8a02-45af-8b0c-ca21bf56e64e minimal true
    18
    webui/30f7c9cf-ab03-4f78-a9bf-96c5148a9ec1 running z5 10.30.107.180 vm-62d5e876-2ab4-4327-ba54-2f74b53e3da9 minimal true
    19
    webui/a0433ae3-2a7b-4c7f-822c-9c1d46c658ea running z5 10.30.107.179 vm-365edb16-1b8e-4c65-a984-b03a368d8e95 minimal true
    20
    21
    10 vms
    22
    23
    Succeeded
    Copied!

2.4. HBase 기본 데이터 실행

  • Pinpoint 서비스팩 배포가 완료 되었으면 HBase 14개의 기본 Table이 생성되어야 Application에서 서비스 팩을 정상 사용할 수 있다. h_master 서버에 ssh 로 접속 하여 hbase table 생성 스크립트를 구동한다.
  • 사용 예시
    1
    $ bosh -e micro-bosh -d paasta-pinpoint-service ssh h_master
    2
    3
    h_master/fbd4ed1f-92ce-4244-a0bc-ebc089cebe12:/var/vcap/packages/hbase/bin$ sudo mount -o remount, exec /tmp && /var/vcap/packages/hbase/bin/hbase shell /var/vcap/packages/hbase/bin/hbase-create.hbase
    4
    2018-08-28 02:21:54,165 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    5
    0 row(s) in 2.0700 seconds
    6
    7
    0 row(s) in 4.2910 seconds
    8
    9
    0 row(s) in 1.2440 seconds
    10
    11
    0 row(s) in 1.2360 seconds
    12
    13
    0 row(s) in 1.2660 seconds
    14
    15
    0 row(s) in 2.2480 seconds
    16
    17
    0 row(s) in 2.2610 seconds
    18
    19
    0 row(s) in 2.2490 seconds
    20
    21
    0 row(s) in 8.2970 seconds
    22
    23
    0 row(s) in 2.3460 seconds
    24
    25
    0 row(s) in 2.2660 seconds
    26
    27
    0 row(s) in 2.2680 seconds
    28
    29
    0 row(s) in 2.3110 seconds
    30
    31
    0 row(s) in 2.2500 seconds
    32
    33
    TABLE
    34
    AgentEvent
    35
    AgentInfo
    36
    AgentLifeCycle
    37
    AgentStat
    38
    ApiMetaData
    39
    ApplicationIndex
    40
    ApplicationMapStatisticsCallee_Ver2
    41
    ApplicationMapStatisticsCaller_Ver2
    42
    ApplicationMapStatisticsSelf_Ver2
    43
    ApplicationTraceIndex
    44
    HostApplicationMap_Ver2
    45
    SqlMetaData_Ver2
    46
    StringMetaData
    47
    Traces
    48
    14 row(s) in 0.0470 seconds
    Copied!

2.5. Pinpoint 서비스 브로커 등록

Pinpoint 서비스팩 배포가 완료 되었으면 Application에서 서비스 팩을 사용하기 위해서 먼저 Pinpoint 서비스 브로커를 등록해 주어야 한다.
서비스 브로커 등록시 PaaS-TA에서 서비스브로커를 등록 할 수 있는 사용자로 로그인이 되어 있어야 한다.
  • 서비스 브로커 목록을 확인한다.
1
$ cf service-brokers
Copied!
1
Getting service brokers as admin...
2
3
name url
4
No service brokers found
Copied!
  • Pinpoint 서비스 브로커를 등록한다.
1
$ cf create-service-broker {서비스브로커 이름} {서비스브로커 사용자ID} {서비스브로커 사용자비밀번호} http://{서비스브로커 URL(IP)}
Copied!
1
서비스브로커 이름 : 서비스브로커 관리를 위해 PaaS-TA에서 보여지는 명칭이다. 서비스 Marketplace에서는 각각의 API 서비스 명이 보여지니 여기서 명칭은 서비스브로커 명칭이다.
2
3
서비스브로커 사용자ID / 비밀번호 : 서비스팩에 접근할 수 있는 사용자 ID입니다. 서비스브로커도 하나의 API 서버이기 때문에 아무나 접근을 허용할 수 없어 접근이 가능한 ID/비밀번호를 입력한다.
4
5
서비스브로커 URL : 서비스브로커가 제공하는 API를 사용할 수 있는 URL을 입력한다.
Copied!
1
$ cf create-service-broker pinpoint-service-broker admin cloudfoundry http://10.30.107.182:8080
Copied!
1
Creating service broker pinpoint-service-broker as admin...
2
OK
Copied!
  • 등록된 Pinpoint 서비스 브로커를 확인한다.
1
$ cf service-brokers
Copied!
1
Getting service brokers as admin...
2
name url
3
pinpoint-service-broker http:// 10.30.70.82:8080
Copied!
  • 접근 가능한 서비스 목록을 확인한다.
1
$ cf service-access
Copied!
1
Getting service access as admin...
2
broker: Pinpoint-service-broker
3
service plan access orgs
4
Pinpoint Pinpoint\_standard none
Copied!
서비스 브로커 생성시 디폴트로 접근을 허용하지 않는다.
  • 특정 조직에 해당 서비스 접근 허용을 할당하고 접근 서비스 목록을 다시 확인한다. (전체 조직)
1
$ cf enable-service-access Pinpoint
Copied!
1
Enabling access to all plans of service Pinpoint for all orgs as admin...
2
OK
Copied!
서비스 접근 허용을 확인한다.
1
$ cf service-access
Copied!
1
Getting service access as admin...
2
broker: Pinpoint-service-broker
3
service plan access orgs
4
Pinpoint Pinpoint\_standard all
Copied!

3. Sample Web App 연동 Pinpoint 연동

본 Sample Web App은 개방형 클라우드 플랫폼에 배포되며 Pinpoint의 서비스를 Provision과 Bind를 한 상태에서 사용이 가능하다.

3.1. Sample Web App 구조

Sample Web App은 PaaS-TA에 App으로 배포가 된다. 배포된 App에 Pinpoint 서비스 Bind 를 통하여 초기 데이터를 생성하게 된다. 바인드 완료 후 연결 url을 통하여 브라우저로 해당 App에 대한 Pinpoint 서비스 모니터링을 할 수 있다.
  • Spring-music App을 이용하여 Pinpoint 모니터링을 테스트 하였다.
  • 앱을 다운로드 후 –b 옵션을 주어 buildpack을 지정하여 push 해 놓는다.
1
$ cf push -b java_buildpack_pinpoint --no-start
Copied!
1
Using manifest file /home/ubuntu/workspace/bd_test/spring-music/manifest.yml
2
3
Creating app spring-music-pinpoint in org org / space space as admin...
4
OK
5
6
Creating route spring-music-pinpoint.monitoring.open-paas.com...
7
OK
8
9
Binding spring-music-pinpoint.monitoring.open-paas.com to spring-music-pinpoint...
10
OK
11
12
Uploading spring-music-pinpoint...
13
Uploading app files from: /tmp/unzipped-app175965484
14
Uploading 21.2M, 126 files
15
Done uploading
16
OK
Copied!
1
$ cf apps
Copied!
1
Getting apps in org org / space space as admin...
2
OK
3
4
name requested state instances memory disk urls
5
php-demo started 1/1 256M 1G php-demo.monitoring.open-paas.com
6
spring-music stopped 0/1 512M 1G spring-music.monitoring.open-paas.com
7
spring-music-pinpoint stopped 0/1 512M 1G spring-music-pinpoint.monitoring.open-paas.com
Copied!

3.2. PaaS-TA에서 서비스 신청

Sample Web App에서 Pinpoint 서비스를 사용하기 위해서는 서비스 신청(Provision)을 해야 한다.
*참고: 서비스 신청시 PaaS-TA에서 서비스를 신청 할 수 있는 사용자로 로그인이 되어 있어야 한다.
  • 먼저 PaaS-TA Marketplace에서 서비스가 있는지 확인을
    한다.
1
$ cf marketplace
Copied!
1
Getting services from marketplace in org org / space space as admin...
2
OK
3
4
service plans description
5
Pinpoint Pinpoint_standard A simple pinpoint implementation
Copied!
  • Marketplace에서 원하는 서비스가 있으면 서비스 신청(Provision)을 하여
    서비스 인스턴스를 생성한다.
1
$ cf create-service {서비스명} {서비스플랜} {내서비스명}
Copied!
1
서비스명 : p-Pinpoint로 Marketplace에서 보여지는 서비스 명칭이다.
2
서비스플랜 : 서비스에 대한 정책으로 plans에 있는 정보 중 하나를 선택한다. Pinpoint 서비스는 10 connection, 100 connection 를 지원한다.
3
내서비스명 : 내 서비스에서 보여지는 명칭이다. 이 명칭을 기준으로 환경설정정보를 가져온다.
Copied!
1
$ cf create-service Pinpoint Pinpoint_standard PS1
Copied!