- install the latest version of VirtualBox from http://virtualbox.org
- install vagrant from the package at http://vagrantup.com (gem install is deprecated)
vagrant gem install vagrant-vbguest
(this will automatically update the VirtualBox Guest Additions on your vagrant boxes)vagrant box add precise64 http://files.vagrantup.com/precise64.box
(~300MB)- If you have trouble downloading the base box with Vagrant just download the box and then add from that path:
wget http://files.vagrantup.com/precise64.box
vagrant add precise64.box
cd ~ && mkdir vagrants && cd vagrants
mkdir <projectname> && cd <projectname>
vagrant init precise64
This file contains hidden or 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
exec{"install-tmux": | |
command => "/usr/bin/yum install -y tmux", | |
creates => "/usr/bin/tmux", | |
} |
This file contains hidden or 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
exec{"install-epel": | |
command => "/bin/rpm -i http://linux.mirrors.es.net/fedora-epel/6/i386/epel-release-6-7.noarch.rpm", | |
creates => "/etc/yum.repos.d/epel.repo", | |
} |
This file contains hidden or 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
[vagrant@localhost ~]$ rvmsudo puppet apply /etc/puppet/site.pp | |
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. | |
err: /Stage[main]//Exec[install-epel]/returns: change from notrun to 0 failed: /bin/rpm -i http://linux.mirrors.es.net/fedora-epel/6/i386/epel-release-6-7.noarch.rpm returned 1 instead of one of [0] at /etc/puppet/site.pp:3 | |
notice: Finished catalog run in 5.49 seconds | |
[vagrant@localhost ~]$ |
This file contains hidden or 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
[vagrant@localhost ~]$ rvmsudo puppet apply /etc/puppet/site.pp | |
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. | |
notice: /Stage[main]//Exec[install-epel]/returns: executed successfully | |
notice: Finished catalog run in 5.52 seconds | |
[vagrant@localhost ~]$ |
This file contains hidden or 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
exec{"install-epel": | |
command => "/bin/rpm -i http://linux.mirrors.es.net/fedora-epel/6/i386/epel-release-6-7.noarch.rpm", | |
} |
This file contains hidden or 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
sudo mkdir /etc/puppet && sudo vim /etc/puppet/site.pp |
This file contains hidden or 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| | |
config.vm.box = "centos-6.3" | |
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-centos-6.3.box" | |
# Execute bootstrap.sh script (from a Gist) to install RVM, Ruby, Puppet, etc. | |
# Read the Gist: https://gist.github.com/3615875 | |
config.vm.provision :shell, :inline => "curl -s -L https://raw.github.com/gist/3615875/bootstrap.sh > ~/bootstrap.sh" |
This file contains hidden or 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
#!/bin/bash | |
# Update our package manager... | |
sudo yum check-update -y | |
# Install dependencies for RVM and Ruby... | |
sudo yum -y install gcc-c++ patch readline readline-devel zlib zlib-devel libxml2-devel libyaml-devel libxslt-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel git | |
# Get and install RVM | |
curl -L https://get.rvm.io | sudo bash -s stable |
This file contains hidden or 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
task :build_version, :except => { :no_release => true } do | |
deploy_date = Time.now.strftime('%F') | |
build_version = "#{deploy_date} #{tag}.build+#{current_revision}" | |
put(build_version,"#{current_release}/BUILD_VERSION") | |
end |