Skip to content

A lightweight, self-hosted cloud platform built with Flask and Pulumi Automation API for deploying static sites (S3) and virtual machines (EC2) on AWS. Each resource is managed as an independent Pulumi stack through a simple web interface, combining the ease of PaaS platforms like Heroku with full infrastructure-as-code control—perfect for develope

License

Notifications You must be signed in to change notification settings

PranavViswanathan/PranavaOku

Repository files navigation

PranavOku

PranavOku is a web-based service for deploying and managing cloud resources on AWS. It provides a simple user interface to provision static websites and virtual machines, acting as a lightweight, self-hosted alternative to platforms like Heroku. The application leverages Pulumi for infrastructure as code and Flask for the web backend.

Features

  • Static Website Deployment:

    • Deploy static websites directly to AWS S3.
    • Provide content via direct input or from a URL.
    • Each website is managed as an independent Pulumi stack.
    • Create, list, update, and delete websites through the web UI.
  • Virtual Machine Provisioning:

    • Launch and manage EC2 virtual machines.
    • Configure instance types (e.g., t2.nano, t2.micro).
    • Manage SSH access by providing a public key.
    • Each VM is managed as an independent Pulumi stack.
    • Create, list, update, and delete VMs from the web interface.

Technology Stack

  • Backend: Python, Flask
  • Infrastructure as Code: Pulumi, Pulumi Automation API
  • Cloud Provider: AWS (S3 for sites, EC2 for VMs)
  • Frontend: HTML, Bootstrap

Getting Started

Prerequisites

Installation and Setup

  1. Clone the repository:

    git clone https://github.com/pranavviswanathan/PranavaOku.git
    cd PranavaOku
  2. Create and activate a Python virtual environment:

    python3 -m venv venv
    source venv/bin/activate
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Set the required environment variable: The application needs to know your Pulumi organization name to construct console URLs.

    export PULUMI_ORG="<your-pulumi-organization-name>"

Running the Application

  1. Start the Flask development server:

    flask run
  2. Access the web interface by navigating to http://127.0.0.1:5000 in your browser.

How It Works

The application uses the Pulumi Automation API to dynamically create, update, and destroy infrastructure stacks based on user input from the Flask web interface.

  • app.py: The main Flask application file. It sets up the app, defines the main routes, and registers the blueprints for sites and VMs.
  • sites.py: A Flask Blueprint that contains the logic for managing static websites. It defines the Pulumi program for an S3-based static site and includes routes for creating, listing, updating, and deleting these sites.
  • virtual_machines.py: A Flask Blueprint for managing EC2 virtual machines. It defines the Pulumi program to provision an EC2 instance with a security group and key pair, along with the corresponding web routes.
  • templates/: This directory contains all the Jinja2 HTML templates used to render the web UI. It is organized into subdirectories for sites and virtual machines.
  • Pulumi.yaml: The main project file for Pulumi, defining the project name and runtime.

Each time you create a new website or VM, the application creates a new Pulumi stack for that resource under the prananumaoku project. This isolates each piece of infrastructure, allowing for independent management and destruction.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A lightweight, self-hosted cloud platform built with Flask and Pulumi Automation API for deploying static sites (S3) and virtual machines (EC2) on AWS. Each resource is managed as an independent Pulumi stack through a simple web interface, combining the ease of PaaS platforms like Heroku with full infrastructure-as-code control—perfect for develope

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published