Add README steps to deploy nitro contracts on remote machine

This commit is contained in:
Adw8 2024-09-06 12:07:12 +05:30
parent 8f09e44749
commit d7e657119a
5 changed files with 31 additions and 12 deletions

10
.gitignore vendored
View File

@ -1,10 +0,0 @@
l2-setup/out
l2-setup/hosts.ini
nitro-bridge-setup/out
nitro-bridge-setup/bridge-vars.yml
nitro-nodes-setup/nitro-vars.yml
nitro-nodes-setup/out
nitro-contracts-setup/out
nitro-contracts-setup/contract-vars.yml
nitro-nodes-setup/out/
l2-setup/l2-vars.yml

2
l2-setup/.gitignore vendored
View File

@ -1,3 +1,3 @@
out
hosts.ini
l2-vars.yml
hosts.ini

View File

@ -4,6 +4,32 @@
To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine
## Setup Remote Hosts
To run the playbooks on a remote machine, follow these steps:
- In the [`nitro-bridge-setup`](./) directory, create a new file named hosts.ini:
```bash
cp ../example-hosts.ini hosts.ini
```
- Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine
```bash
[nitro_host]
hostname ansible_host= ansible_user= ansible_ssh_common_args='-o ForwardAgent=yes'
```
- 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
```
## Run Nitro Bridge
- Copy the `bridge-vars-example.yml` vars file

3
nitro-contracts-setup/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
out
contract-vars.yml
hosts.ini

View File

@ -1,3 +1,3 @@
nitro-vars.yml
out
nitro-vars.yml
hosts.ini