- From: "Luis Correa d'Almeida" <
>
- To:
- Subject: [chef] Setting up hosts between multiple boxes on EC2
- Date: Sun, 20 Nov 2011 13:32:49 +0000
Let's say I provision two boxes on EC2: db1 and app1
What's the best way to make each box aware of the other? I need to
tell app1 the IP/host/FQDN of the db1 machine so it can connect to it.
One option is to use hosts in the config files - for example, in the
app1 box the config references a host (db1) that I can set up either
in the hosts file or in the local DNS. But I still wouldn't know the
IP of db1 to populate the hosts file with when running chef. At this
point, I need to change my data-bags once I find out the address of
db1 and then provision app1, running a recipe that adds the right
entry to the hosts file with the newly found db1 IP.
Just wondering if there is a better way.
Thanks,
Luis
- [chef] Setting up hosts between multiple boxes on EC2, Luis Correa d'Almeida, 11/20/2011
Archive powered by MHonArc 2.6.16.