consul: use rpc.sh and discv5_nodeInfo for check
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
f74b0199c7
commit
a97db210ce
|
@ -1,5 +1,13 @@
|
||||||
---
|
---
|
||||||
- name: Create service directory
|
- name: Create service directory
|
||||||
|
file:
|
||||||
|
path: '{{ nimbus_fluffy_service_path }}'
|
||||||
|
state: directory
|
||||||
|
owner: '{{ nimbus_fluffy_user }}'
|
||||||
|
group: '{{ nimbus_fluffy_group }}'
|
||||||
|
mode: 0775
|
||||||
|
|
||||||
|
- name: Create data directory
|
||||||
file:
|
file:
|
||||||
path: '{{ nimbus_fluffy_data_path }}'
|
path: '{{ nimbus_fluffy_data_path }}'
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -31,7 +39,7 @@
|
||||||
dest: '{{ nimbus_fluffy_rpc_script_path }}'
|
dest: '{{ nimbus_fluffy_rpc_script_path }}'
|
||||||
owner: '{{ nimbus_fluffy_user }}'
|
owner: '{{ nimbus_fluffy_user }}'
|
||||||
group: '{{ nimbus_fluffy_group }}'
|
group: '{{ nimbus_fluffy_group }}'
|
||||||
mode: 0750
|
mode: 0755
|
||||||
|
|
||||||
- name: Create Ansible toggle script
|
- name: Create Ansible toggle script
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
port: '{{ nimbus_fluffy_listening_port }}'
|
port: '{{ nimbus_fluffy_listening_port }}'
|
||||||
address: '{{ nimbus_fluffy_public_address }}'
|
address: '{{ nimbus_fluffy_public_address }}'
|
||||||
tags: ['{{ env }}.{{ stage }}', 'eth1', 'nimbus']
|
tags: ['{{ env }}.{{ stage }}', 'eth1', 'nimbus']
|
||||||
#checks:
|
checks:
|
||||||
# - name: '{{ nimbus_fluffy_consul_service_name }}-test-health'
|
- name: '{{ nimbus_fluffy_consul_service_name }}-health'
|
||||||
# type: 'http'
|
type: 'script'
|
||||||
# http: 'http://localhost:{{ nimbus_fluffy_rest_port }}/eth/v1/node/version'
|
script: '{{ nimbus_fluffy_rpc_script_path }} discv5_nodeInfo'
|
||||||
|
timeout: '5s'
|
||||||
|
|
||||||
- id: '{{ nimbus_fluffy_service_name }}-metrics'
|
- id: '{{ nimbus_fluffy_service_name }}-metrics'
|
||||||
name: '{{ nimbus_fluffy_consul_metrics_service_name }}'
|
name: '{{ nimbus_fluffy_consul_metrics_service_name }}'
|
||||||
|
|
|
@ -26,7 +26,7 @@ PAYLOAD="{
|
||||||
}"
|
}"
|
||||||
|
|
||||||
# The jq script checks if error exists and adjusts exit code.
|
# The jq script checks if error exists and adjusts exit code.
|
||||||
curl -sS -X POST --max-time 10 \
|
curl -sSf -X POST --max-time 5 \
|
||||||
-H "Content-type:application/json" \
|
-H "Content-type:application/json" \
|
||||||
--data "${PAYLOAD}" \
|
--data "${PAYLOAD}" \
|
||||||
"${URL}" | \
|
"${URL}" | \
|
||||||
|
|
Loading…
Reference in New Issue