diff --git a/docs/subnet/img/click_start.png b/docs/subnet/img/click_start.png new file mode 100644 index 0000000..6908d89 Binary files /dev/null and b/docs/subnet/img/click_start.png differ diff --git a/docs/subnet/img/configuration.png b/docs/subnet/img/configuration.png new file mode 100644 index 0000000..c6a1c80 Binary files /dev/null and b/docs/subnet/img/configuration.png differ diff --git a/docs/subnet/img/custom_subnet.png b/docs/subnet/img/custom_subnet.png new file mode 100644 index 0000000..98766d2 Binary files /dev/null and b/docs/subnet/img/custom_subnet.png differ diff --git a/docs/subnet/img/delete_docker_net.png b/docs/subnet/img/delete_docker_net.png new file mode 100644 index 0000000..551de40 Binary files /dev/null and b/docs/subnet/img/delete_docker_net.png differ diff --git a/docs/subnet/img/files_to_copy.png b/docs/subnet/img/files_to_copy.png new file mode 100644 index 0000000..1ab9c6e Binary files /dev/null and b/docs/subnet/img/files_to_copy.png differ diff --git a/docs/subnet/img/multi_machine_deploy.png b/docs/subnet/img/multi_machine_deploy.png new file mode 100644 index 0000000..5e1a967 Binary files /dev/null and b/docs/subnet/img/multi_machine_deploy.png differ diff --git a/docs/subnet/img/status.png b/docs/subnet/img/status.png new file mode 100644 index 0000000..74ca085 Binary files /dev/null and b/docs/subnet/img/status.png differ diff --git a/docs/subnet/img/success_message.png b/docs/subnet/img/success_message.png new file mode 100644 index 0000000..645b464 Binary files /dev/null and b/docs/subnet/img/success_message.png differ diff --git a/docs/subnet/install_guide/exposing_services_frontend.md b/docs/subnet/install_guide/exposing_services_frontend.md new file mode 100644 index 0000000..730b854 --- /dev/null +++ b/docs/subnet/install_guide/exposing_services_frontend.md @@ -0,0 +1,29 @@ +--- +title: Exposing Subnet Frontend +--- + +# Exposing Subnet Frontend +To allow the Subnet Frontend to be accessible from the public, the following steps are required: + +Update the following parameters in `common.env`, replacing `` with your actual server IP address or domain name: +```bash +VITE_SUBNET_URL=http://:5213 +VITE_SUBNET_RPC=http://:8545 +``` + +Modify the ports in `docker-compose.yml` as follows: +```yaml + stats: + ports: + - '0.0.0.0:5213:5213' + frontend: + ports: + - '0.0.0.0:5214:5214' +``` +Finally, restart Subnet Frontend service: + +``` + HOSTPWD=$(pwd) + docker compose --profile services down frontend + docker compose --profile services up -d frontend +``` \ No newline at end of file diff --git a/docs/subnet/install_guide/launch_subnet.md b/docs/subnet/install_guide/launch_subnet.md index f44a93b..9819d7d 100644 --- a/docs/subnet/install_guide/launch_subnet.md +++ b/docs/subnet/install_guide/launch_subnet.md @@ -28,7 +28,7 @@ title: Launch a Subnet -## Deploy Subnet With Subnet Deployment Wizard UI +## Deploy With Wizard UI 1. Pull `start.sh` script from the generator Github repo and run. This will start a local webserver ``` @@ -56,7 +56,7 @@ title: Launch a Subnet - Start Subnet services ![Steps](../img/steps.png) - 5. Once successfully deployed, you can check out [UI usage guide](../using_subnet.md) + 5. Once successfully deployed, you can check out [UI usage guide](../using_subnet/using_subnet.md) diff --git a/docs/subnet/install_guide/multi_machines_deployment.md b/docs/subnet/install_guide/multi_machines_deployment.md new file mode 100644 index 0000000..e1bb64d --- /dev/null +++ b/docs/subnet/install_guide/multi_machines_deployment.md @@ -0,0 +1,39 @@ +--- +title: Multiple Machines Deployment +--- + +# Multiple Machines Deployment + +To deploy a subnet with multiple machines, you need to follow the first two steps of [Deploy With Wizard UI](../launch_subnet/#deploy-with-wizard-ui), pull and run the `start.sh` script, access the Deployment Wizard in your browser, and follow these steps: + +1. Select "Custom Subnet" and click the button: + ![Custom Subnet](<../img/custom_subnet.png>) + +2. Configure the subnet options as per your requirements and fill in the details: + ![Configureuration](<../img/configuration.png>) + +3. Click the `Submit` button. You should see a success message: + ![success message](<../img/success_message.png>) + +4. Return to the Deployment Wizard page ,continue with [Deployment Wizard](../launch_subnet/#deploy-with-wizard-ui) step 2,click the `Start` button. + ![click_start](../img/click_start.png) + +5. Copy the generated files `subnetX.env`, `docker-compose.yml`, and `genesis.json` to the other machines (ensure you modify the paths as necessary). + You need to copy and move the following files: + ![files_to_copy](../img/files_to_copy.png) + +6. Edit the `generated/docker-compose.yml` file, removing the subnet's network configuration (**except for the subnet configuration on machine1, which is the machine where you ran `start.sh`**). + ![delete_docker_net](../img/delete_docker_net.png) + +7. On `machineX`, place the `subnetX.env`, `docker-compose.yml`, and `genesis.json` files in the same directory. Then, use the following commands to start the corresponding subnet: + ```bash + export HOSTPWD=$(pwd) + docker compose --profile machineX pull; + docker compose --profile machineX up -d; + ``` + ![multi_machine_deploy](../img/multi_machine_deploy.png) + +8. Back in the Deployment Wizard, you can monitor the number of peers in the Status column on the left, or use the script `generated/scripts/check-peer.sh` to confirm if the multi-machine deployment was successful: + + ![Status](<../img/status.png>) + diff --git a/mkdocs.yml b/mkdocs.yml index abb58bb..70cc206 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -108,6 +108,8 @@ nav: - Introduction: ./subnet/index.md - Deployment Guide: - Launch a Subnet: ./subnet/install_guide/launch_subnet.md + - Multi-Machines Deployment: ./subnet/install_guide/multi_machines_deployment.md + - Exposing Subnet Frontend: ./subnet/install_guide/exposing_services_frontend.md - Configs Explanation: ./subnet/install_guide/config_explanation.md - Common Issues and Troubleshooting: ./subnet/install_guide/common_issues.md - FAQ: ./subnet/install_guide/faq.md