Remove steps to execute playbooks locally

This commit is contained in:
Adw8 2024-10-22 15:36:46 +05:30
parent 6b49d1878f
commit 2ac535b175
7 changed files with 31 additions and 83 deletions

View File

@ -1,8 +1,10 @@
# nitro-bridge-setup # nitro-bridge-setup
## Setup Ansible ## Prerequisites
To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine - Setup Ansible: To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine.
- Setup user: Follow steps from [Setup a user](../user-setup/README.md#setup-a-user) to setup a new user with passwordless sudo
## Setup ## Setup
@ -40,33 +42,13 @@ The following commands have to be executed in the [`nitro-bridge-setup`](./) dir
## Run Nitro Bridge ## Run Nitro Bridge
### On Local Host
- To setup and run nitro bridge locally, execute the `run-nitro-bridge.yml` Ansible playbook:
```bash
LANG=en_US.utf8 ansible-playbook run-nitro-bridge.yml --extra-vars='{ "target_host": "localhost"}' --user $USER -kK
```
NOTE: By default, deployments are created in an `out` directory. To change this location, update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file
- For skipping container build, set `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash
LANG=en_US.utf8 ansible-playbook run-nitro-bridge.yml --extra-vars='{"target_host" : "localhost", "skip_container_build": true}' --user $USER -kK
```
### On Remote Host
To run the playbook on a remote host:
- Create a new `hosts.ini` file: - Create a new `hosts.ini` file:
```bash ```bash
cp ../hosts.example.ini hosts.ini cp ../hosts.example.ini hosts.ini
``` ```
- Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine: - Edit the [`hosts.ini`](./hosts.ini) file:
```ini ```ini
[<deployment_host>] [<deployment_host>]
@ -78,7 +60,7 @@ To run the playbook on a remote host:
- Replace `<target_ip>` with the IP address or hostname of the target machine - Replace `<target_ip>` with the IP address or hostname of the target machine
- Replace `<ssh_user>` with the SSH username (e.g., dev, ubuntu) - 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 - Verify that you are able to connect to the host using the following command:
```bash ```bash
ansible all -m ping -i hosts.ini -k ansible all -m ping -i hosts.ini -k
@ -94,12 +76,14 @@ To run the playbook on a remote host:
# } # }
``` ```
- Execute the `run-nitro-bridge.yml` Ansible playbook for remote deployment: - Execute the `run-nitro-bridge.yml` Ansible playbook for deploying nitro bridge:
```bash ```bash
LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-bridge.yml --extra-vars='{ "target_host": "nitro_host"}' --user $USER -kK LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-bridge.yml --extra-vars='{ "target_host": "nitro_host"}' --user $USER -kK
``` ```
NOTE: By default, deployments are created in an `out` directory. To change this location, update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file
- For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter: - For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash ```bash

View File

@ -1,3 +1,3 @@
target_host: "localhost" target_host: "nitro_host"
nitro_directory: out nitro_directory: out
skip_container_build: false skip_container_build: false

View File

@ -1,8 +1,10 @@
# nitro-contracts-setup # nitro-contracts-setup
## Setup Ansible ## Prerequisites
To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine - Setup Ansible: To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine.
- Setup user: Follow steps from [Setup a user](../user-setup/README.md#setup-a-user) to setup a new user with passwordless sudo
## Setup ## Setup
@ -34,33 +36,13 @@ The following commands have to be executed in the [`nitro-contracts-setup`](./)
## Deploy Contracts ## Deploy Contracts
### On Local Host
- To deploy nitro contracts locally, execute the `deploy-contracts.yml` Ansible playbook:
```bash
LANG=en_US.utf8 ansible-playbook deploy-contracts.yml --extra-vars='{ "target_host": "localhost"}' --user $USER -kK
```
NOTE: By default, deployments are created in an `out` directory. To change this location, update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file
- For skipping container build, set `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash
LANG=en_US.utf8 ansible-playbook deploy-contracts.yml --extra-vars='{"target_host" : "localhost", "skip_container_build": true}' --user $USER -kK
```
### On Remote Host
To run the playbook on a remote host:
- Create a new `hosts.ini` file: - Create a new `hosts.ini` file:
```bash ```bash
cp ../hosts.example.ini hosts.ini cp ../hosts.example.ini hosts.ini
``` ```
- Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine: - Edit the [`hosts.ini`](./hosts.ini) file:
```ini ```ini
[<deployment_host>] [<deployment_host>]
@ -88,12 +70,14 @@ To run the playbook on a remote host:
# } # }
``` ```
- Execute the `deploy-contracts.yml` Ansible playbook for remote deployment: - Execute the `deploy-contracts.yml` Ansible playbook to deploy nitro contracts:
```bash ```bash
LANG=en_US.utf8 ansible-playbook -i hosts.ini deploy-contracts.yml --extra-vars='{ "target_host": "nitro_host"}' --user $USER -kK LANG=en_US.utf8 ansible-playbook -i hosts.ini deploy-contracts.yml --extra-vars='{ "target_host": "nitro_host"}' --user $USER -kK
``` ```
NOTE: By default, deployments are created in an `out` directory. To change this location, update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file
- For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter: - For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash ```bash

View File

@ -1,3 +1,3 @@
target_host: "localhost" target_host: "nitro_host"
nitro_directory: out nitro_directory: out
skip_container_build: false skip_container_build: false

View File

@ -1,8 +1,10 @@
# nitro-nodes-setup # nitro-nodes-setup
## Setup Ansible ## Prerequisites
To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine - Setup Ansible: To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine.
- Setup user: Follow steps from [Setup a user](../user-setup/README.md#setup-a-user) to setup a new user with passwordless sudo
## Setup ## Setup
@ -52,33 +54,13 @@ The following commands have to be executed in [`nitro-nodes-setup`](./) director
## Run Nitro Node ## Run Nitro Node
### On Local Host
- To run a nitro node, execute the `run-nitro-nodes.yml` Ansible playbook by running the following command:
```bash
LANG=en_US.utf8 ansible-playbook run-nitro-nodes.yml --extra-vars='{ "target_host": "localhost"}' --user $USER -kK
```
NOTE: By default, deployments are created in a `out` directory. To change this location, update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file
- For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash
LANG=en_US.utf8 ansible-playbook -i hosts.ini run-nitro-nodes.yml --extra-vars='{ "target_host": "localhost", "skip_container_build": true }' --user $USER -kK
```
### On Remote Host
To run the playbook on a remote host:
- Create a new `hosts.ini` file: - Create a new `hosts.ini` file:
```bash ```bash
cp ../hosts.example.ini hosts.ini cp ../hosts.example.ini hosts.ini
``` ```
- Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine: - Edit the [`hosts.ini`](./hosts.ini) file:
```ini ```ini
[<deployment_host>] [<deployment_host>]
@ -108,12 +90,14 @@ To run the playbook on a remote host:
- Copy and edit the [`nitro-vars.yml`](./nitro-vars.yml) file as described in the [local setup](./README.md#run-nitro-node-on-local-host) section - Copy and edit the [`nitro-vars.yml`](./nitro-vars.yml) file as described in the [local setup](./README.md#run-nitro-node-on-local-host) section
- Execute the `run-nitro-nodes.yml` Ansible playbook for remote deployment: - Execute the `run-nitro-nodes.yml` Ansible playbook to deploy nitro nodes:
```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
``` ```
NOTE: By default, deployments are created in a `out` directory. To change this location, update the `nitro_directory` variable in the [setup-vars.yml](./setup-vars.yml) file
- For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter: - For skipping container build, run with `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash ```bash

View File

@ -1,3 +1,3 @@
target_host: "localhost" target_host: "nitro_host"
nitro_directory: out nitro_directory: out
skip_container_build: false skip_container_build: false

View File

@ -1,20 +1,16 @@
# service-provider-setup # service-provider-setup
## Setup Ansible
To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine
## Prerequisites ## Prerequisites
- Setup Ansible: follow the [installation](../README.md#installation) guide to setup ansible on your machine
- Set up a DigitalOcean Droplet with passwordless SSH access - Set up a DigitalOcean Droplet with passwordless SSH access
- Buy a domain and configure [nameservers pointing to DigitalOcean](https://docs.digitalocean.com/products/networking/dns/getting-started/dns-registrars/) - Buy a domain and configure [nameservers pointing to DigitalOcean](https://docs.digitalocean.com/products/networking/dns/getting-started/dns-registrars/)
- Generate a DigitalOcean access token, used for API authentication and managing cloud resources - Generate a DigitalOcean access token, used for API authentication and managing cloud resources
## Setup a new User - Setup a user: Follow steps from [Setup a user](../user-setup/README.md#setup-a-user) to setup a new user with passwordless sudo
Follow steps from [Setup a user](../user-setup/README.md#setup-a-user) to setup a new user with passwordless sudo
## Become a Service Provider ## Become a Service Provider