The main task of the project is to maintain information about existing
streams in the OCA observatory NATS network, and to update them on either
OCA server nats.oca.lan
or developer machine.
The stream configuration for developers is stored in the oca_nats_config/configuration
Configuration of streams on the server is done by editing the oca_nats_config/config.yaml
file in the main project directory. The oca nats server update should happen
automatically after upload to git.
Starting from version 1.1.0, the project supports multiple nats servers (as serverish started to support).
Default, in the oca_nats_config/config.yaml
are two servers:
nats.oca.lan
- the main server for the OCA observatorylocalhost
- the developer server This means, that in observatory, thents.oca.lan
server will be updated, and on the developer machine, thelocalhost
server will be updated.
It is possible to have your own local streams configuration and nats server
password by creating a config.yaml
file in the oca_nats_config/configuration
directory.
To update the nats server with new streams, run the command:
poetry run build
For the installation on Docker (OCA server or local developer machine) follow the instructions in Docker section.
First you need to clone the repository from git.
git clone https://github.com/araucaria-project/oca_nats_config.git
Then go to the project folder and install it.
WARNING the poetry
package is required for installation.
cd oca_nats_config
poetry install
For a single update, follow the instructions in Develop usage section.
Attention. The service is configured to run as a poweruser
. This means that a user with this name must exist in
the environment and must be the owner of the project. Therefore, the installation process should be done as poweruser
.
To run the auto-update service on linux you need to first complete installation (see installation section).
Go to the /etc/systemd/system/
directory in the project and make symlinks to service scripts.
WARNING [path-to-project]
is the project path
cd /etc/systemd/system/
sudo ln -s [path-to-project]/oca_nats_config/scripts/oca_nats_config_update.service oca_nats_config_update.service
sudo ln -s [path-to-project]/oca_nats_config/scripts/oca_nats_config_update.timer oca_nats_config_update.timer
Next go to and make symlink to auto update script:
cd /usr/bin/
sudo ln -s [path-to-project]/oca_nats_config/scripts/auto_update.sh auto_update.sh
Now start the services.
sudo systemctl daemon-reload
sudo systemctl enable oca_nats_config_update.timer
sudo systemctl start oca_nats_config_update.timer
At the end, you can check status nev service by:
sudo systemctl status oca_nats_config_update.timer