# Infrastructure Deployment

This directory contains the Pulumi infrastructure code for deploying the inference service.

## Prerequisites

1. **Node.js and npm**: Install Node.js 16+ and npm
2. **Pulumi CLI**: Install the [Pulumi CLI](https://www.pulumi.com/docs/get-started/install/)
3. **AWS CLI**: Configure AWS credentials with appropriate permissions
4. **kubectl**: For interacting with EKS clusters

## Quick Start

### Local Development (on dev stack)

1. **Install dependencies:**

   ```bash
   cd deployments
   npm install
   ```

2. **Deploy changes to dev environment:**

   ```bash
   # For local development:
   export PULUMI_ACCESS_TOKEN=...
   export PULUMI_CONFIG_PASSPHRASE=...
   pulumi stack select dev
   pulumi up
   ```

   > [!WARNING]
   > The dev stack is shared by all developers. Be careful not to break the environment for others.

## Configuration

Each environment has its own configuration file:

- **Dev**: `Pulumi.dev.yaml`
- **Staging**: `Pulumi.staging.yaml`
- **Prod**: `Pulumi.prod.yaml`

### Configuration Values

- `s3-bucket`: S3 bucket name for usage data storage
- `domain`: Domain name for the service
- `domain-hosted-zone`: Route53 hosted zone for the Domain name
- `eks-cluster`: EKS cluster name to deploy to
- `k8s-namespace`: Kubernetes namespace to deploy into
