<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Boom]]></title>
  <link href="http://tsabat.github.io/atom.xml" rel="self"/>
  <link href="http://tsabat.github.io/"/>
  <updated>2013-05-07T20:42:19-07:00</updated>
  <id>http://tsabat.github.io/</id>
  <author>
    <name><![CDATA[Timothy Sabat]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Installing a RapidSSL SSL cert on an AWS Load Balancer]]></title>
    <link href="http://tsabat.github.io/blog/2013/05/07/installing-a-rapidssl-ssl-cert-on-an-aws-load-balancer/"/>
    <updated>2013-05-07T20:25:00-07:00</updated>
    <id>http://tsabat.github.io/blog/2013/05/07/installing-a-rapidssl-ssl-cert-on-an-aws-load-balancer</id>
    <content type="html"><![CDATA[<p>Over at <a href="http://codepen.io">CodePen</a> it came time to renew our SSL cert.  I dutifully follwed the <a href="https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=content&amp;id=SO21322&amp;actp=search&amp;viewlocale=en_US">setup instructions</a>, but I was greeted with this error:</p>

<blockquote><p>Invalid Public Key Certificate</p></blockquote>

<p>After talking with the support staff at RapidSSL, I was told to reverse the Intermediate CA Bundle.  The example from <a href="https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=content&amp;id=SO21856&amp;actp=search&amp;viewlocale=en_US&amp;searchid=1367983787858">their instructions</a> looks like this:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>-----BEGIN CERTIFICATE----
</span><span class='line'>Primary Intermediate CA
</span><span class='line'>-----END CERTIFICATE-----
</span><span class='line'>-----BEGIN CERTIFICATE-----
</span><span class='line'>Secondary Intermediate CA
</span><span class='line'>-----END CERTIFICATE-----
</span><span class='line'>
</span><span class='line'>Needs to be switched to..
</span><span class='line'>
</span><span class='line'>-----BEGIN CERTIFICATE-----
</span><span class='line'>Secondary Intermediate CA
</span><span class='line'>-----END CERTIFICATE-----
</span><span class='line'>-----BEGIN CERTIFICATE-----
</span><span class='line'>Primary Intermediate CA
</span><span class='line'>-----END CERTIFICATE-----
</span></code></pre></td></tr></table></div></figure>


<p>I&rsquo;m noting this here so in 2016 when we have to renew our SSL Cert, we&rsquo;ll know what to do.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Set Up A Static Host-Only Network For Virtualbox]]></title>
    <link href="http://tsabat.github.io/blog/2012/02/28/set-up-a-static-host-only-network-for-virtualbox/"/>
    <updated>2012-02-28T09:09:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2012/02/28/set-up-a-static-host-only-network-for-virtualbox</id>
    <content type="html"><![CDATA[<h2>Intro</h2>

<p>Setting up a Host-Only Network with Ubuntu Server requires some knowledge of networking.  But why accumulate knowledge when you can simply copy snippets from the internet?</p>

<h2>Set Up Host-Only Networking</h2>

<p>Host-Only Networking is a setting in VirtualBox that allows your host machine to act like a DHCP server for a private network on your machine.  Using this setting, you may loom like a god above the private network you create on your garden of nodes.  Or, you can just test out some new service&hellip; Your choice.</p>

<h3>Enable Host-Only Networking</h3>

<p>Right-click <code>settings</code> on your virtual machine of choice, then click the <code>Network</code> tab.  Choose <code>Adapter 2</code> and then click <code>Enable Network Adapter</code>.  Make sure the <code>Name</code> dropdown says <code>vboxnet1</code>.  If it does not, click <code>VirtualBox</code> from your menu bar, then <code>Preferences</code>, and then the <code>Network</code> tab because we&rsquo;re going to add a new network.  Click the <code>Add host-only network</code> button.  This will create a new Host-Only network with a gateway of <code>33.33.33.1</code>.  We&rsquo;ll set our Ubuntu Server up accordingly.</p>

<h3>Configure Your Ubuntu Box</h3>

<p>Start the box, then issue the following commands:</p>

<pre><code>sudo vi /etc/network/interfaces
</code></pre>

<p>Then, make your interfaces file look like this:</p>

<pre><code># The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
    address 33.33.33.11
    netmask 255.255.255.0
    gateway 33.33.33.1
</code></pre>

<p>Then, reboot your machine.</p>

<pre><code>sudo reboot
</code></pre>

<h3>Verify Your Settings</h3>

<p>We want to make sure that the settings you put in place work.  To do so, issue this command</p>

<pre><code>ifconfig
</code></pre>

<p>And view the resulting settings:</p>

<pre><code>eth0      Link encap:Ethernet  HWaddr 08:00:27:c8:d3:98  
      inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
        ...Truncated for brevity...

eth1      Link encap:Ethernet  HWaddr 08:00:27:0e:e2:c0  
       inet addr:33.33.33.11  Bcast:0.0.0.0  Mask:255.255.255.0
        ...Truncated for brevity...
</code></pre>

<p>If you don&rsquo;t see that, be sure that the Host Only Network you created in the steps above is in the 33.33.33.1 gateway range.</p>

<h3>Reading More</h3>

<p><a href="https://help.ubuntu.com/8.04/serverguide/C/network-configuration.html">Ubuntu Network Configuration</a>
<a href="http://bowerstudios.com/node/722">Accessing Ubuntu Server in a VirtualBox Virtual Machine</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[How to manage your dotfiles with git]]></title>
    <link href="http://tsabat.github.io/blog/2011/12/28/how-to-manage-your-dotfiles-with-git/"/>
    <updated>2011-12-28T21:45:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2011/12/28/how-to-manage-your-dotfiles-with-git</id>
    <content type="html"><![CDATA[<h3>Update</h3>

<p>The blog post below is over-simplified.  You should follow the steps outlined by the <a href="http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/">vimcast</a> guys.</p>

<h3>Objective</h3>

<p>Programs like vim, bash, and zsh all use <code>dotfiles</code> for configuration.  You want to back them up in case of disaster.  Here&rsquo;s how I handle that using a <code>.dotfiles</code> directory and symlinks.</p>

<h3>Where Do My <code>dotfiles</code> Live?</h3>

<p>By default vim, bash, zsh and other programs store <code>dotfiles</code> in your home directory. You can view the dotfiles in your home directory like so:</p>

<pre><code>cd
ls -al
</code></pre>

<h3>Vim As An Example</h3>

<p>In the following steps, you&rsquo;ll learn how to back up your Vim configuration to a directory named <code>.dotfiles</code>.</p>

<p>To get started, create your <code>.dotfiles</code> directory.</p>

<pre><code>cd
mkdir -p .dotfiles/vim
</code></pre>

<p>Note: The <code>-p</code> option tells bash to create the directory recursively, building the entire path if it does not exist.</p>

<p>Now, move your <code>.vim</code> and <code>.vimrc</code> files to your <code>.dotfiles</code> directory.</p>

<pre><code>mv .vimrc .vim .dotfiles/vim
</code></pre>

<p>Finally, <a href="http://www.tech-recipes.com/rx/172/create_a_symbolic_link_in_unix_solaris_linux/">symlink</a> the files and folders you just moved back to their original location.</p>

<pre><code>cd
ln -s .dotfiles/vim/.vimrc .vimrc
ln -s .dotfiles/vim/.vim .vim
</code></pre>

<h3>Back It Up</h3>

<p>Remember to use whatever source control system you like to back up your <code>.dotfiles</code> directory.  I prefer git.</p>

<pre><code>cd ~/.dotfiles
git init
git add .
git commit -a -m 'My first dotfile commit'
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Chef Recipe To Upgrade Virtualbox Additions]]></title>
    <link href="http://tsabat.github.io/blog/2011/12/20/chef-recipe-to-upgrade-virtualbox-additions/"/>
    <updated>2011-12-20T23:01:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2011/12/20/chef-recipe-to-upgrade-virtualbox-additions</id>
    <content type="html"><![CDATA[<p>Every time the guys at VirtualBox update their software, you have to scramble to find resources to upgrade your virtualbox guest additions.  You also get the following annoying message.</p>

<pre><code>[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
</code></pre>

<p>To prevent this from being a hassle, I created this chef recipe to help ease our suffering.</p>

<script src="https://gist.github.com/1505022.js?file=upgrade_guest_additions.rb"></script>


<p>You will probably have to restart your vagrant box for this to work.  I&rsquo;m not 100% sure.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Command-Line Resources]]></title>
    <link href="http://tsabat.github.io/blog/2011/12/19/command-line-resources/"/>
    <updated>2011-12-19T08:07:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2011/12/19/command-line-resources</id>
    <content type="html"><![CDATA[<h3>SSH Tips</h3>

<p>This excellent article entitled <a href="http://shebang.brandonmintern.com/tips-for-remote-unix-work-ssh-screen-and-vnc#">Tips for Remote Unix Work</a> covers some vital SSH goodness.  For example, copying your public ssh key</p>

<pre><code>ssh user@example.com 'mkdir -p .ssh &amp;&amp; cat &gt;&gt; .ssh/authorized_keys' &lt; ~/.ssh/id_rsa.pub
</code></pre>

<p>and piping commands via SSH without logging into the remote machine</p>

<pre><code>cd &amp;&amp; tar czv src | ssh example.com 'tar xz'
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[How to test out a shared vagrant box]]></title>
    <link href="http://tsabat.github.io/blog/2011/12/15/how-to-test-out-a-shared-vagrant-box/"/>
    <updated>2011-12-15T12:17:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2011/12/15/how-to-test-out-a-shared-vagrant-box</id>
    <content type="html"><![CDATA[<h3>Intro</h3>

<p>At some point, someone will offer to share a vagrant box with you.  These are the steps required to get that box working.</p>

<h3>Create a Working Folder</h3>

<p>We&rsquo;ll need a place to house the <code>.box</code> file and a way to start it up, so create the directory and use the vagrant gem&rsquo;s <code>init</code> call, which will make a <code>VagrantFile</code> for you.</p>

<pre><code>mkdir WorkingFolder
cd WorkingFolder
vagrant init
</code></pre>

<h3>Download the <code>.box</code> File</h3>

<p>Put the <code>.box</code> file into your Working Directory.  For this exercise, we&rsquo;ll call it sharedBox.box.</p>

<h3>Add The Box to Vagrant&rsquo;s Box Cache</h3>

<p>The command below will import your .box file.</p>

<pre><code>cd WorkingFolder
vagrant box add shared_box sharedBox.box
</code></pre>

<p>Importing a box file will copy it your <code>~/.vagrant.d/boxes</code> folder.  To prove this, run the <code>ls</code> command.</p>

<pre><code>ls ~/.vagrant.d/boxes
yourshell$ shared_box
</code></pre>

<p>Notice that the <code>shared_box</code> argument to the <code>box add</code> command produces a <code>shared_box</code> file in your <code>~/.vagrant.d/boxes</code> directory.  Now, when dealing with this box in vagrant, you&rsquo;ll refer to it as <code>shared_box</code>.  So, you can safely delete the sharedBox.box file from your Working Directory.</p>

<pre><code>rm sharedBox.box
</code></pre>

<h3>Edit the VagrantFile</h3>

<p>In order start the vagrant box, you&rsquo;ll need to reference it in your <code>VagrantFile</code>.  Using your editor, change</p>

<pre><code>config.vm.box = "base"
</code></pre>

<p>to</p>

<pre><code>config.vm.box = "shared_box"
</code></pre>

<p>Now when you tell vagrant to start, you&rsquo;ll be referring to the <code>shared_box</code>.</p>

<h3>All Done</h3>

<p>With these steps in place, you&rsquo;re ready to start vagrant with the <code>vagrant_up</code> command.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Setting Up A Vagrant Development Environment]]></title>
    <link href="http://tsabat.github.io/blog/2011/12/12/setting-up-a-vagrant-development-environment/"/>
    <updated>2011-12-12T13:59:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2011/12/12/setting-up-a-vagrant-development-environment</id>
    <content type="html"><![CDATA[<h3>Install the Vagrant gem</h3>

<p>You need vagrant installed for this process to work.  Vagrant depends on a version of ruby we&rsquo;ll set up using the <a href="http://beginrescueend.com/">Ruby Version Manager</a>, as shown below.  This can take a while, so be patient.  A quick note for mac developers: RVM installs Ruby from source.  In order to do so, you will need <a href="http://developer.apple.com/xcode/">Xcode</a> installed.  You can try using another gcc, but for one-stop goodness, install Xcode and move along.</p>

<pre><code>bash &lt; &lt;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm" # Load RVM function' &gt;&gt; ~/.bash_profile
source ~/.bash_profile
rvm install 1.9.2
rvm use 1.9.2 --default
</code></pre>

<p>Next install vagrant</p>

<pre><code>gem install vagrant
</code></pre>

<h3>Create A Home Base</h3>

<p>It is likely you&rsquo;ll be creating several vagrant boxes (individual machines) as you move along, so it makes sense to keep them organized in one place.  Let&rsquo;s create that now.</p>

<pre><code>mkdir ~/boxes
</code></pre>

<p>The <code>boxes</code> name given above is just my convention.  You may name that folder anything you like. We&rsquo;ll refer to this as your boxes directory.</p>

<h3>Clone The Opscode Cookbooks</h3>

<p>Opscode has a set of <a href="https://github.com/opscode/cookbooks">cookbooks</a> you&rsquo;ll use when writing chef scripts.  You&rsquo;ll want to pull these down and keep them within reach.</p>

<pre><code>cd ~/boxes
git clone https://github.com/opscode/cookbooks.git
</code></pre>

<p>This will create a directory <code>cookbooks</code> in your base directory containing all of Opscode&rsquo;s great cookbooks.  I suggest deleting the <code>.git</code> folder at the base of this dir and checking your cookbooks into your own source control repo.  As you add write cookbooks of your own, you may save them there.</p>

<h3>Create A Project Directory</h3>

<p>A project directory represents one (or more) VMs associated by a VagrantFile.  You&rsquo;ll learn more about the VagrantFile later in this article.  For now, just know that the VagrantFile acts as the configuration for your Vagrant project.  In the snippet below, we&rsquo;ll create a project directory called ProjectDirectory.  Choose a name that properly describes the box you&rsquo;re building.  For example, <code>WebServer</code> would be a good Project Directory name.</p>

<pre><code>cd ~/boxes/
mkdir ProjectDirectory
cd ProjectDirectory
</code></pre>

<h3>Clone the Chef Repo</h3>

<p>The Chef Repo is the basic structure required by Chef.  Your cookbooks and other important files will be kept here. In the example below, we&rsquo;ll be turning your Project Directory into a Chef Repo.  That&rsquo;s why we add the <code>.</code> at the end of the git clone command.</p>

<pre><code>cd ~/boxes/ProjectDirectory
git clone https://github.com/opscode/chef-repo.git .
</code></pre>

<p>If you run a <code>ls -al</code> command, you&rsquo;ll notice the following directory structure in your Project Directory now:</p>

<pre><code>ls -al
total 32
drwxr-xr-x  13 timsabat  staff   442 Dec 13 12:36 .
drwxr-xr-x   7 timsabat  staff   238 Dec 13 12:36 ..
drwxr-xr-x  13 timsabat  staff   442 Dec 13 12:36 .git
-rw-r--r--   1 timsabat  staff    18 Dec 13 12:36 .gitignore
-rw-r--r--   1 timsabat  staff  3521 Dec 13 12:36 README.md
-rw-r--r--   1 timsabat  staff  2171 Dec 13 12:36 Rakefile
drwxr-xr-x   3 timsabat  staff   102 Dec 13 12:36 certificates
-rw-r--r--   1 timsabat  staff   156 Dec 13 12:36 chefignore
drwxr-xr-x   3 timsabat  staff   102 Dec 13 12:36 config
drwxr-xr-x   3 timsabat  staff   102 Dec 13 12:36 cookbooks
drwxr-xr-x   3 timsabat  staff   102 Dec 13 12:36 data_bags
drwxr-xr-x   3 timsabat  staff   102 Dec 13 12:36 environments
drwxr-xr-x   3 timsabat  staff   102 Dec 13 12:36 roles
</code></pre>

<p>Since we&rsquo;ll be creating our own git repository in this directory, let&rsquo;s delete the one provided by the previous clone command.</p>

<pre><code>cd ~/boxes/ProjectDirectory
sudo rm -r .git .gitignore
</code></pre>

<h3>Initialize your Vagrant environment</h3>

<p>Vagrant depends on a file called VagrantFile for configuration information.  The following command creates that file.</p>

<pre><code>vagrant init
</code></pre>

<p>The <code>ls</code> command will prove the <code>vagrant init</code> call did create your VagrantFile.</p>

<p>Now we&rsquo;ll create a <code>knife.rb</code> file to control how chef&rsquo;s <code>knife</code> command interacts with your project.</p>

<pre><code>cd ~/boxes/ProjectDirectory
mkdir .chef
touch .chef/knife.rb
</code></pre>

<p>What is <code>knife</code> you ask?  Opscode <a href="http://wiki.opscode.com/display/chef/Knife">describes</a> this way:</p>

<blockquote><p>[knife] is used by administrators to interact with the Chef Server API and the local Chef repository. It provides the capability to manipulate nodes, cookbooks, roles, databags, environments, etc., and can also be used to provision cloud resources and to bootstrap systems.</p></blockquote>

<p>The following values should be present in your <code>knife.rb</code> file.</p>

<pre><code>current_dir = File.dirname(__FILE__)
cache_options( :path =&gt; "#{ENV['HOME']}/.chef/checksums" )
cookbook_path            ["#{current_dir}/../cookbooks", "#{current_dir}/../site-cookbooks"]
</code></pre>

<p>The options you&rsquo;ve set here tell chef where to create new cookbooks, and how/where to cache your erb templates.</p>

<h3>Create your <code>vagrant_main</code> cookbook</h3>

<p>In order for vagrant to configure your virtual machine, you must tell it which Chef cookbook to run first.  For convention&rsquo;s sake, we&rsquo;ll call this cookbook <code>vagrant_main</code>. If you were using hosted Chef instead of chef-solo (Vagrant&rsquo;s default mode), the would represent the &lsquo;run list&rsquo;.  If you don&rsquo;t know what that means, no big deal, you don&rsquo;t have to understand hosted chef to run Vagrant.</p>

<p>We&rsquo;ll run the following knife command create your <code>vagrant_main</code> cookbook.</p>

<pre><code>cd ~/boxes/ProjectDirectory
knife cookbook create vagrant_main
</code></pre>

<p>Observe your handiwork :</p>

<pre><code>cd ~/boxes/ProjectDirectory/cookbooks/vagrant_main
ls -al
</code></pre>

<p>and you&rsquo;ll see output which looks like this:</p>

<pre><code>-rw-r--r--   1 timsabat  staff   88 Dec 14 08:56 README.md
drwxr-xr-x   2 timsabat  staff   68 Dec 14 08:56 attributes
drwxr-xr-x   2 timsabat  staff   68 Dec 14 08:56 definitions
drwxr-xr-x   3 timsabat  staff  102 Dec 14 08:56 files
drwxr-xr-x   2 timsabat  staff   68 Dec 14 08:56 libraries
-rw-r--r--   1 timsabat  staff  249 Dec 14 08:56 metadata.rb
drwxr-xr-x   2 timsabat  staff   68 Dec 14 08:56 providers
drwxr-xr-x   3 timsabat  staff  102 Dec 14 08:56 recipes
drwxr-xr-x   2 timsabat  staff   68 Dec 14 08:56 resources
drwxr-xr-x   3 timsabat  staff  102 Dec 14 08:56 templates
</code></pre>

<p>Each directory here has special meaning to Chef. You and read about what each means by checking out the <a href="http://wiki.opscode.com/display/chef/Cookbooks">Opscode cookbook documentation</a>.</p>

<p>Finally, we&rsquo;ll tell the VagrantFile to run Chef against the <code>vagrant_main</code> cookbook we just created.  To do so, open the VagrantFile and change the values</p>

<pre><code># config.vm.provision :chef_solo do |chef|
#   chef.cookbooks_path = "cookbooks"
#   chef.add_recipe "mysql"
#   chef.add_role "web"
#
#   # You may also specify custom JSON attributes:
#   chef.json = { :mysql_password =&gt; "foo" }
# end
</code></pre>

<p>to</p>

<pre><code>config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
    chef.add_recipe "vagrant_main"
end
</code></pre>

<h3>Conclusion</h3>

<p>You&rsquo;ve set up a Vagrant Development Environment.  Now, write a recipe.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Installing Chef Client and Chef Server]]></title>
    <link href="http://tsabat.github.io/blog/2011/12/11/installing-chef-client-and-chef-server/"/>
    <updated>2011-12-11T23:31:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2011/12/11/installing-chef-client-and-chef-server</id>
    <content type="html"><![CDATA[<h3>This guide will get you up and running with chef server and client on the same Windows 2008 Server.</h3>

<p>The instructions outlined herin are a distillaiton of the <a href="http://wiki.opscode.com/display/chef/Fast+Start+Guide+for+Windows#FastStartGuideforWindows-Step1%253ACreateaHostedChefaccount">Chef Fast-Start Guide For Windows</a></p>

<h3>Create a Hosted Chef Account</h3>

<p>The instructions for <a href="http://wiki.opscode.com/display/chef/Fast+Start+Guide+for+Windows#FastStartGuideforWindows-Step1%253ACreateaHostedChefaccount">Creating a Hosted Chef Account</a> are easy to follow.  Do that and return to this guide.</p>

<h3>Install Chef Client and Server</h3>

<p>Run the <a href="http://opscode-full-stack.s3.amazonaws.com/windows/chef-client-0.10.4-6.msi">Chef Full Installer</a> and then verify your install with these commands.</p>

<pre><code>chef-client --version
tar --version
</code></pre>

<p>should produce</p>

<pre><code>Chef: 0.10.4
bsdtar 2.8.3 0 libarchive 2.8.3
</code></pre>

<h3>Install Git</h3>

<p>Follow the instructions listed in the <a href="http://help.github.com/win-set-up-git/">github.com Windows Setup Guide</a>.</p>

<p>Then verify</p>

<pre><code>git --version
</code></pre>

<p>will produce</p>

<pre><code>git version 1.7.6.mmsygit.0
</code></pre>

<p>or whatever the latest git version happens to be.</p>

<h3>Prepare Your File System</h3>

<p>Follow these instructions to set up your base Chef directory.  You&rsquo;ll use this when creating cookbooks.</p>

<pre><code>cd %HOMEPATH%
git clone git://github.com/opscode/chef-repo.git
mkdir %HOMEPATH%\chef-repo\.chef
</code></pre>

<p>Move in your Chef keys you created in the first step of this guide titled Create A Hosted Account.  Edit the snippet below for your system settings:</p>

<pre><code>move %HOMEPATH%\Downloads\knife.rb %HOMEPATH%\chef-repo\.chef
move %HOMEPATH%\Downloads\tsabat.pem %HOMEPATH%\chef-repo\.chef
move %HOMEPATH%\Downloads\fizbuzz-validator.pem %HOMEPATH%\chef-repo\.chef
</code></pre>

<p>Open WordPad to edit your knife.rb file.</p>

<pre><code>Write %HOMEPATH%\chef-repo\.chef\knife.rb, 
</code></pre>

<p>MEPATH%\chef-repo
In that file, change <code>cookbook_path ["#{current_dir}/../cookbooks"]</code> to <code>cookbook_path ["#{ENV['HOME']}/chef-repo/cookbooks"]</code></p>

<h3>Verify Connection To Hosted Chef</h3>

<p>Run the commands</p>

<pre><code>cd %HOMEPATH%\chef-repo
knife client list fizbuzz-validator
</code></pre>

<p><strong>TODO: Explain the validator&rsquo;s role in Chef</strong></p>

<p>and you&rsquo;ll see your machine name listed there.</p>

<h3>Configure The Workstation as Client</h3>

<p>Run these commands</p>

<pre><code>cd %HOMEPATH%\chef-repo
knife configure client %HOMEPATH%\chef-repo
</code></pre>

<p>Then edit your client.rb</p>

<pre><code>Write %HOMEPATH%\chef-repo
</code></pre>

<p>making it look like this, substituting fizbuzz for your own organization.</p>

<pre><code>log_level        :info
log_location     STDOUT
chef_server_url  'https://api.opscode.com/organizations/fizbuzz'
validation_client_name 'fizbuzz-validator'
validation_key cd "#{ENV['HOME']}/chef-repo/.chef/fizbuzz-validator.pem"
client_key "#{ENV['home']}/chef-repo/client.pem 
</code></pre>

<p>Run chef-client to register your client with the server.</p>

<pre><code>chef-client -c %HOMEPATH%\chef-repo\client.rb
</code></pre>

<p>You&rsquo;ll see output which looks like this:</p>

<pre><code>[Mon, 12 Dec 2011 00:48:03 -0800] INFO: *** Chef 0.10.4 ***
[Mon, 12 Dec 2011 00:48:09 -0800] INFO: Client key C:\Users\Administrator/chef-r
epo/client.pem is not present - registering
[Mon, 12 Dec 2011 00:48:14 -0800] INFO: Run List is []
[Mon, 12 Dec 2011 00:48:14 -0800] INFO: Run List expands to []
[Mon, 12 Dec 2011 00:48:14 -0800] INFO: Starting Chef Run for WIN-JLR7H2GM3Q5
[Mon, 12 Dec 2011 00:48:14 -0800] INFO: Loading cookbooks []
[Mon, 12 Dec 2011 00:48:14 -0800] WARN: Node WIN-JLR7H2GM3Q5 has an empty run li
st.
[Mon, 12 Dec 2011 00:48:15 -0800] INFO: Chef Run complete in 1.484375 seconds
[Mon, 12 Dec 2011 00:48:15 -0800] INFO: Running report handlers
[Mon, 12 Dec 2011 00:48:15 -0800] INFO: Report handlers complete
</code></pre>

<p>Verify that your node was added</p>

<pre><code>cd %HOMEPATH%\chef-repo
knife client list
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Vagrant Boxes and veewee]]></title>
    <link href="http://tsabat.github.io/blog/2011/12/08/vagrant-boxes-and-veewee/"/>
    <updated>2011-12-08T22:02:00-08:00</updated>
    <id>http://tsabat.github.io/blog/2011/12/08/vagrant-boxes-and-veewee</id>
    <content type="html"><![CDATA[<h3>11PM Thursday Night</h3>

<p>I&rsquo;ve been trying to get Windows 2008 <a href="vagrantup.com">vagrant</a> box up and running and I&rsquo;ve had little luck.  According to instructions on <a href="http://www.ducea.com/2011/08/15/building-vagrant-boxes-with-veewee/">ducea.com</a>, the creation of a base windows box sould be a breeze using the <a href="https://github.com/jedi4ever/veewee">veewee</a> gem, but the postinstall.sh script placed in the base of the cygwin install had several errors.</p>

<h3>10AM Friday Morning</h3>

<p>It looks like cygwin was sporting an older version.</p>

<p>TODO:</p>

<ol>
<li>Edit the <a href="https://github.com/jedi4ever/veewee/blob/master/templates/windows-2008R2-amd64/postinstall.sh">postinstall.sh</a> file to pull the latest cygwin files.</li>
<li>Also, the ruby installer looks like it wants to pull the 32 bit install.  Is that right?</li>
</ol>

]]></content>
  </entry>
  
</feed>
