The IM Squonk2 Deck (Squeck)
Project description
Squeck (Squonk2 Deck) is s Textual-UI (TUI) for the summary visualisation of multiple Squonk2 environments.
Squeck uses the squonk2-python-client to create a Deck displaying summary information for multiple Squonk2 environments and uses Will McGugan’s textual framework to provide the user with a simple, text-based user interface modelled on the popular k9s Kubernetes monitor.
Installation
Squeck is a Python application, written with Python 3.10 and published to PyPI and is easily installed using pip:
pip install im-squeck
Execution
Before running Squeck you must have access to at least one Squonk2 environment. Squeck obtains details of the environment through a YAML-based environments file. An example file, environments, is located in the root of this project:
---
# An example Squeck environments file.
#
# It provides all the connection details for one or more Squonk2 environments.
# It is expected to be found in the user's home directory
# as '~/.squonk2/environments' or the user can 'point' to it by setting
# 'SQUONK2_ENVIRONMENT_FILE', e.g. 'export SQUONK2_ENVIRONMENT_FILE=~/my-env'
# The 'environments' block defines one or more environments.
# Each has a name. Here we define an environment called 'site-a'
# but environments can be called anything YAML accepts as a key,
# although it would aid consistency if you restrict your names to letters
# and hyphens.
environments:
site-a:
# The hostname of the keycloak server, without a 'http' prefix
# and without a '/auth' suffix.
keycloak-hostname: example.com
# The realm name used for the Squonk2 environment.
keycloak-realm: squonk2
# The Keycloak client IDs of the Account Server and Data Manager.
# The Account Server client ID is optional.
keycloak-as-client-id: account-server-api
keycloak-dm-client-id: data-manager-api
# The hostnames of the Account Server and Data Manager APIs,
# without a 'http' prefix and without an 'api' suffix.
# If you have not provided an Account Server client ID its
# hostname value is not required.
as-hostname: as.example.com
dm-hostname: dm.example.com
# The username and password of an admin user that has access
# to the Account Server and Data Manager.
# The user *MUST* have admin rights.
admin-user: dlister
admin-password: blob1234
# The final part of the file is a 'default' property,
# which Squeck uses to select the an environment from the block above
# when all else fails. It's simply the name of one of the environment
# declarations above.
default: site-a
When Squeck starts it will look for the environments file in your home directory, in the file ~/.squonk2/environments. If you place your populated environments file there you need do nothing else prior to running Squeck. If you prefer to put your environments file elsewhere, or have multiple files, set the path to your file using the environment variable SQUONK2_ENVIRONMENTS_FILE:
export SQUONK2_ENVIRONMENTS_FILE=~/my-squonk2-environments
With an environments file in place you can run Squeck:
squeck
Logging
You can enable logging from Squeck and the underlying textual framework by setting the environment variable SQUONK2_LOGFILE when running the application:
SQUONK2_LOGFILE=./squeck.log squeck
Debugging
Textual doesn’t like anything being written to the console so printing (even to stderr) will topple the display. That’s why stderr is diverted when the application is running and nothing is printed. There comes a time, though, when you need to see the error log. For these times you can run Squeck without stderr diverted:
squeck --enable-stderr
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file im-squeck-1.0.0.tar.gz
.
File metadata
- Download URL: im-squeck-1.0.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 992797d293244a3ea49d5560ed762222b3e4b36ba2e33c94dcfd52b1413d3aa3 |
|
MD5 | 897bb7de91fb88f69a69225419e38879 |
|
BLAKE2b-256 | 0c96966dc391a095427d8dcf1d4f4fcdd145c0014ac62358dff93892b216eb15 |
File details
Details for the file im_squeck-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: im_squeck-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e6b9968f303f59da636383bca008e93412f17fae5ef05a9c3c4408070e9656c |
|
MD5 | 7e78c10627166ed0633a7315644e38ed |
|
BLAKE2b-256 | 337eb9688d4e0a4a6ac76e258505eeabeef41ab750847aa4f85d7451262d67b3 |