-
Notifications
You must be signed in to change notification settings - Fork 18
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
[FR] Use/lookup for load balancer #746
Comments
hello @zahornyak |
@JohnPreston you're right. But how to use that? When I use it like that:
it does not work I have errors like that: |
So, the error here is just telling you that the Lookup format is incorrect. x-elbv2:
Lookup:
loadbalancer:
Tags:
Name: test-balancer Should work, on top of my head |
didnt work. |
@zahornyak what version of compose-x are you using? Latest is 1.0.1, latest nightly is 1.1.0rc1 x-elbv2:
my-lb-to-lookup-logical-name:
Lookup:
loadbalancer:
Tags:
Name: test-balancer |
Update: |
So is it working now? Do you mind if I tag you to review the docs when I open the PR for it? |
yeah, I missed that part, but now I've added everything and it works as well. Thank you |
sure) Thanks |
@JohnPreston I have an additional question regarding load balancer listener rules. As I can see, I can lookup for the listeners but can I lookup for listeners and create listener rules in that listener? x-elbv2:
lb:
Lookup:
loadbalancer:
Tags:
Name: test-deleteme
Listeners:
1:
Tags:
Name: test-deleteme
Targets:
- name: all-gateways
access: test.com
TargetGroups:
all-gateways:
Port: 80
Protocol: TCP
HealthCheck:
HealthCheckIntervalSeconds: 17
HealthCheckProtocol: TCP
HealthCheckTimeoutSeconds: 10
HealthyThresholdCount: 2
UnhealthyThresholdCount: 2
TargetGroupAttributes:
deregistration_delay.timeout_seconds: "30"
Services:
- Name: web:web
Port: 80 But it does not create any listener rules with a connected target group there. |
Okay, interesting. x-elbv2:
my-lb:
DnsAliases:
- Names:
- my-domain.tld
Route53Zone: x-route53::PublicZone
Lookup:
loadbalancer:
Tags:
servicename: some-service-name
project: project-name
Name: lb-name
Listeners:
443:
Tags:
Name: https-listener
Port: "443"
Protocol: HTTPS
Targets:
- name: family:service:8080
Conditions:
- Field: host-header
HostHeaderConfig:
Values:
- my-domain.tld
Services:
family:service:8080:
port: 8080
protocol: HTTP
healthcheck: 8080:HTTP:7:2:15:5:/swagger-ui.html:401 This is an actual working example that I use and works great. |
Thanks for the example How did you get Also, I have an error Here's my config: version: "3.8"
x-cluster:
Properties:
CapacityProviders:
- FARGATE
ClusterName: Test-cluster
x-vpc:
Lookup:
VpcId:
Tags:
- Name: default
AppSubnets: {}
PublicSubnets:
Tags:
- name: public
PrivateSubnets: {}
StorageSubnets: {}
x-elbv2:
lb:
Lookup:
loadbalancer:
Tags:
Name: test-deleteme
Listeners:
1:
Tags:
Name: test-deleteme
Targets:
- name: web:api
Conditions:
- Field: host-header
HostHeaderConfig:
Values:
- my-domain.tld
Services:
web:api:
port: 80
protocol: HTTP
healthcheck: 80:HTTP:7:2:15:5:/:401
services:
api:
image: nginx
ports:
- "80:80"
networks:
- public
deploy:
labels:
ecs.task.family: web
networks:
public:
x-vpc: PublicSubnets Did I miss something? |
@JohnPreston As far as I can see, error Targets:
- name: web:api
Conditions:
- Field: host-header
HostHeaderConfig:
Values:
- my-domain.tld And I have no idea why it doesn't work. And still interested in how |
My example with family:service:8080 was due to my service having I presume you removed the Listeners:
1: {} I presume that you set For the TypeError, I imagine there is a stacktrace with that? Would you mind sharing it? |
yes, that was an example, I'm using 80 there. I have an error |
@JohnPreston BTW, how to change the launch type? I do not see any docs about that |
https://docs.compose-x.io/syntax/compose_x/ecs.details/deploy.html#ecs-compute-platform |
And this is version 1.0.1, right? |
yes, 1.0.1 |
Hey @zahornyak cd ecs_composex; git fetch; git checkout fix/elbv2-listener-tidy-function;
python3 -m venv compose_x
source compose_x/bin/activate
pip install . Then run the command again. Running a LB 24/7 for no reason costs $ so I haven't gotten to implement lookup testing for it yet. |
@JohnPreston Sorry, already deployed everything and can't test again. I've created lb instead of lookup on existing, that works for us for now, thanks for your help! BTW, your tool is great and has no great analogs at all |
@zahornyak I have a setup similar to yours, how do you handle updates? For example you added a new service or target group. An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack [microservices] already exists and cannot be created again with the changeSet [microserviceshmrszypibv]. |
Is your feature request related to a problem? Please describe.
Currently, I want to use existing load balancer for my preset, but I cannot do that or there are no docs that I can do that
Describe the solution you'd like
I would like to have possibility to use use/lookup for x-elbv2
Describe alternatives you've considered
didnt find any
The text was updated successfully, but these errors were encountered: