mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-05-05 18:38:27 +00:00
Update README and Makefiles.
This commit is contained in:
parent
b0148da1bf
commit
cf5ef8d061
8
Makefile
8
Makefile
@ -43,11 +43,11 @@ build-ui:
|
|||||||
docker-compose run --rm --no-deps chirpstack-ui make build
|
docker-compose run --rm --no-deps chirpstack-ui make build
|
||||||
|
|
||||||
# Enters the devshell for ChirpStack development.
|
# Enters the devshell for ChirpStack development.
|
||||||
devshell:
|
docker-devshell:
|
||||||
docker-compose run --rm --service-ports --name chirpstack chirpstack
|
docker-compose run --rm --service-ports --name chirpstack chirpstack
|
||||||
|
|
||||||
# Enters the devshell for ChirpStack UI development.
|
# Enters the devshell for ChirpStack UI development.
|
||||||
devshell-ui:
|
docker-devshell-ui:
|
||||||
docker-compose run --rm --service-ports --name chirpstack-ui chirpstack-ui bash
|
docker-compose run --rm --service-ports --name chirpstack-ui chirpstack-ui bash
|
||||||
|
|
||||||
# Runs the tests
|
# Runs the tests
|
||||||
@ -56,7 +56,3 @@ test:
|
|||||||
cd chirpstack && make test
|
cd chirpstack && make test
|
||||||
cd lrwn && make test
|
cd lrwn && make test
|
||||||
cd lrwn-filters && make test
|
cd lrwn-filters && make test
|
||||||
|
|
||||||
# Starts the ChirpStack server (for testing only).
|
|
||||||
test-server: build-ui
|
|
||||||
docker-compose run --rm --service-ports chirpstack make test-server
|
|
89
README.md
89
README.md
@ -9,10 +9,95 @@ cloud providers, databases and services commonly used for handling device data.
|
|||||||
ChirpStack provides a gRPC based API that can be used to integrate or extend
|
ChirpStack provides a gRPC based API that can be used to integrate or extend
|
||||||
ChirpStack.
|
ChirpStack.
|
||||||
|
|
||||||
## Documentation
|
## Documentation and binaries
|
||||||
|
|
||||||
Please refer to the [ChirpStack](https://www.chirpstack.io/) website for
|
Please refer to the [ChirpStack](https://www.chirpstack.io/) website for
|
||||||
documentation.
|
documentation and pre-compiled binaries.
|
||||||
|
|
||||||
|
## Building from source
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
Building ChirpStack requires:
|
||||||
|
|
||||||
|
* [Nix](https://nixos.org/download.html) (recommended) and
|
||||||
|
* [Docker](https://www.docker.com/)
|
||||||
|
|
||||||
|
#### Nix
|
||||||
|
|
||||||
|
Nix is used for defining the development environment which is used for local
|
||||||
|
development and for creating the final binaries.
|
||||||
|
|
||||||
|
If you do not have Nix installed and do not want to, then you could also look at
|
||||||
|
the dependencies specified in the `shell.nix` file and install these manually.
|
||||||
|
Alternatively use [Vagrant](https://www.vagrantup.com/) to setup a VM with Nix and Docker
|
||||||
|
installed. See also the provided `Vagrantfile`.
|
||||||
|
|
||||||
|
#### Docker
|
||||||
|
|
||||||
|
Docker is used by [cross-rs](https://github.com/cross-rs/cross) for cross-compiling,
|
||||||
|
as well as some of the `make` commands you will find in the ChirpStack project.
|
||||||
|
|
||||||
|
### Starting the development shell
|
||||||
|
|
||||||
|
Run the following command to start the development shell:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix-shell
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building the UI
|
||||||
|
|
||||||
|
To build the ChirpStack UI, execute the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
make build-ui
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that the ChirpStack UI is built using
|
||||||
|
|
||||||
|
### Running ChirpStack tests
|
||||||
|
|
||||||
|
#### Start required services
|
||||||
|
|
||||||
|
ChirpStack requires several services like PostgresQL, Redis, Mosquitto, ...
|
||||||
|
to be running before you can run the tests.
|
||||||
|
|
||||||
|
Execute the following command to start these:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Run tests
|
||||||
|
|
||||||
|
Run the following command to run the ChirpStack tests:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building ChirpStack
|
||||||
|
|
||||||
|
Before compiling the binaries, you need to install some additional development
|
||||||
|
tools (for cross-compiling, packaging, e.d.). Execute the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make dev-dependencies
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the following command within the `./chirpstack` sub-folder:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Build AMD64 debug build (optimized for build speed)
|
||||||
|
make debug-amd64
|
||||||
|
|
||||||
|
# Build AMD64 release build (optimized for performance and binary size)
|
||||||
|
make release-amd64
|
||||||
|
|
||||||
|
# Build all packages (all targets, .deb, .rpm and .tar.gz files)
|
||||||
|
make dist
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -5,6 +5,9 @@ PKG_VERSION := $(shell cargo metadata --no-deps --format-version 1 | jq -r '.pac
|
|||||||
debug-amd64:
|
debug-amd64:
|
||||||
cross build --target x86_64-unknown-linux-musl
|
cross build --target x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
release-amd64:
|
||||||
|
cross build --target x86_64-unknown-linux-musl --release
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
# Keep these in this order, as aarch64 is based on Debian Buster (older),
|
# Keep these in this order, as aarch64 is based on Debian Buster (older),
|
||||||
# the others on Bullseye. For some build scripts we want to build against
|
# the others on Bullseye. For some build scripts we want to build against
|
||||||
@ -39,9 +42,3 @@ test:
|
|||||||
cargo fmt --check
|
cargo fmt --check
|
||||||
cargo clippy --no-deps
|
cargo clippy --no-deps
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
test-server: debug-amd64
|
|
||||||
../target/x86_64-unknown-linux-musl/debug/chirpstack -c ./configuration
|
|
||||||
|
|
||||||
dbshell:
|
|
||||||
psql -h postgres -U chirpstack chirpstack
|
|
||||||
|
@ -16,6 +16,11 @@ services:
|
|||||||
- REDIS_HOST=redis
|
- REDIS_HOST=redis
|
||||||
- POSTGRESQL_HOST=postgres
|
- POSTGRESQL_HOST=postgres
|
||||||
- MQTT_BROKER_HOST=mosquitto
|
- MQTT_BROKER_HOST=mosquitto
|
||||||
|
- TEST_POSTGRESQL_DSN=postgres://chirpstack_test:chirpstack_test@postgres/chirpstack_test?sslmode=disable
|
||||||
|
- TEST_REDIS_URL=redis://redis/1
|
||||||
|
- TEST_MOSQUITTO_SERVER=tcp://mosquitto:1883/
|
||||||
|
- TEST_KAFKA_BROKER=kafka:9092
|
||||||
|
- TEST_AMQP_URL=amqp://guest:guest@rabbitmq:5672
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user