Skip to content

Instantly share code, notes, and snippets.

View englishm's full-sized avatar
🎯
Focusing

Mike English englishm

🎯
Focusing
View GitHub Profile
exec{"install-tmux":
command => "/usr/bin/yum install -y tmux",
creates => "/usr/bin/tmux",
}
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",
}
[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 ~]$
[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 ~]$
exec{"install-epel":
command => "/bin/rpm -i http://linux.mirrors.es.net/fedora-epel/6/i386/epel-release-6-7.noarch.rpm",
}
sudo mkdir /etc/puppet && sudo vim /etc/puppet/site.pp
@englishm
englishm / Vagrantfile
Created September 4, 2012 18:23
Vagrantfile for base CentOS 6.3 + RVM + Ruby + Puppet
# -*- 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"
@englishm
englishm / bootstrap.sh
Created September 4, 2012 02:29 — forked from kuleszaj/bootstrap.sh
Puppet Bootstrap, CentOS
#!/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
@englishm
englishm / deploy.rb
Created August 8, 2012 20:14
cap deploy:build_version
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
@englishm
englishm / gist:3092817
Created July 11, 2012 19:47
Go Go Vagrant
  • 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