Commit 1d3d0b47
Changed files (3)
script/bootstrap-vagrant-user.sh
@@ -0,0 +1,12 @@
+git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
+echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
+echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
+source ~/.bash_profile
+git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
+git clone https://github.com/tpope/rbenv-ctags.git ~/.rbenv/plugins/rbenv-ctags
+git clone https://github.com/rkh/rbenv-update.git ~/plugins/rbenv-update
+git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
+rbenv install 2.1.4
+gem install bundler
+cd /vagrant
+bundle install
script/bootstrap.sh
@@ -1,15 +1,11 @@
#!/usr/bin/env bash
-
apt-get update -y
apt-get upgrade -y
apt-get -y install curl git-core python-software-properties imagemagick libmagickwand-dev memcached
apt-get -y install build-essential
apt-get -y install tklib
-# Extras for RubyGems and Rails:
apt-get -y install zlib1g-dev libssl-dev
-# Readline Dev on Ubuntu 12.04 LTS:
apt-get -y install libreadline-gplv2-dev
-# Install some nokogiri dependencies:
apt-get -y install libxml2 libxml2-dev libxslt1-dev
apt-get -y install gawk libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
apt-get -y autoremove
@@ -23,18 +19,8 @@ add-apt-repository -y ppa:chris-lea/node.js
apt-get -y update
apt-get -y install nodejs
apt-get -y install build-essential
-# Packages required for compilation of some stdlib modules
apt-get -y install tklib
-# Extras for RubyGems and Rails:
apt-get -y install zlib1g-dev libssl-dev
-# Readline Dev on Ubuntu 12.04 LTS:
apt-get -y install libreadline-gplv2-dev
-# Install some nokogiri dependencies:
apt-get -y install libxml2 libxml2-dev libxslt1-dev
-
-git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
-echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
-echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
-source ~/.bash_profile
-git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
-rbenv install 2.1.3
+su -c "source /vagrant/script/bootstrap-vagrant-user.sh" vagrant
Vagrantfile
@@ -42,42 +42,4 @@ Vagrant.configure("2") do |config|
vm.gui = false
vm.vmx["displayname"] = "cakeside"
end
-
- # Enable provisioning with chef solo, specifying a cookbooks path, roles
- # path, and data_bags path (all relative to this Vagrantfile), and adding
- # some recipes and/or roles.
- #
- # config.vm.provision :chef_solo do |chef|
- # chef.cookbooks_path = "../my-recipes/cookbooks"
- # chef.roles_path = "../my-recipes/roles"
- # chef.data_bags_path = "../my-recipes/data_bags"
- # chef.add_recipe "mysql"
- # chef.add_role "web"
- #
- # # You may also specify custom JSON attributes:
- # chef.json = { :mysql_password => "foo" }
- # end
-
- # Enable provisioning with chef server, specifying the chef server URL,
- # and the path to the validation key (relative to this Vagrantfile).
- #
- # The Opscode Platform uses HTTPS. Substitute your organization for
- # ORGNAME in the URL and validation key.
- #
- # If you have your own Chef Server, use the appropriate URL, which may be
- # HTTP instead of HTTPS depending on your configuration. Also change the
- # validation key to validation.pem.
- #
- # config.vm.provision :chef_client do |chef|
- # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
- # chef.validation_key_path = "ORGNAME-validator.pem"
- # end
- #
- # If you're using the Opscode platform, your validator client is
- # ORGNAME-validator, replacing ORGNAME with your organization name.
- #
- # If you have your own Chef Server, the default validation client name is
- # chef-validator, unless you changed the configuration.
- #
- # chef.validation_client_name = "ORGNAME-validator"
end