testnet-ops/nitro-bridge-demo-setup/README.md

54 lines
2.3 KiB
Markdown
Raw Normal View History

# nitro-bridge-demo-setup
## Setup Ansible
To get started, follow the [installation](../README.md#installation) guide to setup ansible on your machine
## Nitro Bridge Demo
2024-09-03 08:42:46 +00:00
The following commands have to be executed in [`nitro-bridge-demo-setup`](./) directory
2024-09-03 08:46:21 +00:00
- To set up the Nitro Bridge Demo, execute the `run-bridge-demo.yml` Ansible playbook by running the following command:
2024-09-03 09:54:29 +00:00
NOTE: By default, deployments are created in the `nitro-bridge-demo-setup/out` directory. To change this location, update the `nitro_directory` variable in the [vars.yml](./vars.yml) file.
```bash
2024-09-03 09:39:19 +00:00
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-bridge-demo.yml --extra-vars='{ "target_host": "localhost"}' --user $USER
```
- If you want to skip building the containers, set `"skip_container_build" : true` in the `--extra-vars` parameter:
```bash
2024-09-03 09:39:19 +00:00
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local run-bridge-demo.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
### Reset Demo
2024-09-03 08:46:21 +00:00
- Run the following command to reset demo:
```bash
2024-09-03 09:39:19 +00:00
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local reset-demo.yml --extra-vars='{"target_host" : "localhost"}' -K --user $USER
```
- Deployments are stopped
- Nitro nodes deployment data are removed
- Deployments are started again
- Steps from [Demo](https://git.vdb.to/cerc-io/nitro-stack/src/branch/main/nitro-bridge-demo.md#demo) can be run again
### Cleanup
2024-09-03 08:42:46 +00:00
- To stop all deployments, run the `stop-deployments.yml` playbook in the `nitro-stack-demo` directory:
```bash
2024-09-03 09:39:19 +00:00
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local stop-deployments.yml --extra-vars='{"target_host" : "localhost"}' -K --user $USER
```
- If you also want to remove the deployments, set `"remove_deployment_dir" : true` in the `--extra-vars` parameter when running the playbook:
```bash
2024-09-03 09:39:19 +00:00
LANG=en_US.utf8 ansible-playbook -i localhost, --connection=local stop-deployments.yml --extra-vars='{"target_host" : "localhost", "remove_deployment_dir" : true}' -K --user $USER
```