Skip to content

LWS Deployment Document

BigBang-Core edited this page Dec 28, 2020 · 1 revision

Deployment instruction

Ubuntu 18.04

1. Deploy BigBang(on a host where BigBang is to be deployed or on the same host where LWS is)

2. Install Docker(on a host where redis mysql is to be deployed or on the same host where LWS is)

3. Install Docker Compose(on a host where reids mysql is to be deployed or on the same host where LWS is)

4. Download docker-compose script(on a host where redis mysql is to be deployed)

Download the latest release of LWS and unzip it into the deployment directory. Put docker folder in a proper place. Mysql docker container, what LWS depends on, will save data in the docker folder.

5. Modify mysql account information

Open docker/docker-compose.yaml in text editor and modify MYSQL_ROOT_PASSWORD、MYSQL_USER、MYSQL_PASS to designate the mysql account to create.

6. Run redis mysql’s docker containers

  • Switch current directory to docker in terminal

  • Execute the command

sudo docker-compose pull && sudo docker-compose up -d

7. Register AWS MQTT service and apply for certificate

8. Download LWS(on the host where LWS is to be deployed)

Download the latest release of LWS and unzip it into LWS’s deployment directory.

9. Modify LWS configuration file

Open .env in text editor and edit the content. The implications of the main configuration items are as follows:

  • DATABASE_URL:mysql way of connection

  • CORECLIENT_URL:BigBang connection address

  • FORK_ID:the BigBand Branch link ID to pay attention to

  • LWS_ID、LWS_TOPIC、AWS_IOT_MQTT_CLIENT_ID:assign an unique ID under AWS MQTT account for LWS service

  • AWS_CERTS_PATH:path where AWS certificate is stored

  • AWS_IOT_MQTT_HOST:AWS MQTT server address

  • AWS_IOT_MQTT_PORT:AWS MQTT server port

10. Launch stream and gateway

nohup ./stream > stream.log 2>&1 &

nohup ./gateway > gateway.log 2>&1 &