Skip to content

canonical/software-inventory-exporter

Repository files navigation

Get it from the Snap Store

Software Inventory Exporter

This snap runs a simple python http server with FastAPI that serves, hostname, kernel version, apt packages and snaps in json format.

Deployment

To get the latest stable version of the snap from Snapstore, run:

sudo snap install software-inventory-exporter

To get the latest development version of the snap, build from the source code and install with --dangerous flag:

make build
sudo snap install software-inventory-exporter.snap --dangerous
# connect interfaces
sudo snap connect software-inventory-exporter:snap-apt-dpkg-db

Configuration

To configure the snap for your own environment, create a config.yaml file in $SNAP_DATA (see Snap Environment Variables) directory with the desired entries. By default, bind_address and port are configured to the values 0.0.0.0 and 8675, respectively.

The configuration should have the following format:

settings:
  bind_address: <IP>
  port: <port>

Usage

After the installation and configuration you should be able to use the API. Check the automatic documentation by accessing /docs by accessing: http://<IP>:<port>/docs

From there you will be able to see all endpoint available and try it out.