Skip to content

Commit a51a813

Browse files
committed
Rewrite Packet Multiplexer + add more features.
This rewrites the ChirpStack Packet Multiplexer in Rust and makes it possible to forward all gateway data to a server, or to filter based on Gateway ID (prefix). This also adds Prometheus metrics for monitoring.
1 parent a35dfec commit a51a813

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3069
-1595
lines changed

.circleci/config.yml

-42
This file was deleted.

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: chirpstack

.github/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Please see the documentation for all configuration options:
2+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "cargo"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"

.github/workflows/main.yml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v4
17+
-
18+
name: Install Nix
19+
uses: cachix/install-nix-action@v30
20+
with:
21+
nix_path: nixpkgs=channel:nixos-24.05
22+
-
23+
name: Cargo cache
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
~/.cargo/bin/
28+
~/.cargo/registry/index/
29+
~/.cargo/registry/cache/
30+
~/.cargo/git/db/
31+
target/
32+
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
33+
-
34+
name: Run tests
35+
run: nix-shell --command "make test"
36+
37+
dist:
38+
needs: tests
39+
runs-on: ubuntu-latest
40+
if: startsWith(github.ref, 'refs/tags/v')
41+
strategy:
42+
matrix:
43+
target:
44+
- x86_64-unknown-linux-musl
45+
- aarch64-unknown-linux-musl
46+
- armv7-unknown-linux-musleabihf
47+
steps:
48+
-
49+
name: Checkout
50+
uses: actions/checkout@v4
51+
-
52+
name: Install Nix
53+
uses: cachix/install-nix-action@v30
54+
with:
55+
nix_path: nixpkgs=channel:nixos-24.05
56+
-
57+
name: Cargo cache
58+
uses: actions/cache@v4
59+
with:
60+
path: |
61+
~/.cargo/bin/
62+
~/.cargo/registry/index/
63+
~/.cargo/registry/cache/
64+
~/.cargo/git/db/
65+
target/
66+
key: ${{ runner.os }}-cargo-dist-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
67+
-
68+
name: Build distributables
69+
run: nix-shell --command "make dist-${{ matrix.target }}"
70+
-
71+
name: Configure AWS credentials
72+
uses: aws-actions/configure-aws-credentials@v1
73+
with:
74+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
75+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
76+
aws-region: eu-west-1
77+
-
78+
name: Upload binaries to S3
79+
run: |
80+
aws s3 sync dist s3://builds.loraserver.io/chirpstack-packet-multiplexer
81+
if: startsWith(github.ref, 'refs/tags/v')

.gitignore

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
# hidden files
22
.*
3-
4-
# Vagrant
5-
Vagrantfile
6-
7-
# logs
8-
*.log
9-
10-
# configuration
11-
*.toml
3+
!/.github
124

135
# dependencies
14-
/vendor
6+
/target
157

168
# builds
179
/dist
18-
/build
19-
/docs/public
10+
11+
# config
12+
/chirpstack-packet-multiplexer.toml

.goreleaser.yml

-42
This file was deleted.

0 commit comments

Comments
 (0)