add --prepare command to bootstrap remote servers#135
Open
ch4r10t33r wants to merge 4 commits intomainfrom
Open
add --prepare command to bootstrap remote servers#135ch4r10t33r wants to merge 4 commits intomainfrom
ch4r10t33r wants to merge 4 commits intomainfrom
Conversation
Adds a new --prepare flag to spin-node.sh (ansible mode only) that verifies and installs the three prerequisites every remote host needs before a lean-quickstart deployment can run: - python3 (Ansible cannot self-bootstrap this) - Docker CE + Compose plugin (all clients run as containers) - yq (common role hard-fails without it) Changes: - parse-env.sh: add --prepare flag; bypass node-required guard - spin-node.sh: early-exit prepare path before genesis setup - run-ansible.sh: route prepare action to prepare.yml - ansible/playbooks/prepare.yml: new playbook targeting all:!localhost - README.md: document --prepare in Args, Scenarios, and Ansible sections
Extends the prepare playbook to configure ufw on each remote server: - Reads quicPort (UDP), metricsPort (TCP), and apiPort/httpPort (TCP) per-host directly from validator-config.yaml on the Ansible controller, so only the ports actually configured for that node are opened - Opens fixed observability ports on every host: 9090 (prometheus), 9080 (promtail), 9098 (cadvisor), 9100 (node_exporter) - Always allows SSH (22/tcp) before enabling ufw to prevent lockout - Enables ufw with default deny incoming; rules are persisted to disk and survive reboots - Prints ufw status verbose as part of the final summary Also handles Lantern's httpPort field alongside the apiPort field used by all other clients.
be714c2 to
1cc7ee2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--prepareflag tospin-node.sh(ansible mode only) that verifies and installs the prerequisites every remote host needs before a lean-quickstart deployment can runansible/playbooks/prepare.ymlagainst all remote hosts (all:!localhost) in the inventory —--nodeis not required--sshKeyand--useRootare honoured; all other flags are ignoredWhat gets installed
python3yqcommonrole hard-fails at every deploy ifyqis absent on the remoteUsage
Changes
parse-env.sh— new--prepareflag; bypasses the "node required" guardspin-node.sh— early-exit prepare path inserted after deployment mode is resolved, before genesis setuprun-ansible.sh— routesprepareaction toprepare.ymlansible/playbooks/prepare.yml— new playbook; idempotent, skips already-installed toolsREADME.md— documents--preparein the Args list, Scenarios section, and Ansible Deployment section