Add prerequisite of setting up user in README

This commit is contained in:
Adw8 2024-10-23 12:40:15 +05:30
parent 9ec097ef94
commit e844a9bc61

View File

@ -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 `<deployment_host>` with `nitro_host`
* Replace `<host_name>` with the alias of your choice
* Replace `<target_ip>` with the IP address or hostname of the target machine
* Replace `<ssh_user>` with the SSH username (e.g., dev, ubuntu)
* Replace `<ssh_user>` 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