Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-07-07 10:25:42 +02:00
parent 4e0db40fb4
commit b8316e01d2
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,8 @@
---
nimbus_era_files_timer_name: 'nimbus-era-files-update'
nimbus_era_files_timer_path: '/data/era'
nimbus_era_files_timer_user: 'nimbus'
nimbus_era_files_timer_group: 'staff'
nimbus_era_files_timer_frequency: 'weekly'
nimbus_era_files_timer_timeout_sec: 82800
nimbus_era_files_timer_script: '{{ nimbus_era_files_timer_path }}/update.sh'

View File

@ -0,0 +1,22 @@
---
- name: Create ERA file update script
template:
src: 'update.sh.j2'
dest: '{{ nimbus_era_files_timer_script }}'
owner: '{{ nimbus_era_files_timer_user }}'
group: '{{ nimbus_era_files_timer_group }}'
mode: 0755
- name: Create timer for ERA file updates
include_role: name=systemd-timer
vars:
systemd_timer_description: 'Update Nimbus beacon node ERA files'
#systemd_timer_start_on_creation: false
systemd_timer_ionice_class: 'idle'
systemd_timer_name: '{{ nimbus_era_files_timer_name }}'
systemd_timer_user: '{{ nimbus_era_files_timer_user }}'
systemd_timer_group: '{{ nimbus_era_files_timer_group }}'
systemd_timer_frequency: '{{ nimbus_era_files_timer_frequency }}'
systemd_timer_timeout_sec: '{{ nimbus_era_files_timer_timeout_sec }}'
systemd_timer_work_dir: '{{ nimbus_era_files_timer_path }}'
systemd_timer_script_path: '{{ nimbus_era_files_timer_script }}'

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# vim: ft=bash
set -eof pipefail
BEACON_NODE_BIN_PATH="{{ TODO }}"
BEACON_NODE_DATA_DIR="{{ TODO }}"
BEACON_NODE_DB_DIR="${BEACON_NODE_DATA_DIR}/data/shared_mainnet_0/db"
"${BEACON_NODE_BIN_PATH}/bin/ncli_db" exportEra --db="${BEACON_NODE_DB_DIR}"