Created
November 29, 2012 13:20
-
-
Save lsolesen/4169013 to your computer and use it in GitHub Desktop.
Chef recipe for installing BOA with vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chef::Log.debug("Running barracuda recipe") | |
remote_file "/tmp/BOA.sh" do | |
source "http://files.aegir.cc/BOA.sh.txt" | |
mode 00755 | |
end | |
execute "/tmp/BOA.sh" do | |
creates "/usr/local/bin/boa" | |
end | |
execute "Run the BOA Installer o1" do | |
command "boa in-stable local [email protected] aegir.local o1 mini" | |
end | |
execute "Run the BOA Installer o2" do | |
command "boa in-stable local [email protected] aegir.local o2 mini" | |
end | |
execute "Run the BOA Installer o3" do | |
command "boa in-stable local [email protected] aegir.local o3 mini" | |
end | |
(1..3).each do |boa_user| | |
user "o#{boa_user}" do | |
supports :manage_home => true | |
home "/data/disk/o#{boa_user}" | |
shell "/bin/bash" | |
end | |
directory "/data/disk/o#{boa_user}/.ssh" do | |
owner "o#{boa_user}" | |
group "users" | |
mode 00700 | |
recursive true | |
end | |
execute "Add ssh key to user" do | |
command "ssh-keygen -b 4096 -t rsa -N \"\" -f /data/disk/o#{boa_user}/.ssh/id_rsa" | |
creates "/data/disk/o#{boa_user}/.ssh/id_rsa" | |
end | |
directory "/data/disk/o#{boa_user}/static" do | |
owner "o#{boa_user}" | |
group "users" | |
mode 00755 | |
recursive true | |
end | |
end | |
# Rebuild VirtualBox Guest Additions | |
# http://vagrantup.com/v1/docs/troubleshooting.html | |
execute "Rebuild VirtualBox Guest Additions" do | |
command "sudo /etc/init.d/vboxadd setup" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment