Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently utilize Vagrant and Chef to provision individual linux VMs for different apps.

These apps are domain addressable from host, without requiring anything else set up on the host. This is achieved using avahi on the linux guest. Host then accesses via guest's hostname, such as:

myguest1.local -> VM#1
myguest2.local -> VM#2

I now have another app about to install, which to replicate the production server, should have 2 Apache virtual hosts addressable within the one VM, such as:

myguest3.local    
               -> VM#3
myguest4.local    

Can I also achieve this completely with Vagrant/Chef, without needing any modification to the host machine?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You can announce the alias via the Avahi API with Avahi.EntryGroup.AddRecord: python example.

A detailed solution for using the script is provided on SO

share|improve this answer

It'll certainly work, but you will need to manually set entries for the virtual hosts in your hosts' /etc/hosts file. That should be the only step required on the host machine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.