Netrics repository to generate and maintain configuration for Netrics FLOTO containers.
This module turns balena_devices_output.json
into a directory structure full of configuration files for each one of the FLOTO devices.
It takes a jinja template to serve as a base for generating the final configuration files.
TBD: plugins can be implemented to provide a logic for paramenter generation (right now, the function gen_config is responsible for a default configuration).
- netrics-config can be operated through the scripts available in the
scripts
folder, mainly throughmanage.py
- netrics-config will use and write to
$HOME/.netrics-config/
in order to operate. - No sensitive data is shared along with these configuration.
A typical config template file (Jinja) can be found here.
- Establish the AWS bucket credentials through AWS configure;
- Make sure you have write permissions and puclic read permissions to the bucket;
- Copy
database.yaml
anddata/s3
from either netrics-config-data-v1 or netrics-config-data-v2 private repos; - Any changes to
database.yaml
and/ordata/s3
should be ideally updated on the private data repos - You can overwrite the parameters generated by
gen_config
with the parameters listed indatabase.yaml
by selectingoverwrite: true
and changing the parameters in thedatabase.yaml
file - From
scripts
runmanage.py -i balena_devices_output.json
to generate new data on localdata/s3
- Run
sync.sh
to update to the cloud.
The file structure should look like:
.
├── data
│ ├── backup
│ ├── database-blacklist.yaml
│ ├── database.yaml
│ ├── database.yaml.new
│ └── s3
│ ├── 051a9184995bdd161e4a031ec8b38fc1
│ │ └── nm-exp-active-netrics.toml
│ ├── 1e01471bc0bc7884ecb711af3f78e9f3
│ │ └── nm-exp-active-netrics.toml
│ ├── 24d4783ea4639e88bc39115ae9d2e082
│ │ └── nm-exp-active-netrics.toml
│ ├── 2560db8b79608a6d6bdc450e4709d3db
│ │ └── nm-exp-active-netrics.toml
│ ├── 4582cc4fb0054aeac5445460f664dc12
│ │ └── nm-exp-active-netrics.toml
│ ├── 743c94e868c86ff18685a03b74ef3ab4
│ │ └── nm-exp-active-netrics.toml
│ ├── 8e9f994db1c34b7933388804f4adf5c6
│ │ └── nm-exp-active-netrics.toml
│ ├── ba444188a8b7364ce5a36182e9477b62
│ │ └── nm-exp-active-netrics.toml
│ ├── cdef0f835fdc82be19b834a20ac5e315
│ │ └── nm-exp-active-netrics.toml
│ ├── d20906c3e10d0b20c6a3540c3e3188e0
│ │ └── nm-exp-active-netrics.toml
│ └── eb559c17b1bf466296ed8ed6f1172e1c
│ └── nm-exp-active-netrics.toml
└── templates
└── default
└── nm-exp-active-netrics.template.toml.jinja
TBD