Skip to main content

Deploy LocalAI and Flowise on AWS EKS

A TypeScript program to deploy a Kubernetes cluster on AWS

This example lives in the pulumi/examples repository. Check out just this directory to use it:

Get started with this example
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examples
git -C pulumi-examples sparse-checkout set aws-ts-localai-flowise
cd pulumi-examples/aws-ts-localai-flowise

This example deploys LocalAI and Flowise on an Amazon EKS cluster using Pulumi in TypeScript.

Prerequisites#

  1. Install Pulumi
  2. Configure AWS credentials
  3. Install Node.js

If you run Pulumi for the first time, you will be asked to log in. Follow the instructions on the screen to login. You may need to create an account first, don’t worry it is free.

Deploying the example#

  1. Create a new stack:

    Terminal window
    pulumi stack init dev
  2. Set the AWS region to deploy into:

    Terminal window
    pulumi config set aws:region eu-central-1
  3. Install dependencies:

    Terminal window
    npm install
  4. Deploy the infrastructure:

    Terminal window
    pulumi up
  5. Port forward the Flowise UI. First, retrieve the kubeconfig file:

    Terminal window
    pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml

    As the program does not deploy a LoadBalancer, you need to port forward the UI to your local machine:

    Terminal window
    kubectl port-forward svc/flowise-ui 3000:3000

Cleaning up#

Once you’re finished, destroy the resources and remove the stack:

Terminal window
pulumi destroy
pulumi stack rm

Related

The infrastructure as code platform for any cloud.