Environment is an overloaded term. Here at Engine Yard, when we refer to your "environment", we are talking about the group of instances that collectively run an application or set of applications.
An environment includes application instance(s), database instance(s), and possibly one or more utility instances. For more information about instances types, see About instances on Engine Yard Cloud.
Topics:
Architecture
Referencing Environment Instances
For versions of the Engine Yard stack stable-v5.3.0.21 and stable-v4-2.0.117 and above internal hostnames for all instances in the local environment are automatically generated in /etc/hosts
. This can be useful for configurations where you want to remotely access a specific instance through the Elastic IP of the application master (e.g. ssh tunnels) or if you want set a configuration to point to an instance with a specific role (e.g. ey-utility-redis).
Each type of instance has its own unique host name generation pattern:
- Application Master:
ey-app-master
- DB Master:
ey-db-master
- Application Slaves: If there is only a single host it will be mapped to
ey-app-slave
. If there are multiple application slaves they will include an index number (starting at 0) based on the order in which the hosts are listed in the DNA. - Database Slaves: If there is only a single database slave it will be mapped to
ey-db-slave
. If there are multiple database slaves they will have an index number (starting at 0) based on the order in which the hosts are listed in the DNA. If a database slave also has an assigned name (e.g. backup) it will generate a corresponding hostname for that also (e.g. ey-db-slave-backup) resulting in more than one way to reference to a single replica. - Utility Instances: Will generate a name based on the assigned name of the instance using the pattern
ey-utility-#{name}
. If two utility instances share the same name an index number will be appended (starting at 0) based on the order in which the hosts are listed in the DNA.
The hosts entries will automatically be regenerated as part of the chef run for your environment. These occur when you click Apply on the dashboard, as well as when you add and remove instances from your environment.
Example:
#---EY-HOSTS-START
# Application Master
10.203.197.207 ey-app-master
# Application Slaves
10.230.182.98 ey-app-slave-0
10.183.100.16 ey-app-slave-1
# Database Master
10.218.172.125 ey-db-master
# Database Replicas
10.61.218.153 ey-db-slave-brian_wilson
10.61.218.153 ey-db-slave-0
10.13.193.84 ey-db-slave-1
# Utility Instances
10.33.189.48 ey-utility-test2-0
10.181.36.56 ey-utility-test2-1
10.95.177.162 ey-utility-test1
#---EY-HOSTS-END
If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.
Comments
Please sign in to leave a comment.