Improve centos and ubuntu instruction for edge
This commit is contained in:
parent
4007526155
commit
8412b61812
@ -158,21 +158,65 @@ sudo rpm -Uvh tb-edge-${TB_EDGE_VERSION}.rpm
|
||||
{: .copy-code}
|
||||
|
||||
### Configure ThingsBoard Edge
|
||||
To configure ThingsBoard Edge, you can either manually edit the configuration file or use a command to automate the process.
|
||||
|
||||
|
||||
#### [Optional] Update bind ports
|
||||
If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server (cloud) is running, you'll need to update docker compose port mapping to avoid port collision between ThingsBoard server and ThingsBoard Edge.
|
||||
|
||||
Please update next lines of `docker-compose.yml` file:
|
||||
#### Automated Configuration
|
||||
You can use the following command to automatically update the configuration file with specific values:
|
||||
|
||||
```bash
|
||||
ports:
|
||||
- "18080:8080"
|
||||
- "11883:1883"
|
||||
- "15683-15688:5683-5688/udp"
|
||||
sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
|
||||
export CLOUD_ROUTING_KEY=${CLOUD_ROUTING_KEY}
|
||||
export CLOUD_ROUTING_SECRET=${CLOUD_ROUTING_SECRET}
|
||||
export CLOUD_RPC_HOST=${BASE_URL}
|
||||
export CLOUD_RPC_PORT=${CLOUD_RPC_PORT}
|
||||
export CLOUD_RPC_SSL_ENABLED=${CLOUD_RPC_SSL_ENABLED}
|
||||
EOL'
|
||||
```
|
||||
Make sure that ports above (18080, 11883, 15683-15688) are not used by any other application.
|
||||
{: .copy-code}
|
||||
|
||||
#### Manual Configuration
|
||||
|
||||
```bash
|
||||
sudo nano /etc/tb-edge/conf/tb-edge.conf
|
||||
```
|
||||
{: .copy-code}
|
||||
|
||||
Please update the following lines in your configuration file. Make sure to replace:
|
||||
|
||||
```text
|
||||
export CLOUD_ROUTING_KEY=${CLOUD_ROUTING_KEY}
|
||||
export CLOUD_ROUTING_SECRET=${CLOUD_ROUTING_SECRET}
|
||||
export CLOUD_RPC_HOST=${BASE_URL}
|
||||
export CLOUD_RPC_PORT=${CLOUD_RPC_PORT}
|
||||
export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE
|
||||
|
||||
```
|
||||
|
||||
#### [Optional] Update bind ports
|
||||
If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server (cloud) is running, you'll need to update configuration parameters to avoid port collision between ThingsBoard server and ThingsBoard Edge.
|
||||
|
||||
Please uncomment the following parameters in the ThingsBoard Edge configuration file (**/etc/tb-edge/conf/tb-edge.conf**):
|
||||
|
||||
```text
|
||||
export HTTP_BIND_PORT=18080
|
||||
export MQTT_BIND_PORT=11883
|
||||
export COAP_BIND_PORT=15683
|
||||
export LWM2M_ENABLED=false
|
||||
```
|
||||
|
||||
Or update using command:
|
||||
|
||||
```bash
|
||||
sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
|
||||
export HTTP_BIND_PORT=18080
|
||||
export MQTT_BIND_PORT=11883
|
||||
export COAP_BIND_PORT=15683
|
||||
export LWM2M_ENABLED=false
|
||||
EOL'
|
||||
```
|
||||
{: .copy-code}
|
||||
|
||||
Make sure that ports above (18080, 11883, 15683-15688) are not used by any other application.
|
||||
#### Run installation script
|
||||
Once ThingsBoard Edge is installed and configured please execute the following install script:
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ If ThingsBoard Edge is going to be running on the same machine where ThingsBoard
|
||||
|
||||
Please update next lines of `docker-compose.yml` file:
|
||||
|
||||
```bash
|
||||
```text
|
||||
ports:
|
||||
- "18080:8080"
|
||||
- "11883:1883"
|
||||
|
||||
@ -86,10 +86,57 @@ Go to the download repository and install ThingsBoard Edge service
|
||||
|
||||
```bash
|
||||
sudo dpkg -i tb-edge-{TB_EDGE_VERSION}.deb
|
||||
{:copy-code}
|
||||
```
|
||||
{: .copy-code}
|
||||
|
||||
### Configure ThingsBoard Edge
|
||||
To configure ThingsBoard Edge, you can either manually edit the configuration file or use a command to automate the process.
|
||||
|
||||
#### Automated Configuration
|
||||
You can use the following command to automatically update the configuration file with specific values:
|
||||
|
||||
```bash
|
||||
sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
|
||||
export CLOUD_ROUTING_KEY=${CLOUD_ROUTING_KEY}
|
||||
export CLOUD_ROUTING_SECRET=${CLOUD_ROUTING_SECRET}
|
||||
export CLOUD_RPC_HOST=${BASE_URL}
|
||||
export CLOUD_RPC_PORT=${CLOUD_RPC_PORT}
|
||||
export CLOUD_RPC_SSL_ENABLED=${CLOUD_RPC_SSL_ENABLED}
|
||||
EOL'
|
||||
```
|
||||
{: .copy-code}
|
||||
|
||||
#### Manual Configuration
|
||||
|
||||
```bash
|
||||
sudo nano /etc/tb-edge/conf/tb-edge.conf
|
||||
```
|
||||
{: .copy-code}
|
||||
|
||||
Please update the following lines in your configuration file. Make sure to replace:
|
||||
|
||||
```text
|
||||
export CLOUD_ROUTING_KEY=${CLOUD_ROUTING_KEY}
|
||||
export CLOUD_ROUTING_SECRET=${CLOUD_ROUTING_SECRET}
|
||||
export CLOUD_RPC_HOST=${BASE_URL}
|
||||
export CLOUD_RPC_PORT=${CLOUD_RPC_PORT}
|
||||
export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE
|
||||
|
||||
```
|
||||
|
||||
Edit ThingsBoard Edge configuration file
|
||||
#### [Optional] Update bind ports
|
||||
If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server (cloud) is running, you'll need to update configuration parameters to avoid port collision between ThingsBoard server and ThingsBoard Edge.
|
||||
|
||||
Please uncomment the following parameters in the ThingsBoard Edge configuration file (**/etc/tb-edge/conf/tb-edge.conf**):
|
||||
|
||||
```text
|
||||
export HTTP_BIND_PORT=18080
|
||||
export MQTT_BIND_PORT=11883
|
||||
export COAP_BIND_PORT=15683
|
||||
export LWM2M_ENABLED=false
|
||||
```
|
||||
|
||||
Or update using command:
|
||||
|
||||
```bash
|
||||
sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
|
||||
@ -98,8 +145,10 @@ export MQTT_BIND_PORT=11883
|
||||
export COAP_BIND_PORT=15683
|
||||
export LWM2M_ENABLED=false
|
||||
EOL'
|
||||
{:copy-code}
|
||||
```
|
||||
{: .copy-code}
|
||||
|
||||
Make sure that ports above (18080, 11883, 15683-15688) are not used by any other application.
|
||||
|
||||
#### Run installation script
|
||||
|
||||
|
||||
@ -562,7 +562,7 @@ public class EdgeController extends BaseController {
|
||||
public EdgeInstallInstructions getEdgeDockerInstallInstructions(
|
||||
@ApiParam(value = EDGE_ID_PARAM_DESCRIPTION, required = true)
|
||||
@PathVariable("edgeId") String strEdgeId,
|
||||
@ApiParam(value = "Installation method (e.g., 'docker', 'ubuntu', 'centos')")
|
||||
@ApiParam(value = "Installation method ('docker', 'ubuntu' or 'centos')")
|
||||
@PathVariable("method") String installationMethod,
|
||||
HttpServletRequest request) throws ThingsboardException {
|
||||
if (isEdgesEnabled() && edgeInstallServiceOpt.isPresent()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user