Skip to content

richardbeumer/envoy-api

Repository files navigation

API for exposing Envoy Production values.

API retrieves token from enlighten and queries the local envoy for production stats

Run local

To run loccaly perform the following steps

  1. Create Python virtual environment and install the requirements in it.
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt --no-cache-dir
  1. Set variables:
export ENLIGHTEN_USERNAME=<enlighten-username>
export ENLIGHTEN_PASSWORD=<enlighten-password>
export ENVOY_SERIAL=<envoy-serial>
export ENVOY_SITE=<envoy-siteId>
export ENVOY_HOST=<envoy-host-or-ip>
  1. Run the code:
cd src
uvicorn api:app --reload

DevContainer

You can also run from a devcontainer

  1. Start the devContainer.
vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=<url-of-this-forked-repo>
  1. Set variables:
export ENLIGHTEN_USERNAME=<enlighten-username>
export ENLIGHTEN_PASSWORD=<enlighten-password>
export ENVOY_SERIAL=<envoy-serial>
export ENVOY_SITE=<envoy-siteId>
export ENVOY_HOST=<envoy-host-or-ip>
  1. Run the code from a terminal in the container.
cd src
uvicorn api:app --reload --host: 0.0.0.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •