-
Notifications
You must be signed in to change notification settings - Fork 0
Ec2 connection/non static ports #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
5fa5f04
2adedd8
dc5104d
a3b2d09
e65a4cc
4dac63b
df669ba
a2e4dbd
0f65f5d
c51cd50
5fdc3dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| .git | ||
| .omx | ||
| .pytest_cache | ||
| .venv | ||
| .env | ||
| .env.* | ||
| !.env.example | ||
| __pycache__ | ||
| *.pyc | ||
| *.pyo | ||
| *.pyd | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
| ._* | ||
| Thumbs.db | ||
| .DS_Store | ||
| AWSCLIV2.pkg | ||
| docker_container | ||
| grpc_stubs | ||
| stubs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
|
|
||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
Comment on lines
+18
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Disable checkout credential persistence. Set 🧰 Tools🪛 zizmor (1.26.1)[warning] 13-14: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: "Run Ruff: Lint" | ||
| run: uvx ruff check . | ||
|
|
||
| - name: "Run Ruff: Format Check" | ||
| run: uvx ruff format --check . | ||
|
|
||
| - name: "Install dependencies for Ty" | ||
| run: | | ||
| uv venv | ||
| uv pip install -e . | ||
|
|
||
| - name: "Run Ty: Type Check" | ||
| run: uvx ty check | ||
|
|
||
| # If you want to run this locally, install act and run "act pull_request" | ||
| # For fixing Ruff lint errors: uvx ruff check --fix . | ||
| # For fixing Ruff formatting errors: uvx ruff format . | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # EC2 variant of the main example config: | ||
| # - exactly 2 agent instances | ||
| # - generic agent image + bind-mounted project code | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Correct the smoke-config deployment assumption. The EC2 launcher runs 🤖 Prompt for AI Agents |
||
| # - t2.nano for lowest-cost MVP validation | ||
|
|
||
| agents: | ||
| - name: MarketResearchAgent | ||
| replicas: 2 | ||
| redis_port: 6379 | ||
| instance_type: t2.nano | ||
| resources: | ||
| cpu: 1 | ||
| memory: 256 | ||
| entrypoint: agents/market_agent.py | ||
| provider: EC2 | ||
|
|
||
|
|
||
| poll_interval: 5 | ||
|
|
||
| redis: | ||
| host: localhost | ||
| port: 6379 | ||
| db: 0 | ||
|
|
||
| ec2: | ||
| region: us-east-1 | ||
| ami_id: ami-0123456789abcdef0 | ||
| subnet_id: subnet-0123456789abcdef0 | ||
| security_group_ids: | ||
| - sg-0123456789abcdef0 | ||
| ssh_user: ubuntu | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,70 +3,63 @@ | |
|
|
||
| agents: | ||
| - name: FinanceAgent | ||
| # Replicas can be placed on different hosts with explicit host/port. | ||
| # Alternatively, use `replicas: 3` as shorthand to launch 3 instances | ||
| # on the same host with sequential ports starting from `port`. | ||
| replicas: | ||
| - host: localhost | ||
| port: 8051 | ||
| - host: localhost | ||
| port: 8052 | ||
| redis_port: 6379 # Redis port on this node | ||
| # user: sagarwal # SSH user for remote hosts (omit for localhost) | ||
| # Stateful agents get session affinity: all calls within a single | ||
| # request_id are routed to the same instance. | ||
| replicas: 2 | ||
| redis_port: 6379 # Redis port on this node | ||
| stateful: true | ||
| # Resource limits per instance | ||
| resources: | ||
| cpu: 1 # Number of CPU cores | ||
| memory: 512 # Memory in MB | ||
| # Path to the agent entrypoint script | ||
| cpu: 1 | ||
| memory: 512 | ||
| entrypoint: agents/finance_agent.py | ||
| provider: local | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does provider do here ? How will the values change when it's not local ?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In runtime_manager.py, when the instance gets created in ensure_instances(), the logic to create the instance for the agent would be different if the provider was local vs EC2. |
||
|
|
||
| - name: MarketResearchAgent | ||
| host: localhost | ||
| port: 8053 | ||
| redis_port: 6379 | ||
| # user: sagarwal | ||
| replicas: 1 | ||
| redis_port: 6379 | ||
| resources: | ||
| cpu: 1 | ||
| memory: 512 | ||
| entrypoint: agents/market_agent.py | ||
| provider: local | ||
|
|
||
| - name: VllmAgent | ||
| host: localhost | ||
| port: 8054 | ||
| redis_port: 6379 | ||
| replicas: 1 | ||
| redis_port: 6379 | ||
| resources: | ||
| cpu: 2 | ||
| memory: 2048 | ||
| entrypoint: agents/vllm_agent.py | ||
| provider: local | ||
|
|
||
| - name: Workflow | ||
| host: localhost | ||
| port: 8050 # LC gRPC port (exposed to host) | ||
| replicas: 1 | ||
| type: workflow | ||
| api_port: 8080 # Flask REST API port (exposed to host) | ||
| redis_port: 6379 | ||
| replicas: 1 | ||
| workflow_file: workflows/example_workflow.py | ||
| provider: local | ||
|
|
||
| # Polling interval in seconds | ||
| poll_interval: 5 | ||
|
|
||
| # Redis connection | ||
| redis: | ||
| host: localhost | ||
| port: 6379 | ||
| db: 0 | ||
|
|
||
| # Docker image registry (optional). | ||
| # If set, `ventis deploy` will push images to this registry locally and | ||
| # pull them on remote nodes before starting containers. | ||
| # If omitted, images are shipped to remote nodes via `docker save | ssh ... docker load`. | ||
| # EC2 defaults for `provider: EC2` replicas. | ||
| # Security group must allow inbound TCP 22, 50051, and 6379 from the | ||
| # global controller host's source IP. | ||
| # | ||
| # ec2: | ||
| # region: us-east-1 | ||
| # ami_id: ami-0123456789abcdef0 | ||
| # subnet_id: subnet-0123456789abcdef0 | ||
| # security_group_ids: | ||
| # - sg-0123456789abcdef0 | ||
| # ssh_user: ubuntu | ||
|
|
||
|
|
||
| # Docker image registry (legacy; no longer used). | ||
| # Remote nodes are expected to already have the image before `ventis deploy`. | ||
| # | ||
| # registry: | ||
| # url: myregistry.example.com:5000 # Registry host:port | ||
| # user: sagarwal # (optional) SSH user used when pulling on remote nodes | ||
| # url: myregistry.example.com:5000 | ||
| # user: sagarwal | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| boto3 | ||
| grpcio | ||
| grpcio-tools | ||
| redis | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.