Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes for anyone to quickly deploy #1711

Open
marcellodesales opened this issue Jan 2, 2025 · 7 comments
Open

Kubernetes for anyone to quickly deploy #1711

marcellodesales opened this issue Jan 2, 2025 · 7 comments
Labels
enhancement New feature or request

Comments

@marcellodesales
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I'm looking for a team of people interested in deploying multiple Eliza in a Kubernetes cluster

Describe the solution you'd like

Deployment infrastructure using CloudNative. I see we have docker-compose already, so we should be able to build something higher-level.

Describe alternatives you've considered

There's nothing yet

Additional context

After watching Shaw's interview at https://www.youtube.com/watch?v=5GBXS5myXz0, I'm certain we can create something that's quickly deployable for at a large-scale.

@marcellodesales marcellodesales added the enhancement New feature or request label Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Hello @marcellodesales! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!

@flingjie
Copy link

flingjie commented Jan 3, 2025

A simple and efficient approach is to use environment variables in the Dockerfile to load .env and characters configuration files, and then use Kubernetes configuration files to mount different configurations for each Eliza container.


1. Use Environment Variables in the Dockerfile:

Define default environment variables in the Dockerfile using the ENV directive to specify the paths for the .env and characters configuration files.

# Set default configuration file paths
ENV ENV_FILE_PATH=/app/config/.env
ENV CHARACTERS_FILE_PATH=/app/config/characters.json

2. Dynamically Load Configurations in the Application:

Ensure that the application can dynamically load the .env and characters configuration files using the paths specified in the environment variables. This allows the application to adapt to different environments at runtime.


3. Use Different Config in Kubernetes:

Example Kubernetes Configuration:

apiVersion: v1
kind: Pod
metadata:
  name: eliza-instance1
spec:
  containers:
    - name: eliza-container
      image: your-eliza-image
      env:
        - name: ENV_FILE_PATH
          value: "/config/.env1"
        - name: CHARACTERS_FILE_PATH
          value: "/config/charactersXXX.json"
      volumeMounts:
        - name: config-volume
          mountPath: /config
  volumes:
    - name: config-volume
      configMap:
        name: eliza-config-instance1

4. Load Different Configurations for Different Instances:

  • Create separate Config for each Eliza instance, with customized content as needed.
  • Reference the corresponding Config in the Kubernetes configuration file to ensure each instance loads the correct configuration.

@marcellodesales
Copy link
Contributor Author

@flingjie thank you! That's a good start! :) I will play with it a bit this weekend... who knows a multi-agent system to do what I need in a shot...

@AIFlowML
Copy link
Collaborator

AIFlowML commented Jan 3, 2025

Im interested in this because of a plug-in im developing.
https://github.com/fetchai/uAgents this framework do it i think in python.
We can port it into Eliza in no time.

@vanshpatelx
Copy link

@marcellodesales I'm interested, can we connect on discord or slack or any platform, for seamless communication for enhancing this ?

@marcellodesales
Copy link
Contributor Author

@vanshpatelx yeah absolutely... I still need to get through the docs from Eliza as I'm still 2 days old on this since I watched the Shaw's interview...

@AIFlowML I haven't seen the uAgents, but if they can be deployed as containers in an isolated KXS cluster (K8S or even K3S), there are a couple of use cases we can tackle to create a library of agents that are simpler to deploy in an expected and controlled/safer environment...

I'm still going through the docs on my breaks (full-time job + 1-year old baby)... Hope this weekend I will get some time to play with this...

@vanshpatelx
Copy link

@marcellodesales Yeah, I will also go through docs, when you are free. just tell me, we discuss next steps. [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants