Add ansible playbooks to setup and run nitro nodes #2

Merged
nabarun merged 10 commits from deep-stack/testnet-ops:ag-run-nitro-node into main 2024-09-05 07:27:36 +00:00
4 changed files with 23 additions and 6 deletions
Showing only changes of commit d8e3ec5273 - Show all commits

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
nitro-nodes-setup/out/

View File

@ -6,7 +6,7 @@
- Add location of the directory containing the ansible binary to your `PATH`
- Optional: Set Locale Encoding to `UTF-8`
- Set Locale Encoding to `UTF-8`
Ansible requires the locale encoding to be `UTF-8`. You can either use the `LANG` prefix when running Ansible commands or set the system-wide locale.

View File

@ -50,18 +50,34 @@ The following commands have to be executed in [`nitro-nodes-setup`](./) director
nitro_node_multiaddr: ""
```
- To run a nitro node, execute the `run-nitro-node.yml` Ansible playbook by running the following command.
- To run a nitro node, execute the `run-nitro-nodes.yml` Ansible playbook by running the following command.
NOTE: By default, deployments are created in the `nitro-nodes-setup/out` directory. To change this location, update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file.
```bash
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-nitro-node.yml --extra-vars='{ "target_host": "localhost"}' --user $USER
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-nitro-nodes.yml --extra-vars='{ "target_host": "localhost"}' --user $USER
```
- For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-nitro-node.yml --extra-vars='{ "target_host": "localhost", "skip_container_build": true }' --user $USER
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-nitro-nodes.yml --extra-vars='{ "target_host": "localhost", "skip_container_build": true }' --user $USER
```
- Follow steps from [Demo](https://git.vdb.to/cerc-io/nitro-stack/src/branch/main/nitro-bridge-demo.md#demo) to create mirror channels on L2, create virtual channel and make payments
## Check Deployment Status
- Run the following command in the directory where the deployments are created
- Check L1 nitro node logs:
```bash
laconic-so deployment --dir l1-nitro-deployment logs nitro-node -f
```
- Check L2 nitro node logs:
```bash
laconic-so deployment --dir l2-nitro-deployment logs nitro-node -f
```
Follow steps from [Demo](https://git.vdb.to/cerc-io/nitro-stack/src/branch/main/nitro-bridge-demo.md#demo) to create mirror channels on L2, create virtual channel and make payments

View File

@ -1,4 +1,4 @@
- name: Setup and run a nitro node
- name: Setup and run nitro nodes
hosts: "{{ target_host }}"
vars_files: