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

update ecs ec2 CF to support code executor #229

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

avimoondra
Copy link
Contributor

@avimoondra avimoondra commented Jan 24, 2025

update ecs ec2 CF to support code executor

image

Create ECS Ec2 cluster in VPC, capacity provider specs:

  • New ASG
  • On-demand
  • Amazon Linux 2
  • 0-3, c4.2xlarge (8vCPU, 15 GiB memory)
  • Private subnets only.
  • SG default all traffic inbound/outbound

@avimoondra avimoondra force-pushed the avimoondra/update-ecs-ec2-cf-with-ce branch from ff6afab to 6957890 Compare January 24, 2025 19:52
@@ -377,7 +430,7 @@ Resources:
AllocatedStorage: "80"
DBInstanceClass: "db.m5.large"
Engine: postgres
EngineVersion: "13.11"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Template does not work as is

Cannot find version 13.11 for postgres (Service: Rds, Status Code: 400, Request ID: c2a95d82-78f1-46b6-9473-148f47f5f0ad)

@@ -846,8 +931,6 @@ Resources:
Value: temporal.retoolsvc:7233
- Name: ECS_DEPLOYED
Value: "true"
- Name: WORKFLOW_BACKEND_HOST
Value: http://workflows-backend.retoolsvc:3000
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

irrelevant to set in temporal services

@avimoondra avimoondra marked this pull request as ready for review January 24, 2025 19:54
Copy link
Contributor

@roberto-retool roberto-retool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments, otherwise LGTM!

cloudformation/retool-workflows.ec2.yaml Outdated Show resolved Hide resolved
ImageCodeExecutor:
Type: String
Description: Image to use in the Code Executor Service
Default: tryretool/code-executor-service:3.114.7-stable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think of something like the below? would make version mismatches much less likely, but also one-off images from other repos become a bit harder to use.

    Type: String
    Description: Retool version tag
    Default: 3.114.7-stable

  ContainerImage: !Sub tryretool/backend:${Version}
  CodeExecutorImage: !Sub tryretool/code-executor-service:${Version}

Copy link
Contributor Author

@avimoondra avimoondra Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I like this a lot. Tbh I feel like one offs are less common these days (probably for the better)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are getting to a one off we might be pretty hands on anyways. The workaround I guess is they'd have to update the template alongside the one off.

@@ -492,7 +545,7 @@ Resources:
MinimumHealthyPercent: !Ref 'MinimumHealthyPercent'
TaskDefinition: !Ref 'RetoolWorkflowsWorkerTask'

RetoolWorkkflowsBackendECSService:
RetoolWorkflowsBackendECSService:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing typo. not too familiar with AWS CF change management and ordering of operations, but this may lead to some downtime if the old service is torn down before the new one is brought up?

Copy link
Contributor Author

@avimoondra avimoondra Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Between this and the RDS change, I feel like it's still worth it for all new customers using the template at least (more polish).

For most resources, changing the logical name of a resource is equivalent to deleting that resource and replacing it with a new one. Any other resources that depend on the renamed resource also need to be updated and might cause them to be replaced. Other resources require you to update a property (not just the logical name) in order to initiate an update.

image

(as expected)

@avimoondra avimoondra merged commit a4e374a into master Jan 27, 2025
@avimoondra avimoondra deleted the avimoondra/update-ecs-ec2-cf-with-ce branch January 27, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants