Created
June 27, 2012 20:34
-
-
Save fishnix/3006712 to your computer and use it in GitHub Desktop.
cfengine localDev bootrap with chef solo vagrantfile
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
-- Install vagrant | |
-- Setup box | |
cd ~/tmp/vagrant_projects | |
git clone git://gist.github.com/3006712.git cfe3-vagrant | |
cd cfe3-vagrant | |
-- get local copy of cfe3 masterfiles | |
svn co https://cf3svn.its.yale.edu/repos/cf3dcsunix/trunk cfengine3 | |
-- get a copy of my chef cookbooks | |
git clone git://github.com/fishnix/chef-repo-yu.git -b vagrant-cookbooks | |
-- edit Vagrantfile for your basebox name (if necessary) | |
-- Fire and go | |
vagrant up | |
vagrant ssh | |
sudo su - | |
/var/cfengine/bin/cf-agent -Kvn -D localDev | |
/var/cfengine/bin/cf-agent -Kv -D localDev |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
#config.vm.box = "minimal-centos-62" | |
#config.vm.box_url = "http://leleupi.its.yale.edu:8181/PKG/minimal-centos-62.box" | |
config.vm.box = "rhel63min" | |
config.vm.box_url = "http://leleupi.its.yale.edu:8181/PKG/rhel63min.box" | |
config.vm.customize ["modifyvm", :id, "--memory", "1024"] | |
# Forward a port from the guest to the host, which allows for outside | |
# computers to access the VM, whereas host only networking does not. | |
config.vm.forward_port 22, 2222 | |
# Enable provisioning with chef solo, specifying a cookbooks path (relative | |
# to this Vagrantfile), and adding some recipes and/or roles. | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = "chef-repo-yu/cookbooks" | |
chef.roles_path = "chef-repo-yu/roles" | |
#chef.add_recipe "yum" | |
chef.add_recipe "cfengine::localclient" | |
# You may also specify custom JSON attributes: | |
chef.json.merge!({ | |
:cfengine => { :policy_server => 'vm-cfgprdapp-01.its.yale.edu', | |
:policy_server_ip => '130.132.50.34', | |
:masterfiles => '/var/cfengine/masterfiles', | |
:inputs => '/var/cfengine/inputs', | |
:cfengine_package => "cfengine-community" | |
} | |
}) | |
end | |
config.vm.share_folder "masterfiles","/var/cfengine/masterfiles","./cfengine3/" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment