InfraWiz

InfraWiz - Wizardry in Infrastructure Management and Setup

Overview

InfraWiz is an intelligent provisioning system designed to simplify and automate the setup and configuration of servers and infrastructure. Leveraging the power of AI and Terraform, InfraWiz interacts with users to determine their specific needs and provisions the necessary packages, files, and scripts to achieve the desired setup. This tool aims to streamline the process of server management, making it more efficient and accessible.

Features

Components

  1. InfraWiz Core Script: The main script that initializes the AI interaction and handles the provisioning process.
  2. Terraform Configurations: Declarative Terraform files defining infrastructure as code.
  3. Configuration Files: Files needed to customize and secure the setup, including environment variables and secrets management.
  4. Provisioning Scripts: Bash and Python scripts that perform specific tasks such as installing software, setting up services, and configuring the system.
  5. Logs and Output: Logs generated during the provisioning process to help with debugging and verification.

Usage

For a quick start guide, see QUICKSTART.md.

Installation

  1. Clone the repository:
    git clone https://github.com/cywf/InfraWiz.git
    cd InfraWiz
    
  2. Install Python dependencies:
    pip install -r requirements.txt
    
  3. Set up OpenAI API key:

    Option A - Using environment variable:

    export OPENAI_API_KEY='your-api-key-here'
    

    Option B - Using .env file (recommended):

    cp .env.example .env
    # Edit .env and add your OpenAI API key
    

    Get your API key from: https://platform.openai.com/api-keys

Running InfraWiz

Run the main script:

python infra_wiz.py

Note: For safety, automatic command execution is disabled. Review the AI recommendations carefully and execute commands manually.

Example Usage

$ python infra_wiz.py
Hi! I'm InfraWiz, your Infrastructure Management Wizard.
What can I help you with today?
Enter your request: Set up a web server with nginx and python

InfraWiz will then analyze your request and provide specific recommendations for packages, configurations, and setup steps.

Contribution

License

This project is licensed under the MIT License.