Add remote host setup for nitro contracts README

This commit is contained in:
Adw8
2024-09-09 12:09:02 +05:30
parent d7e657119a
commit dc6145f37d
5 changed files with 111 additions and 34 deletions
+16 -5
View File
@@ -6,7 +6,7 @@ To get started, follow the [installation](../README.md#installation) guide to se
## Setup Remote Hosts
To run the playbooks on a remote machine, follow these steps:
To run the playbook on a remote machine, follow these steps:
- In the [`nitro-bridge-setup`](./) directory, create a new file named hosts.ini:
@@ -18,18 +18,29 @@ To run the playbooks on a remote machine, follow these steps:
```bash
[nitro_host]
hostname ansible_host= ansible_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'
```
- Replace `host_name` with the alias of your choice.
- 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).
- Verify that you are able to connect to the host using the following command
```bash
ansible all -m ping -i hosts.ini
ansible all -m ping -i hosts.ini -k
# Expected output:
# <host_name> | SUCCESS => {
# "ansible_facts": {
# "discovered_interpreter_python": "/usr/bin/python3.10"
# },
# "changed": false,
# "ping": "pong"
# }
```
## Run Nitro Bridge
- Copy the `bridge-vars-example.yml` vars file
@@ -75,7 +86,7 @@ To run the playbooks on a remote machine, follow these steps:
l1_asset_address: ""
```
- To run the nitro bridge, execute the `run-nitro-bridge.yml` Ansible playbook by running the following command:
- To run the nitro bridge, execute the `run-nitro-bridge.yml` Ansible playbook by running one of the following commands:
- For local deployment, specify the `"target_host": localhost` in the `--extra-vars` parameter: