Ansible role for Nim-Codex node configuration
https://github.com/status-im/nim-codex
7353484dcf
Most of the code from infra-role-beacon-node-linux |
||
---|---|---|
defaults | ||
files | ||
handlers | ||
meta | ||
tasks | ||
templates | ||
README.md |
README.md
Description
This role provisions a nim Codex installation.
Introduction
The role will:
- Checkout a branch from the nim-dagger repo
- Build it using the
build.sh
Bash script - Schedule regular builds using Systemd timers
- Start a node by defining a Systemd service
Ports
The service exposes two ports by default:
9000
- LibP2P peering port. Must ALWAYS be public.9900
- Prometheus metrics port. Should not be public.
Installation
Add to your requirements.yml
file:
- name: infra-role-nim-codex
src: git+git@github.com:status-im/infra-role-nim-codex
scm: git
Configuration
The crucial settings are:
# branch which should be built
codex_repo_branch: 'stable'
# optional setting for debug mode
codex_log_level: 'DEBUG'
Management
Service
Assuming the main
branch was built you can manage the service with:
sudo systemctl start codex-main
sudo systemctl status codex-main
sudo systemctl stop codex-main
You can view logs under:
tail -f /data/codex-main/logs/service.log
All node data is located in /data/codex-main/data
.
Builds
A timer will be installed to build the image:
> sudo systemctl list-units --type=service '*codex-*'
UNIT LOAD ACTIVE SUB DESCRIPTION
codex-prater-stable.service loaded active running Codex (stable)
To rebuild the image:
> sudo systemctl start build-codex-main
To check full build logs use:
journalctl -u build-codex-main.service
Requirements
Due to being part of Status infra this role assumes availability of certain things:
- The
iptables-persistent
module