Skip to content

everhardt/configizer

 
 

Repository files navigation

Configizer for balenaOS config.json updates

Safe way to modify the config.json on a balenaOS device remotely (e.g. connecting over the CLI using balena ssh)

This tool supports the config.json options provided by the operating system, that is not yet supported by the supervisor. Any entry that the supervisor learns to support will be removed from this tool, as that is the right place for modifying values.

See the full list of the supported entries in the meta-balena README.

Usage

  • config.sh is the script that will be run on the device. In the headers of that file, there are a number of settings, modify any of them that you want to use, leave the rest as it is. Only those modifications will be run on the device that are the non-default values. Each entry has a help text to assist in filling it out
  • create a file called batch, and add the UUIDs of the devices that you want to modify there, one by one
  • in case that you also need to change the API Keys of the devices, create a file called new_keys with the UUID & new device API key pairs, according to the new_keys.example
  • ensure that you are logged in with the CLI (e.g. by checking balena whoami)
  • to run the script on the given devices, start with ./run.sh (Linux is supported at the moment, might need to make that file executable, or run it with bash ./run.sh)
  • you will see the logs of the updates, and those are also saved into a logfile
  • if the script is re-run, any device that is successfully done previously (according to the config.log file) will be skipped. Thus if you change the script, and need to rerun on devices you run on previously, remove the config.log file.
  • note, that once the script starts to run on a device, even if it gets disconnected (and thus logs stop) the config.json update will proceed

About

Safe(r) balenaOS config.json updates remotely

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%