KBEC-00395 - How to setup an Amazon ELB for Clustered HA Setup

Article ID:360032824672
2 minute readKnowledge base

Summary

When you are setting up a Clustered Environment, you will require a Load Balancer. While we provide an example of setting up HAProxy to act as a load balancer, you can also use Amazon’s ELB.

To set up an Amazon ELB for an CloudBees CD (CloudBees Flow) Cluster, please follow these steps:

  • Go to Load Balancers within Amazon EC2

  • Select 'Create a Load Balancer'

  • Select 'Classic Load Balancer'

  • Fill in a Load Balancer 'Name'

  • Select the VPC your Instances are residing in

  • Remove Port 80 Listener

  • Add 3 Listeners with Load Balancer Protocol and Instance Protocol as 'TCP'. These Ports will be based on Port usage

    • Port 8000 -> Port 8000

    • Port 8443 -> Port 8443

    • Port 61613 -> Port 61613

  • Assign or create any required Security Groups that have the necessary ports open based on the KB Article above and the Ports Opened in the previous step

  • Configure the Health Check as follows:

    • Ping Protocol 'HTTP'

    • Ping Port '8000'

    • Ping Path '/commanderRequest/health'

    • For a more responsive Health Check, please Reduce the Interval and Healthy Threshold that suits your configuration

  • Add the EC2 Instances that contain the CloudBees CD (CloudBees Flow) Servers

  • Add any Tags such as 'Name' to your ELB

  • Review and Create

After you have created the ELB. It will take time to spin up and perform the initial health checks. Therefore, in the Instances subtab of the ELB, you might see your instances having the status of 'OutofService' for a few moments. Please refresh to ensure that your servers are properly being contacted by the ELB’s Health checks.

The ELB will also generate a 'DNS Name' which can be found in the Description subtab of the ELB. This name is necessary to use within the configuration of CloudBees CD (CloudBees Flow) nodes.