Skip to content

waggle-sensor/wes-chirpstack-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wes-chirpstack-tracker

Tracks lorawan devices sending payloads to a Chirpstack Server to report to a Django app.

NOTE: The Django App encompasses the models, serializers, and views necessary for facilitating API calls within app/django_client/

Production Deployment

Setting the Secret "django-token"

To set the django-token secret follow these steps:

  1. Find or Generate the secret key the Node in waggle-auth-app using using the Node Auth Token app
  2. Once you have the key, base64 encode it
echo -n 'key' | base64
  1. Finally, deploy the base54 encoded key as a secret to the Node's k8s cluster. A template is here
kubectl apply -f secret.yaml

Running Individual Packages

The packages in app/ can be used invidually by running the main file. Example:

python3 app/django_client/client.py --debug --vsn W030 --api-interface https://auth.sagecontinuum.org --node-token akdfh80034 --lorawan-connection-router lorawanconnections/ --lorawan-key-router lorawankeys/ --lorawan-device-router lorawandevices/ --sensor-hardware-router sensorhardwares/

NOTE: the main file name will be different based on the package

Test Suite

Unit Test

To run unit tests download the requirements in /test/, then run the following command

pytest

Integration Test

  • To test wes-chirpstack-tracker in a k3s cluster use the yaml files in /test/kubernetes/.
    • if django-token secret is not in the cluster, wes-chirpstack-tracker pod will stay in CreateContainerConfigError status. Once the secret is created the pod will start running by itself.
    • If you need to use secret.yaml, make sure you add your base 64 encoded token to it
  • One way to test an update's image build is to open a PR.
    • Open a PR which builds a some-image:pr-x for every push you do to help testing.
    • if you're iterating on the image, you would mostly use the explicit image:tag@shasum
      • PR
        • Here you can see the image:tag@shasum
        • If you want to pull the image you would use image:tag@shasum

More Information

About

Tracks chirpstack records such as devices and keys

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published