Skip to content

agent manual installation

hyokyungk edited this page Oct 6, 2021 · 7 revisions

DF v0.4.3 ๋ฒ„์ „ ๊ตฌ๋™ & REST API & Agent ์ˆ˜๋™ ์„ค์น˜ ๋ฐฉ๋ฒ•

  • rest api, cb-apigw api ํ…Œ์ŠคํŠธ ์™„๋ฃŒ
  • (DF Only) cb-operator ๊ตฌ๋™ ํ…Œ์ŠคํŠธ ์™„๋ฃŒ
  • Helm ๋ฐฐํฌ ํ…Œ์ŠคํŠธ ์™„๋ฃŒ

DF์˜ docker-compose ๊ตฌ๋™ ๋ฐฉ๋ฒ•

  • vim /etc/hosts (์•„๋ž˜ ๋‚ด์šฉ ์ถ”๊ฐ€) {{server IP}} cb-dragonfly-kafka cb-dragonfly-influxdb cb-dragonfly-kapacitor

  • ${HOME}/cb-dragonfly/conf/config.yaml ๋‚ด์šฉ ์ˆ˜์ •

    kafka:
      endpoint_url: cb-dragonfly-kafka
      kafka_ip: {{server IP}}  # Cloud-Barista๋ฅผ ์„ค์น˜ ๋ฐ ์‹คํ–‰ํ•˜๋Š” VM/๋ฌผ๋ฆฌ๋จธ์‹ ์˜ Public IP ์ฃผ์†Œ๋ฅผ ๊ธฐ์žฌ
      helm_port: 32000
    
    collectManager:
      collector_ip: {{server IP}} # Cloud-Barista๋ฅผ ์„ค์น˜ ๋ฐ ์‹คํ–‰ํ•˜๋Š” VM/๋ฌผ๋ฆฌ๋จธ์‹ ์˜ Public IP ์ฃผ์†Œ๋ฅผ ๊ธฐ์žฌ
    
  • ${HOME}/cb-dragonfly ๋””๋ ‰ํ† ๋ฆฌ์—์„œ make compose-up

DF REST API ๊ฐ€์ด๋“œ: CB-Dragonfly API (v0.4.3) ์ฐธ๊ณ 

Agent ์ˆ˜๋™ ์„ค์น˜ ๊ฐ€์ด๋“œ

๋‹ค์Œ๊ณผ ๊ฐ™์€ 3๊ฐœ์˜ ํŒŒ์ผ ํ•„์š” (์„ค์น˜ deb ํŒŒ์ผ, mcis ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ, telegraf.conf ํŒŒ์ผ)

  • ์—์ด์ „ํŠธ vm์—์„œ git clone https://github.com/cloud-barista/cb-dragonfly.git / v0.4.3 ํƒœํฌ Checkout ํ›„, 3๊ฐœ์˜ ํŒŒ์ผ ์ถ”์ถœ
  • ${HOME}/cb-dragonfly/file/pkg/ubuntu/x64/telegraf_1.16.0~dbceb930-0_amd64.deb
  • ${HOME}/cb-dragonfly/file/install_mcis_script.sh
  • ${HOME}/cb-dragonfly/file/conf/telegraf.conf

debํŒŒ์ผ ์„ค์น˜

  • dpkg -i telegraf_1.16.0~dbceb930-0_amd64.deb

mcis ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ ์„ค์น˜

  • chmod +x install_mcis_script.sh & ./install_mcis_script.sh

telegraf.conf ์ด๋™

  • mv telegraf.conf /etc/telegraf

๋„๋ฉ”์ธ ์ •๋ณด ๋“ฑ๋ก

  • echo "{{server IP}} cb-dragonfly-kafka" >> /etc/hosts

telegraf.conf ํŒŒ์ผ 2๊ณณ ์ˆ˜์ • ํ›„ $service telegraf restart ์‹คํ–‰

[global_tags]
 # dc = "us-east-1" # will tag all metrics with dc=us-east-1
 # rack = "1a"
 ## Environment variables can be used as tags, and throughout the config file
 # user = "$USER"
 nsId = "test_ns"
 mcisId = "test_mcis"
 vmId = "test_vm"
 osType = "linux"
 cspType = "aws"
 mechanism = "push"
...
[[outputs.kafka]]
 ## URLs of kafka brokers
 brokers = ["cb-dragonfly-kafka:9092"]
 ## Kafka topic for producer messages
 topic = "test_ns_test_mcis_test_vm_aws"
 data_format = "json"
Clone this wiki locally