Updates after ChirpStack rename.

This commit is contained in:
Orne Brocaar 2019-11-02 18:35:00 +01:00
parent 43d6449d4a
commit b753aaf6f7
18 changed files with 87 additions and 88 deletions

View File

@ -1,7 +1,7 @@
# LoRa Server Docker setup # ChirpStack Docker example
This repository contains a skeleton to setup the [LoRa Server](https://www.loraserver.io) This repository contains a skeleton to setup the [ChirpStack](https://www.chirpstack.io)
project using [docker-compose](https://docs.docker.com/compose/). open-source LoRaWAN Network Server stack using [Docker Compose](https://docs.docker.com/compose/).
**Note:** Please use this `docker-compose.yml` file as a starting point for testing **Note:** Please use this `docker-compose.yml` file as a starting point for testing
but keep in mind that for production usage it might need modifications. but keep in mind that for production usage it might need modifications.
@ -10,18 +10,18 @@ but keep in mind that for production usage it might need modifications.
* `docker-compose.yml`: the docker-compose file containing the services * `docker-compose.yml`: the docker-compose file containing the services
* `docker-compose-env.yml`: alternate docker-compose file using environment variables, can be run with the docker-compose `-f` flag * `docker-compose-env.yml`: alternate docker-compose file using environment variables, can be run with the docker-compose `-f` flag
* `configuration/lora*`: directory containing the LoRa Server configuration files, see: * `configuration/chirpstack*`: directory containing the ChirpStack configuration files, see:
* https://www.loraserver.io/lora-gateway-bridge/install/config/ * https://www.chirpstack.io/gateway-bridge/install/config/
* https://www.loraserver.io/loraserver/install/config/ * https://www.chirpstack.io/network-server/install/config/
* https://www.loraserver.io/lora-app-server/install/config/ * https://www.chirpstack.io/application-server/install/config/
* https://www.loraserver.io/lora-geo-server/install/config/ * https://www.chirpstack.io/geolocation-server/install/config/
* `configuration/postgresql/initdb/`: directory containing PostgreSQL initialization scripts * `configuration/postgresql/initdb/`: directory containing PostgreSQL initialization scripts
## Configuration ## Configuration
The LoRa Server components are pre-configured to work with the provided The ChirpStack stack components components are pre-configured to work with the provided
`docker-compose.yml` file and defaults to the EU868 LoRaWAN band. Please refer `docker-compose.yml` file and defaults to the EU868 LoRaWAN band. Please refer
to the `configuration/loraserver/examples` directory for more configuration to the `configuration/chirpstack-network-server/examples` directory for more configuration
examples. examples.
# Data persistence # Data persistence
@ -36,7 +36,7 @@ installed.
## Usage ## Usage
To start all the LoRa Server components, simply run: To start the ChirpStack open-source LoRaWAN Network Server stack, simply run:
```bash ```bash
$ docker-compose up $ docker-compose up
@ -51,8 +51,8 @@ $ docker-compose up
After all the components have been initialized and started, you should be able After all the components have been initialized and started, you should be able
to open http://localhost:8080/ in your browser. to open http://localhost:8080/ in your browser.
### Add network-server ### Add Network Server
When adding the network-server in the LoRa App Server web-interface When adding the Network Server in the ChirpStack Application Server web-interface
(see [network-servers](https://www.loraserver.io/lora-app-server/use/network-servers/)), (see [Network Servers](https://www.chirpstack.io/application-server/use/network-servers/)),
you must enter `loraserver:8000` as the network-server `hostname:IP`. you must enter `chirpstack-network-server:8000` as the Network Server `hostname:IP`.

View File

@ -1,8 +1,8 @@
# See https://www.loraserver.io/lora-app-server/install/config/ for a full # See https://www.chirpstack.io/application-server/install/config/ for a full
# configuration example and documentation. # configuration example and documentation.
[postgresql] [postgresql]
dsn="postgres://loraserver_as:loraserver_as@postgresql/loraserver_as?sslmode=disable" dsn="postgres://chirpstack_as:chirpstack_as@postgresql/chirpstack_as?sslmode=disable"
[redis] [redis]
url="redis://redis:6379" url="redis://redis:6379"
@ -11,7 +11,7 @@ url="redis://redis:6379"
server="tcp://mosquitto:1883" server="tcp://mosquitto:1883"
[application_server.api] [application_server.api]
public_host="appserver:8001" public_host="chirpstack-application-server:8001"
[application_server.external_api] [application_server.external_api]
bind="0.0.0.0:8080" bind="0.0.0.0:8080"

View File

@ -1,4 +1,4 @@
# See https://www.loraserver.io/lora-gateway-bridge/install/config/ for a full # See https://www.chirpstack.io/gateway-bridge/install/config/ for a full
# configuration example and documentation. # configuration example and documentation.
[integration.mqtt.auth.generic] [integration.mqtt.auth.generic]

View File

@ -1,4 +1,4 @@
# See https://www.loraserver.io/lora-geo-server/install/config/ for a full # See https://www.chirpstack.io/geolocation-server/install/config/ for a full
# configuration example and documentation. # configuration example and documentation.
[geo_server.backend] [geo_server.backend]

View File

@ -1,11 +1,11 @@
# See https://www.loraserver.io/loraserver/install/config/ for a full # See https://www.chirpstack.io/network-server/install/config/ for a full
# configuration example and documentation. # configuration example and documentation.
# #
# This file is for the EU868 band. See the examples/ folder for more # This file is for the EU868 band. See the examples/ folder for more
# configuration examples. # configuration examples.
[postgresql] [postgresql]
dsn="postgres://loraserver_ns:loraserver_ns@postgresql/loraserver_ns?sslmode=disable" dsn="postgres://chirpstack_ns:chirpstack_ns@postgresql/chirpstack_ns?sslmode=disable"
[redis] [redis]
url="redis://redis:6379" url="redis://redis:6379"
@ -47,7 +47,7 @@ name="EU_863_870"
server="tcp://mosquitto:1883" server="tcp://mosquitto:1883"
[join_server.default] [join_server.default]
server="http://appserver:8003" server="http://chirpstack-application-server:8003"
[geolocation_server] [geolocation_server]
server="geoserver:8005" server="chirpstack-geolocation-server:8005"

View File

@ -1,11 +1,11 @@
# See https://www.loraserver.io/loraserver/install/config/ for a full # See https://www.chirpstack.io/network-server/install/config/ for a full
# configuration example and documentation. # configuration example and documentation.
# #
# This file is for the EU868 band. See the examples/ folder for more # This file is for the EU868 band. See the examples/ folder for more
# configuration examples. # configuration examples.
[postgresql] [postgresql]
dsn="postgres://loraserver_ns:loraserver_ns@postgresql/loraserver_ns?sslmode=disable" dsn="postgres://chirpstack_ns:chirpstack_ns@postgresql/chirpstack_ns?sslmode=disable"
[redis] [redis]
url="redis://redis:6379" url="redis://redis:6379"
@ -47,7 +47,7 @@ name="EU_863_870"
server="tcp://mosquitto:1883" server="tcp://mosquitto:1883"
[join_server.default] [join_server.default]
server="http://appserver:8003" server="http://chirpstack-application-server:8003"
[geolocation_server] [geolocation_server]
server="geoserver:8005" server="chirpstack-geolocation-server:8005"

View File

@ -1,11 +1,11 @@
# See https://www.loraserver.io/loraserver/install/config/ for a full # See https://www.chirpstack.io/network-server/install/config/ for a full
# configuration example and documentation. # configuration example and documentation.
# #
# This file is for the US915 band (channels 0-7). See the examples/ folder for more # This file is for the US915 band (channels 0-7). See the examples/ folder for more
# configuration examples. # configuration examples.
[postgresql] [postgresql]
dsn="postgres://loraserver_ns:loraserver_ns@postgresql/loraserver_ns?sslmode=disable" dsn="postgres://chirpstack_ns:chirpstack_ns@postgresql/chirpstack_ns?sslmode=disable"
[redis] [redis]
url="redis://redis:6379" url="redis://redis:6379"
@ -23,7 +23,7 @@ name="US_902_928"
server="tcp://mosquitto:1883" server="tcp://mosquitto:1883"
[join_server.default] [join_server.default]
server="http://appserver:8003" server="http://chirpstack-application-server:8003"
[geolocation_server] [geolocation_server]
server="geoserver:8005" server="chirpstack-geolocation-server:8005"

View File

@ -1,4 +1,4 @@
# See https://www.loraserver.io/loraserver/install/config/ for a full # See https://www.chirpstack.io/network-server/install/config/ for a full
# configuration example and documentation. # configuration example and documentation.
# #
# This file is for the US915 band (channels 8-15). See the examples/ folder for more # This file is for the US915 band (channels 8-15). See the examples/ folder for more
@ -7,7 +7,7 @@
# Note: these channels are also used by TTN. # Note: these channels are also used by TTN.
[postgresql] [postgresql]
dsn="postgres://loraserver_ns:loraserver_ns@postgresql/loraserver_ns?sslmode=disable" dsn="postgres://chirpstack_ns:chirpstack_ns@postgresql/chirpstack_ns?sslmode=disable"
[redis] [redis]
url="redis://redis:6379" url="redis://redis:6379"
@ -25,8 +25,7 @@ name="US_902_928"
server="tcp://mosquitto:1883" server="tcp://mosquitto:1883"
[join_server.default] [join_server.default]
server="http://appserver:8003" server="http://chirpstack-application-server:8003"
[geolocation_server] [geolocation_server]
server="geoserver:8005" server="chirpstack-geolocation-server:8005"

View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
create role chirpstack_ns with login password 'chirpstack_ns';
create database chirpstack_ns with owner chirpstack_ns;
EOSQL

View File

@ -1,7 +0,0 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
create role loraserver_ns with login password 'loraserver_ns';
create database loraserver_ns with owner loraserver_ns;
EOSQL

View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
create role chirpstack_as with login password 'chirpstack_as';
create database chirpstack_as with owner chirpstack_as;
EOSQL

View File

@ -1,7 +0,0 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
create role loraserver_as with login password 'loraserver_as';
create database loraserver_as with owner loraserver_as;
EOSQL

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="chirpstack_as" <<-EOSQL
create extension pg_trgm;
EOSQL

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="loraserver_as" <<-EOSQL
create extension pg_trgm;
EOSQL

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="chirpstack_as" <<-EOSQL
create extension hstore;
EOSQL

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="loraserver_as" <<-EOSQL
create extension hstore;
EOSQL

View File

@ -1,36 +1,36 @@
version: "3" version: "3"
services: services:
loraserver: chirpstack-network-server:
image: loraserver/loraserver:3 image: chirpstack/chirpstack-network-server:3
environment: environment:
- POSTGRESQL.DSN=postgres://loraserver_ns:loraserver_ns@postgresql/loraserver_ns?sslmode=disable - POSTGRESQL.DSN=postgres://chirpstack_ns:chirpstack_ns@postgresql/chirpstack_ns?sslmode=disable
- REDIS.URL=redis://redis:6379 - REDIS.URL=redis://redis:6379
- NETWORK_SERVER.BAND.NAME=EU_863_870 - NETWORK_SERVER.BAND.NAME=EU_863_870
- NETWORK_SERVER.GATEWAY.BACKEND.MQTT.SERVER=tcp://mosquitto:1883 - NETWORK_SERVER.GATEWAY.BACKEND.MQTT.SERVER=tcp://mosquitto:1883
- JOIN_SERVER.DEFAULT.SERVER=http://appserver:8003 - JOIN_SERVER.DEFAULT.SERVER=http://chirpstack-application-server:8003
- GEOLOCATION_SERVER.SERVER=geoserver:8005 - GEOLOCATION_SERVER.SERVER=chirpstack-geolocation-server:8005
appserver: chirpstack-application-server:
image: loraserver/lora-app-server:3 image: chirpstack/chirpstack-application-server:3
ports: ports:
- 8080:8080 - 8080:8080
environment: environment:
- POSTGRESQL.DSN=postgres://loraserver_as:loraserver_as@postgresql/loraserver_as?sslmode=disable - POSTGRESQL.DSN=postgres://chirpstack_as:chirpstack_as@postgresql/chirpstack_as?sslmode=disable
- REDIS.URL=redis://redis:6379 - REDIS.URL=redis://redis:6379
- APPLICATION_SERVER.INTEGRATION.MQTT.SERVER=tcp://mosquitto:1883 - APPLICATION_SERVER.INTEGRATION.MQTT.SERVER=tcp://mosquitto:1883
- APPLICATION_SERVER.API.PUBLIC_HOST=appserver:8001 - APPLICATION_SERVER.API.PUBLIC_HOST=chirpstack-application-server:8001
- APPLICATION_SERVER.EXTERNAL_API.JWT_SECRET=verysecret - APPLICATION_SERVER.EXTERNAL_API.JWT_SECRET=verysecret
gatewaybridge: chirpstack-gateway-bridge:
image: loraserver/lora-gateway-bridge:3 image: chirpstack/chirpstack-gateway-bridge:3
ports: ports:
- 1700:1700/udp - 1700:1700/udp
environment: environment:
- INTEGRATION.MQTT.AUTH.GENERIC.SERVER=tcp://mosquitto:1883 - INTEGRATION.MQTT.AUTH.GENERIC.SERVER=tcp://mosquitto:1883
geoserver: chirpstack-geolocation-server:
image: loraserver/lora-geo-server:3 image: chirpstack/chirpstack-geolocation-server:3
environment: environment:
- GEO_SERVER.BACKEND.NAME=collos - GEO_SERVER.BACKEND.NAME=collos

View File

@ -1,29 +1,29 @@
version: "3" version: "3"
services: services:
loraserver: chirpstack-network-server:
image: loraserver/loraserver:3 image: chirpstack/chirpstack-network-server:3
volumes: volumes:
- ./configuration/loraserver:/etc/loraserver - ./configuration/chirpstack-network-server:/etc/chirpstack-network-server
appserver: chirpstack-application-server:
image: loraserver/lora-app-server:3 image: chirpstack/chirpstack-application-server:3
ports: ports:
- 8080:8080 - 8080:8080
volumes: volumes:
- ./configuration/lora-app-server:/etc/lora-app-server - ./configuration/chirpstack-application-server:/etc/chirpstack-application-server
gatewaybridge: chirpstack-gateway-bridge:
image: loraserver/lora-gateway-bridge:3 image: chirpstack/chirpstack-gateway-bridge:3
ports: ports:
- 1700:1700/udp - 1700:1700/udp
volumes: volumes:
- ./configuration/lora-gateway-bridge:/etc/lora-gateway-bridge - ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
geoserver: chirpstack-geolocation-server:
image: loraserver/lora-geo-server:3 image: chirpstack/chirpstack-geolocation-server:3
volumes: volumes:
- ./configuration/lora-geo-server:/etc/lora-geo-server - ./configuration/chirpstack-geolocation-server:/etc/chirpstack-geolocation-server
postgresql: postgresql:
image: postgres:9.6-alpine image: postgres:9.6-alpine