Giter Club home page Giter Club logo

Comments (3)

babatundebusari avatar babatundebusari commented on August 27, 2024

I think this is an issue with internal ELB

- name: launch visualizer load balancer
  ec2_elb_lb:
    name: "{{ vpc }}-{{ region }}-{{ env }}-a"
    scheme: internal
    state: present
    subnets: "{{ subnets | join(',') }}"
    security_group_ids: "{{ security_groups }}"
    connection_draining_timeout: 60
    cross_az_load_balancing: yes
    listeners:
      - protocol: https
        load_balancer_port: 443
        instance_port: 9999
        ssl_certificate_id: "{{ elb_acm_certificate }}"
    health_check:
        ping_protocol: http
        ping_port: 9009
        ping_path: "/status"
        response_timeout: 5
        interval: 30
        unhealthy_threshold: 2
        healthy_threshold: 10

- name: launch microservice load balancer
  ec2_elb_lb:
    name: "{{ vpc }}-{{ region }}-{{ env }}-bi"
    scheme: internal
    state: present
    subnets: "{{ subnets | join(',') }}"
    security_group_ids: "{{ security_groups }}"
    connection_draining_timeout: 60
    cross_az_load_balancing: yes
    listeners:
      - protocol: https
        load_balancer_port: 443
        instance_port: 9000
        ssl_certificate_id: "{{ elb_acm_certificate }}"
    health_check:
        ping_protocol: http
        ping_port: 9009
        ping_path: "/status"
        response_timeout: 5
        interval: 30
        unhealthy_threshold: 2
        healthy_threshold: 10
- name: create conductr-haproxy Autoscaling Group
  ec2_asg:
    name: "{{ cluster_name }}"
    availability_zones: "{{ availability_zones }}"
    load_balancers: '{{ vpc }}-{{ region }}-{{ env }}-a, {{ vpc }}-{{ region }}-{{ env }}-b'
    launch_config_name: "{{ lc_name }}"
    min_size: "{{ asg_min_size }}"
    max_size: "{{ asg_max_size }}"
    desired_capacity: "{{ asg_desired_size }}"
    vpc_zone_identifier: "{{ subnets }}"
    tags: "{{ tags }}"
    state: present

ERROR

"msg": "Failed to create Autoscaling Group: BotoServerError: 400 Bad Request\n<ErrorResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2011-01-01/\">\n <Error>\n <Type>Sender</Type>\n <Code>ValidationError</Code>\n <Message>Provided Load Balancers may not be valid. Please ensure they exist and try again.</Message>\n </Error>\n <RequestId>bc6fc38e-8dfe-11e7-bbae-d56fd34454</RequestId>\n</ErrorResponse>\n"

So since am using internal ELB, is there anything else i need to do?

from autoscaling-blog.

nsharma070980 avatar nsharma070980 commented on August 27, 2024

If you are using an ELB, try attaching the Target-Group associated with the ELB, using "target_group_arns" tag

  • name: 'Create Liferay ASG'
    ec2_asg:
    name: "test-{{env}}-ASG"
    target_group_arns: "arn:aws:elasticloadbalancing:us-east-1:395015784255:targetgroup/test-priv-tg/48bc582585fe9ee3"
    launch_config_name: "test-{{env}}-launchConfig"
    min_size: 0
    max_size: 3
    desired_capacity: 0
    termination_policies: "OldestInstance"
    vpc_zone_identifier: [ "subnet_priv_0}}", "{{subnet_priv_1}}", "{{subnet_priv_2}}" ]
    replace_all_instances: yes
    tags:
    - environment: "dev"
    propagate_at_launch: no
    register: asg_details
  • debug: var=asg_details

from autoscaling-blog.

matrinox avatar matrinox commented on August 27, 2024

@nsharma070980 I thought with classic load balancers you have to use LoadBalancerNames key: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-loadbalancernames

from autoscaling-blog.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.