From d7e657119a1be348bef5ba9727e943cdb6ed505d Mon Sep 17 00:00:00 2001 From: Adw8 Date: Fri, 6 Sep 2024 12:07:12 +0530 Subject: [PATCH] Add README steps to deploy nitro contracts on remote machine --- .gitignore | 10 ---------- l2-setup/.gitignore | 2 +- nitro-bridge-setup/README.md | 26 ++++++++++++++++++++++++++ nitro-contracts-setup/.gitignore | 3 +++ nitro-nodes-setup/.gitignore | 2 +- 5 files changed, 31 insertions(+), 12 deletions(-) delete mode 100644 .gitignore create mode 100644 nitro-contracts-setup/.gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f2f70c6..0000000 --- a/.gitignore +++ /dev/null @@ -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 diff --git a/l2-setup/.gitignore b/l2-setup/.gitignore index bec264f..fb4396e 100644 --- a/l2-setup/.gitignore +++ b/l2-setup/.gitignore @@ -1,3 +1,3 @@ out -hosts.ini l2-vars.yml +hosts.ini diff --git a/nitro-bridge-setup/README.md b/nitro-bridge-setup/README.md index 127eb22..200883a 100644 --- a/nitro-bridge-setup/README.md +++ b/nitro-bridge-setup/README.md @@ -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 `` with the IP address or hostname of the target machine. + - Replace `` 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 diff --git a/nitro-contracts-setup/.gitignore b/nitro-contracts-setup/.gitignore new file mode 100644 index 0000000..ffb4fb9 --- /dev/null +++ b/nitro-contracts-setup/.gitignore @@ -0,0 +1,3 @@ +out +contract-vars.yml +hosts.ini diff --git a/nitro-nodes-setup/.gitignore b/nitro-nodes-setup/.gitignore index 8ad0f7d..a537e4d 100644 --- a/nitro-nodes-setup/.gitignore +++ b/nitro-nodes-setup/.gitignore @@ -1,3 +1,3 @@ -nitro-vars.yml out +nitro-vars.yml hosts.ini