Vibe and fly with your infrastructure - an AI-powered cloud infrastructure assistant.
Cloud Pilot is an AI-powered assistant that helps you design, deploy, and manage cloud infrastructure. It provides an intuitive chat interface for interacting with your cloud resources.
Before you begin, ensure you have the following installed:
- Docker and Docker Compose (for containerized deployment)
- Node.js (v14 or later) and npm (for frontend development)
- Python (v3.9 or later) (for backend development)
- Terraform (v1.0 or later) (for infrastructure provisioning)
You'll also need:
- An Anthropic API key for Claude AI
- AWS credentials (access key ID and secret access key)
Make sure you have the following environment variables set:
export ANTHROPIC_API_KEY=<your-anthropic-api-key>
export AWS_ACCESS_KEY_ID=<your-aws-access-key-id>
export AWS_SECRET_ACCESS_KEY=<your-aws-secret-access-key>
Then run the following command to start the development frontend and backend:
docker compose up --build
The easiest way to deploy Cloud Pilot is using Docker Compose:
-
Clone the repository:
git clone https://github.com/yourusername/cloud-pilot.git cd cloud-pilot
-
Set up environment variables:
# Create a .env file cat > .env << EOL ANTHROPIC_API_KEY=your-anthropic-api-key AWS_ACCESS_KEY_ID=your-aws-access-key-id AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key EOL
-
Deploy using the provided script:
./deploy.sh
This will:
- Build the frontend and backend Docker images
- Start the containers in detached mode
- Expose the frontend on port 3000 and the backend on port 8000
To check the status of your deployment:
docker compose ps
To view logs:
docker compose logs -f
To stop the deployment:
docker compose down
If you prefer to deploy without Docker, follow these steps:
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
pip install -e .
-
Set environment variables:
export ANTHROPIC_API_KEY=your-anthropic-api-key export AWS_ACCESS_KEY_ID=your-aws-access-key-id export AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
-
Start the backend server:
uvicorn src.api:app --host 0.0.0.0 --port 8000
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install --legacy-peer-deps
-
Build the production version:
npm run build
-
Serve the built files (using a static file server like serve):
npm install -g serve serve -s build -l 3000
Alternatively, you can use Nginx to serve the frontend:
# Install Nginx
sudo apt-get install nginx
# Create Nginx configuration
sudo nano /etc/nginx/sites-available/cloud-pilot
# Add the following configuration
server {
listen 80;
server_name your-domain.com;
location / {
root /path/to/cloud-pilot/frontend/build;
index index.html;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
# Enable the site
sudo ln -s /etc/nginx/sites-available/cloud-pilot /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
To deploy Cloud Pilot on AWS:
-
EC2 Deployment:
- Launch an EC2 instance (t2.micro or larger recommended)
- Install Docker and Docker Compose
- Clone the repository and follow the Docker deployment steps above
-
ECS Deployment:
- Create an ECS cluster
- Create task definitions for the frontend and backend
- Set up the necessary environment variables in the task definitions
- Deploy the services
-
Using Elastic Beanstalk:
- Create a
Dockerrun.aws.json
file in the project root:{ "AWSEBDockerrunVersion": 2, "containerDefinitions": [ { "name": "backend", "image": "your-ecr-repo/cloud-pilot-backend:latest", "essential": true, "memory": 512, "portMappings": [ { "hostPort": 8000, "containerPort": 8000 } ], "environment": [ { "name": "ANTHROPIC_API_KEY", "value": "your-anthropic-api-key" }, { "name": "AWS_ACCESS_KEY_ID", "value": "your-aws-access-key-id" }, { "name": "AWS_SECRET_ACCESS_KEY", "value": "your-aws-secret-access-key" } ] }, { "name": "frontend", "image": "your-ecr-repo/cloud-pilot-frontend:latest", "essential": true, "memory": 256, "portMappings": [ { "hostPort": 80, "containerPort": 3000 } ], "links": [ "backend" ] } ] }
- Create a new Elastic Beanstalk application and environment
- Upload the Dockerrun.aws.json file
- Create a
The deployment process for other cloud providers (GCP, Azure, etc.) is similar:
- Set up virtual machines or container services
- Install Docker and Docker Compose
- Clone the repository and follow the Docker deployment steps
The following environment variables are required:
Variable | Description |
---|---|
ANTHROPIC_API_KEY |
Your Anthropic API key for Claude AI |
AWS_ACCESS_KEY_ID |
Your AWS access key ID |
AWS_SECRET_ACCESS_KEY |
Your AWS secret access key |
For a better development experience with hot reloading (changes reflect immediately without rebuilding):
# Start development environment with hot reloading
./dev.sh
This uses a special development configuration that:
- Mounts your local frontend code directly into the container
- Uses React's development server instead of Nginx
- Enables hot reloading so changes appear instantly in the browser
- Preserves node_modules in the container (faster builds)
When you're ready to deploy to production:
# Deploy to production
./deploy.sh
This builds optimized production containers with:
- Minified frontend build
- Nginx for serving static files
- Better performance for end users
With development mode:
- Start the environment with
./dev.sh
- Edit any frontend files in the
frontend/src
directory - Changes will automatically appear in the browser
- No need to rebuild or restart containers