Taking the leap into Vagrant, Aegir and easy development

2 minutters læsning

After watching the presentation about Fearless development with drush, Vagrant and Aegir from Montreal by @ergonlogic. I decided that it was time to make my life easier when developing.

Therefore I installed Vagrant- and on one of the VM’s provided by Vagrant, I wanted to install Barracuda as I am using that in production. If you just want an aegir instance, you can use aegir-up. Adding a box and setting up Barracuda was fairly easy:

<pre style="line-height: 1.5; font-size: 14px; font-family: Menlo, Monaco, sans-serif;">
<span class="deep-blue" style="color: rgb(115, 197, 221);">$</span> vagrant box add base http://files.vagrantup.com/lucid32.box
<span class="deep-blue" style="line-height: 1.5; color: rgb(115, 197, 221);">$</span><span style="line-height: 1.5;"> vagrant init
</span><span class="deep-blue" style="line-height: 1.5; color: rgb(115, 197, 221);">$</span><span style="line-height: 1.5;"> vagrant up</span>

That brings me a box. I ssh’ed into the box by:


<span class="deep-blue" style="font-family: Menlo, Monaco, sans-serif; color: rgb(115, 197, 221);">$</span><span style="color: rgb(51, 51, 51); font-family: Menlo, Monaco, sans-serif;"> vagrant ssh</span>

Then I could simply (logged into the box) follow the instructions from this page:


<span class="deep-blue" style="font-family: Menlo, Monaco, sans-serif; color: rgb(115, 197, 221);">$</span><span style="color: rgb(51, 51, 51); font-family: Menlo, Monaco, sans-serif;"> sudo su</span>
<span class="deep-blue" style="font-family: Menlo, Monaco, sans-serif; color: rgb(115, 197, 221);">$</span><span style="color: rgb(51, 51, 51); font-family: Menlo, Monaco, sans-serif;"> </span><span style="color: rgb(0, 0, 0); font-family: Monaco, 'Courier New', monospace; line-height: 16.78333282470703px; white-space: pre; background-color: rgb(248, 248, 248);">wget -q -U iCab http://files.aegir.cc/BOA.sh.txt</span>
<span class="deep-blue" style="font-family: Menlo, Monaco, sans-serif; color: rgb(115, 197, 221);">$</span><span style="color: rgb(51, 51, 51); font-family: Menlo, Monaco, sans-serif;"> </span><span style="background-color: rgb(248, 248, 248); color: rgb(0, 0, 0); font-family: Monaco, 'Courier New', monospace; line-height: 16.78333282470703px; white-space: pre;">bash BOA.sh.txt</span>
<span class="deep-blue" style="font-family: Menlo, Monaco, sans-serif; color: rgb(115, 197, 221);">$</span><span style="color: rgb(51, 51, 51); font-family: Menlo, Monaco, sans-serif;"> </span><span style="background-color: rgb(248, 248, 248); color: rgb(0, 0, 0); font-family: Monaco, 'Courier New', monospace; line-height: 16.78333282470703px; white-space: pre;">boa in-stable local my@email</span>

Make sure that you look for the login information in the terminal output. You need that to be able to see your octopus instances from the browser.

Edit the Vagrantfile

First edit the Vagrantfile and put in an IP. I also edited /etc/hosts and added that IP and had it point to the domains from the login information.

Next step

That is all there is to setting up a Barracuda with an octopus aegir instance on a VM, so I am not fiddling with setup of my main computer. Brilliant and cudos to the developers of both VirtualBox, Vagrant and BOA.

Next is figuring out how to do remote imports from my local barracuda VM, so I can fetch my production server projects locally like @ergonlogic does in his presentation. I tried the instructions on setting it op on Barracuda, but I cannot figure out how to add my LOCAL VM to autorized_hosts, and I guess that is why the local barracuda cannot talk to the production barracuda? I will let you know, if I find out?

Kommentarer

Chris Rowe

When you say “First edit the Vagrantfile and put in an IP” how do you do this and what is the end result. Are you assigning a static IP for a bridged network? Ideally I would have a static ip so my hosts file didn’t need to be changed, but since my setup is on a laptop, I don’t have a consistent network to work with. I have looked into setting up a local dns server but it seems like more work than it might be worth. For now my work network seems to keep giving me the same IP address using DHCP.

Skriv en kommentar

Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret *

Indlæser...