2019-04-26 11:54:14 +02:00
|
|
|
---
|
|
|
|
- name: Geth | Create Consul service definition
|
|
|
|
include_role: name=consul-service
|
|
|
|
vars:
|
2021-03-25 13:50:04 +01:00
|
|
|
consul_config_name: '{{ geth_cont_name }}'
|
2019-04-26 11:54:14 +02:00
|
|
|
consul_services:
|
2021-03-25 13:50:04 +01:00
|
|
|
- name: '{{ geth_cont_name }}'
|
2019-04-26 11:54:14 +02:00
|
|
|
tags: '{{ geth_consul_tags }}'
|
|
|
|
port: '{{ geth_port }}'
|
2021-03-25 12:16:43 +01:00
|
|
|
address: '{{ ansible_host }}'
|
2019-04-26 11:54:14 +02:00
|
|
|
meta:
|
|
|
|
node_addr: '{{ node_info.json.result.id }}'
|
|
|
|
node_enode: '{{ node_info.json.result.enode }}'
|
2019-05-06 11:41:21 +02:00
|
|
|
checks:
|
2021-03-25 13:50:04 +01:00
|
|
|
- id: '{{ geth_cont_name }}-status'
|
2019-05-06 11:41:21 +02:00
|
|
|
type: tcp
|
|
|
|
tcp: '127.0.0.1:{{ geth_port }}'
|
2021-03-25 12:16:43 +01:00
|
|
|
|
2021-03-25 13:50:04 +01:00
|
|
|
- name: '{{ geth_cont_name }}-rpc'
|
2019-05-06 11:41:21 +02:00
|
|
|
tags: '{{ geth_consul_tags + ["rpc"] }}'
|
|
|
|
port: '{{ geth_rpc_port }}'
|
2021-12-02 12:52:10 +01:00
|
|
|
address: '{{ ansible_local.wireguard.address }}'
|
2019-05-06 11:41:21 +02:00
|
|
|
meta:
|
2021-12-02 12:52:10 +01:00
|
|
|
url: 'http://{{ ansible_local.wireguard.address }}:{{ geth_rpc_port }}'
|
2019-04-26 11:54:14 +02:00
|
|
|
checks:
|
2021-03-25 13:50:04 +01:00
|
|
|
- id: '{{ geth_cont_name }}-rpc-status'
|
2021-03-25 13:56:04 +01:00
|
|
|
type: 'script'
|
2021-05-11 12:17:34 +02:00
|
|
|
script: '{{ geth_rpc_wrapper }} eth_syncing'
|
2019-05-08 14:17:36 +02:00
|
|
|
timeout: '5s'
|
2021-10-15 14:35:30 +02:00
|
|
|
failures_before_critical: 3
|
2021-03-25 12:16:43 +01:00
|
|
|
|
2021-03-25 13:50:04 +01:00
|
|
|
- name: '{{ geth_cont_name }}-ws'
|
2020-11-24 15:37:01 +01:00
|
|
|
tags: '{{ geth_consul_tags + ["websocket"] }}'
|
|
|
|
port: '{{ geth_websocket_port }}'
|
2021-12-02 12:52:10 +01:00
|
|
|
address: '{{ ansible_local.wireguard.address }}'
|
2020-11-24 15:37:01 +01:00
|
|
|
meta:
|
2021-12-02 12:52:10 +01:00
|
|
|
url: 'ws://{{ ansible_local.wireguard.address }}:{{ geth_websocket_port }}'
|
2020-11-24 15:37:01 +01:00
|
|
|
checks:
|
|
|
|
- id: '{{ geth_cont_name }}-ws-status'
|
|
|
|
name: 'Geth WebSocket API'
|
|
|
|
type: 'tcp'
|
|
|
|
tcp: 'localhost:{{ geth_websocket_port }}'
|
2021-10-15 14:35:30 +02:00
|
|
|
failures_before_critical: 3
|