mirror of capsul cloud compute provider web application https://giit.cyberia.club/~forest/capsul-flask
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3wc 6fb9c651e8 Revert accidental change to test DB settings 1 year ago
capsulflask Revert accidental change to test DB settings 1 year ago
docs Tidying; add .env.sample 1 year ago
.drone.yml Docker image, & local development docker-compose.yml (#2) 2 years ago
.env.sample Tidying; add .env.sample 1 year ago
.gitignore gitignore unittest output file 1 year ago
Dockerfile Docker image, & local development docker-compose.yml (#2) 2 years ago
LICENSE.md affero GPL license 3 years ago
Pipfile Basic testing using flask-testing 1 year ago
Pipfile.lock ensure that app is defined in app.py to fix login link logging issues. 1 year ago
README.md remove redundant get_vms() and add testing documentation from pull 1 year ago
app.py create TestHTTPClient that uses werkzueg test client, tests are passing 1 year ago
docker-compose.yml Fixes to compose file 1 year ago
letsencrypt-root-ca.crt simplify postgres connection parameters as a single string 2 years ago
setup.cfg affero GPL license 3 years ago
setup.py postgres automatic schema management roughly working 3 years ago



screenshot of capsul.org home page

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 integrates with Stripe as a credit card processor, and BTCPay Server as a cryptocurrency payment processor.

capsul-flask invokes shell-scripts to create/manage libvirt/qemu vms, and it depends on dnsmasq to act as the DHCP server for the vms.

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.

Quickstart (run capsul-flask on your computer in development mode)

# 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 docs/ folder: