Skip to content

A multi-cloud management solution built with Django that connects to various cloud providers (OCI, AWS, Azure). This tool enables centralized scheduling for VM power operations across different cloud platforms, allowing automated start/stop schedules to optimize resource usage and reduce costs.

Notifications You must be signed in to change notification settings

joaopblume/cloudboosting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Install apache2 and setup mod_wsgi apache's plugin

## Prerequisites

Before you begin, ensure you have the following:

- A running instance of Ubuntu 24.04.1 LTS
- Sudo privileges

## Step 1: Update System Packages

Update your system packages to the latest version:

```sh
sudo apt update
sudo apt upgrade

Step 2: Install Apache2

Install Apache2 and its development package:

sudo apt install apache2
sudo apt install apache2-dev

Step 3: Install Python Development Package

Install the Python development package:

sudo apt install python3-dev

Step 4: Install mod_wsgi

Download and install mod_wsgi:

wget https://files.pythonhosted.org/packages/e9/02/36597a3e2478e20ec55432dd153fd23067d2dc5ec736ae16ccc08905f8cb/mod_wsgi-5.0.1.tar.gz
tar -xvf mod_wsgi-5.0.1.tar.gz
cd mod_wsgi-5.0.1
export PYTHON_PATH=/usr/bin/python3
./configure
make
sudo make install

Set the correct permissions for the mod_wsgi module:

sudo chmod 644 /usr/lib/apache2/modules/mod_wsgi.so

Step 5: Configure Apache to Use mod_wsgi

Create the wsgi.load file:

sudo vi /etc/apache2/mods-available/wsgi.load

Add the following line to the file:

LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

Enable the wsgi module and restart Apache:

sudo a2enmod wsgi
sudo systemctl restart apache2

Verify that the wsgi module is enabled:

apache2ctl -M | grep wsgi

Step 6: Install Django

Install Django and related packages:

python -m pip install Django djangorestframework django-cors-headers

Step 7: Set Up Django Project

Navigate to your project directory and set up a new Django project:

cd cloudb
django-admin startproject api_root .
python3 manage.py startapp api_rest
python3 manage.py runserver

Step 8: Apply Migrations

Apply the initial migrations for your Django app:

python manage.py makemigrations api_rest
python manage.py migrate

Step 9: Create a Superuser

Create a superuser for your Django admin:

python manage.py createsuperuser

Follow the prompts to set the username and password for the superuser.

Instalar o NODE JS
https://nodejs.org/dist/v22.11.0/node-v22.11.0-linux-x64.tar.xz
export NODEJS_HOME=/home/joao/django-cloudb/cloudboosting/node-v22.11.0-linux-x64/bin
export PATH=$NODEJS_HOME:$PATH

python cloudb/manage.py tailwind init
python cloudb/manage.py tailwind install
python cloudb/manage.py tailwind start


https://stackoverflow.com/questions/67938486/after-installing-npm-on-wsl-ubuntu-20-04-i-get-the-message-usr-bin-env-bash

chmod -R a+x node_modules


FOR PRODUCTION USE
python cloudb/manage.py tailwind build

https://pypi.org/project/django-q2/
python cloudb/manage.py qcluster

About

A multi-cloud management solution built with Django that connects to various cloud providers (OCI, AWS, Azure). This tool enables centralized scheduling for VM power operations across different cloud platforms, allowing automated start/stop schedules to optimize resource usage and reduce costs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published