Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.
Joe Hohertz edited this page Apr 30, 2014 · 4 revisions

HOME > BURI ROLE GUIDE > EUREKA

Eureka is a Netflix OSS service providing a service registry for locating services for the purpose of load balancing and failover of middle-tier services.

The role definition uses the method of Configuring EIPs using DNS method of assembling a Eureka cluster. This allows one to easily scale up and down, and have new nodes auto-join the cluster.

  1. Create EIPs for Eureka
  2. Create EIP DNS entries
  3. Configure local/site.yml and build AMI
  4. Create IAM role
  5. Create security group
  6. Launch Eureka Cluster
## Step 1: Create EIPs for Eureka
  1. In the AWS EC2 console left-side menu, under "Network & Security", click "Elastic IPs"
  2. Click "Allocate New Address", pick then environment as appropriate
  3. Repeat for the number of Eureka nodes you wish to provision.
## Step 2: Create EIP DNS entries
  1. Create regional TXT record, pointing to the availability zone records within the region

    txt.us-east-1.eureka.yourdomain.net="us-east-1c.eureka.yourdomain.net" "us-east-1d.eureka.yourdomain.net" "us-east-1e.eureka.yourdomain.net"
    
  2. Create availability zone TXT records, pointing to the EIP hostnames assigned to each zone:

    txt.us-east-1c.eureka.yourdomain.net="ec2-11-11-11-11.compute-1.amazonaws.com" "ec2-22-22-22-22.compute-1.amazonaws.com"
    txt.us-east-1d.eureka.yourdomain.net="ec2-33-33-33-33.compute-1.amazonaws.com"
    txt.us-east-1e.eureka.yourdomain.net="ec2-44-44-44-44.compute-1.amazonaws.com"
    
## Step 3: Configure local/site.yml and build AMI
  1. Edit local/site.yml in your Buri build tree and ensure the following is set as needed:

    eureka_dns_txt_domain: 'eureka.yourdomain.net'
    
  2. Build the AMI for Eureka

    ./resnap.sh <base-pvm-ami-ID> eureka
    
## Step 4: Create IAM role
  1. In the AWS IAM console left-side menu, click "Roles"
  2. Click "Create New Role"
  3. Give it a name. ("Eureka" is suggested)
  4. On the "Select Role Type" screen, click "Select" next to "Amazon EC2"
  5. Click "Custom Policy", then "Select"
  6. Under "Policy Name", give it the same name as in 3rd point of this section.
  7. Under "Policy Document", paste in the file policies/eureka.sample from the Buri distribution
  8. Click "Continue" and then "Create Role" to complete creating the IAM role needed by Buri.
## Step 5: Create security group
  1. In the AWS EC2 console left-side menu, under "Network & Security", click "Security Groups"
  2. Click "Create Security Group"
  3. Give it a name. ("Eureka" is suggested), and a description, pick VPC if applicable.
  4. Add a rule to allow SSH from the source IPs you wish to administrate from
  5. Add a rule to allow HTTP from the source IPs you wish to administrate from
  6. Click "Create"
  7. Make note of the security group ID, and edit the inbound rules for the security group again
  8. Add a rule to allow HTTP from other members of the security group. (IE: place the ID in the source column)
## Step 6: Launch Eureka Cluster

For each availability zone:

  1. Select the Eureka AMI to launch, assign it launch in the zone needed, and ensure it has the IAM role and security group for Eureka applied. If you have N nodes defined for a given region, you can safely launch N instances at the same time.

  2. Give it a few minutes to initialize. You should see in the instances list, that the EIPs allocated in step 1 start being bound to your instance. Once this happens:

  3. Hit the following URL to see status, substituting any of your EIPs for the hostname:

    http://ec2-11-11-11-11.compute-1.amazonaws.com/eureka/jsp/status.jsp
    
Clone this wiki locally