Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

first commit

  • Loading branch information...
commit 0fd1b9febc5b129a93cac346399d558799743818 0 parents
@pferdefleisch authored
18 Vagrantfile
@@ -0,0 +1,18 @@
+Vagrant::Config.run do |config|
+
+ config.vm.box = "base"
+
+ # Assign this VM to a host only network IP, allowing you to access it
+ # via the IP.
+ # config.vm.network "33.33.33.10"
+
+ config.vm.forward_port "http", 80, 8080
+ config.vm.forward_port "ssh", 22, 2222
+
+ config.vm.provision :chef_solo do |chef|
+ chef.cookbooks_path = "cookbooks"
+ chef.add_recipe "pferdefleisch"
+ chef.json = { :user => "aaron" }
+ end
+
+end
BIN  cookbooks/.DS_Store
Binary file not shown
1  cookbooks/pferdefleisch
@@ -0,0 +1 @@
+Subproject commit 59a7050f0100dd12d8d7cb975aa9c677ca3f7593
16 deploy.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Usage: ./deploy.sh [host]
+
+host="${1:-aaron@192.168.2.105}"
+
+# The host key might change when we instantiate a new VM, so
+# we remove (-R) the old host key from known_hosts
+ssh-keygen -R "${host#*@}" 2> /dev/null
+
+tar cj . | ssh -o 'StrictHostKeyChecking no' "$host" '
+sudo rm -rf ~/chef &&
+mkdir ~/chef &&
+cd ~/chef &&
+tar xj &&
+sudo bash install.sh'
19 install.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# This runs as root on the server
+
+chef_binary=/var/lib/gems/1.9.1/bin/chef-solo
+
+# Are we on a vanilla system?
+if ! test -f "$chef_binary"; then
+ export DEBIAN_FRONTEND=noninteractive
+ # Upgrade headlessly (this is only safe-ish on vanilla systems)
+ aptitude update &&
+ apt-get -o Dpkg::Options::="--force-confnew" \
+ --force-yes -fuy dist-upgrade &&
+ # Install Ruby and Chef
+ aptitude install -y ruby1.9.1 ruby1.9.1-dev make &&
+ sudo gem1.9.1 install --no-rdoc --no-ri chef --version 0.10.0
+fi &&
+
+"$chef_binary" -c solo.rb -j solo.json
8 solo.json
@@ -0,0 +1,8 @@
+{
+ "run_list": [
+ "recipe[pferdefleisch]",
+ "recipe[mongodb]",
+ "recipe[mongodb::server]"
+ ],
+ "user": "aaron"
+}
4 solo.rb
@@ -0,0 +1,4 @@
+root = File.absolute_path(File.dirname(__FILE__))
+
+file_cache_path root
+cookbook_path root + '/cookbooks'
Please sign in to comment.
Something went wrong with that request. Please try again.