https://github.com/zonca/openstack_unshelver_webapp
https://github.com/zonca/openstack_unshelver_webapp
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zonca/openstack_unshelver_webapp
- Owner: zonca
- Created: 2025-09-22T22:49:33.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-23T01:42:51.000Z (9 months ago)
- Last Synced: 2025-09-23T02:45:59.208Z (9 months ago)
- Language: Python
- Size: 79.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenStack Unshelver Web App
Check out the accompanying blog post: https://www.zonca.dev/posts/2025-09-22-openstack-unshelver-demo
FastHTML web application that authenticates users via GitHub OAuth (restricted to a
particular organisation) and provides buttons that unshelve and monitor configured
OpenStack instances.
## Features
- GitHub OAuth login with organisation membership enforcement
- Config-driven list of OpenStack instances to unshelve
- Unshelve workflow with live status updates every 10 seconds
- HTTP readiness probing and direct link to the instance web UI once online
## Configuration
Create a configuration file following [`config.example.yaml`](config.example.yaml) and
supply it as `config.yaml` or via the `UNSHELVER_CONFIG` environment variable.
Key sections:
- `app`: UI title, session secret, polling and HTTP probe timings
- `github`: OAuth client credentials, redirect URI, required organisation
- `openstack`: Authentication credentials passed to `openstacksdk`
- `buttons`: One entry per UI button with instance name and optional behaviour overrides
## Running the App
This project uses [uv](https://github.com/astral-sh/uv).
```bash
uv run python app.py
```
By default the app listens on `http://localhost:5001`. Adjust the `redirect_uri`
accordingly in GitHub OAuth settings and the configuration file.
## Testing
Run the unit tests with:
```bash
uv run pytest
```
## Notes
- The web UI keeps state in-memory; if you run multiple processes you should add a
shared backing store for task status.
- TLS certificate verification for instance readiness checks can be disabled per button
using `verify_tls: false` when required for self-signed certificates.
- The OpenStack credentials can be provided either as username/password/project or
application credentials (set `application_credential_id` and
`application_credential_secret`).