Skip to content

Commit

Permalink
Rename to ChirpStack Gateway Bridge.
Browse files Browse the repository at this point in the history
  • Loading branch information
brocaar committed Nov 2, 2019
1 parent 8e4a50c commit cae6e5d
Show file tree
Hide file tree
Showing 124 changed files with 761 additions and 884 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Expand Up @@ -8,7 +8,7 @@ jobs:
- checkout
- run:
name: run tests
command: docker-compose run --rm gatewaybridge make test
command: docker-compose run --rm chirpstack-gateway-bridge make test

deploy:
machine:
Expand All @@ -18,10 +18,10 @@ jobs:
- checkout
- run:
name: compile distributable binaries
command: docker-compose run --rm gatewaybridge make dist
command: docker-compose run --rm chirpstack-gateway-bridge make dist
- run:
name: upload binaries to s3
command: aws s3 sync dist/upload s3://builds.loraserver.io/lora-gateway-bridge
command: aws s3 sync dist/upload s3://builds.loraserver.io/chirpstack-gateway-bridge

workflows:
version: 2
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "docs/themes/chirpstack-hugo-theme"]
path = docs/themes/chirpstack-hugo-theme
url = git@github.com:brocaar/chirpstack-hugo-theme.git
21 changes: 11 additions & 10 deletions .goreleaser.yml
@@ -1,8 +1,8 @@
project_name: lora-gateway-bridge
project_name: chirpstack-gateway-bridge

builds:
- main: cmd/lora-gateway-bridge/main.go
binary: lora-gateway-bridge
- main: cmd/chirpstack-gateway-bridge/main.go
binary: chirpstack-gateway-bridge
goos:
- windows
- darwin
Expand All @@ -24,20 +24,21 @@ release:
disable: true

nfpm:
vendor: LoRa Server project
homepage: https://www.loraserver.io/
vendor: ChirpStack
homepage: https://www.chirpstack.io/
maintainer: Orne Brocaar <info@brocaar.com>
description: LoRa Gateway Bridge
description: ChirpStack Gateway Bridge
license: MIT
formats:
- deb
bindir: /usr/bin
files:
"packaging/files/lora-gateway-bridge.rotate": "/etc/logrotate.d/lora-gateway-bridge"
"packaging/files/lora-gateway-bridge.init": "/usr/lib/lora-gateway-bridge/scripts/lora-gateway-bridge.init"
"packaging/files/lora-gateway-bridge.service": "/usr/lib/lora-gateway-bridge/scripts/lora-gateway-bridge.service"
"packaging/files/chirpstack-gateway-bridge.rotate": "/etc/logrotate.d/chirpstack-gateway-bridge"
"packaging/files/chirpstack-gateway-bridge.init": "/usr/lib/chirpstack-gateway-bridge/scripts/chirpstack-gateway-bridge.init"
"packaging/files/chirpstack-gateway-bridge.service": "/usr/lib/chirpstack-gateway-bridge/scripts/chirpstack-gateway-bridge.service"
config_files:
"packaging/files/lora-gateway-bridge.toml": "/etc/lora-gateway-bridge/lora-gateway-bridge.toml"
"packaging/files/chirpstack-gateway-bridge.toml": "/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml"
scripts:
preinstall: "packaging/scripts/pre-install.sh"
postinstall: "packaging/scripts/post-install.sh"
postremove: "packaging/scripts/post-remove.sh"
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -3,8 +3,8 @@
There are a couple of ways to get involved:

* Join the discussions:
* LoRa Server project forum [https://forum.loraserver.io/](https://forum.loraserver.io/)
* Report bugs or make feature-requests by opening an issue at [https://github.com/brocaar/lora-gateway-bridge/issues](https://github.com/brocaar/lora-gateway-bridge/issues)
* LoRa Server project forum [https://community.chirpstack.io/](https://community.chirpstack.io/)
* Report bugs or make feature-requests by opening an issue at [https://github.com/brocaar/chirpstack-gateway-bridge/issues](https://github.com/brocaar/chirpstack-gateway-bridge/issues)
* Help fixing issues or improve documentation by creating pull-requests


Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
@@ -1,6 +1,6 @@
FROM golang:1.12-alpine AS development

ENV PROJECT_PATH=/lora-gateway-bridge
ENV PROJECT_PATH=/chirpstack-gateway-bridge
ENV PATH=$PATH:$PROJECT_PATH/build
ENV CGO_ENABLED=0
ENV GO_EXTRA_BUILD_ARGS="-a -installsuffix cgo"
Expand All @@ -18,5 +18,5 @@ FROM alpine:latest AS production

WORKDIR /root/
RUN apk --no-cache add ca-certificates
COPY --from=development /lora-gateway-bridge/build/lora-gateway-bridge .
ENTRYPOINT ["./lora-gateway-bridge"]
COPY --from=development /chirpstack-gateway-bridge/build/chirpstack-gateway-bridge .
ENTRYPOINT ["./chirpstack-gateway-bridge"]
2 changes: 1 addition & 1 deletion Dockerfile-devel
@@ -1,6 +1,6 @@
FROM golang:1.12-alpine

ENV PROJECT_PATH=/lora-gateway-bridge
ENV PROJECT_PATH=/chirpstack-gateway-bridge
ENV PATH=$PATH:$PROJECT_PATH/build
ENV CGO_ENABLED=0
ENV GO_EXTRA_BUILD_ARGS="-a -installsuffix cgo"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Orne Brocaar
Copyright (c) 2019 Orne Brocaar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -5,7 +5,7 @@ VERSION := $(shell git describe --always |sed -e "s/^v//")
build:
@echo "Compiling source"
@mkdir -p build
go build $(GO_EXTRA_BUILD_ARGS) -ldflags "-s -w -X main.version=$(VERSION)" -o build/lora-gateway-bridge cmd/lora-gateway-bridge/main.go
go build $(GO_EXTRA_BUILD_ARGS) -ldflags "-s -w -X main.version=$(VERSION)" -o build/chirpstack-gateway-bridge cmd/chirpstack-gateway-bridge/main.go

clean:
@echo "Cleaning up workspace"
Expand Down Expand Up @@ -40,7 +40,7 @@ dev-requirements:
# shortcuts for development

serve: build
./build/lora-gateway-bridge
./build/chirpstack-gateway-bridge

run-compose-test:
docker-compose run --rm gatewaybridge make test
46 changes: 22 additions & 24 deletions README.md
@@ -1,11 +1,10 @@
# LoRa Gateway Bridge
# ChirpStack Gateway Bridge

[![CircleCI](https://circleci.com/gh/brocaar/lora-gateway-bridge.svg?style=svg)](https://circleci.com/gh/brocaar/lora-gateway-bridge)
[![CircleCI](https://circleci.com/gh/brocaar/chirpstack-gateway-bridge.svg?style=svg)](https://circleci.com/gh/brocaar/chirpstack-gateway-bridge)

LoRa Gateway Bridge is a service which converts LoRa packet-forwarder protocols
into a LoRa Server [common protocol](https://github.com/brocaar/loraserver/blob/master/api/gw/gw.proto) (JSON and Protobuf).
This project is part of the [LoRa Server](https://github.com/brocaar/loraserver)
project.
ChirpStack Gateway Bridge is a service which converts LoRa<sup>&reg;</sup> Packet Forwarder protocols
into a ChirpStack Network Server [common data-format](https://github.com/brocaar/chirpstack-network-server/blob/master/api/gw/gw.proto) (JSON and Protobuf).
This component is part of the ChirpStack open-source LoRaWAN<sup>&reg;</sup> Network Server stack.

## Backends

Expand All @@ -23,33 +22,32 @@ The following integrations are provided:

## Architecture

![architecture](https://docs.loraserver.io/img/architecture.png)
![architecture](https://www.chirpstack.io/img/graphs/architecture.png)

### Component links

* [LoRa Gateway Bridge](https://www.loraserver.io/lora-gateway-bridge)
* [LoRa Gateway Config](https://www.loraserver.io/lora-gateway-bridge/install/config)
* [LoRa Server](https://www.loraserver.io/loraserver)
* [LoRa App Server](https://www.loraserver.io/lora-app-server)
* [ChirpStack Gateway Bridge](https://www.chirpstack.io/gateway-bridge/)
* [ChirpStack Network Server](https://www.chirpstack.io/network-server/)
* [ChirpStack Application Server](https://www.chirpstack.io/application-server/)

## Links
****
* [Downloads](https://www.loraserver.io/lora-gateway-bridge/overview/downloads/)
* [Docker image](https://hub.docker.com/r/loraserver/lora-gateway-bridge/)
* [Documentation](https://www.loraserver.io/lora-gateway-bridge/)
* [Building from source](https://www.loraserver.io/lora-gateway-bridge/community/source/)
* [Contributing](https://www.loraserver.io/lora-gateway-bridge/community/contribute/)

* [Downloads](https://www.chirpstack.io/gateway-bridge/overview/downloads/)
* [Docker image](https://hub.docker.com/r/chirpstack/chirpstack-gateway-bridge/)
* [Documentation](https://www.chirpstack.io/gateway-bridge/)
* [Building from source](https://www.chirpstack.io/gateway-bridge/community/source/)
* [Contributing](https://www.chirpstack.io/gateway-bridge/community/contribute/)
* Support
* [Support forum](https://forum.loraserver.io)
* [Bug or feature requests](https://github.com/brocaar/lora-gateway-bridge/issues)
* [Community forum](https://community.chirpstack.io)
* [Bug or feature requests](https://github.com/brocaar/chirpstack-gateway-bridge/issues)

## Sponsors

[![CableLabs](https://www.loraserver.io/img/sponsors/cablelabs.png)](https://www.cablelabs.com/)
[![SIDNFonds](https://www.loraserver.io/img/sponsors/sidn_fonds.png)](https://www.sidnfonds.nl/)
[![acklio](https://www.loraserver.io/img/sponsors/acklio.png)](http://www.ackl.io/)
[![CableLabs](https://www.chirpstack.io/img/sponsors/cablelabs.png)](https://www.cablelabs.com/)
[![SIDNFonds](https://www.chirpstack.io/img/sponsors/sidn_fonds.png)](https://www.sidnfonds.nl/)
[![acklio](https://www.chirpstack.io/img/sponsors/acklio.png)](http://www.ackl.io/)

## License

LoRa Gateway Bridge is distributed under the MIT license. See
[LICENSE](https://github.com/brocaar/lora-gateway-bridge/blob/master/LICENSE).
ChirpStack Gateway Bridge is distributed under the MIT license. See
[LICENSE](https://github.com/brocaar/chirpstack-gateway-bridge/blob/master/LICENSE).
Expand Up @@ -4,7 +4,7 @@ import (
"html/template"
"os"

"github.com/brocaar/lora-gateway-bridge/internal/config"
"github.com/brocaar/chirpstack-gateway-bridge/internal/config"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand All @@ -18,8 +18,8 @@ log_level = {{ .General.LogLevel }}
# Filters.
#
# These can be used to filter LoRaWAN frames to reduce bandwith usage between
# the gateway and LoRa Gateway Bride. Depending the used backend, filtering
# will be performed by the Packet Forwarder or LoRa Gateway Bridge.
# the gateway and ChirpStack Gateway Bride. Depending the used backend, filtering
# will be performed by the Packet Forwarder or ChirpStack Gateway Bridge.
[filters]
# NetIDs filters.
Expand Down Expand Up @@ -102,13 +102,13 @@ type="{{ .Backend.Type }}"
# TLS certificate and key files.
#
# When set, the websocket listener will use TLS to secure the connections
# between the gateways and LoRa Gateway Bridge (optional).
# between the gateways and ChirpStack Gateway Bridge (optional).
tls_cert="{{ .Backend.BasicStation.TLSCert }}"
tls_key="{{ .Backend.BasicStation.TLSKey }}"
# TLS CA certificate.
#
# When configured, LoRa Gateway Bridge will validate that the client
# When configured, ChirpStack Gateway Bridge will validate that the client
# certificate of the gateway has been signed by this CA certificate.
ca_cert="{{ .Backend.BasicStation.CACert }}"
Expand Down Expand Up @@ -194,7 +194,7 @@ type="{{ .Backend.Type }}"
# Payload marshaler.
#
# This defines how the MQTT payloads are encoded. Valid options are:
# * protobuf: Protobuf encoding (this will become the LoRa Gateway Bridge v3 default)
# * protobuf: Protobuf encoding
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="{{ .Integration.Marshaler }}"
Expand Down Expand Up @@ -316,7 +316,7 @@ marshaler="{{ .Integration.Marshaler }}"
# Token expiration (symmetric key authentication).
#
# LoRa Gateway Bridge will generate a SAS token with the given expiration.
# ChirpStack Gateway Bridge will generate a SAS token with the given expiration.
# After the token has expired, it will generate a new one and trigger a
# re-connect (only for symmetric key authentication).
sas_token_expiration="{{ .Integration.MQTT.Auth.AzureIoTHub.SASTokenExpiration }}"
Expand Down Expand Up @@ -347,7 +347,7 @@ marshaler="{{ .Integration.Marshaler }}"
# Metrics stored in Prometheus.
#
# These metrics expose information about the state of the LoRa Gateway Bridge
# These metrics expose information about the state of the ChirpStack Gateway Bridge
# instance like number of messages processed, number of function calls, etc.
[metrics.prometheus]
# Expose Prometheus metrics endpoint.
Expand All @@ -360,7 +360,7 @@ marshaler="{{ .Integration.Marshaler }}"
# Gateway meta-data.
#
# The meta-data will be added to every stats message sent by the LoRa Gateway
# The meta-data will be added to every stats message sent by the ChirpStack Gateway
# Bridge.
[meta_data]
Expand Down Expand Up @@ -404,7 +404,7 @@ marshaler="{{ .Integration.Marshaler }}"
# Executable commands.
#
# The configured commands can be triggered by sending a message to the
# LoRa Gateway Bridge.
# ChirpStack Gateway Bridge.
[commands]
# Example:
# [commands.commands.reboot]
Expand All @@ -419,7 +419,7 @@ marshaler="{{ .Integration.Marshaler }}"

var configCmd = &cobra.Command{
Use: "configfile",
Short: "Print the LoRa Gateway Bridge configuration file",
Short: "Print the ChirpStack Gateway Bridge configuration file",
RunE: func(cmd *cobra.Command, args []string) error {
t := template.Must(template.New("config").Parse(configTemplate))
err := t.Execute(os.Stdout, config.C)
Expand Down
Expand Up @@ -11,18 +11,18 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/brocaar/lora-gateway-bridge/internal/config"
"github.com/brocaar/chirpstack-gateway-bridge/internal/config"
)

var cfgFile string // config file
var version string

var rootCmd = &cobra.Command{
Use: "lora-gateway-bridge",
Short: "abstracts the packet_forwarder protocol into JSON over MQTT",
Long: `LoRa Gateway Bridge abstracts the packet_forwarder protocol into JSON over MQTT
> documentation & support: https://www.loraserver.io/lora-gateway-bridge
> source & copyright information: https://github.com/brocaar/lora-gateway-bridge`,
Use: "chirpstack-gateway-bridge",
Short: "abstracts the packet_forwarder protocol into Protobuf or JSON over MQTT",
Long: `ChirpStack Gateway Bridge abstracts the packet_forwarder protocol into Protobuf or JSON over MQTT
> documentation & support: https://www.chirpstack.io/gateway-bridge/
> source & copyright information: https://github.com/brocaar/chirpstack-gateway-bridge`,
RunE: run,
}

Expand Down Expand Up @@ -90,10 +90,10 @@ func initConfig() {
log.WithError(err).WithField("config", cfgFile).Fatal("error loading config file")
}
} else {
viper.SetConfigName("lora-gateway-bridge")
viper.SetConfigName("chirpstack-gateway-bridge")
viper.AddConfigPath(".")
viper.AddConfigPath("$HOME/.config/lora-gateway-bridge")
viper.AddConfigPath("/etc/lora-gateway-bridge/")
viper.AddConfigPath("$HOME/.config/chirpstack-gateway-bridge")
viper.AddConfigPath("/etc/chirpstack-gateway-bridge/")
if err := viper.ReadInConfig(); err != nil {
switch err.(type) {
case viper.ConfigFileNotFoundError:
Expand Down
Expand Up @@ -9,14 +9,14 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/brocaar/lora-gateway-bridge/internal/backend"
"github.com/brocaar/lora-gateway-bridge/internal/commands"
"github.com/brocaar/lora-gateway-bridge/internal/config"
"github.com/brocaar/lora-gateway-bridge/internal/filters"
"github.com/brocaar/lora-gateway-bridge/internal/forwarder"
"github.com/brocaar/lora-gateway-bridge/internal/integration"
"github.com/brocaar/lora-gateway-bridge/internal/metadata"
"github.com/brocaar/lora-gateway-bridge/internal/metrics"
"github.com/brocaar/chirpstack-gateway-bridge/internal/backend"
"github.com/brocaar/chirpstack-gateway-bridge/internal/commands"
"github.com/brocaar/chirpstack-gateway-bridge/internal/config"
"github.com/brocaar/chirpstack-gateway-bridge/internal/filters"
"github.com/brocaar/chirpstack-gateway-bridge/internal/forwarder"
"github.com/brocaar/chirpstack-gateway-bridge/internal/integration"
"github.com/brocaar/chirpstack-gateway-bridge/internal/metadata"
"github.com/brocaar/chirpstack-gateway-bridge/internal/metrics"
)

func run(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -55,8 +55,8 @@ func setLogLevel() error {
func printStartMessage() error {
log.WithFields(log.Fields{
"version": version,
"docs": "https://www.loraserver.io/lora-gateway-bridge/",
}).Info("starting LoRa Gateway Bridge")
"docs": "https://www.chirpstack.io/gateway-bridge/",
}).Info("starting ChirpStack Gateway Bridge")
return nil
}

Expand Down
Expand Up @@ -8,7 +8,7 @@ import (

var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the LoRa Gateway Bridge version",
Short: "Print the ChirpStack Gateway Bridge version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
},
Expand Down
9 changes: 9 additions & 0 deletions cmd/chirpstack-gateway-bridge/main.go
@@ -0,0 +1,9 @@
package main

import "github.com/brocaar/chirpstack-gateway-bridge/cmd/chirpstack-gateway-bridge/cmd"

var version string // set by the compiler

func main() {
cmd.Execute(version)
}

0 comments on commit cae6e5d

Please sign in to comment.