iot-bgw
IoT Border Gateway, remote access and security for the Internet of Things, contains BGW external interface, http-proxy, mqtt-proxy and auth server
Try it out
docker pull hareeqi/bgw
docker run --rm -it -p 443:443 -e "ADMIN_KEY_PASSWORD=test" hareeqi/bgw
- Admin key "admin.test.7UQ4zTKbjv85YKxJwX6Tky1tIl7cpvGHPdsqBTwGZMz"
- Test Link note: port 443 requires sudo access
Usage
- Map a volume to /bgw/config that contains the three files below
- Provide a certificate file ("[cert name].pem") - example
- Provide a key file ("[key name].pem") - example
- provide a config file (either config.env or config.json or both)
- You final docker run command looks like this.
docker run -p 80:80 -p 443:443 -p 8883:8883 -v /my/host/config:/bgw/config hareeqi/bgw
Swagger
- Click authorize and set the api key to "Bearer [BGW ADMIN KEY]"
- You can change the swagger target host host by changing the url
- Click here to use swagger Click here
Configs
- All configs for the bgw are passed as environment variables
- You can supply environment variables from a file by providing config.env or config.json or both
- Each bgw component has a config prifix (EI_, HTTP_PROXY_, MQTT_PROXY_, AUTH_SERVER_, AAA_CLIENT_)
- Shared config like the aaa client, can be used globally like AAA_CLIENT_ or selectivily like EI_AAA_CLEINT_
- note: configs in config.json will be converted to environment variables and passed to all components
- For all available configurations list (click here)
Components
- iot-bgw-external-interface
- iot-bgw-auth-server
- iot-bgw-mqtt-proxy
- iot-bgw-http-proxy
- iot-bgw-aaa-client
Development Mode
If you would like to further develop the bgw in your local machine:
- Clone the rep by running this command
git clone https://github.com/hareeqi/iot-bgw.git
- Build the dependencies for all components and remove the container using this command:
docker run --rm -it -v "$(pwd)"/iot-bgw:/bgw hareeqi/bgw build
- Create and run a container with dependencies in dev mode:
docker run --rm -it -p 80:80 -p 443:443 -p 8883:8883 -v "$(pwd)"/iot-bgw:/bgw hareeqi/bgw dev
Whenever you change the code in you local dev folder the component will automatically restarts and your changes are reflected immediately