Prasyarat

  • OpenStack terinstall

Panduan

  1. Buat user openstack-exporter
useradd --no-create-home --shell /bin/false openstack-exporter
  1. Buat file konfigurasi
mkdir /etc/openstack/
cat<<EOF > /etc/openstack/clouds.yaml
clouds:
 default:
   region_name: <region_name>
   identity_api_version: 3
   identity_interface: <endpoint_interface> # admin/internal/public
   auth:
     username: <username>
     password: <password>
     project_name: <project_name>
     project_domain_name: <project_domain_name>
     project_domain_id: <project_domain_id>
     user_domain_name: <user_domain_name>
     auth_url: https://<keystone_endpoint>:<keystone_port>/v3
     verify: false
EOF
  1. Buat file systemd
cat<<EOF > /etc/systemd/system/openstack-exporter.service
[Unit]
Description=OpenStack Exporter OPEX
Wants=network-online.target
After=network-online.target

[Service]
User=openstack-exporter
Group=openstack-exporter
Type=simple
ExecStart=openstack-exporter Surabaya

[Install]
WantedBy=multi-user.target
EOF
  1. Reload daemon dan jalankan servis
systemctl daemon-reload
systemctl enable --now openstack-exporter

Catatan!
Jika terjadi error x509: certificate signed by unknown tambahkan certificate openstack ke daftar trusted!

Referensi