From e844a9bc6137fe716beaa5382ca6c0924f24789f Mon Sep 17 00:00:00 2001 From: Adw8 Date: Wed, 23 Oct 2024 12:40:15 +0530 Subject: [PATCH] Add prerequisite of setting up user in README --- testnet-nitro-node.md | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/testnet-nitro-node.md b/testnet-nitro-node.md index 2db33b5..2c523a5 100644 --- a/testnet-nitro-node.md +++ b/testnet-nitro-node.md @@ -14,6 +14,8 @@ * On deployment machine: + * User with passwordless sudo: see [setup](https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/user-setup/README.md#user-setup) + * laconic-so: see [installation](https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/stack-orchestrator-setup/README.md#setup-stack-orchestrator) ## Setup @@ -114,21 +116,12 @@ ## Run Nitro Nodes -Nitro nodes can be run using Ansible either locally or on a remote machine; follow corresponding steps for your setup - -### On Local Host - -* Setup and run a Nitro node (L1+L2) by executing the `run-nitro-nodes.yml` Ansible playbook: - - ```bash - LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-nitro-nodes.yml --extra-vars='{ "target_host": "localhost"}' --user $USER - ``` - -### On Remote Host +Nitro nodes can be set up on a target machine using Ansible: * In `testnet-ops/nitro-nodes-setup`, create a new `hosts.ini` file: ```bash + cd testnet-ops/nitro-nodes-setup cp ../hosts.example.ini hosts.ini ``` @@ -142,12 +135,12 @@ Nitro nodes can be run using Ansible either locally or on a remote machine; foll * Replace `` with `nitro_host` * Replace `` with the alias of your choice * Replace `` with the IP address or hostname of the target machine - * Replace `` with the SSH username (e.g., dev, ubuntu) + * Replace `` with the username of the user that you set up on target machine (e.g. dev, ubuntu) * Verify that you are able to connect to the host using the following command ```bash - ansible all -m ping -i hosts.ini -k + ansible all -m ping -i hosts.ini # If using password based authentication, enter the ssh password on prompt; otherwise, leave it blank @@ -162,13 +155,10 @@ Nitro nodes can be run using Ansible either locally or on a remote machine; foll # } ``` -* Execute the `run-nitro-nodes.yml` Ansible playbook for remote deployment: +* Execute the `run-nitro-nodes.yml` Ansible playbook to setup and run a Nitro node (L1+L2): ```bash - LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-nodes.yml --extra-vars='{ "target_host": "nitro_host"}' --user $USER -kK - - # If using password based authentication, enter the ssh password on prompt; otherwise, leave it blank - # Enter the sudo password as "BECOME password" on prompt + LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-nodes.yml --extra-vars='{ "target_host": "nitro_host"}' --user $USER ``` ### Check Deployment Status