mirror of
https://github.com/status-im/infra-role-geth-exporter.git
synced 2025-02-18 22:06:22 +00:00
add initial tasks and defaults
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
aed4c0fdd7
commit
f27e381a6c
18
defaults/main.yml
Normal file
18
defaults/main.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
geth_expo_cont_image: statusteam/geth_exporter:latest
|
||||
geth_expo_cont_name: geth-exporter
|
||||
geth_expo_cont_addr: '0.0.0.0'
|
||||
geth_expo_cont_port: 9200
|
||||
|
||||
# consul catalog data
|
||||
geth_expo_consul_name: 'geth-exporter'
|
||||
geth_expo_consul_addr: '{{ ansible_local.tinc.vpn_ip }}'
|
||||
geth_expo_consul_extra_tag: '{{ geth_expo_cont_name }}'
|
||||
geth_expo_consul_tags:
|
||||
- '{{ geth_expo_consul_extra_tag }}'
|
||||
- metrics
|
||||
- geth
|
||||
|
||||
cont_state: started
|
||||
cont_recreate: false
|
||||
cont_restart: false
|
17
tasks/consul.yml
Normal file
17
tasks/consul.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: Create Consul service definition
|
||||
include_role: name=consul-service
|
||||
vars:
|
||||
consul_config_name: '{{ geth_expo_cont_name | replace("-", "_") }}'
|
||||
consul_services:
|
||||
- name: '{{ geth_expo_consul_name }}'
|
||||
port: '{{ geth_expo_cont_port }}'
|
||||
address: '{{ geth_expo_consul_addr }}'
|
||||
tags: '{{ geth_expo_consul_tags }}'
|
||||
meta:
|
||||
container: '{{ geth_expo_cont_name }}'
|
||||
checks:
|
||||
- id: '{{ geth_expo_consul_name }}'-health
|
||||
name: 'geth-exporter healthcheck'
|
||||
type: http
|
||||
http: 'http://localhost:{{ geth_expo_cont_port }}/health'
|
18
tasks/container.yml
Normal file
18
tasks/container.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: 'Start container: {{ geth_expo_cont_name }}'
|
||||
docker_container:
|
||||
name: '{{ geth_expo_cont_name }}'
|
||||
image: '{{ geth_expo_cont_image }}'
|
||||
user: root
|
||||
pull: true
|
||||
restart_policy: always
|
||||
state: '{{ cont_state }}'
|
||||
recreate: '{{ cont_recreate }}'
|
||||
restart: '{{ cont_restart }}'
|
||||
entrypoint: geth_exporter
|
||||
volumes_from: '{{ cont_name }}'
|
||||
command: |
|
||||
-ipc /data/geth.ipc
|
||||
-port 9200
|
||||
ports:
|
||||
- '{{ geth_expo_cont_port }}:9200/tcp'
|
3
tasks/main.yml
Normal file
3
tasks/main.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
- import_tasks: container.yml
|
||||
- import_tasks: consul.yml
|
Loading…
x
Reference in New Issue
Block a user