Skip to content

πŸ§±πŸ“¦ | The brickbox.io website contains both the public-facing and customer dashboards.

License

Notifications You must be signed in to change notification settings

brickbox-io/brickbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

brickbox.io

Code Quality Β  Script Check Β  Django CI

Table of Contents

What is brickbox.io?

brickbox.io is an artificial intelligence (AI) infrastructure provider and management platform. The goal of brickbox.io is to connection individuals working on the latest in cutting edge technology with the hardware they need to rain AI models.

The web interface is built on the Django framework.

Getting Started

sudo apt update && sudo apt upgrade -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10 -y
sudo apt install nginx -y

sudo apt-get install python3.10-venv -y
python3.10 -m venv bbenv

source bbenv/bin/activate
python -m pip install -r requirements.txt

To update requirements.txt after a new package is installed

python3 -m pip freeze -l > requirements.txt

Deploy

Uvicorn is used as the ASGI server to provide async capabilities. When changes are made use systemctl restart gunicorn to update the service.

Static Files

Files including images and .js are servered from the location specified in Nginx. Rull the command python3 manage.py collectstatic to automaticly copy static files from the project directory to the location specified in the settings folder.

Continuous Integration

To facilitate the rapid integration of new code the brickbox.io DevOps process includes a set of continuous integration tools. These tools are a combination of both best practices and enforced code policies with the aid of GitHub Actions.

Admin & Monitoring

Service Status

To quickly see that services are operational the app django-health-check has been added.

Directory Structure

.
β”œβ”€β”€ .github             # CI/CD using GitHub Actions and other functions.
β”œβ”€β”€ bb_accounts         # User account creation and management.
β”œβ”€β”€ bb_api              # API framework and endpoints.
β”œβ”€β”€ bb_dashboard        # Main user interfaces.
β”œβ”€β”€ bb_data             # Contains the database model definitions.
β”œβ”€β”€ bb_public           # Any publicly accessible landing/info pages.
β”œβ”€β”€ bb_tasks            # Task management framework, celery.
β”œβ”€β”€ bb_vm               # Virtual machine component.
β”œβ”€β”€ brickbox            # Django project settings and configuration.
└── puller              # Internal CI/CD tools.

Design Strategy

The platform has a combination of both passive and active components. These are broken into either endpoints or background tasks. The majority of functionality occurs under bb_tasks.

Definitions

Colocation Client
Represents an idividual or entity that owns one or more servers located within brickbox. A client can be controlled by one or more users. A "client" is singular while their servers/units can be plural.

Colocation Owner
The user that owns the colocation client.