-
Notifications
You must be signed in to change notification settings - Fork 0
Ec2 connection/non static ports #7
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
Changes from all commits
fe41fae
0c82743
45597dc
6522624
efe72ea
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 |
|---|---|---|
| @@ -1,19 +1,48 @@ | ||
| What you need to run agents on EC2. | ||
|
|
||
| - AMI with Docker installed. | ||
| - Used Ubuntu base image | ||
| - Python/pip too, but only needed for the global controller | ||
| -Security group allowing port 50051, 6379, 8080, and 22 communication within the security group | ||
| -Passwordless ssh set up. | ||
| For local controller | ||
| - AMI with the following installed: | ||
| - Docker | ||
| - Public key in authorizedkeys in ~/.ssh | ||
|
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. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use the correct SSH authorized-keys filename. Line 6 says 🧰 Tools🪛 LanguageTool[grammar] ~6-~6: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| For global controller | ||
| - Instance with all of the following installed: | ||
| - Both things in local controller | ||
| - Python 3.10+ | ||
| - Ventis folder | ||
| - pip requirements installed in env | ||
| - pip install -e . --break-system-packages | ||
| - Private key labeled as ventis_ec2 inside ~/.ssh | ||
| - Private key complementing local public key | ||
|
|
||
|
|
||
| For convenience, you can use the global controller as the | ||
| AMI for local to save some time | ||
|
|
||
| AWS Specific Permissions | ||
| - IAM Role to attach to global controller instance allowing | ||
| - ec2:RunInstance,TerminateInstance,DescribeInstances,CreateTags | ||
|
Comment on lines
+23
to
+24
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 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== README excerpt ==\n'
sed -n '18,30p' ventis/controller/cloud_provider_logic/EC2/README.md
printf '\n== Search for related EC2 IAM actions in repo ==\n'
rg -n "RunInstance|RunInstances|TerminateInstance|TerminateInstances|DescribeInstances|CreateTags" ventis/controller/cloud_provider_logic/EC2 -S || trueRepository: CanyonCodeCoreAI/canyoncodecore Length of output: 821 🌐 Web query:
💡 Result: In AWS IAM policies, ec2:RunInstances and ec2:TerminateInstances are specific actions used to control the ability to launch and terminate Amazon EC2 instances, respectively [1]. Both actions support resource-level permissions, allowing you to restrict access to specific EC2 instances by specifying their Amazon Resource Name (ARN) in the Resource element of your IAM policy [1][2]. Key details for using these actions in policies: 1. Service Prefix and Format: These actions use the ec2 service prefix [3]. In a JSON policy document, they are specified as ec2:RunInstances and ec2:TerminateInstances [1][4]. 2. Resource-Level Permissions: You can grant access to all instances using a wildcard ("*") or restrict access to specific instances or groups of instances by providing their specific ARNs [1]. For example, a resource ARN for an instance is typically structured as arn:aws:ec2:region:account-id:instance/instance-id [1]. 3. Security Best Practices: Because RunInstances can be used to create resources with broad permissions, it is common to use conditions, such as ec2:ResourceTag or aws:RequestTag, to ensure that only authorized tags are applied during instance creation or to restrict actions to instances that have specific tags [5]. For the most comprehensive and up-to-date list of all EC2 actions, resource types, and condition keys, refer to the official AWS Service Authorization Reference documentation for Amazon EC2 [3][2]. Citations:
Correct the EC2 IAM action names. Use 🤖 Prompt for AI AgentsSource: MCP tools |
||
| - SSH permissions for entering global controller | ||
| - Security group allowing port 50051, 6379, and 22 TCP communication within security group | ||
| - Also need the port your workflow API's are open to be allowed | ||
|
|
||
|
|
||
| Steps: | ||
|
|
||
| 1. SSH into EC2 machine and clone this repo in | ||
| 1. SSH into EC2 Global Controller Instance | ||
|
|
||
| 2. Create your app | ||
|
|
||
| 3. Change the agents/configs/workflow folders to suit your needs | ||
|
|
||
| 4. Run ventis build + ventis deploy | ||
|
|
||
| For cleanup, use ventis clean to clean stubs/containers | ||
|
|
||
| If encountering permission errors with the keys, run this to give key more permissions if blocked | ||
| chmod 700 ~/.ssh | ||
| chmod 600 ~/.ssh/ventis_ec2 | ||
|
|
||
| 2. Install and activate venv | ||
|
|
||
| 3. Create the app, or navigate to ventis/templates | ||
|
|
||
| 4. Change the global_controller.yaml configs to suit your setup | ||
|
|
||
| 5. Run ventis build + ventis deploy | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use descriptive link text.
Replace “here” with text identifying the resource, such as “Red Hat’s SSH key-based access guide,” so the link remains understandable in screen-reader and link-list views.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 78-78: Link text should be descriptive
(MD059, descriptive-link-text)
🤖 Prompt for AI Agents
Source: Linters/SAST tools