Skip to content

Commit 991cb7b

Browse files
committed
new pages
1 parent 4e61560 commit 991cb7b

File tree

4 files changed

+63
-53
lines changed

4 files changed

+63
-53
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Exposing Subnet Services and Frontend
3+
---
4+
5+
# Exposing Subnet Services and Frontend
6+
After starting the subnet, you need to start the servers. To allow outside users or services to access the services on the server, you need to expose the following ports. Here are the steps:
7+
8+
Update the following parameters in `common.env`, replacing `<YOUR_SERVER_IP>` with your actual server IP address or domain name:
9+
```bash
10+
VITE_SUBNET_URL=http://<YOUR_SERVER_IP>:5213
11+
VITE_SUBNET_RPC=http://<YOUR_SERVER_IP>:8545
12+
```
13+
14+
Modify the ports in `docker-compose.yml` as follows:
15+
```yaml
16+
relayer:
17+
ports:
18+
- '0.0.0.0:5215:5215'
19+
frontend:
20+
ports:
21+
- "0.0.0.0:5214:5214"
22+
```

docs/subnet/install_guide/launch_subnet.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -60,59 +60,6 @@ title: Launch a Subnet
6060

6161
<!-- 6. (Optional) if you deployed Subswap, check out the usage here: -->
6262

63-
### Multiple Machines Deployment
64-
65-
To deploy a subnet with multiple machines , access the Deployment Wizard in your browser and follow these steps:
66-
67-
1. Select "Custom Subnet" and click the button:
68-
![Custom Subnet](<../img/custom_subnet.png>)
69-
70-
2. Configure the subnet options as per your requirements and fill in the details:
71-
![Configureuration](<../img/configuration.png>)
72-
73-
3. Click the `Submit` button. You should see a success message:
74-
![success message](<../img/success_message.png>)
75-
76-
4. Return to the Deployment Wizard page ,continue with [Deployment Wizard](launch_subnet/#deploy-with-wizard-ui) step 2,click the `Start` button.
77-
![click_start](../img/click_start.png)
78-
79-
5. Copy the generated files `subnetX.env`, `docker-compose.yml`, and `genesis.json` to the other machines (ensure you modify the paths as necessary).
80-
You need to copy and move the following files:
81-
![files_to_copy](../img/files_to_copy.png)
82-
83-
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`**).
84-
![delete_docker_net](../img/delete_docker_net.png)
85-
86-
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:
87-
```bash
88-
export HOSTPWD=$(pwd)
89-
docker compose --profile machineX pull;
90-
docker compose --profile machineX up -d;
91-
```
92-
![multi_machine_deploy](../img/multi_machine_deploy.png)
93-
94-
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:
95-
96-
![Status](<../img/status.png>)
97-
98-
## Exposing Subnet Services and Frontend
99-
100-
Update the following parameters in `common.env`, replacing `<YOUR_SERVER_IP>` with your actual server IP address or domain name:
101-
```bash
102-
VITE_SUBNET_URL=http://<YOUR_SERVER_IP>:5213
103-
VITE_SUBNET_RPC=http://<YOUR_SERVER_IP>:8545
104-
```
105-
106-
Modify the ports in `docker-compose.yml` as follows:
107-
```yaml
108-
frontend:
109-
ports:
110-
- "0.0.0.0:5214:5214"
111-
```
112-
113-
Visit the Deployment Wizard and restart the subnet and services in the Deployment Wizard to apply these settings.
114-
115-
11663
<!-- ## Removing Subnet
11764
11865
### Shutdown Subnet
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Multiple Machines Deployment
3+
---
4+
5+
# Multiple Machines Deployment
6+
7+
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:
8+
9+
1. Select "Custom Subnet" and click the button:
10+
![Custom Subnet](<../img/custom_subnet.png>)
11+
12+
2. Configure the subnet options as per your requirements and fill in the details:
13+
![Configureuration](<../img/configuration.png>)
14+
15+
3. Click the `Submit` button. You should see a success message:
16+
![success message](<../img/success_message.png>)
17+
18+
4. Return to the Deployment Wizard page ,continue with [Deployment Wizard](../launch_subnet/#deploy-with-wizard-ui) step 2,click the `Start` button.
19+
![click_start](../img/click_start.png)
20+
21+
5. Copy the generated files `subnetX.env`, `docker-compose.yml`, and `genesis.json` to the other machines (ensure you modify the paths as necessary).
22+
You need to copy and move the following files:
23+
![files_to_copy](../img/files_to_copy.png)
24+
25+
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`**).
26+
![delete_docker_net](../img/delete_docker_net.png)
27+
28+
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:
29+
```bash
30+
export HOSTPWD=$(pwd)
31+
docker compose --profile machineX pull;
32+
docker compose --profile machineX up -d;
33+
```
34+
![multi_machine_deploy](../img/multi_machine_deploy.png)
35+
36+
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:
37+
38+
![Status](<../img/status.png>)
39+

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ nav:
108108
- Introduction: ./subnet/index.md
109109
- Deployment Guide:
110110
- Launch a Subnet: ./subnet/install_guide/launch_subnet.md
111+
- Multi-Machines Deployment: ./subnet/install_guide/multi_machines_deployment.md
112+
- Exposing Services: ./subnet/install_guide/exposing_services.md
111113
- Configs Explanation: ./subnet/install_guide/config_explanation.md
112114
- Common Issues and Troubleshooting: ./subnet/install_guide/common_issues.md
113115
- FAQ: ./subnet/install_guide/faq.md

0 commit comments

Comments
 (0)