Consul Basic Setup
Материал из noname.com.ua
Базовая настройка Hashicorp Consul
- Для использования в качестве бекенда для Hashicorp Vault)
- Очень базовая однонодовая конфигурация
Установка
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install consul
Базовая настройка
Unit немного исправлен
# systemctl cat consul.service
[Unit] Description="HashiCorp Consul - A service mesh solution" Documentation=https://www.consul.io/ Requires=network-online.target After=network-online.target ConditionFileNotEmpty=/etc/consul.d/consul-server.json [Service] EnvironmentFile=-/etc/consul.d/consul.env User=consul Group=consul ExecStart=/usr/bin/consul agent -config-dir=/etc/consul.d/ ExecReload=/bin/kill --signal HUP $MAINPID KillMode=process KillSignal=SIGTERM Restart=on-failure LimitNOFILE=65536 [Install] WantedBy=multi-user.target
Конфигурационные файлы
consul-server.json
cat /etc/consul.d/consul-server.json
{
"node_name": "consul",
"disable_remote_exec": true,
"disable_update_check": true,
"leave_on_terminate": false,
"enable_script_checks": true,
"data_dir": "/opt/consul",
"server": true,
"performance": {
"raft_multiplier": 1
},
"ports": {
"dns": 8600,
"http": 8500,
"https": -1,
"server": 8300
},
"log_level": "DEBUG",
"ui_config": {
"enabled": true
}
}