<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Blog::Quibb &#187; Uncategorized</title> <atom:link href="http://blog.quibb.org/category/uncategorized/feed/" rel="self" type="application/rss+xml" /><link>http://blog.quibb.org</link> <description>Software development and more.</description> <lastBuildDate>Mon, 21 Nov 2011 05:12:26 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Nightly Benchmarks: Tracking Results with Codespeed</title><link>http://blog.quibb.org/2010/07/nightly-benchmarks-tracking-results-with-codespeed/</link> <comments>http://blog.quibb.org/2010/07/nightly-benchmarks-tracking-results-with-codespeed/#comments</comments> <pubDate>Mon, 19 Jul 2010 14:16:54 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[benchmarks]]></category> <category><![CDATA[continuous integration]]></category> <category><![CDATA[jruby]]></category><guid isPermaLink="false">http://blog.quibb.org/?p=204</guid> <description><![CDATA[Background Codespeed is a project for tracking performance. I discovered it when the PyPy project started using Codespeed to track performance. Since then development has been done to make its setup easier and provide more display options. Anyway, two posts ago I talked about running nightly benchmarks with Hudson. Then in the previous post I [...]]]></description> <content:encoded><![CDATA[<h2>Background</h2><p><a title="Codespeed" href="http://github.com/tobami/codespeed">Codespeed</a> is a project for tracking performance.  I discovered it when the <a title="PyPy" href="http://pypy.org/">PyPy</a> project started using Codespeed to track performance.  Since then development has been done to make its setup easier and provide more display options.</p><p>Anyway, two posts ago I talked about <a title="running nightly benchmarks with Hudson" href="http://blog.quibb.org/2010/04/nightly-benchmarks-setting-up-hudson/">running nightly benchmarks with Hudson</a>.  Then in the previous post I discussed <a title="passing parameters between builds in Hudson" href="http://blog.quibb.org/2010/04/passing-parameters-between-builds-in-hudson/">passing parameters between builds in Hudson</a>.  Both of these posts are worth reading before trying to setup Hudson with Codespeed.</p><h2>Codespeed Installation/Configuration</h2><h3>Django Quickstart</h3><p>Codespeed is built on Python and <a title="Django" href="http://www.djangoproject.com/">Django</a>.  Some basic knowledge of Django is needed in order to get everything up and running.  Don&#8217;t worry, it&#8217;s not that hard to learn the bit that is needed. <a title="manage.py" href="http://docs.djangoproject.com/en/1.2/ref/django-admin/#ref-django-admin">manage.py</a> is all you need to know about to setup and view Codespeed.  There is information about <a title="deploying Django to a real web server" href="http://docs.djangoproject.com/en/1.2/howto/deployment/#howto-deployment-index">deploying Django to a real web server</a>, but I won&#8217;t be covering that here.</p><p>Here are the commands to get Django running:</p><p><a title="syncdb" href="http://docs.djangoproject.com/en/1.2/ref/django-admin/#syncdb"><strong>syncdb</strong></a></p><p>syncdb is used to initialize the database with the necessary tables.  It will also setup an admin account.  With the sqlite3 database selected, it will create the database file when this command is run.</p><p>The command is:</p><pre>python manage.py syncdb</pre><p><a title="runserver" href="http://docs.djangoproject.com/en/1.2/ref/django-admin/#runserver-port-or-ipaddr-port"><strong>runserver</strong></a></p><p>The next command is the runserver command.  This runs the built-in django server.  In the documentation they state you&#8217;re not supposed to use it in a production environment, so make sure to deploy to a production environment if you plan to host it on the Internet or high traffic network.</p><p>The command is:</p><pre>python manage.py runserver 0.0.0.0:9000</pre><p>By default the server will run on 127.0.0.1:8000.  Setting the IP to 0.0.0.0 allows connections from any computer.  This works well if you&#8217;re on a local area network and want to set it up on a VM over SSH, but still be able to access the web interface from your computer.  The port is the port for the server to run on.  To view Codespeed, point your browser at 127.0.0.1:9000 or the IP of the machine it&#8217;s on with the colon 9000.</p><p>Django has many <a title="Django settings" href="http://docs.djangoproject.com/en/1.2/ref/settings/#ref-settings">settings</a> that may or may not need to be tweaked for your environment.  They can be set through the <a title="speedcenter/settings.py" href="http://github.com/tobami/codespeed/blob/0.6.1/speedcenter/settings.py">speedcenter/settings.py</a> file.</p><h3>Codespeed Setup/Settings</h3><p>Now for setting up the actual Codespeed server.  First check it out using git.  The clone command is:</p><pre>git clone http://github.com/tobami/codespeed.git</pre><p>The settings file is <a title="speedcenter/codespeed/settings.py" href="http://github.com/tobami/codespeed/blob/0.6.1/speedcenter/codespeed/settings.py">speedcenter/codespeed/settings.py</a>.</p><p>Most of the default values will work fine.  They&#8217;re mostly for setting default values for various things in the interface.</p><p>One thing that does need to be configured is the environment.  Start by running the syncdb command and then run the server using runserver.  Now that the server is running, browse to the admin interface.  If you ran the server on port 9000, point your browser at http://127.0.0.1:9000/admin.  Login using the username and password you created during the syncdb call.  A Codespeed environment must be created manually.  The environment is the machine you&#8217;re running the benchmarks on.  After logging in, click Add next to the Environment label.  Fill in the various fields and remember the name of it.  Save it when you&#8217;re done.  The name will be used later when submitting benchmark data to Codespeed.</p><h2>Submitting Benchmarks</h2><p>This will pick up where my last <a title="Nightly Benchmarks: Setting up Hudson" href="http://blog.quibb.org/2010/04/nightly-benchmarks-setting-up-hudson/">tutorial</a> left off.  The benchmarks were running as a nightly job in Hudson.  Sending benchmark data to Codespeed will take a bit of programming.  I&#8217;m going to continue the example with <a title="JRuby" href="http://jruby.org/">JRuby</a>, so the benchmarks and submission process are written in Ruby.</p><p>In order to submit benchmarks information must be transferred from the JRuby build job to the Ruby Benchmarks job.  My last post discussed how to transfer parameters between jobs.  Using the <a title="Parameterized Trigger Plugin" href="http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Trigger+Plugin%2C+Parameterized+Trigger+Plugin">Parameterized Trigger Plugin</a> and passing extra parameters using a properties file will allow you to get all the necessary parameters to the benchmarks job.</p><p>The required information for submitting a benchmark result to Codespeed includes:</p><ul><li>commitid &#8211; The id of the commit, which could either be a git/mercurial hashcode or an svn revision number.</li><li>project &#8211; The name of the project to save.</li><li>executable &#8211; The name of the executable.</li><li>benchmark &#8211; The name of the benchmark.</li><li>environment &#8211; This is the name of the environment you created earlier.  It must be the name of an existing environment.</li><li>result_value &#8211; The runtime of the benchmark. You can configure what units a benchmark has through the admin interface. Default is seconds.</li></ul><p>This information can be included but is optional:</p><ul><li>std_dev &#8211; The standard deviation of the results of the benchmarks.</li><li>min</li><li>max</li><li>branch &#8211; The branch corresponding to this benchmark in the SCM repository.</li><li>result_date &#8211; The timestamp of the commit in the form &#8220;%Y-%m-%d %H:%M&#8221;</li></ul><p>The above information is passed to Codespeed through an encoded URL.  Have the URL point to http://127.0.0.1:9000/results/add/ and encode the parameters for sending.  For the JRuby benchmarks, the following parameters are sent from the JRuby job to the to the ruby benchmarks job.</p><pre>COMMIT_ID=$(git rev-parse HEAD)
COMMIT_TIME=$(git log -1 --pretty=\"format:%ad\")
RUBY_PATH=$WORKSPACE/bin/jruby
REPO_URL=git://github.com/jruby/jruby.git</pre><p>The other fields are derived from the benchmarks job itself.</p><p>Here is the source code for <a title="submission through Ruby rake file" href="http://github.com/qbproger/ruby-benchmark-suite/blob/master/rakelib/bench.rake">submission through Ruby</a>:</p><div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">output = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
canonical_name = doc<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;name&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#CC0066; font-weight:bold;">gsub</span> <span style="color:#996600;">'//'</span>, <span style="color:#996600;">'/'</span>
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'commitid'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = commitid
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'project'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = BASE_VM
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'branch'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = branch
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'executable'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = BASE_VM
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'benchmark'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span>canonical_name<span style="color:#006600; font-weight:bold;">&#41;</span>
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'environment'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = environment
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'result_value'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = doc<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;mean&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'std_dev'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = doc<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;standard_deviation&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
output<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'result_date'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = commit_time
&nbsp;
res = <span style="color:#6666ff; font-weight:bold;">Net::HTTP</span>.<span style="color:#9900CC;">post_form</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">URI</span>.<span style="color:#9900CC;">parse</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;#{server}/result/add/&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>, output<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> res.<span style="color:#9900CC;">body</span></pre></div></div><p>It&#8217;s a good idea to always print out the response as it will contain debug information.  There is an example of <a title="save_single_result.py" href="http://github.com/tobami/codespeed/blob/0.6.1/tools/save_single_result.py">how to submit benchmarks to Codespeed using Python</a> in the Codespeed repository in the tools directory.</p><h2>Viewing Results</h2><p>After results are in the the Codespeed database, you can view the data through the web interface.  Direct a browser at http://127.0.0.1:9000.  The changes view shows the trend over the last revisions.  The timeline view allows you to see a graph of recent revisions, and the newly added comparison view will compare different executables running the same benchmark.</p> ]]></content:encoded> <wfw:commentRss>http://blog.quibb.org/2010/07/nightly-benchmarks-tracking-results-with-codespeed/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Passing Parameters Between Builds in Hudson</title><link>http://blog.quibb.org/2010/04/passing-parameters-between-builds-in-hudson/</link> <comments>http://blog.quibb.org/2010/04/passing-parameters-between-builds-in-hudson/#comments</comments> <pubDate>Wed, 21 Apr 2010 03:06:23 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[continuous integration]]></category> <category><![CDATA[git]]></category><guid isPermaLink="false">http://blog.quibb.org/?p=192</guid> <description><![CDATA[In my last post, I talked about setting up Hudson to run nightly benchmarks.  While trying to take that to the next step, and get nightly benchmarks recorded in a graph, I discovered that passing parameters between builds may not be as easy as it originally seemed.  If you&#8217;re using the Hudson Parameterized Trigger plugin, [...]]]></description> <content:encoded><![CDATA[<p>In my last post, I talked about setting up <a title="Hudson" href="http://hudson-ci.org/">Hudson</a> to run nightly benchmarks.  While trying to take that to the next step, and get nightly benchmarks recorded in a graph, I discovered that passing parameters between builds may not be as easy as it originally seemed.  If you&#8217;re using the Hudson <a title="Parameterized Trigger Plugin" href="http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Trigger+Plugin%2C+Parameterized+Trigger+Plugin">Parameterized Trigger plugin</a>, that gets you part of the way to passing parameters between builds, but I was left wanting more flexibility than it offered.</p><p>I wanted to set environment variables with an Execute Shell step, and then be able to pass them as parameters to the benchmarks build.  I wanted to pass the git commit id and timestamp to the benchmarks build for recording.  The Git SCM Plugin doesn&#8217;t provide that information to Hudson.  The Parameterized Trigger plugin is able to handle environment variables that are set by Hudson itself.  However, when trying to set them in the Execute Shell step, it didn&#8217;t pick up the newly set environment variables.  At this point I looked through the available options.  I saw that I could set the Parameterized Trigger to read from a parameters file.  I tried writing out a parameters file from the Execute Shell section, and reading it in using the Parameterized Trigger plugin.  Success!</p><p>Here are the commands I used to write out the properties file:</p><pre>echo "COMMIT_ID=$(git rev-parse HEAD)" &gt; params.properties
echo "COMMIT_TIME=$(git log -1 --pretty=\"format:%ad\")" &gt;&gt; params.properties</pre><p>In the end, it worked out pretty well.  After these commands are run, a params.properties file is created.  The Parameterized Trigger plugin is setup to read params.properties, and the information moves on to the next build.</p> ]]></content:encoded> <wfw:commentRss>http://blog.quibb.org/2010/04/passing-parameters-between-builds-in-hudson/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Nightly Benchmarks: Setting up Hudson</title><link>http://blog.quibb.org/2010/04/nightly-benchmarks-setting-up-hudson/</link> <comments>http://blog.quibb.org/2010/04/nightly-benchmarks-setting-up-hudson/#comments</comments> <pubDate>Thu, 08 Apr 2010 13:36:27 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[benchmarks]]></category> <category><![CDATA[continuous integration]]></category> <category><![CDATA[jruby]]></category><guid isPermaLink="false">http://blog.quibb.org/?p=169</guid> <description><![CDATA[For some projects, finding out about performance regressions is important.  I&#8217;m going to write a two part series about setting up a nightly build machine and displaying the generated data.  This part is going to cover installation of Hudson, and getting the benchmarks running nightly. I decided to give Hudson a try because I had [...]]]></description> <content:encoded><![CDATA[<p>For some projects, finding out about performance regressions is important.  I&#8217;m going to write a two part series about setting up a nightly build machine and displaying the generated data.  This part is going to cover installation of <a title="Hudson" href="http://hudson-ci.org/">Hudson</a>, and getting the benchmarks running nightly.</p><p>I decided to give Hudson a try because I had heard good things about it.  Also after hearing coworkers complain about cruise control and cdash, I thought I&#8217;d try something new.  Since Hudson has pretty extensive documentation, I&#8217;ll walk you through setting up the JRuby project to build with Hudson and getting benchmarks running on it.</p><h2>Hudson Installation</h2><p>On Ubuntu it&#8217;s as simple as:</p><pre>sudo apt-get install hudson
</pre><p>While I didn&#8217;t install it on windows, the installation should require little more than installing <a title="Tomcat" href="http://tomcat.apache.org/">Tomcat</a> and then downloading the Hudson war file and put it in the web-apps directory.</p><p>After installation browsing to http://127.0.0.1:8080 should show the Hudson Dashboard.</p><h3>Hudson Configuration</h3><p>After Hudson installation is complete, it requires very little configuration before setting up your first project.  One thing that may be necessary is going to the plugins page and making sure your version control system is covered.  For setting up a continuous integration machine to build JRuby, the git plugin is necessary.</p><p>To install the Hudson Git Plugin, click <strong>Manage Hudson</strong> on the left hand side.  Then click <strong>Manage Plugins</strong> from the list in the middle of the screen.  Click the <strong>Available</strong> tab, and find the <span style="text-decoration: underline;">Hudson GIT plugin</span> in the list.  After it&#8217;s installed it will show up in the Installed tab.</p><p>After installing all the necessary plugins for your project go back to the Hudson Dashboard by clicking the Hudson logo, or the Back to Dashboard link.</p><h2>Setting up a Project to Build</h2><p>A good first step it to make sure the project will build on the given machine without being built through Hudson.  There may be some dependencies that got overlooked, and this is a good way to make sure everything is setup to build your project.</p><p>Now, click on the <strong>New Job</strong> link on the left hand side.  For the JRuby project, the <strong>Build a free-style software project</strong> is the type of project to setup.  I imagine that is the correct type of project to setup for most projects.</p><p>Unless you plan on keeping all the builds produced on the server, the <strong>Discard Old Builds</strong> is a good option to check, and set how long you want the builds to remain on the server.  Choose the source code management tool that you use for your project, which is Git for JRuby, and set the appropriate settings.</p><p>JRuby settings:</p><pre>URL of Repository: git://github.com/jruby/jruby.git
Branch Specifier (blank for default): master
Repository browser (Auto)
</pre><p>There are several types of Build Triggers by default.  More Build Triggers can be added through plugins, if you&#8217;re looking for another way to trigger a build.  For a nightly build at midnight select the <strong>Build periodically</strong> option, and put <em>@midnight</em> in the field.</p><p>For the build step, if you&#8217;re building a Java project select <strong>Invoke Ant</strong>.  Otherwise, <strong>Execute shell</strong> may be a good option for you.  For JRuby, select Invoke Ant and set the target to jar to build it.</p><p>At this point you can click the <strong>Save</strong> button at the bottom of the page and click <strong>Build Now</strong> on the next page to build your project.  It&#8217;s a good idea to make sure your project builds correctly before trying to add in nightly benchmarks.  It&#8217;s easier to debug problems before you have too much going on.  By clicking on the build from the active builds list the console output can be seen from the browser.</p><h2>Running the Benchmarks</h2><p>If your benchmarks are in the same repository, you&#8217;re mostly done.  Add another build step, and set it up to run your benchmarks.  While JRuby does have benchmarks in its repository, the benchmarks I plan on running are in a different repository.  With this goal in mind, I created another Job in Hudson to checkout and run the benchmarks.</p><p>Its setup is very similar to that of JRuby, it checks out the source and runs the benchmarks.  The main difference is that a parameter is passed to the project to tell it which Ruby VM to use.  The <span style="text-decoration: underline;">Parameterized Trigger Plugin</span> is necessary to pass a parameter from one project to another.  The way it works is you set a parameter in the project receiving the parameter near the top of the page.  In my case, I added a RUBY_PATH parameter.  Then you setup the build job to send that parameter to the benchmarks job.</p><p>To do this, I went back to the JRuby job and turned on the <strong>Trigger parameterized build on other projects</strong> option.  It should be the last option down at the bottom of the page.  I set the JRuby job to trigger with the benchmarks job name, and in the predefined parameters field I put the following:</p><pre> RUBY_PATH=$WORKSPACE/bin/jruby</pre><p>After this is in place, when a JRuby build finishes it will start a benchmarks run.  Now that your benchmarks are up and running, the next part to this series will go over how to display the information in a way that makes it easy to spot regressions.</p><p>If you have any questions or if I went over something too quickly, post a comment and/or ask a question.</p> ]]></content:encoded> <wfw:commentRss>http://blog.quibb.org/2010/04/nightly-benchmarks-setting-up-hudson/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Setting up a VirtualBox LAMP Server</title><link>http://blog.quibb.org/2010/02/setting-up-a-virtualbox-lamp-server/</link> <comments>http://blog.quibb.org/2010/02/setting-up-a-virtualbox-lamp-server/#comments</comments> <pubDate>Wed, 17 Feb 2010 03:20:38 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[lamp]]></category> <category><![CDATA[virtualbox]]></category><guid isPermaLink="false">http://blog.quibb.org/?p=144</guid> <description><![CDATA[Introduction I recently decided to play around with web development a little bit. Not being familiar with setting up a web server, I decided to setup a VirtualBox LAMP server. Since I couldn&#8217;t find a good guide that went through all the steps of setting up a VirtualBox LAMP Server in one place, I decided [...]]]></description> <content:encoded><![CDATA[<h2>Introduction</h2><p>I recently decided to play around with web development a little bit.  Not being familiar with setting up a web server, I decided to setup a <a title="VirtualBox" href="http://www.virtualbox.org/">VirtualBox</a> <a title="LAMP" href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29">LAMP</a> server.  Since I couldn&#8217;t find a good guide that went through all the steps of setting up a VirtualBox LAMP Server in one place, I decided to write about my experience.  I wanted a LAMP Server that I could access from any machine on my local network.  In retrospect, it isn&#8217;t very hard to do, but having all the information in one place is nice.</p><h2>Installing VirtualBox</h2><p>Start by installing VirtualBox.  The open source edition (OSE) should be good enough to use for the purposes of this guide.  I was installing the full edition on <a title="openSuSE 11.2" href="http://www.opensuse.org/en/">openSuSE 11.2</a>, and there were some issues.  The issue I had was solved with this command: <strong>sudo chmod +x /usr/lib/virtualbox/VirtualBox and remove /tmp/*vbox*</strong>.  Generally speaking it&#8217;s fairly easy to install VirtualBox on Windows.  When creating a new virtual machine, I allocated 512MB of RAM and 12GB of HD space.</p><p>For additional Linux troubleshooting look here (It applies to more than just OpenSuSE): <a title=" Sun’s VirtualBox on OpenSUSE 11.1" href="http://ryan.rawswift.com/2009/01/27/suns-virtualbox-on-opensuse-111/">Sun’s VirtualBox on OpenSUSE 11.1</a></p><h2>Installing LAMP</h2><p>I chose Ubuntu for my LAMP server largely because there are many documents on how to setup a LAMP server on top of Ubuntu.  I&#8217;ll do a quick overview here, and provide a link to <a title="setting up a LAMP server on Ubuntu (Hardy Heron)" href="http://www.ubuntugeek.com/ubuntu-804-hardy-heron-lamp-server-setup.html">setting up a LAMP server on Ubuntu (Hardy Heron)</a>.  I liked this guide more than the guide for Jaunty because this one tells you to install the <a title="OpenSSH" href="http://www.openssh.com/">OpenSSH</a> server, and being able to administer the VM remotely is a good idea.</p><p>Start by downloading the <a title="Ubuntu Server Edition" href="http://www.ubuntu.com/server">Ubuntu Server Edition</a>.  I tried downloading and installing Hardy Heron, which is the latest Long Term Support (LTS) release, but I kept getting a Kernel Panic when trying to boot in VirtualBox 3.1.2.  It may have been the combination of VirtualBox version and Ubuntu version.  Eventually, I ended up going with Karmic Koala.  The installation process is almost identical to the Hardy Heron installation, and it provides both the LAMP and OpenSSH options that the guide suggests.</p><h2>Network Configuration</h2><p>Click on your newly created virtual machine, and open the settings dialog.  Then click the <em>Network</em> settings area.  For Adapter 1, make sure that the <em>Enable Network Adapter</em> checkbox is checked.  Adapter 1 is attached to <em>NAT</em> by default, switch it to <em>Bridged Adapter</em> for it to look like a regular PC to the rest of your network.  It will acquire an IP address from your router, like a normal computer.  If you only want your host computer to be able to access it the <em>Host-only Adapter</em> option seems like an appropriate choice, but I did not use or test this option.  After changing the setting, start up the virtual machine.  To get the IP of the virtual machine use the <strong>ifconfig</strong> command.  If you point your browser at that IP, you should see the apache welcome page.</p><h3>Static IP</h3><p>Setting a static IP address for the virtual machine is a good idea so you can always access the same IP address.  These are the instructions for setting a static IP in Ubuntu.</p><p>Edit the /etc/network/interfaces file using vim or nano:</p><pre>sudo [your_editor] /etc/network/interfaces</pre><p>Find this line:</p><pre>iface eth0 inet dhcp</pre><p>Change it to:</p><pre>iface eth0 inet static
address 192.168.1.99
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1</pre><p>These settings worked well for my Linksys router.  By default, the DHCP service the router provides starts using IP addresses starting with 192.168.1.100.  By using 192.168.1.99 it was outside of that range.  The Linksys router defaults to using 192.168.1.1 for its own IP, which is why the gateway is set to that.</p><h2>Pure-FTPd FTP Server</h2><p>The last step is setting up an FTP Server on it so you can easily transfer files.   For this I chose <a title="Pure-FTPd" href="http://www.pureftpd.org/project/pure-ftpd">Pure-FTPd</a> because the project prides itself on is being easy to configure.  It largely worked right out of the box without any configuration.</p><p>To install it:</p><pre>sudo apt-get install pure-ftpd</pre><p>Some Pure-FTPd configuration:</p><pre>CD to the configuration directory located here:
/etc/pure-ftpd/conf

Set display dot files to on (so you can see your .htaccess file):
echo yes &gt; DisplayDotFiles

Restart Pure-FTPd:
sudo /etc/init.d/pure-ftpd restart

Get your user connected to the /var/www directory:
CD to your home folder and create a symbolic link to /var/www
ln -s /var/www www

Change ownership /var/www to your user, so you can write to this directory.
chown -R  /var/www

Change to 755 permissions
chmod -R 755 /var/www</pre><p>You should now be able to connect to the FTP server from anywhere on your network by pointing your FTP client at: 192.168.1.99 (or any IP you may have chosen).  It should have no problem running PHP files.</p><p>If any part of this short guide was confusing or didn&#8217;t work, leave a comment so I can look into it and update the guide.</p> ]]></content:encoded> <wfw:commentRss>http://blog.quibb.org/2010/02/setting-up-a-virtualbox-lamp-server/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Getting Started with Git (and the Hub)</title><link>http://blog.quibb.org/2009/01/getting-started-with-git-and-the-hub/</link> <comments>http://blog.quibb.org/2009/01/getting-started-with-git-and-the-hub/#comments</comments> <pubDate>Wed, 21 Jan 2009 02:30:01 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[git]]></category> <category><![CDATA[source control]]></category> <category><![CDATA[svn]]></category><guid isPermaLink="false">http://blog.quibb.org/?p=23</guid> <description><![CDATA[I&#8217;m very new to Git, but I find some of its features interesting and worth a post about.  This is possibly a part 1 of more to come as I learn more about Git and how to use it effectively.  The comments below are made with having mostly used SVN in the past for source [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m very new to Git, but I find some of its features interesting and worth a post about.  This is possibly a part 1 of more to come as I learn more about Git and how to use it effectively.  The comments below are made with having mostly used SVN in the past for source control.</p><p><strong>Features (that appeal to me):</strong></p><p>These features are of DVCS in general, Bisect may be git specific.</p><ul><li><em>Local Commits</em> &#8211; Even if you don&#8217;t have access to the repository, you&#8217;re still able to commit to your local copy.  So even without commit access, you still have all the tools a cm system provides available to you.</li><li><em>Entire revision history stored locally</em>. &#8211; Let&#8217;s face it, hard drive space it cheap these days, and network hiccups happen from time to time.  It&#8217;s nice to be able to have your revision history there when you need it.  With SVN, without a path to the server there is little you can do.</li><li><em>Bisect</em> &#8211; While I haven&#8217;t used this, it seems like a very interesting feature.  It allows you to specify a start and a stop revision.  It then helps you track down when a bug was introduced.  I may include something more about this after I&#8217;ve used it, but it still looks like an interesting feature.</li></ul><p><strong>Starting out:</strong></p><p>Make sure you have git installed before starting here.  I&#8217;m assuming git is installed, and you are a little familiar with the commands.  Here are some links to some excellent resources to get you started if you&#8217;re not at that point yet:</p><ul><li><a title="http://git.or.cz/gitwiki/GitCheatSheet" href="http://git.or.cz/gitwiki/GitCheatSheet">http://git.or.cz/gitwiki/GitCheatSheet</a><ul><li>When starting out with any new command line tool, I see if there is a cheatsheet online for it.  It&#8217;s always good to help you get acquainted with some of the commands.  In general, a good starting point.</li></ul></li><li><a title="http://gitready.com/" href="http://gitready.com/">http://gitready.com/</a><ul><li>This is a really cool resource I found while on my adventures in git.  It helped me figure out how to revert files, which wasn&#8217;t entirely clear from the commands.</li></ul></li><li><a title="http://git-scm.com/course/svn.html" href="http://git-scm.com/course/svn.html">http://git-scm.com/course/svn.html</a><ul><li>It was useful to see some of the svn commands that I&#8217;m used to, and their git counterparts.</li></ul></li></ul><p>Well, now that you&#8217;re somewhat familiar with git, let&#8217;s get started on with github.  Now, the main reason for posting this is because as a new user it didn&#8217;t seem that clear what I need to do to actually push to a repository.  After you&#8217;ve been given access to, or created, a github repository, you must set your username and email for github to use.</p><p>Instructions on that can be found here: <a title="http://github.com/guides/tell-git-your-user-name-and-email-address" href="http://github.com/guides/tell-git-your-user-name-and-email-address">http://github.com/guides/tell-git-your-user-name-and-email-address</a></p><p>Now, here is the part that really wasn&#8217;t clear to me.  You need to setup an ssh key to github as part of their authentication.  I don&#8217;t know if this is correct, but I think of this as a layer of encryption that happens to make sure my files get to github unaltered. (similar to PGP for email)</p><p>Instructions for this can be found here: <a title="http://github.com/guides/providing-your-ssh-key" href="http://github.com/guides/providing-your-ssh-key">http://github.com/guides/providing-your-ssh-key</a></p><p>Now that you&#8217;re all setup, you&#8217;re ready to do some commits and then a push to the server.  Have fun in the world of git.</p> ]]></content:encoded> <wfw:commentRss>http://blog.quibb.org/2009/01/getting-started-with-git-and-the-hub/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 5/17 queries in 0.006 seconds using disk
Object Caching 515/541 objects using disk

Served from: blog.quibb.org @ 2012-02-05 12:19:21 -->
