Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Netrics repository to generate and maintain configuration for Netrics FLOTO containers.

License

Notifications You must be signed in to change notification settings

internet-equity/netrics-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netrics-config

Netrics repository to generate and maintain configuration for Netrics FLOTO containers.

Overview

image

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 through manage.py
  • netrics-config will use and write to $HOME/.netrics-config/ in order to operate.
  • No sensitive data is shared along with these configuration.

Config file / Template

A typical config template file (Jinja) can be found here.

Steps to operate an existing data

  1. Establish the AWS bucket credentials through AWS configure;
  2. Make sure you have write permissions and puclic read permissions to the bucket;
  3. Copy database.yaml and data/s3 from either netrics-config-data-v1 or netrics-config-data-v2 private repos;
  4. Any changes to database.yaml and/or data/s3 should be ideally updated on the private data repos
  5. You can overwrite the parameters generated by gen_config with the parameters listed in database.yaml by selecting overwrite: true and changing the parameters in the database.yaml file
  6. From scripts run manage.py -i balena_devices_output.json to generate new data on local data/s3
  7. 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

Steps to bootstrap a new bucket

TBD

About

Netrics repository to generate and maintain configuration for Netrics FLOTO containers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published