Manage all your VMs in the browser.
pip install -r requirements.txt
After having installed all the requirements, run this in venv:
streamlit run app.py
Search everywhere:
Sync Python Requirements...
Tools
Sync Python Requirements...
Create a .streamlit/secrets.toml
file and write this:
db_username = "username"
db_password = "password"
db_address = "localhost or ip"
db_name = "name"
cookie_name = "cookie_name"
cookie_key = "key"
cookie_expiry_days = 30
cipher_key = "some Fernet-compliant key"
These are used in backend/database.py
to create the connection.
CREATE DATABASE "vm-lab"
WITH
OWNER = postgres
ENCODING = 'UTF8'
LOCALE_PROVIDER = 'libc'
CONNECTION LIMIT = -1
IS_TEMPLATE = False;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(128) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
role VARCHAR(10) NOT NULL
);
CREATE TABLE virtual_machines (
id SERIAL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
host VARCHAR(50) NOT NULL,
port INTEGER NOT NULL,
username VARCHAR(50) NOT NULL,
ssh_key BYTEA,
password VARCHAR(128),
user_id SERIAL NOT NULL,
CONSTRAINT fk_user FOREIGN KEY (user_id)
REFERENCES users(id) ON DELETE CASCADE
);
CREATE TABLE bookmarks (
id SERIAL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
link VARCHAR(255) NOT NULL,
user_id SERIAL NOT NULL,
CONSTRAINT fk_user FOREIGN KEY (user_id)
REFERENCES users(id) ON DELETE CASCADE
);