3.2 KiB
3.2 KiB
Contributing
Making changes
Currently, this repo pushes a tagged image from main
to the packages tab each time main
is updated. As such, if you're proposing a change, please update the following files in a PR and DO NOT push directly to main
.
- Bump the
version
number in the config.json file - Make whatever changes you need (e.g., bumping the version of Node Exporter or the version of the base images)
- Add your changes to the CHANGELOG.md file
Testing
I'm still working this out, but am doing testing based on this page.
After making your changes, run the command below from the git root directory (i.e., hassos-addons
) to ensure that the add-on builds successfully (substitute amd64
with armhf
, aarch64
, or i386
based on your system).
docker run \
--rm \
-it \
--name builder \
--privileged \
-v ./prometheus_node_exporter:/data \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
ghcr.io/home-assistant/amd64-builder \
-t /data \
--amd64 \
--test \
-i test-prometheus-node-exporter \
-d local
To test that the add-on actually runs, I've been using my personal instance of Home Assistant 🤷♂️
- Open the Add-ons panel in Home Assistant by going to
Settings-->Add-ons-->Add-on Store
- Uninstall the current Prometheus Node Exporter add-on (the one published from GHCR.io)
- Install the official samba add-on
- Enable samba with a username and password
- Mount the samba share locally (e.g., Dolphin can use
smb://your_home_assistant_ip_address
) - Navigate to the
addons
directory in the samba share - Copy/paste the entire
prometheus_node_exporter
directory to theaddons
directory in the samba share - In the
config.json
file in the samba share, remove this entire line"image": "ghcr.io/loganmarchione/hassos-addons/prometheusnodeexporter-{arch}",
- Open the Add-ons panel in Home Assistant by going to
Settings-->Add-ons-->Add-on Store
- Click the menu icon in the top-right, then click "Check for updates"
- Refresh the page
- At the very top, there should be a new section for "Local add-ons" with the "Prometheus Node Exporter" to install
- Install the new add-on from the local repository
- Test all configurations
- Make sure log entries line up with configuration settings
- Navigate to
http://your_home_assistant_ip_address:9100/metrics
and ensure that HTTP basic auth works as expected
- Stop and uninstall the local add-on
- Delete the entire
prometheus_node_exporter
directory in theaddons
directory in the samba share - Disable the samba add-on
- Re-install add-on from GHCR.io (you'll need to re-configure the add-on)