40 lines
1.8 KiB
YAML
40 lines
1.8 KiB
YAML
|
|
---
|
||
|
|
# The Monero block explorer, on the same box as the node.
|
||
|
|
#
|
||
|
|
# xmrblocks reads monerod's LMDB directly rather than going through RPC, which
|
||
|
|
# is why it lives here and not on its own VM. It is a 26 MB binary and 132 KB
|
||
|
|
# of templates; the expensive part is building it, and that happens elsewhere
|
||
|
|
# (scripts/build-xmrblocks.sh) because this box has 2 GB and a single monero
|
||
|
|
# translation unit needs ~3.2 GB. See roles/xmrblocks/README.md.
|
||
|
|
- name: Deploy the Monero blockchain explorer
|
||
|
|
hosts: monero
|
||
|
|
become: yes
|
||
|
|
vars:
|
||
|
|
healthcheck_push_url: "https://{{ subdomains.gatus }}.{{ root_domain }}/api/v1/endpoints/probe_xmrblocks/external"
|
||
|
|
healthcheck_push_token: "{{ gatus_push_tokens[inventory_hostname] }}"
|
||
|
|
roles:
|
||
|
|
- xmrblocks
|
||
|
|
|
||
|
|
- name: Publish the explorer from the edge host
|
||
|
|
hosts: edge
|
||
|
|
become: yes
|
||
|
|
tasks:
|
||
|
|
# No basic auth: this is a public block explorer over public chain data,
|
||
|
|
# which is what a block explorer is for. Caddy terminates TLS and proxies.
|
||
|
|
# Note the explorer has NO authentication of its own, so everything it can
|
||
|
|
# do is world-reachable - including the tx pusher, which relays a raw
|
||
|
|
# transaction through our node. That is deliberate; see the role README.
|
||
|
|
- name: Expose the Monero explorer over HTTPS
|
||
|
|
ansible.builtin.include_role:
|
||
|
|
name: caddy_site
|
||
|
|
vars:
|
||
|
|
caddy_site_name: monero-explorer
|
||
|
|
caddy_site_domain: "{{ subdomains.monero_explorer }}.{{ root_domain }}"
|
||
|
|
caddy_site_upstream: "{{ hostvars['monerod_box_local'].ansible_host }}:{{ hostvars['monerod_box_local'].xmrblocks_port }}"
|
||
|
|
caddy_site_resolvers: "100.100.100.100"
|
||
|
|
|
||
|
|
# The per-site validate cannot catch a conflict between sites.
|
||
|
|
- name: Validate the whole Caddyfile
|
||
|
|
ansible.builtin.command: caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile
|
||
|
|
changed_when: false
|