-
Notifications
You must be signed in to change notification settings - Fork 0
Eureka
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.
- Create EIPs for Eureka
- Create EIP DNS entries
- Configure local/site.yml and build AMI
- Create IAM role
- Create security group
- Launch Eureka Cluster
- In the AWS EC2 console left-side menu, under "Network & Security", click "Elastic IPs"
- Click "Allocate New Address", pick then environment as appropriate
- Repeat for the number of Eureka nodes you wish to provision.
-
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"
-
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"
-
Edit local/site.yml in your Buri build tree and ensure the following is set as needed:
eureka_dns_txt_domain: 'eureka.yourdomain.net'
-
Build the AMI for Eureka
./resnap.sh <base-pvm-ami-ID> eureka
- In the AWS IAM console left-side menu, click "Roles"
- Click "Create New Role"
- Give it a name. ("Eureka" is suggested)
- On the "Select Role Type" screen, click "Select" next to "Amazon EC2"
- Click "Custom Policy", then "Select"
- Under "Policy Name", give it the same name as in 3rd point of this section.
- Under "Policy Document", paste in the file policies/eureka.sample from the Buri distribution
- Click "Continue" and then "Create Role" to complete creating the IAM role needed by Eureka.
- In the AWS EC2 console left-side menu, under "Network & Security", click "Security Groups"
- Click "Create Security Group"
- Give it a name. ("Eureka" is suggested), and a description, pick VPC if applicable.
- Add a rule to allow SSH from the source IPs you wish to administrate from
- Add a rule to allow HTTP from the source IPs you wish to administrate from
- Click "Create"
- Make note of the security group ID, and edit the inbound rules for the security group again
- Add a rule to allow HTTP from other members of the security group. (IE: place the ID in the source column)
For each availability zone:
-
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.
-
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:
-
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