Installing Server Node

Installing Server Node

ย 

Required Hardware Spec.

Single Server Node ๊ธฐ์ค€

์•„๋ž˜๋Š” InfluxDB์˜ official ๊ถŒ๊ณ  ์‚ฌ์–‘์„ ์ฐธ๊ณ ํ•œ normal workload(agent ๋‹น ํ•˜๋‚˜์˜ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋ชจ๋‹ˆํ„ฐ๋ง)์— ๋Œ€ํ•œ ๊ธฐ์ค€ ์ž…๋‹ˆ๋‹ค.
๋˜ํ•œ, CH Portalย + InfluxDB + Kapacitor + SaltStack Server๊ฐ€ ํ•œ ๋Œ€์˜ ์„œ๋ฒ„์— ํƒ‘์žฌ๋˜๋Š” ๊ฒƒ์œผ๋กœ ์‚ฐ์ •ํ•ฉ๋‹ˆ๋‹ค.
๋‹จ, ๊ฐ ์„œ๋ฒ„ ๋ฐ ์—์ด์ „ํŠธ ์ปดํฌ๋„ŒํŠธ๋“ค(Introduction | Components Architecture)์˜ workload๋Ÿ‰ ๋”ฐ๋ผ ๊ฐ€๋ณ€์  ์ž…๋‹ˆ๋‹ค.

  • 100 ~ 250 agent nodes: 8core, 16GB Ram

  • ~ 500 agent nodes: 16core, 32GB Ram

  • ~ 1000 agent nodes: 24core+, 48GB+ Ram

๋˜ํ•œ, Kapacitor(data processing component)์˜ ๊ฒฝ์šฐ๋Š” jobํ• ๋‹น ๊ฐœ์ˆ˜๋‚˜ ํ”„๋กœ์„ธ์‹ฑ ๋ถ€ํ•˜์— ๋”ฐ๋ผ ์ „์ฒด workload๋Š” ์ฐจ์ด๊ฐ€ ํด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์šด์˜ ์ค‘ ์‹ค์ œ ๋ถ€ํ•˜๋Ÿ‰์— ๋”ฐ๋ผ ๊ฐ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ถ„๋ฆฌ-ํ™•์žฅ(Scale-out)ํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ ๊ถŒ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

OS

  • CentOS 7 x86_64 ๊ธฐ์ค€

CloudHub์—์„œ ์‚ฌ์šฉ๋˜๋Š” Port

๊ฐœ๋…๋„

์ฐธ๊ณ  ์•„๋ž˜์—์„œ ํ™”์‚ดํ‘œ๋ฅผ ๋ฐ›๋Š” ์ชฝ์ด Port Listening ์ƒํƒœ๋กœ ํ‘œ๊ธฐํ•จ.

External Ports: Internet ๊ตฌ๊ฐ„

  • 443: CloudHub Portal์—์„œ ์‚ฌ์šฉํ•˜๋Š” ์›น ํฌํŠธ.

Internal Ports (Backend Server ๊ฐ„): Trusted Network ๊ตฌ๊ฐ„

  • 8000 : Salt-API Server - CH Server์™€ ๋ฐ์ดํ„ฐ ์†ก์ˆ˜์‹ .

  • 9094 : Kapacitor - InfluxDB์™€ ๋ฐ์ดํ„ฐ ์†ก์ˆ˜์‹ .

Intermediate Ports (Agent โ†”๏ธŽ Backend Server ๊ฐ„): Semi-Trusted Network ๊ตฌ๊ฐ„

์•„๋ž˜ ํฌํŠธ๋“ค์€ ๋ชจ๋‹ˆํ„ฐ๋ง ๋Œ€์ƒ ํ˜ธ์ŠคํŠธ๋“ค(MO: Managed Objects)๊ณผ์˜ ํ†ต์‹ ์— ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
443 ํฌํŠธ๋ฅผ ์ œ์™ธํ•˜๊ณ ๋Š” ๋ณด์•ˆ ์œ„ํ˜‘์ด ๋  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ,
Source IP ํ˜น์€ ๋Œ€์—ญ์œผ๋กœ ACL์ •์ฑ…์„ ์‚ฌ์šฉํ•  ํ•„์š”๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

์•„๋ž˜ ์„ค์ • ์˜ˆ์‹œ์™€ ๊ฐ™์ด firewalld filter๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜, ํ˜น์€ tcp_wrappers ๋“ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ hosts.allow, hosts.deny ๋“ฑ์— ACL์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
(tcp_wrappers ์„ค์ • ๋ฐฉ๋ฒ•์€ ์—ฌ๊ธฐ์„œ๋Š” ๋‹ค๋ฃจ์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์š”ํ•œ ๊ฒฝ์šฐ, ์ธํ„ฐ๋„ท ๊ฒ€์ƒ‰์„ ํ†ตํ•˜์—ฌ ์‰ฝ๊ฒŒ ์‚ฌ์šฉ๋ฒ•์„ ์–ป์„ ์ˆ˜ ์žˆ์œผ๋‹ˆ ์ฐธ๊ณ  ๋ฐ”๋ž๋‹ˆ๋‹ค.)

  • 4505-4506 : Salt-Master - Salt-Minion๊ณผ ๋ฐ์ดํ„ฐ ์†ก์ˆ˜์‹ .

  • 8086 : InfluxDB - telegraf๋กœ๋ถ€ํ„ฐ ๋ฐ์ดํ„ฐ ์ˆ˜์‹ .

์•„๋ž˜๋Š” firewalld ์„ค์ • ํŒŒ์ผ ์˜ˆ์‹œ์ด๋ฉฐ,
์ฃผ์˜ ๋ฌผ๋ฆฌ์ ์ธ ๋ณด์•ˆ ์žฅ๋น„๋ฅผ ๋”ฐ๋กœ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์ •ํ•  ๊ฒฝ์šฐ๋Š” ์œ„ ์„ค๋ช…ํ•œ ์šฉ๋„์™€ ๋‚ด์šฉ์— ๋งž๊ฒŒ ACL์„ ์„ค์ •ํ•˜์—ฌ ์‚ฌ์šฉํ•˜์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

<!-- /etc/firewalld/zones/public.xml --> <?xml version="1.0" encoding="utf-8"?> <zone> <short>Public</short> <description>For use in public areas.</description> <service name="ssh"/> <service name="dhcpv6-client"/> <port protocol="tcp" port="443"/> <rule family="ipv4"> <source address="xxx.xxx.xxx.0/24"/> <port protocol="tcp" port="4505-4506"/> <accept/> </rule> <rule family="ipv4"> <source address="xxx.xxx.xxx.xxx"/> <port protocol="tcp" port="8000"/> <accept/> </rule> <rule family="ipv4"> <source address="xxx.xxx.xxx.xxx"/> <port protocol="tcp" port="8086"/> <accept/> </rule> <rule family="ipv4"> <source address="xxx.xxx.xxx.xxx"/> <port protocol="tcp" port="9094"/> <accept/> </rule> </zone>

Install Pre-required Packages

Setting InfluxDB and Kapacitor containers via Docker Compose

[์ฃผ์˜] CloudHub์™€์˜ ํ˜ธํ™˜์„ฑ ์œ ์ง€

CloudHub๋Š” ์œ„ InfluxDB์™€ Kapacitor์˜ ์ž„์˜์˜ ๋ฒ„์ „์—๋Š” ์ƒํ•˜์œ„ ํ˜ธํ™˜๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฐ˜๋“œ์‹œ CloudHub Release(https://github.com/snetsystems/cloudhub/releases)ํŽ˜์ด์ง€์—์„œ ์„ค์น˜ํ•  CloudHub ๋ฒ„์ „๊ณผ ํ˜ธํ™˜๋˜๋Š” InfluxDB์™€ Kapacitor ๋ฒ„์ „์„ ํ™•์ธํ•œ ํ›„, ํ•ด๋‹น ๋ฒ„์ „์œผ๋กœ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ>
InfluxDB๊ฐ€ 1.8.0, Kapacitor๊ฐ€ 1.5.4๋ผ๋ฉด,
์•„๋ž˜ 6๋ฒˆ์„ ์ˆ˜ํ–‰ํ•œ ํ›„, sandbox/.env ํŒŒ์ผ์„ ์•„๋ž˜์™€ ๊ฐ™์ด ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.
INFLUXDB_TAG=1.8.0
KAPACITOR_TAG=1.5.4
์ดํ›„, ์•„๋ž˜ 7๋ฒˆ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

  1. Docker ์„ค์น˜ ํ™•์ธ

    • ๋ฒ„์ „ : Docker version 18.09.4 ์ด์ƒ

      $ docker --version Docker version 18.09.4, build d14af54266
    • ๋ฒ„์ „์ด ๋‚ฎ์œผ๋ฉด ์ด์ „ ๋ฒ„์ „์„ ์‚ญ์ œ ํ›„ ์„ค์น˜

      • ์ด์ „ ๋ฒ„์ „ ์‚ญ์ œ

        $ yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
      • ์ €์žฅ์†Œ ์„ค์ • ๋ฐ ์ถ”๊ฐ€

        $ yum install -y yum-utils \ device-mapper-persistent-data \ lvm2 $ yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
      • Install Docker Engine - Community

        $ yum install docker-ce docker-ce-cli containerd.io
  2. Docker log rotation ์„ค์ •

    • logrotate์„ ์‚ฌ์šฉํ•˜์—ฌ Docker Log๋ฅผ ๊ด€๋ฆฌ ํ•ฉ๋‹ˆ๋‹ค.

    • Log ํŒŒ์ผ ๊ฒฝ๋กœ : /var/lib/docker/containers/*/*.log

    • Log ์„ค์ • ํŒŒ์ผ : $ vim /etc/logrotate.d/docker-container

      /var/lib/docker/containers/*/*.log { daily rotate 7 missingok dateext compress notifempty }

      daily : ๋งค์ผ log๋ฅผ rotate ํ•ฉ๋‹ˆ๋‹ค.
      rotate 7 : ์ตœ๋Œ€ log.1, log.2 ๋“ฑ 7๊ฐœ์˜ ํŒŒ์ผ์„ ๋ณด๊ด€ํ•ฉ๋‹ˆ๋‹ค.
      missingok : log๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ ์—๋Ÿฌ ์—†์ด ๋‹ค์Œ rotate๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค.
      dateext : log ํŒŒ์ผ์— YYYYMMDD ํ˜•์‹์˜ ํ™•์žฅ์ž๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
      compress : ์ด์ „ log๋ฅผ ์••์ถ•ํ•ฉ๋‹ˆ๋‹ค.
      notifempty :ย ย log ๋‚ด์šฉ์ด ์—†์œผ๋ฉด rotation ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

  3. Docker ์‹คํ–‰

    $ systemctl enable docker $ systemctl start docker $ systemctl status docker โ— docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2020-03-09 05:30:36 EDT; 3s ago Docs: https://docs.docker.com Main PID: 2036 (dockerd) Tasks: 8 Memory: 42.1M CGroup: /system.slice/docker.service โ””โ”€2036 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock ... ... Hint: Some lines were ellipsized, use -l to show in full.
  4. Docker Compose ์„ค์น˜ ํ™•์ธ

    • ๋ฒ„์ „ : Docker Compose version 1.24 ์ด์ƒ

      $ docker-compose --version docker-compose version 1.24.0, build 0aa59064
    • ๋ฒ„์ „์ด ๋‚ฎ๊ฑฐ๋‚˜ ๋ฏธ ์„ค์น˜ ์‹œ Docker Compose ์„ค์น˜

      • ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ

        $ curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
      • ๋‹ค์šด๋กœ๋“œ ํŒŒ์ผ์— ๊ถŒํ•œ ์ ์šฉ

        $ sudo chmod +x /usr/local/bin/docker-compose
      • ๋ฒ„์ „ ํ™•์ธ

        $ docker-compose --version docker-compose version 1.25.4, build 8d51620a
  5. Git ์„ค์น˜

    $ yum install -y git
  6. Snetsystems/Sandbox Download

    $ cd {Sandbox ๋‹ค์šด๋กœ๋“œ ํ•  ๋””๋ ‰ํ† ๋ฆฌ ์ด๋™} $ git clone https://github.com/snetsystems/sandbox.git
  7. Sandbox ์‹คํ–‰

    $ cd sandbox $ ./sandbox up Using latest, stable releases Spinning up Docker Images... If this is your first time starting sandbox this might take a minute... Creating network "sandbox_default" with the default driver Building influxdb Step 1/2 : ARG INFLUXDB_TAG Step 2/2 : FROM influxdb:$INFLUXDB_TAG latest: Pulling from library/influxdb c0c53f743a40: Downloading [=================================> ] 30.81MB/45.38MB c0c53f743a40: Pull complete 66997431d390: Pull complete ... ... Successfully built a59cd84d6569 Successfully tagged kapacitor:latest Creating sandbox_influxdb_1 ... done Creating sandbox_kapacitor_1 ... done Opening tabs in browser...

Setting SaltStack for master

[์ฃผ์˜]
ํ์‡„๋ง(Off internet) ์ผ ๊ฒฝ์šฐ, yum ๋ช…๋ น์— --disablerepo=* --enablerepo=cloudhubrepo ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Yum install

Salt official installation guide(https://repo.saltproject.io/3001.html#rhel)
โ†’ Enter into the linked page, and then choose โ€œRedhat / CentOS 7 PY3โ€ tab button.

  1. SaltStack ์ €์žฅ์†Œ ๋“ฑ๋ก

    $ yum install -y epel-release $ rpm --import https://repo.saltproject.io/py3/redhat/7/x86_64/archive/3001.4/SALTSTACK-GPG-KEY.pub $ curl -fsSL https://repo.saltproject.io/py3/redhat/7/x86_64/archive/3001.4.repo | sudo tee /etc/yum.repos.d/salt.repo $ yum clean expire-cache
  2. Salt-Master, Salt-API, Salt-Minion ์„ค์น˜

    $ yum install -y salt-master salt-api salt-minion
  3. Config ์„ค์ •

    1. Salt-Master์˜ Config ์™€ Salt-API์˜ Config ํŒŒ์ผ์„ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

    2. Salt-Master : $ vim /etc/salt/master.d/master.conf

    3. ์ฃผ์˜ Host์— ์—ฌ๋Ÿฌ Interface๊ฐ€ ์žˆ์„ ๊ฒฝ์šฐ Salt-Minion๊ณผ ์—ฐ๊ฒฐ ๊ฐ€๋Šฅํ•œ ๋„คํŠธ์›Œํฌ Interface IP๋กœ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
      ex) interface: 61.254.65.58
      ์•„๋ž˜ ์˜ˆ์™€ ๊ฐ™์ด any(0.0.0.0)๋กœ ์„ค์ •ํ•ด๋„ master โ†”๏ธŽ minion ๊ฐ„ ํ†ต์‹ ์€ ๋ฌธ์ œ๊ฐ€ ์—†์œผ๋‚˜,
      CloudHub UI์—์„œ ์›ํ•˜์ง€ ์•Š๋Š” IP๋กœ ํ‘œ์‹œ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

      ## log_level ## # One of 'garbage', 'trace', 'debug', info', 'warning'(default), 'error', 'critical'. log_level: info ##### Primary configuration settings ##### ########################################## # The address of the interface to bind to: interface: 0.0.0.0 # The tcp port used by the publisher: publish_port: 4505 # Allow minions to push files to the master. This is disabled by default, for # security purposes. # file_recv: True ##### State System settings ##### ########################################## # The state system uses a "top" file to tell the minions what environment to # use and what modules to use. The state_top file is defined relative to the # root of the base environment as defined in "File Server settings" below. state_top: top.sls ##### File Server settings ##### ########################################## # Salt runs a lightweight file server written in zeromq to deliver files to # minions. This file server is built into the master daemon and does not # require a dedicated port. # The file server works on environments passed to the master, each environment # can have multiple root directories, the subdirectories in the multiple file # roots cannot match, otherwise the downloaded files will not be able to be # reliably ensured. A base environment is required to house the top file. file_roots: base: - /srv/salt/prod qa: - /srv/salt/qa - /srv/salt/prod dev: - /srv/salt/dev - /srv/salt/qa - /srv/salt/prod # File Server Backend # # Salt supports a modular fileserver backend system, this system allows # the salt master to link directly to third party systems to gather and # manage the files available to minions. Multiple backends can be # configured and will be searched for the requested file in the order in which # they are defined here. The default setting only enables the standard backend # "roots" which uses the "file_roots" option. fileserver_backend: - roots ##### Security settings ##### ########################################## # The external auth system uses the Salt auth modules to authenticate and # validate users to access areas of the Salt system. external_auth: pam: saltdev: - .* - '@runner' - '@wheel' - '@jobs' # Allow eauth users to specify the expiry time of the tokens they generate. # A boolean applies to all users or a dictionary of whitelisted eauth backends # and usernames may be given. token_expire_user_override: pam: - saltdev ##### API Server settings ##### ########################################## rest_cherrypy: port: 8000 disable_ssl: True
    4. Salt-Minion : $ vim /etc/salt/minion.d/minion.conf

      ## log_level ## # One of 'garbage', 'trace', 'debug', info', 'warning'(default), 'error', 'critical'. log_level: info master: <master ip address> id: <์œ ์ผํ•œ minion id ์„ค์ •ํ•ด์•ผ ํ•˜๋ฉฐ, ์ƒ๋žต ์‹œ, hostname = minion id>
  4. ๊ณ„์ • ์ƒ์„ฑ ๋ฐ ํŒจ์Šค์›Œ๋“œ ์„ค์ •
    ์•„๋ž˜ ์ถ”๊ฐ€๋œ password๋Š” ์ถ”ํ›„ salt-api authentication์„ ์œ„ํ•œ pam_token๋ฅผ ๋ฐœ๊ธ‰ ๋ฐ›๋Š”๋ฐ ์“ฐ์ด๋ฏ€๋กœ, ์ž˜ ๊ธฐ์–ตํ•ด๋‘์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

    $ useradd saltdev $ passwd <password> Changing password for user saltdev. New password:
  5. ์„œ๋น„์Šค ์‹œ์ž‘

    $ systemctl enable salt-master $ systemctl start salt-master $ systemctl enable salt-api $ systemctl start salt-api $ systemctl enable salt-minion $ systemctl start salt-minion

For off internet

  • ์ƒ๋‹จ ์„ค์น˜ ๊ณผ์ •์€ ์ธํ„ฐ๋„ท์ด ํ—ˆ์šฉ๋˜๋Š” ํ™˜๊ฒฝ์—์„œ์˜ Pre-required Packages ์„ค์น˜ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

  • ์ธํ„ฐ๋„ท์ด ์•ˆ๋˜๋Š” ํ์‡„๋ง ํ™˜๊ฒฝ์—์„œ Package Deployment on Private Network(Server)์„ค์น˜ ๋ฐฉ๋ฒ• ์ž…๋‹ˆ๋‹ค.

Download telegraf into salt file_roots path on salt-master

์•„๋ž˜ ๋งํฌ์—์„œ ์„ค์น˜ํ•˜๊ณ ์ž ํ•˜๋Š” ๋ฒ„์ „์„ ๋‹ค์šด๋กœ๋“œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Download URL: https://github.com/snetsystems/telegraf/releases

ํŠน๋ณ„ํ•œ ์–ธ๊ธ‰์ด ์—†๋‹ค๋ฉด, telegraf ์ตœ์‹  ๋ฒ„์ „์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

ํ์‡„๋ง์ธ ๊ฒฝ์šฐ USB ๋˜๋Š” CD์—์„œ telegraf rpm ํŒŒ์ผ์„ ์•„๋ž˜ ๊ฒฝ๋กœ์— ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.

$ย mkdirย -pย /srv/salt/prod/telegrafย ย ย ย ย ย ย ย ย ย # Telegraf package path $ย cdย /srv/salt/prod/telegraf $ wget https://github.com/snetsystems/telegraf/releases/download/v1.19.0-snet/telegraf-1.19.0-snet-1.x86_64.rpm

Install CloudHub Portal

Download

์•„๋ž˜ ๋งํฌ์—์„œ ์„ค์น˜ํ•˜๊ณ ์ž ํ•˜๋Š” ๋ฒ„์ „์„ ๋‹ค์šด๋กœ๋“œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Download URL: https://github.com/snetsystems/cloudhub/releases

๊ฐ€์ด๋“œ์—์„œ ์‚ฌ์šฉ๋˜๋Š” CloudHub์˜ ๋ฒ„์ „๊ณผ ํ˜„์žฌ ์ตœ์‹  ๋ฆด๋ฆฌ์ฆˆ ๋ฒ„์ „์€ ์ฐจ์ด๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค๋งŒ,
์„ค์น˜ ๋ฐฉ๋ฒ•์€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.

Install CloudHub admin portal package

์•„๋ž˜์—์„œ ์„ค์ •๋œ ์‹คํ–‰ ์˜ต์…˜๋“ค์€ ์„ค์น˜ ๊ณผ์ •์— ๊ด€๊ณ„๋œ ์˜ˆ์‹œ์ด๋ฉฐ, Production ํ™˜๊ฒฝ์—์„œ CloudHub๋ฅผ ์‹คํ–‰ํ•  ๋•Œ๋Š” Basic Configure CloudHub ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  • ์„ค์น˜๋ช…๋ น์–ด

    • $ sudo yum localinstall cloudhub-0.9.1~17fe47a.x86_64.rpm

  • Log ํŒŒ์ผ

    • service๋กœ ๋ฐ๋ชฌ ์‹คํ–‰ ์‹œ log file : /var/log/cloudhub

    • systemd๋กœ ๋ฐ๋ชฌ ์‹คํ–‰ ์‹œ log file: /var/log/messages

  • Environment or Argument file path

    • ์‹คํ–‰(help) ์˜ต์…˜

      • $ cloudhub -h

    • ํŒŒ์ผ : /etc/default/cloudhub

    • Argument ์„ค์ •: ์˜ˆ> 61.250.122.xx

      $ cat /etc/default/cloudhub CLOUDHUB_OPTS="-l=debug \ --auth-duration=0 \ -t=74c1e9e2450886060b5bf736b935cd0bf960837f \ -i=<client-id> \ -s=<client-secret> \ -u=salt:http://61.250.122.xx:8000/run \ -k=salt:<salt-token>"
  • ์„œ๋น„์Šค ์‹œ์ž‘/์ •์ง€/์žฌ์‹œ์ž‘

    • $ sudo systemctl {start|stop|restart} cloudhub

  • ์„œ๋น„์Šค ํ™•์ธ

    $ systemctl status cloudhub.service โ— cloudhub.service Loaded: loaded (/usr/lib/systemd/system/cloudhub.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2020-02-20 03:55:04 EST; 1s ago Main PID: 23498 (cloudhub) Tasks: 5 Memory: 26.9M CGroup: /system.slice/cloudhub.service โ””โ”€23498 /usr/bin/cloudhub Feb 20 03:55:04 localhost.localdomain systemd[1]: Started cloudhub.service. Feb 20 03:55:04 localhost.localdomain cloudhub[23498]: time="2020-02-20T03:55:04-05:00" level=info msg="Serving CloudHub at http://[::]:8888" component=server

Enabling HTTPS on CloudHub Portal

  • http๊ฐ€ ๊ธฐ๋ณธ์œผ๋กœ ์„ค์ •๋˜์–ด ์žˆ์œผ๋ฉฐ https๋กœ ๋ณ€๊ฒฝ ํ•˜๋ ค๋ฉด cloudhub.service ์ค‘๋‹จ ํ›„ ์„ค์ •ํŒŒ์ผ์„ ์ˆ˜์ •ํ•˜๊ณ  'systemctl daemon-reload'๋ฅผ ํ•˜์—ฌ ์„œ๋น„์Šค๋ฅผ ์žฌ์‹œ์ž‘ ํ•ฉ๋‹ˆ๋‹ค.

    $ cat /etc/systemd/system/multi-user.target.wants/cloudhub.service [Unit] After=network-online.target [Service] User=root Group=root Environment="HOST=0.0.0.0" #Environment="PORT=8888" Environment="PORT=443" Environment="TLS_CERTIFICATE=/usr/lib/cloudhub/key/cloudhub_self_signed.pem" Environment="BOLT_PATH=/var/lib/cloudhub/cloudhub-v1.db" Environment="CANNED_PATH=/usr/share/cloudhub/cloudhub-canned" Environment="PROTOBOARDS_PATH=/usr/share/cloudhub/cloudhub-protoboards" EnvironmentFile=-/etc/default/cloudhub ExecStart=/usr/bin/cloudhub $CLOUDHUB_OPTS KillMode=control-group Restart=on-failure [Install] WantedBy=multi-user.target

ย