Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: chirpstack/chirpstack-gateway-bridge
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.0.2
Choose a base ref
...
head repository: chirpstack/chirpstack-gateway-bridge
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 360 changed files with 15,526 additions and 24,985 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: chirpstack
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/1.bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: Bug report
about: Create a bug report for ChirpStack Gateway Bridge
---

<!--
We really appreciate your time effort in creating this issue, it's really valuable for the quality of the project.
Before diving into the details, make sure to check off the following:
-->

<!-- Your checkbox should look like this: [x] -->

- [ ] The issue is present in the latest release.
- [ ] I have searched the [issues](https://github.com/brocaar/chirpstack-gateway-bridge) of this repository and believe that this is not a duplicate.

## What happened?

## What did you expect?

## Steps to reproduce this issue

Steps:

1.
2.
3.
4.

## Could you share your log output?

<!--
Insert the cli log output right after the shell word.
You can get this output running Chirpstack Gateway Bridge from the cli.
e.g. sudo chirpstack-gateway-bridge
-->
```shell

```

## Your Environment

<!--
Hints:
ChirpStack Concentratord:
sudo chirpstack-concentratord-sx1301 --version
ChirpStack Application Server
sudo chirpstack-application-server version
ChirpStack Network Server
sudo chirpstack-network-server version
ChirpStack Gateway Bridge
sudo chirpstack-gateway-bridge version
ChirpStack Geolocation Server:
sudo chirpstack-geolocation-server version
-->


| Component | Version |
| --------------------| ------- |
| Application Server | v?.?.? |
| Network Server | |
| Gateway Bridge | |
| Chirpstack API | |
| Geolocation | |
| Concentratord | |
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/2.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Feature request
about: Suggest a new idea to ChirpStack Gateway Bridge
---

<!--
We really appreciate your time effort in creating this issue, it's really valuable for the quality of the project.
Before diving into the details, make sure to check off the following:
-->

<!-- Your checkbox should look like this: [x] -->

- [ ] I have searched the [issues](https://github.com/brocaar/chirpstack-gateway-bridge) of this repository and believe that this is not a duplicate.

## Summary

<!-- Describe how it should work. -->

## What is the use-case?

<!-- Providing an use-case will help to know if this feature can fits within the architecture, aside of giving feedback and shape the implementation if required. -->

## Implementation description

<!--
Provide a description, workflow, technique, or even a screenshot that describes how this feature should be implemented.
-->

## Can you implement this by yourself and make a pull request?
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false # force the usage of a template
contact_links:
- name: ChirpStack Community Forum
url: https://forum.chirpstack.io/
about: I need support with ChirpStack.
93 changes: 93 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Run tests
run: docker compose run --rm chirpstack-gateway-bridge make test

dist:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
-
name: Build distributable binaries
run: docker compose run --rm chirpstack-gateway-bridge make dist
-
name: Upload binaries to S3
if: startsWith(github.ref, 'refs/tags/v')
run: |
aws s3 sync dist/upload s3://builds.loraserver.io/chirpstack-gateway-bridge
# Runs on pull request to ensure the docker build works,
# but pushes only on commits to master and on PRs.
docker:
needs: test
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
chirpstack/${{ github.event.repository.name }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
30 changes: 28 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# hidden files
.*

# Vagrant
Vagrantfile

# configuration files
/*.toml

# coverage file
/coverage.out

# certificates
/certs

# binaries
dist/
build/
/dist
/build
/docs/public
*.ipk

# build folders
/packaging/vendor/*/*/package
/packaging/vendor/*/*/temp
/packaging/vendor/*/*/*.tar.gz
/packaging/vendor/*/*/key

# dependencies
/vendor

# certificates
/certs
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/themes/chirpstack-hugo-theme"]
path = docs/themes/chirpstack-hugo-theme
url = https://github.com/brocaar/chirpstack-hugo-theme.git
45 changes: 45 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
project_name: chirpstack-gateway-bridge

env:
- GOMIPS=softfloat

builds:
- main: cmd/chirpstack-gateway-bridge/main.go
binary: chirpstack-gateway-bridge
goos:
- linux
goarch:
- amd64
- arm
- arm64
- mips
goarm:
- 5
- 6
- 7
hooks:
post: ./packaging/scripts/compress-mips.sh

release:
disable: true

nfpm:
vendor: ChirpStack
homepage: https://www.chirpstack.io/
maintainer: Orne Brocaar <info@brocaar.com>
description: ChirpStack Gateway Bridge
license: MIT
formats:
- deb
- rpm
bindir: /usr/bin
files:
"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/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"
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributing

There are a couple of ways to get involved:

* Join the discussions:
* LoRa Server project forum [https://forum.chirpstack.io/](https://forum.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


When you would like to add new features, please discuss the feature first
by creating an issue describing your feature, how you're planning to implement
it, what the usecase is etc...
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
FROM golang:1.6.2
FROM golang:1.22.1-alpine AS development

ENV PROJECT_PATH=/go/src/github.com/brocaar/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"

# install tools
RUN go get github.com/golang/lint/golint
RUN go get github.com/kisielk/errcheck
RUN apk add --no-cache ca-certificates make git bash

# setup work directory
RUN mkdir -p $PROJECT_PATH
COPY . $PROJECT_PATH
WORKDIR $PROJECT_PATH

# copy source code
COPY . $PROJECT_PATH
RUN make dev-requirements
RUN make

# build
RUN make build
FROM alpine:3.17.0 AS production

CMD ["lora-gateway-bridge"]
RUN apk --no-cache add ca-certificates
COPY --from=development /chirpstack-gateway-bridge/build/chirpstack-gateway-bridge /usr/bin/chirpstack-gateway-bridge
USER nobody:nogroup
ENTRYPOINT ["/usr/bin/chirpstack-gateway-bridge"]
Loading