Python Flask web application implementing user accounts, payment, and virtual machine management for a smol "virtual machine (vm) as a service" aka "cloud compute" provider. Originally developed by Cyberia Computer Club for https://capsul.org
capsul-flask has a "hub and spoke" architecture. The "Hub" runs the web application and talks to the Postrges database, while the "Spoke"(s) are responsible for creating/managing virtual machines. In this way, capsul can be scaled to span more than one machine. One instance of the capsul-flask application can run in both hub mode and spoke mode at the same time, however there must only be one instance of the app running in "Hub" mode at any given time.
# get an instance of postgres running locally on port 5432 # (you don't have to use docker, but we thought this might be the easiest for a how-to example) docker run --rm -it -e POSTGRES_PASSWORD=dev -p 5432:5432 postgres & # install dependencies sudo apt install pipenv python3-dev libpq-dev # download and run git clone https://giit.cyberia.club/~forest/capsul-flask cd capsul-flask pipenv install pipenv run flask run
Interested in learning more? How about a trip to the the
capsul-flask's relationship to its Database Server
capsul-flask's hub-and-spoke architecture