Refactor instructions

This commit is contained in:
Prathamesh Musale 2024-09-17 16:26:26 +05:30
parent 5015497aae
commit ed95f5350d
2 changed files with 17 additions and 10 deletions

View File

@ -24,7 +24,7 @@
* On deployments machine(s): * On deployments machine(s):
* laconic-so: see [installation](https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/stack-orchestrator-setup/README.md) * laconic-so: see [installation](https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/stack-orchestrator-setup/README.md#setup-stack-orchestrator)
<details open> <details open>
<summary>L2 Optimism</summary> <summary>L2 Optimism</summary>

View File

@ -4,21 +4,23 @@
* Local: * Local:
* Ansible: see [installation](https://git.vdb.to/cerc-io/testnet-ops#installation) * Clone the `cerc-io/testnet-ops` repository:
* yq: see [installation](https://github.com/mikefarah/yq#install) ```bash
git clone git@git.vdb.to:cerc-io/testnet-ops.git
```
* Ansible: see [installation](https://git.vdb.to/cerc-io/testnet-ops#installation)
* On deployment machine: * On deployment machine:
* laconic-so: see [installation](https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/stack-orchestrator-setup/README.md) * laconic-so: see [installation](https://git.vdb.to/cerc-io/testnet-ops/src/branch/main/stack-orchestrator-setup/README.md#setup-stack-orchestrator)
## Setup ## Setup
* On your local machine, clone the `cerc-io/testnet-ops` repository: * Move to `nitro-nodes-setup` :
```bash ```bash
git clone git@git.vdb.to:cerc-io/testnet-ops.git
cd testnet-ops/nitro-nodes-setup cd testnet-ops/nitro-nodes-setup
``` ```
@ -70,7 +72,7 @@
* Update the target dir in `setup-vars.yml`: * Update the target dir in `setup-vars.yml`:
```bash ```bash
# Set path to desired deployments dir # Set path to desired deployments dir (under your user)
DEPLOYMENTS_DIR=<path-to-deployments-dir> DEPLOYMENTS_DIR=<path-to-deployments-dir>
sed -i "s|^nitro_directory:.*|nitro_directory: $DEPLOYMENTS_DIR/nitro-node|" setup-vars.yml sed -i "s|^nitro_directory:.*|nitro_directory: $DEPLOYMENTS_DIR/nitro-node|" setup-vars.yml
@ -92,7 +94,7 @@ Nitro nodes can be run using Ansible either locally or on a remote machine; foll
### On Remote Host ### On Remote Host
* Create a new `hosts.ini` file: * In `testnet-ops/nitro-nodes-setup`, create a new `hosts.ini` file:
```bash ```bash
cp ../hosts.example.ini hosts.ini cp ../hosts.example.ini hosts.ini
@ -101,7 +103,7 @@ Nitro nodes can be run using Ansible either locally or on a remote machine; foll
* Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine: * Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine:
```ini ```ini
[deployment_host] [<deployment_host>]
<host_name> ansible_host=<target_ip> ansible_user=<ssh_user> ansible_ssh_common_args='-o ForwardAgent=yes' <host_name> ansible_host=<target_ip> ansible_user=<ssh_user> ansible_ssh_common_args='-o ForwardAgent=yes'
``` ```
@ -115,6 +117,8 @@ Nitro nodes can be run using Ansible either locally or on a remote machine; foll
```bash ```bash
ansible all -m ping -i hosts.ini -k ansible all -m ping -i hosts.ini -k
# If using password based authentication, enter the ssh password on prompt; otherwise, leave it blank
# Expected output: # Expected output:
# <host_name> | SUCCESS => { # <host_name> | SUCCESS => {
@ -130,6 +134,9 @@ Nitro nodes can be run using Ansible either locally or on a remote machine; foll
```bash ```bash
LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-nodes.yml --extra-vars='{ "target_host": "nitro_host"}' --user $USER -kK 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
``` ```
### Check Deployment Status ### Check Deployment Status