The-Swarm-Corporation / swarms-cloud

Deploy your autonomous agents to production grade environments with 99% Uptime Guarantee, Infinite Scalability, and self-healing.
https://discord.gg/GYbXvDGevY
MIT License
24 stars 9 forks source link

start of the k8s cluster #69

Closed jmikedupont2 closed 1 month ago

jmikedupont2 commented 1 month ago
jmikedupont2 commented 1 month ago

todo, add https://github.com/nozaq/terraform-aws-remote-state-s3-backend https://github.com/im2nguyen/rover for visualization https://github.com/JamesWoolfenden/pike to determine the least permissions https://github.com/iann0036/iamlive to monitor the used permissions https://github.com/kishaningithub/tf-import-gen to generate imports https://github.com/nozaq/terraform-aws-remote-state-s3-backend for the creation of the s3 bucket

jmikedupont2 commented 1 month ago

Using terraformer to import, then

upgrade the generated state with tofu state replace-provider registry.opentofu.org/-/aws hashicorp/aws

then generate imports with tf-import-gen

jmikedupont2 commented 1 month ago

Apply worked.

jmikedupont2 commented 1 month ago

next I will make sure the service is reachable, also we will want to build the docker image from github actions or aws codebuild, and we also want to slim down the docker image and also add in the health checks

jmikedupont2 commented 1 month ago

@kyegomez now in the pr you have the k8s cluster, the docker compose test, a test routine, a deploy routine, some readme how I built it, and it fails to run the application code just like locally.

jmikedupont2 commented 1 month ago
return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api.py", line 148, in agent_completions
    completions=ChatCompletionResponse(
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 193, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 4 validation errors for ChatCompletionResponse
model
  Field required [type=missing, input_value={'choices': [{'index': 0,...2, completion_tokens=1)}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.8/v/missing
object
  Field required [type=missing, input_value={'choices': [{'index': 0,...2, completion_tokens=1)}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.8/v/missing
choices.0.ChatCompletionResponseChoice.message.role
  Input should be 'assistant' [type=literal_error, input_value='Swarm Agent', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/literal_error
choices.0.ChatCompletionResponseStreamChoice.delta
  Field required [type=missing, input_value={'index': 0, 'message': {...ent': '', 'name': None}}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.8/v/missing