Skip to content

Commit 6345987

Browse files
Updated readme chirpstack section
1 parent f359d13 commit 6345987

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,36 @@ Solution:
8080
## Adding an ADR Algorithm
8181
When the ADR Algorithm has been tested, and is ready for deployment, the ADR Algorithm has to be added to chirpstack. It is mandatory that the custom adr module is writtin in js.
8282

83-
### Adding the Plugin to Chirpstack
83+
## Adding the Plugin to Chirpstack
84+
85+
### Docker
86+
8487
If the default `docker-compose.yml` file is used, the folder `./configuration/chirpstack` is already copied to `/etc/chirpstack` in the docker container.
85-
Therefore a new folder can be added such as `./configuration/chirpstack/adr-plugins` in which the js file can be added.
86-
This makes the file available at `/etc/chirpstack/adr-plugins/example-file.js` within the chirpstack container.
88+
Therefore a new folder can be added such as `./configuration/chirpstack/adr-modules` in which the js file can be added.
89+
This makes the file available at `/etc/chirpstack/adr-modules/example-file.js` within the chirpstack container.
8790

88-
The last step is to specify the file as being an adr-plugin within the `chirpstack.toml` config file by adding `adr_plugins=["/etc/chirpstack/adr-plugins/example-file.js"]` under `[network]`, like this:
91+
The last step is to specify the file as being an adr-plugin within the `chirpstack.toml` config file by adding `adr_plugins=["/etc/chirpstack/adr-modules/example-file.js"]` under `[network]`, like this:
8992
```toml
9093
[network]
91-
adr_plugins=["/etc/chirpstack/adr-plugins/example-file.js"]
94+
adr_plugins=["/etc/chirpstack/adr-modules/example-file.js"]
9295
```
9396

94-
Your should now be able to restart the chirpstack server and the new adr algorithm should be available in Chirpstack.
97+
You should now be able to restart the chirpstack server and the new adr algorithm should be available in Chirpstack.
98+
99+
### Helm
100+
101+
When hosting via helm the steps are slightly different.
102+
103+
1. Make sure that the persistent volume claim belonging to the chirpstack exists in your hosted setup.
104+
2. Find the actual name of the network-server pod. This can be done in a few ways. If you're have a connection via a GUI like `Lens` it can be found under the `Pods` list. If you're hosting on an Azure Kubernetes service, it can be found under the side menu `Workloads -> Pods`
105+
3. Use `kubectl` to copy the module into the pod
106+
```bash
107+
kubectl cp ./path/to/module/adr-module chirpstack-xxxxxxxxx-xxxxx:/etc/chirpstack/adr-modules
108+
```
109+
4. Update `configmap.yaml` located under `/helm/charts/chirpstack/templates` with the path to the plugin under `[network]`, like this:
110+
```toml
111+
[network]
112+
adr_plugins=["/etc/chirpstack/adr-modules/example-file.js"]
113+
```
114+
The first line already exists
115+
5. Once the helm chart has redeployed restart the network server to enable the new module.

0 commit comments

Comments
 (0)