Portal UI 설치 가이드

1. 문서 개요

1.1. 목적

본 문서(PaaS-TA Portal Release 설치 가이드)는 전자정부표준프레임워크 기반의 PaaS-TA에서 제공되는 PaaS-TA Portal Release를 Bosh2.0을 이용하여 설치 하는 방법을 기술하였다. PaaS-TA 3.5 버전부터는 Bosh2.0 기반으로 deploy를 진행하며 내부 네트워크는 link를 적용시켜 자동으로 Ip가 할당이 된다. 기존 Bosh1.0 기반으로 설치를 원할경우에는 PaaS-TA 3.1 이하 버전의 문서를 참고한다.

1.2. 범위

설치 범위는 PaaS-TA Portal Release를 검증하기 위한 기본 설치를 기준으로 작성하였다.

1.3. 시스템 구성도

본 문서의 설치된 시스템 구성도이다. Binary Storage, Mariadb, Proxy, Gateway Api, Registration Api, Portal Api, Common Api, Log Api, Storage Api, Webadmin, Webuser로 최소사항을 구성하였다.
  • Paas-TA Portal 설치할때 cloud config에 추가적으로 정의한 VM_Tpye명과 스펙
VM_Type
스펙
portal_tiny
1vCPU / 256MB RAM / 4GB Disk
portal_medium
1vCPU / 1GB RAM / 4GB Disk
portal_small
1vCPU / 512MB RAM / 4GB Disk
  • Paas-TA Portal각 Instance의 Resource Pool과 스펙
구분
Resource Pool
스펙
haproxy
portal_small
1vCPU / 512MB RAM / 4GB Disk
mariadb
portal_small
1vCPU / 512MB RAM / 4GB Disk +10GB(영구적 Disk)
paas-ta-portal-webadmin
portal_small
1vCPU / 512MB RAM / 4GB Disk
paas-ta-portal-webuser
portal_small
1vCPU / 512MB RAM / 4GB Disk

1.4. 참고자료

2. PaaS-TA Portal 설치

2.1. 설치전 준비사항

본 설치 가이드는 Linux 환경에서 설치하는 것을 기준으로 하였다. 서비스팩 설치를 위해서는 먼저 BOSH CLI v2 가 설치 되어 있어야 하고 BOSH 에 로그인이 되어 있어야 한다. BOSH CLI v2 가 설치 되어 있지 않을 경우 먼저 BOSH2.0 설치 가이드 문서를 참고 하여 BOSH CLI v2를 설치를 하고 사용법을 숙지 해야 한다.
  • PaaS-TA에서 제공하는 압축된 릴리즈 파일들을 다운받는다.
  • 다운로드 방법
  • 릴리즈된 파일받는방법
    1
    $ wget -O download.zip http://45.248.73.44/index.php/s/DiqGmxMk6sDjA2z/download
    2
    $ unzip download.zip
    Copied!
  • PAAS-TA-PORTAL-UI-RELEASE 다운받아 직접 릴리즈 생성및 업로드 하는 방법
    1
    $ git clone https://github.com/PaaS-TA/PAAS-TA-PORTAL-UI-RELEASE.git
    2
    $ cd ~/PAAS-TA-PORTAL-UI-RELEASE
    3
    $ wget -O src.zip http://45.248.73.44/index.php/s/GDWgAMRQ7tnH7eo/download
    4
    $ unzip src.zip
    5
    $ rm -rf src.zip
    6
    $ sh start.sh
    Copied!
  1. 1.
    bosh envs 명령어를 통해 사용할 bosh env를 확인한다.
    1
    $ bosh envs
    2
    URL Alias
    3
    10.0.1.7 micro-bosh
    4
    5
    1 environments
    6
    7
    Succeeded
    Copied!
  2. 2.
    bosh runtime-config 확인 및 수정
    1. 1.
      명령어를 통해 bosh-dns include deployments 에 paasta가 있는지 확인한다.
    $ bosh -e micro-bosh runtime-config Using environment '10.0.50.90' as client 'admin'
    addons:
    • include:
      deployments:
      • paasta
        stemcell:
      • os: ubuntu-trusty
      • os: ubuntu-xenial
        jobs:
        • name: bosh-dns
          properties:
          api:
          client:
          tls: "((/dns_api_client_tls))"
          server:
          tls: "((/dns_api_server_tls))"
          cache:
          enabled: true
          health:
          client:
          tls: "((/dns_healthcheck_client_tls))"
          enabled: true
          server:
          tls: "((/dns_healthcheck_server_tls))"
          release: bosh-dns
          name: bosh-dns
    • include:
      stemcell:
      • os: windows2012R2
      • os: windows2016
      • os: windows1803
        jobs:
        • name: bosh-dns-windows
          properties:
          api:
          client:
          tls: "((/dns_api_client_tls))"
          server:
          tls: "((/dns_api_server_tls))"
          cache:
          enabled: true
          health:
          client:
          tls: "((/dns_healthcheck_client_tls))"
          enabled: true
          server:
          tls: "((/dns_healthcheck_server_tls))"
          release: bosh-dns
          name: bosh-dns-windows
          releases:
    • name: bosh-dns
      sha1: d1aadbda5d60c44dec4a429cda872cf64f6d8d0b
      version: 1.10.0
      variables:
    • name: "/dns_healthcheck_tls_ca"
      options:
      common_name: dns-healthcheck-tls-ca
      is_ca: true
      type: certificate
    • name: "/dns_healthcheck_server_tls"
      options:
      ca: "/dns_healthcheck_tls_ca"
      common_name: health.bosh-dns
      extended_key_usage:
      • server_auth
        type: certificate
    • name: "/dns_healthcheck_client_tls"
      options:
      ca: "/dns_healthcheck_tls_ca"
      common_name: health.bosh-dns
      extended_key_usage:
      • client_auth
        type: certificate
    • name: "/dns_api_tls_ca"
      options:
      common_name: dns-api-tls-ca
      is_ca: true
      type: certificate
    • name: "/dns_api_server_tls"
      options:
      ca: "/dns_api_tls_ca"
      common_name: api.bosh-dns
      extended_key_usage:
      • server_auth
        type: certificate
    • name: "/dns_api_client_tls" options: ca: "/dns_api_tls_ca" common_name: api.bosh-dns extended_key_usage:
      • client_auth
        type: certificate
      Succeeded
  1. 1.
    bosh-dns include deployments에 paasta가 없다면 ~/workspace/paasta-5.0/deployment/bosh-deployment/runtime-configs 의 dns.yml 을 열어서 paasta를 추가해야한다.
1
addons:
2
- name: bosh-dns
3
jobs:
4
- name: bosh-dns
5
release: bosh-dns
6
properties:
7
cache:
8
enabled: true
9
health:
10
enabled: true
11
server:
12
tls: ((/dns_healthcheck_server_tls))
13
client:
14
tls: ((/dns_healthcheck_client_tls))
15
api:
16
server:
17
tls: ((/dns_api_server_tls))
18
client:
19
tls: ((/dns_api_client_tls))
20
include:
21
deployments:
22
- paasta
23
stemcell:
24
- os: ubuntu-trusty
25
- os: ubuntu-xenial
Copied!
  1. 1.
    dns.yml의 bosh-dns addons 설정 부분이다. Incoude.deployments에 paasta를 위와같이 추가시킨다.
  2. 2.
    yml설정을 한 후에 ~/workspace/paasta-5.0/deployment/bosh-deployment/update-runtime-config.sh을 실행시키면 runtime-config가 업데이트가 된다.
  3. 3.
    다시 bosh runtime-config 명령어를 통해 bosh-dns include deployments 에 paasta가 있는지 확인 후 성공적으로 등록이 되었으면 ppaasta-portal-ui-release 릴리즈 업로드 및 deploy를 진행한다.
    2.2. PaaS-TA Portal UI 릴리즈 업로드
  • 업로드 되어 있는 릴리즈 목록을 확인한다.
  • 사용 예시
    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
    paasta-delivery-pipeline-release 1.0* b3ee8f48+
    25
    paasta-pinpoint 2.0* 2dbb8bf3+
    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!
  • paasta-portal-ui-release(ver 1.0)이 업로드 되어 있지 않은 것을 확인
  • PaaS-TA Portal 릴리즈 파일을 업로드한다.
    명령어 : bosh -e "bosh env" upload-release "release file"
    1
    릴리즈 파일 위치 : PAAS-TA-PORTAL-RELEASE/paasta-portal-ui-release-1.0.tgz
    Copied!
  • 사용 예시
    1
    $ bosh -e micro-bosh upload-release paasta-portal-ui-release-1.0.tgz
    2
    Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
    3
    4
    ######################################################## 100.00% 153.81 MiB/s 3s
    5
    Task 4687
    6
    7
    Task 4687 | 02:09:08 | Extracting release: Extracting release (00:00:05)
    8
    Task 4687 | 02:09:13 | Verifying manifest: Verifying manifest (00:00:00)
    9
    Task 4687 | 02:09:14 | Resolving package dependencies: Resolving package dependencies (00:00:00)
    10
    Task 4687 | 02:09:14 | Creating new packages: paas-ta-portal-webadmin/a74db51496832a2b1e1e947c424d08b33fb46c83 (00:00:01)
    11
    Task 4687 | 02:09:20 | Creating new packages: haproxy/14b0441f6d68c89612f53ce4334a65c80d601e51 (00:00:00)
    12
    Task 4687 | 02:09:28 | Creating new packages: paas-ta-portal-webuser/e3901a2d9e9cd349a06fee226bc3230e1c91b430 (00:00:02)
    13
    Task 4687 | 02:09:32 | Creating new packages: java/86d8b8f8115418addf836753c1735abe547d4105 (00:00:03)
    14
    Task 4687 | 02:09:35 | Creating new packages: mariadb/59a218308c6c7dcf8795b531b53aa4a1c666ce00 (00:00:23)
    15
    Task 4687 | 02:09:58 | Creating new jobs: paas-ta-portal-webadmin/233eb71833ed12faef66b4ef1b298bee0f6f10d2 (00:00:01)
    16
    Task 4687 | 02:09:59 | Creating new jobs: haproxy/6fb2bf3eefc2ec935bbb6a1d05ed92ba66ea7988 (00:00:00)
    17
    Task 4687 | 02:09:59 | Creating new jobs: paas-ta-portal-webuser/e866e3a0fb36020dd8f207a0db5f7bd22be18d2b (00:00:00)
    18
    Task 4687 | 02:09:59 | Creating new jobs: binary_storage/8315c60cb8259e61fb0df4742e72cb2093dd32e4 (00:00:00)
    19
    Task 4687 | 02:09:59 | Creating new jobs: mariadb/3810edf74d908d7fb1cd284ce69a172b5fb51225 (00:00:01)
    20
    Task 4687 | 02:10:00 | Release has been created: paasta-portal-ui-release/1.0 (00:00:00)
    21
    Task 4687 Started Mon Sep 3 02:09:08 UTC 2018
    22
    Task 4687 Finished Mon Sep 3 02:10:00 UTC 2018
    23
    Task 4687 Duration 00:00:52
    24
    Task 4687 done
    25
    26
    Succeeded
    Copied!
  • PaaS-TA Portal UI 릴리즈를 확인한다.
  • 사용 예시
    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
    paasta-portal-ui-release 1.0* 235c329+
    25
    paasta-delivery-pipeline-release 1.0* b3ee8f48+
    26
    paasta-pinpoint 2.0* 2dbb8bf3+
    27
    php-buildpack 4.3.57* efc48f3
    28
    postgres 29* 5de4d63d+
    29
    python-buildpack 1.6.18* bcc4f26
    30
    routing 0.179.0* 18155a5
    31
    ruby-buildpack 1.7.21* 9d69600
    32
    silk 2.9.0* eebed55
    33
    staticfile-buildpack 1.4.29* 8a82e63
    34
    statsd-injector 1.3.0* 39e5179
    35
    uaa 60.2* ebb5895
    36
    37
    (*) Currently deployed
    38
    (+) Uncommitted changes
    39
    31 releases
    40
    Succeeded
    Copied!
  • PaaS-TA Portal 릴리즈가 업로드 되어 있는 것을 확인
  • Deploy시 사용할 Stemcell을 확인한다.
  • 사용 예시
    1
    $ bosh -e micro-bosh stemcells
    2
    Name Version OS CPI CID
    3
    bosh-openstack-kvm-ubuntu-xenial-go_agent 315.64* ubuntu-xenial - fb08e389-2350-4091-9b29-41743495e62c
    4
    5
    (*) Currently deployed
    6
    7
    1 stemcells
    8
    9
    Succeeded
    Copied!
Stemcell 목록이 존재 하지 않을 경우 Stemcell을 업로드를 해야 한다.

2.3. PaaS-TA Portal UI Deployment 배포

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 내용 조회
    명령어 bosh -e "bosh env" 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
    - cloud_properties:
    277
    cpu: 1
    278
    disk: 4096
    279
    ram: 512
    280
    name: portal_small
    281
    - cloud_properties:
    282
    cpu: 1
    283
    disk: 4096
    284
    ram: 1024
    285
    name: portal_medium
    286
    - cloud_properties:
    287
    cpu: 1
    288
    disk: 4096
    289
    ram: 2048
    290
    name: portal_large
    Copied!
1
Succeeded
Copied!
  • Deployment 파일을 서버 환경에 맞게 수정한다.
    deployment 파일 위치 : PAAS-TA-PORTAL-RELEASE/deployments/paas-ta-portal-bosh2.0-vsphere.yml
  • azs의 경우 z5 ~ z6 로 설정한다.
  • "(())" 구문은 bosh deploy 할 때 변수로 받아서 처리하는 구문이므로 이 부분의 수정 방법은 아래의 deploy-portal-bosh2.0.sh 참고 예) os : ((stemcell_os))
1
# paas-ta-portal-bosh2.0.yml 설정 파일 내용
2
---
3
name: paasta-portal-ui # 서비스 배포이름(필수) bosh deployments 로 확인 가능한 이름
4
5
stemcells:
6
- alias: ((stemcell_alias))
7
os: ((stemcell_os))
8
version: ((stemcell_version))
9
10
releases:
11
- name: "((releases_name))" # 서비스 릴리즈 이름(필수) bosh releases로 확인 가능
12
version: "1.0" # 서비스 릴리즈 버전(필수):latest 시 업로드된 서비스 릴리즈 최신버전
13
14
update:
15
canaries: 1 # canary 인스턴스 수(필수)
16
canary_watch_time: 5000-120000 # canary 인스턴스가 수행하기 위한 대기 시간(필수)
17
update_watch_time: 5000-120000 # non-canary 인스턴스가 수행하기 위한 대기 시간(필수)
18
max_in_flight: 1 # non-canary 인스턴스가 병렬로 update 하는 최대 개수(필수)
19
serial: false
20
21
instance_groups:
22
########## INFRA ##########
23
- name: mariadb
24
azs:
25
- z6
26
instances: 1
27
vm_type: "((vm_type_small))"
28
stemcell: "((stemcell_alias))"
29
persistent_disk_type: "((mariadb_disk_type))"
30
networks:
31
- name: ((internal_networks_name))
32
jobs:
33
- name: mariadb
34
release: "((releases_name))"
35
syslog_aggregator: null
36
37
- name: haproxy
38
azs:
39
- z7
40
instances: 1
41
vm_type: "((vm_type_tiny))"
42
stemcell: "((stemcell_alias))"
43
networks:
44
- name: ((internal_networks_name))
45
- name: ((external_networks_name))
46
static_ips: ((haproxy_public_ip))
47
jobs:
48
- name: haproxy
49
release: "((releases_name))"
50
syslog_aggregator: null
51
properties:
52
infra:
53
admin:
54
enable: "((infra_admin))"
55
56
######## WEB SERVICE ########
57
58
- name: paas-ta-portal-webadmin
59
azs:
60
- z6
61
instances: 1
62
vm_type: "((vm_type_small))"
63
stemcell: "((stemcell_alias))"
64
networks:
65
- name: ((internal_networks_name))
66
jobs:
67
- name: paas-ta-portal-webadmin
68
release: "((releases_name))"
69
syslog_aggregator: null
70
properties:
71
java_opts: "-Xmx450m -Xss1M -XX:MaxMetaspaceSize=93382K -XX:ReservedCodeCacheSize=240m -XX:+UseCompressedOops -Djdk.tls.ephemeralDHKeySize=2048 -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Xverify:none -XX:ErrorFile=/var/vcap/sys/log/java_error_in_idea_%p.log -XX:HeapDumpPath=/var/vcap/sys/log/java_error_in_idea.hprof"
72
api:
73
url: "((default_portal_api_url))"
74
port: 8090
75
76
- name: paas-ta-portal-webuser
77
azs:
78
- z6
79
instances: 1
80
vm_type: "((vm_type_tiny))"
81
stemcell: "((stemcell_alias))"
82
networks:
83
- name: ((internal_networks_name))
84
jobs:
85
- name: paas-ta-portal-webuser
86
release: "((releases_name))"
87
syslog_aggregator: null
88
properties:
89
logPath: "/var/vcap/sys/log/paas-ta-portal-webuser" # WEBUSER는 아파치를 사용함, APACHE 로그 위치
90
webDir: "/var/vcap/packages/apache2/htdocs" # WEBUSER는 아파치를 사용함, APACHE 웹 디렉토리 설정
91
cf:
92
uaa:
93
clientsecret: ((portal_client_secret))
94
monitoring: ((portal_webuser_monitoring))
95
quantity: ((portal_webuser_quantity))
96
automaticApproval: ((portal_webuser_automaticapproval))
97
98
properties:
99
mariadb: # MARIA DB SERVER 설정 정보
100
port: ((mariadb_port)) # MARIA DB PORT 번호
101
admin_user:
102
password: '((mariadb_user_password))' # MARIA DB ROOT 계정 비밀번호
103
host_names:
104
- mariadb0
105
portal_default:
106
name: "((default_portal_api_name))"
107
url: "((default_portal_api_url))"
108
uaa_url: "((default_portal_uaa_url))"
109
header_auth: "((default_portal_header_auth))"
110
desc: "((default_portal_api_desc))"
111
cf_api_version: "((cf_api_version))"
112
webadmin_ips: "((haproxy_public_ip))"
Copied!
  • vsphere : deploy-portal-bosh2.0-vsphere.sh
  • openstack : deploy-portal-bosh2.0-openstack.sh
  • aws : deploy-portal-bosh2.0-aws.sh
각 IaaS 환경에 맞춰 수정후 shell 파일을 실행한다..
bosh 명령문 후에 주석(#)을 사용할경우 오류가 발생한다. 밑의 예시는 vsphere의 환경에서 테스트한 환경이다.
```sh

!/bin/bash

bosh -n -d paasta-portal-ui deploy --no-redact paasta-portal-bosh2.0.yml -o use-public-network-vsphere.yml -v releases_name="paasta-portal-ui-release" -v stemcell_os="ubuntu-xenial" -v stemcell_version="315.64" -v stemcell_alias="default" -v vm_type_tiny="portal_tiny" -v vm_type_small="portal_small" -v vm_type_medium="portal_medium" -v internal_networks_name=service_private -v external_networks_name=service_public -v mariadb_disk_type="10GB" -v mariadb_port=3306 -v mariadb_user_password="password" -v haproxy_public_ip="115.68.46.180" -v portal_client_secret="password" -v portal_webuser_quantity=false -v portal_webuser_monitoring=false -v portal_webuser_automaticapproval=true -v infra_admin=false -v default_portal_api_url="http://115.68.46.179:2225"\ -v default_portal_api_name="PaaS-TA 5.0" -v default_portal_uaa_url="https://uaa.115.68.46.178.xip.io"\ -v default_portal_header_auth="Basic YWRtaW46b3BlbnBhYXN0YQ==" -v default_portal_api_desc="PaaS-TA 5.0 install infra" -v cf_api_version="v3"
1
> release_version : 릴리즈 버전을 입력한다. $bosh releases 명령문으로 확인가능
2
3
- $ bosh releases
4
Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
5
Name Version Commit Hash
6
paasta-portal-ui-release 1.0* 235c329+
7
8
> stemcell_os : 스템셀 OS를 입력한다. $bosh stemcells 명령문으로 확인가능\
9
> stemcell_version : 스템셀 버전을 입력한다. $bosh stemcells 명령문으로 확인가능\
10
> stemcell_alias : bosh deploy시 사용할 스템셀 명칭을 정한다.
11
12
- $ bosh stemcells
13
Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
14
Name Version OS CPI CID
15
bosh-vsphere-esxi-ubuntu-xenial-go_agent 315.64* ubuntu-xenial - sc-66428140-1807-4ca7-894f-d8ffec86d623
16
17
(*) Currently deployed
18
19
1 stemcells
20
21
22
> internal_networks_name : 내부 ip 할당할 network name $ bosh -e micro-bosh cloud-config로 확인가능\
23
> external_networks_name : 외부 ip 할당할 network name $ bosh -e micro-bosh cloud-config로 확인가능
24
25
$ bosh -e micro-bosh cloud-config
26
- name: service_private
27
subnets:
28
- azs:
29
- z1
30
- z2
31
- z3
32
- z4
33
- z5
34
- z6
35
cloud_properties:
36
name: Internal
37
dns:
38
- 8.8.8.8
39
gateway: 10.30.20.23
40
range: 10.30.0.0/16
41
reserved:
42
- 10.30.0.0 - 10.30.106.255
43
static:
44
- 10.30.107.1 - 10.30.107.255
45
- name: service_public
46
subnets:
47
- azs:
48
- z1
49
- z2
50
- z3
51
- z4
52
- z5
53
- z6
54
cloud_properties:
55
name: External
56
dns:
57
- 8.8.8.8
58
gateway: 115.68.47.161
59
range: 115.68.47.160/24
60
reserved:
61
- 115.68.47.161 - 115.68.47.174
62
static:
63
- 115.68.47.175 - 115.68.47.185
64
type: manual
65
66
> mariadb_disk_type: Mariadb의 persistent_disk용량을 정한다.\
67
mariadb_port: Mariadb의 port를 정한다.\
68
mariadb_user_password: Mariadb의 비밀번호를 설정한다.(임의값 가능)\
69
haproxy_ips: Haproxy의 ip 할당, internal_networks_name에 할당된 ip를 사용해야한다.
70
71
> cf_admin_password: CF 관리자 계정 비밀번호를 입력한다.
72
73
>cf_uaa_admin_client_secret: uaac admin client의 secret를 입력한다.\
74
portal_client_secret: uaac portalclient의 secret를 입력한다.
75
76
>portal_webuser_automaticapproval: 회원가입시 cf에 접속가능 여부 true일경우 관리자포탈에서 승인을 해주어야 접근 가능하다.\
77
portal_webuser_monitoring : 모니터링 사용 여부 true일경우 앱 상세정보에서 모니터링창이 활성화가 된다.\
78
portal_webuser_quantity : 사용량 조회 창 활성화 여부
79
80
- PaaS-TA Portal을 배포한다.
81
82
- **사용 예시**
83
84
$ ./deploy-vsphere.sh
85
Using environment '10.30.40.111' as user 'admin' (openid, bosh.admin)
86
87
Using deployment 'paasta-portal-ui'
88
89
+ azs:
90
+ - cloud_properties:
91
+ datacenters:
92
+ - clusters:
93
+ - BD-HA:
94
+ resource_pool: CF_BOSH2_Pool
95
+ name: BD-HA
96
+ name: z1
97
+ - cloud_properties:
98
+ datacenters:
99
+ - clusters:
100
+ - BD-HA:
101
+ resource_pool: CF_BOSH2_Pool
102
+ name: BD-HA
103
+ name: z2
104
+ - cloud_properties:
105
+ datacenters:
106
+ - clusters:
107
+ - BD-HA:
108
+ resource_pool: CF_BOSH2_Pool
109
+ name: BD-HA
110
+ name: z3
111
+ - cloud_properties:
112
+ datacenters:
113
+ - clusters:
114
+ - BD-HA:
115
+ resource_pool: CF_BOSH2_Pool
116
+ name: BD-HA
117
+ name: z4
118
+ - cloud_properties:
119
+ datacenters:
120
+ - clusters:
121
+ - BD-HA:
122
+ resource_pool: CF_BOSH2_Pool
123
+ name: BD-HA
124
+ name: z5
125
+ - cloud_properties:
126
+ datacenters:
127
+ - clusters:
128
+ - BD-HA:
129
+ resource_pool: CF_BOSH2_Pool
130
+ name: BD-HA
131
+ name: z6
132
133
+ vm_types:
134
+ - cloud_properties:
135
+ cpu: 1
136
+ disk: 8192
137
+ ram: 1024
138
+ name: minimal
139
+ - cloud_properties:
140
+ cpu: 1
141
+ disk: 10240
142
+ ram: 2048
143
+ name: default
144
+ - cloud_properties:
145
+ cpu: 1
146
+ disk: 30720
147
+ ram: 4096
148
+ name: small
149
+ - cloud_properties:
150
+ cpu: 2
151
+ disk: 20480
152
+ ram: 4096
153
+ name: medium
154
+ - cloud_properties:
155
+ cpu: 2
156
+ disk: 20480
157
+ ram: 8192
158
+ name: medium-memory-8GB
159
+ - cloud_properties:
160
+ cpu: 4
161
+ disk: 20480
162
+ ram: 8192
163
+ name: large
164
+ - cloud_properties:
165
+ cpu: 8
166
+ disk: 20480
167
+ ram: 16384
168
+ name: xlarge
169
+ - cloud_properties:
170
+ cpu: 2
171
+ disk: 51200
172
+ ram: 4096
173
+ name: small-50GB
174
+ - cloud_properties:
175
+ cpu: 2
176
+ disk: 51200
177
+ ram: 4096
178
+ name: small-50GB-ephemeral-disk
179
+ - cloud_properties:
180
+ cpu: 4
181
+ disk: 102400
182
+ ram: 8192
183
+ name: small-100GB-ephemeral-disk
184
+ - cloud_properties:
185
+ cpu: 4
186
+ disk: 102400
187
+ ram: 8192
188
+ name: small-highmem-100GB-ephemeral-disk
189
+ - cloud_properties:
190
+ cpu: 8
191
+ disk: 20480
192
+ ram: 16384
193
+ name: small-highmem-16GB
194
+ - cloud_properties:
195
+ cpu: 1
196
+ disk: 4096
197
+ ram: 2048
198
+ name: caas_small
199
+ - cloud_properties:
200
+ cpu: 1
201
+ disk: 4096
202
+ ram: 1024
203
+ name: caas_small_api
204
+ - cloud_properties:
205
+ cpu: 1
206
+ disk: 4096
207
+ ram: 4096
208
+ name: caas_medium
209
+ - cloud_properties:
210
+ cpu: 2
211
+ disk: 8192
212
+ ram: 4096
213
+ name: service_medium
214
+ - cloud_properties:
215
+ cpu: 2
216
+ disk: 10240
217
+ ram: 2048
218
+ name: service_medium_2G
219
220
+ vm_extensions:
221
+ - cloud_properties:
222
+ ports:
223
+ - host: 3306
224
+ name: mysql-proxy-lb
225
+ - name: cf-router-network-properties
226
+ - name: cf-tcp-router-network-properties
227
+ - name: diego-ssh-proxy-network-properties
228
+ - name: cf-haproxy-network-properties
229
+ - cloud_properties:
230
+ disk: 51200
231
+ name: small-50GB
232
+ - cloud_properties:
233
+ disk: 102400
234
+ name: small-highmem-100GB
235
236
+ compilation:
237
+ az: z1
238
+ network: default
239
+ reuse_compilation_vms: true
240
+ vm_type: large
241
+ workers: 5
242
243
+ networks:
244
+ - name: default
245
+ subnets:
246
+ - azs:
247
+ - z1
248
+ - z2
249
+ - z3
250
+ - z4
251
+ - z5
252
+ - z6
253
+ cloud_properties:
254
+ name: Internal
255
+ dns:
256
+ - 8.8.8.8
257
+ gateway: 10.30.20.23
258
+ range: 10.30.0.0/16
259
+ reserved:
260
+ - 10.30.0.0 - 10.30.111.40
261
+ - name: public
262
+ subnets:
263
+ - azs:
264
+ - z1
265
+ - z2
266
+ - z3
267
+ - z4
268
+ - z5
269
+ - z6
270
+ cloud_properties:
271
+ name: External
272
+ dns:
273
+ - 8.8.8.8
274
+ gateway: 115.68.46.177
275
+ range: 115.68.46.176/28
276
+ reserved:
277
+ - 115.68.46.176 - 115.68.46.188
278
+ static:
279
+ - 115.68.46.189 - 115.68.46.190
280
+ type: manual
281
+ - name: service_private
282
+ subnets:
283
+ - azs:
284
+ - z1
285
+ - z2
286
+ - z3
287
+ - z4
288
+ - z5
289
+ - z6
290
+ cloud_properties:
291
+ name: Internal
292
+ dns:
293
+ - 8.8.8.8
294
+ gateway: 10.30.20.23
295
+ range: 10.30.0.0/16
296
+ reserved:
297
+ - 10.30.0.0 - 10.30.106.255
298
+ static:
299
+ - 10.30.107.1 - 10.30.107.255
300
+ - name: service_public
301
+ subnets:
302
+ - azs:
303
+ - z1
304
+ - z2
305
+ - z3
306
+ - z4
307
+ - z5
308
+ - z6
309
+ cloud_properties:
310
+ name: External
311
+ dns:
312
+ - 8.8.8.8
313
+ gateway: 115.68.47.161
314
+ range: 115.68.47.160/24
315
+ reserved:
316
+ - 115.68.47.161 - 115.68.47.174
317
+ static:
318
+ - 115.68.47.175 - 115.68.47.185
319
+ type: manual
320
+ - name: portal_service_public
321
+ subnets:
322
+ - azs:
323
+ - z1
324
+ - z2
325
+ - z3
326
+ - z4
327
+ - z5
328
+ - z6
329
+ cloud_properties:
330
+ name: External
331
+ dns:
332
+ - 8.8.8.8
333
+ gateway: 115.68.46.209
334
+ range: 115.68.46.208/28
335
+ reserved:
336
+ - 115.68.46.216 - 115.68.46.222
337
+ static:
338
+ - 115.68.46.214
339
+ type: manual
340
341
+ disk_types:
342
+ - disk_size: 1024
343
+ name: default
344
+ - disk_size: 1024
345
+ name: 1GB
346
+ - disk_size: 2048
347
+ name: 2GB
348
+ - disk_size: 4096
349
+ name: 4GB
350
+ - disk_size: 5120
351
+ name: 5GB
352
+ - disk_size: 8192
353
+ name: 8GB
354
+ - disk_size: 10240
355
+ name: 10GB
356
+ - disk_size: 20480
357
+ name: 20GB
358
+ - disk_size: 30720
359
+ name: 30GB
360
+ - disk_size: 51200
361
+ name: 50GB
362
+ - disk_size: 102400
363
+ name: 100GB
364
+ - disk_size: 1048576
365
+ name: 1TB
366
367
+ stemcells:
368
+ - alias: default
369
+ os: ubuntu-xenial
370
+ version: 'latest'
371
372
+ releases:
373
+ - name: paas-ta-portal-release
374
+ version: '2.0'
375
376
+ update:
377
+ canaries: 1
378
+ canary_watch_time: 5000-120000
379
+ max_in_flight: 1
380
+ serial: false
381
+ update_watch_time: 5000-120000
382
383
+ instance_groups:
384
+ - azs:
385
+ - z3
386
+ instances: 1
387
+ name: mariadb
388
+ networks:
389
+ - name: service_private
390
+ static_ips:
391
+ - 10.30.107.211
392
+ persistent_disk_type: 10GB
393
+ stemcell: default
394
+ syslog_aggregator:
395
+ templates:
396
+ - name: mariadb
397
+ release: paas-ta-portal-release
398
+ vm_type: portal_large
399
+ - azs:
400
+ - z5
401
+ instances: 1
402
+ name: binary_storage
403
+ networks:
404
+ - name: service_private
405
+ static_ips:
406
+ - 10.30.107.212
407
+ persistent_disk_type: 10GB
408
+ stemcell: default
409
+ syslog_aggregator:
410
+ templates:
411
+ - name: binary_storage
412
+ release: paas-ta-portal-release
413
+ vm_type: portal_large
414
+ - azs:
415
+ - z5
416
+ instances: 1
417
+ name: haproxy
418
+ networks:
419
+ - name: service_private
420
+ static_ips:
421
+ - 10.30.107.213
422
+ - default:
423
+ - dns
424
+ - gateway
425
+ name: portal_service_public
426
+ static_ips: 115.68.46.214
427
+ stemcell: default
428
+ syslog_aggregator:
429
+ templates:
430
+ - name: haproxy
431
+ release: paas-ta-portal-release
432
+ vm_type: portal_large
433
+ - azs:
434
+ - z5
435
+ instances: 1
436
+ name: paas-ta-portal-gateway
437
+ networks:
438
+ - name: service_private
439
+ static_ips:
440
+ - 10.30.107.214
441
+ properties:
442
+ eureka:
443
+ client:
444
+ serviceUrl:
445
+ defaultZone: "<redacted>"
446
+ stemcell: default
447
+ syslog_aggregator:
448
+ templates:
449
+ - name: paas-ta-portal-gateway
450
+ release: paas-ta-portal-release
451
+ vm_type: portal_medium
452
+ - azs:
453
+ - z5
454
+ instances: 1
455
+ name: paas-ta-portal-registration
456
+ networks:
457
+ - name: service_private
458
+ static_ips:
459
+ - 10.30.107.215
460
+ properties:
461
+ infra:
462
+ admin:
463
+ enable: "<redacted>"
464
+ java_opts: "<redacted>"
465
+ server:
466
+ port: "<redacted>"
467
+ stemcell: default
468
+ syslog_aggregator:
469
+ templates:
470
+ - name: paas-ta-portal-registration
471
+ release: paas-ta-portal-release
472
+ vm_type: portal_small
473
+ - azs:
474
+ - z5
475
+ instances: 1
476
+ name: paas-ta-portal-api
477
+ networks:
478
+ - name: service_private
479
+ static_ips:
480
+ - 10.30.107.217
481
+ properties:
482
+ abacus:
483
+ url: "<redacted>"
484
+ cloudfoundry:
485
+ authorization: "<redacted>"
486
+ cc:
487
+ api:
488
+ sslSkipValidation: "<redacted>"
489
+ uaaUrl: "<redacted>"
490
+ url: "<redacted>"
491
+ user:
492
+ admin:
493
+ password: "<redacted>"
494
+ username: "<redacted>"
495
+ uaaClient:
496
+ adminClientId: "<redacted>"
497
+ adminClientSecret: "<redacted>"
498
+ clientId: "<redacted>"
499
+ clientSecret: "<redacted>"
500
+ loginClientId: "<redacted>"
501
+ loginClientSecret: "<redacted>"
502
+ skipSSLValidation: "<redacted>"
503
+ eureka:
504
+ client:
505
+ serviceUrl:
506
+ defaultZone: "<redacted>"
507
+ monitoring:
508
+ api:
509
+ url: "<redacted>"
510
+ paasta:
511
+ api:
512
+ portal:
513
+ zuul:
514
+ url: "<redacted>"
515
+ stemcell: default
516
+ syslog_aggregator:
517
+ templates:
518
+ - name: paas-ta-portal-api
519
+ release: paas-ta-portal-release
520
+ vm_type: portal_large
521
+ - azs:
522
+ - z5
523
+ instances: 1
524
+ name: paas-ta-portal-log-api
525
+ networks:
526
+ - name: service_private
527
+ static_ips:
528
+ - 10.30.107.218
529
+ properties:
530
+ cloudfoundry:
531
+ authorization: "<redacted>"
532
+ cc:
533
+ api:
534
+ sslSkipValidation: "<redacted>"
535
+ uaaUrl: "<redacted>"
536
+ url: "<redacted>"
537
+ user:
538
+ admin:
539
+ password: "<redacted>"
540
+ username: "<redacted>"
541
+ uaaClient:
542
+ adminClientId: "<redacted>"
543
+ adminClientSecret: "<redacted>"
544
+ clientId: "<redacted>"
545
+ clientSecret: "<redacted>"
546
+ loginClientId: "<redacted>"
547
+ loginClientSecret: "<redacted>"
548
+ skipSSLValidation: "<redacted>"
549
+ eureka:
550
+ client:
551
+ serviceUrl:
552
+ defaultZone: "<redacted>"
553
+ paasta:
554
+ api:
555
+ portal:
556
+ zuul:
557
+ url: "<redacted>"
558
+ stemcell: default
559
+ syslog_aggregator:
560
+ templates:
561
+ - name: paas-ta-portal-log-api
562
+ release: paas-ta-portal-release
563
+ vm_type: portal_medium
564
+ - azs:
565
+ - z5
566
+ instances: 1
567
+ name: paas-ta-portal-common-api
568