<?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>Cory Collier &#187; server</title>
	<atom:link href="http://corycollier.com/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://corycollier.com</link>
	<description>Web Developer and System Administrator in Orlando, FL</description>
	<lastBuildDate>Fri, 02 Dec 2011 04:10:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Linux Deployment Scripts</title>
		<link>http://corycollier.com/2011/04/linux-deployment-scripts/</link>
		<comments>http://corycollier.com/2011/04/linux-deployment-scripts/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 18:07:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=627</guid>
		<description><![CDATA[A common issue in web development is getting new code to production environments. Nobody wants their site down for long, and depending on who you are a long time could be seconds or less. If you&#8217;re production environment is running a versioned instance of your code, updating that environment is as simple as using your [...]]]></description>
			<content:encoded><![CDATA[<p>A common issue in web development is getting new code to production environments. Nobody wants their site down for long, and depending on who you are a long time could be seconds or less. If you&#8217;re production environment is running a versioned instance of your code, updating that environment is as simple as using your version control. If your moving to a new location however, this isn&#8217;t the case.</p>
<p>So if you&#8217;re moving your production environment, or even just adding another server to your production environment, bash scripts will be of great help to you. The reason for scripting out your deployment is simple: reproducibility. Don&#8217;t take chances migrating a live environment manually. Deployment scripts are testable and version-able.</p>
<p>WARNING: This isn&#8217;t a tutorial on bash-scripting. I presume you already know at least some of the basics.</p>
<p>The strategy of this script is simple: Setup all of the variables up front, then execute the following:</p>
<ol>
<li>Checkout all code into a holding folder (servername.hold)</li>
<li>Switch to the appropriate version of code (git checkout tags/release-0.1)</li>
<li>Create any necessary folders that are not versioned (like cache and log folders)</li>
<li>Apply any necessary ownership/permissions (apache, 0700)</li>
<li>Move the folder from the holding location, to the operating location</li>
</ol>
<style>
code {font-size:0.9em;}
.code-comment { color: #aaa; }
.code-string {color: #c00; }
.code-variable {color: #c0c; }
.code-keyword {color: #0cc; }</p>
</style>
<p>The strategy is simple enough in fact, that you could have multiple site deployment scripts that merely setup the variables for use with the same operational script. Anyways, here&#8217;s an example of how to get this done.<br />
<code><br />
<span class="code-comment">#!/bin/bash</span></p>
<p><span class="code-comment">###########################################################</span><br />
<span class="code-comment"># Setup section of code. Setup necessary values for use in operational section of code</span><br />
<span class="code-comment">###########################################################</span></p>
<p><span class="code-comment">#establish some base values for what the server name is and where to check it out at</span><br />
<span class="code-keyword">SERVER</span>="<span class="code-string">awesome.com</span>"<br />
<span class="code-keyword">PROD_LOCATION</span>="<span class="code-string">/var/www/html/<span class="code-variable">$SERVER</span></span>"<br />
<span class="code-keyword">HOLD_LOCATION</span>="<span class="code-string">/var/www/html/<span class="code-variable">$SERVER</span><span class="code-string">.hold</span>"</p>
<p><span class="code-comment">#establish base values for app and lib git repositories</span><br />
<span class="code-keyword">GIT_REPO_URL</span>="<span class="code-string">git@awesome.com</span>"<br />
<span class="code-keyword">GIT_APP_REPO</span>="<span class="code-string">awesome.git</span>"<br />
<span class="code-keyword">GIT_LIB_REPO</span>="<span class="code-string">awesome-library.git</span>"<br />
<span class="code-keyword">GIT_APP_BRANCH</span>="<span class="code-string">tags/release-1.0</span>"<br />
<span class="code-keyword">GIT_LIB_BRANCH</span>="<span class="code-string">tags/releases-1.0</span>"</p>
<p><span class="code-comment"># create a list of folders that will be used for apache access</span><br />
<span class="code-keyword">FOLDERS</span>="<span class="code-variable">$HOLD_LOCATION</span><span class="code-string">/app/var/log</span><br />
<span class="code-variable">$HOLD_LOCATION</span><span class="code-string">/app/var/cache</span><br />
<span class="code-variable">$HOLD_LOCATION</span><span class="code-string">/app/var/backup</span>"</p>
<p><span class="code-comment">###########################################################</span><br />
<span class="code-comment"># Operational section of code. Modify at your own risk</span><br />
<span class="code-comment">###########################################################</span></p>
<p><span class="code-comment"># echo some information for the user to see what's going on</span><br />
echo<br />
echo "<span class="code-string">DEPLOYMENT SCRIPT:</span> <span class="code-variable">$0</span>"<br />
echo</p>
<p><span class="code-comment"># if the folder already exists, then stop. We won't be able to checkout if the folder already exists </span><br />
if [ -e <span class="code-variable">$HOLD_LOCATION</span> ];<br />
then<br />
    echo "<span class="code-string">Folder already exists</span>"<br />
    exit<br />
fi</p>
<p><span class="code-comment"># echo the results of checking out the application code, and switching to the release tag</span><br />
echo <span class="code-variable">`git clone $GIT_REPO_URL:$GIT_APP_REPO $HOLD_LOCATION`</span><br />
cd <span class="code-variable">$HOLD_LOCATION</span><br />
echo <span class="code-variable">`git checkout $GIT_APP_BRANCH`</span><br />
echo</p>
<p><span class="code-comment"># echo the results of checking out the library code, and switching to it's release tag</span><br />
echo <span class="code-variable">`git clone $GIT_REPO_URL:$GIT_LIB_REPO $HOLD_LOCATION/lib`</span><br />
cd <span class="code-variable">$HOLD_LOCATION</span>"<span class="code-string">/lib"<br />
echo <span class="code-variable">`git checkout $GIT_LIB_BRANCH`</span><br />
echo</p>
<p><span class="code-comment"># iterate over the folders creating them, then assigning them to apache</span><br />
for folder in <span class="code-variable">$FOLDERS</span>;<br />
do<br />
    <span class="code-comment"># output what directory is currently being operated upon</span><br />
    echo "<span class="code-variable">$folder</span>"<br />
    mkdir "<span class="code-variable">$folder</span>"<br />
    chown -R apache: "<span class="code-variable">$folder</span>"<br />
    chmod -R <span class="code-string">0700</span> "<span class="code-variable">$folder</span>"<br />
    echo<br />
done</p>
<p><span class="code-comment">#move the files from the holding area, to the actual area</span><br />
echo <span class="code-variable">`mv $HOLD_LOCATION $PROD_LOCATION`</span><br />
</code></p>
<p>As you can see, everything from the operational section down is basically plug and play. The variables are set, and it&#8217;s off to the races. Note that the library repository is just something that&#8217;s common for what I typically deal with. That may not apply to your situation. This script shouldn&#8217;t serve as the definition of what a production deployment script should be. Rather, this is just an example of one that&#8217;s been quite helpful to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2011/04/linux-deployment-scripts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Holy Crap! Updates!!!</title>
		<link>http://corycollier.com/2008/05/holy-crap-updates/</link>
		<comments>http://corycollier.com/2008/05/holy-crap-updates/#comments</comments>
		<pubDate>Tue, 20 May 2008 22:00:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[matt]]></category>
		<category><![CDATA[memberfuse]]></category>
		<category><![CDATA[ning]]></category>
		<category><![CDATA[promotion]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[suzanne]]></category>
		<category><![CDATA[wedding]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=51</guid>
		<description><![CDATA[I don&#8217;t even know how to begin to talk about everything that&#8217;s been going on since the last time I&#8217;ve written here. My buddy got married. I&#8217;ve dealt with server issues (again). I&#8217;ve been promoted. Some stuff I can&#8217;t even talk about! I&#8217;ve written since Matt and Suzanne were married, but I&#8217;ve yet to write [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t even know how to begin to talk about everything that&#8217;s been going on since the last time I&#8217;ve written here. My buddy got married. I&#8217;ve dealt with server issues (again). I&#8217;ve been promoted. Some stuff I can&#8217;t even talk about!</p>
<p>I&#8217;ve written since Matt and Suzanne were married, but I&#8217;ve yet to write about it. I was the best man, so I guess I&#8217;d be as good as anyone to say something about their wedding. It was a beautiful wedding. Matt and Suzanne are a great couple, and it&#8217;s been awesome to watch their relationship grow to what it is today. I&#8217;d do just about anything for those two, and I couldn&#8217;t be happier for them now.</p>
<p>I was promoted to Product Manager of MemberFuse lately too. If that sounds serious, it&#8217;s because it is. I&#8217;m the one in charge of the direction that product will take. I&#8217;ve recently gotten pretty hooked on what ning is doing, and I&#8217;m considering using them as a platform for MemberFuse. We&#8217;ll see if Sterling and Derek will buy into the concept, but I&#8217;d rather not re-invent the wheel.</p>
<p>Server problems&#8230;. Grrrrrrr&#8230;&#8230;</p>
<p>Last Thursday, I noticed all of the sites on one of my servers were down. I tried to remote into the server, but I couldn&#8217;t. So I RDP&#8217;d to another server on that network and performed a remote restart. The only problem was, the server wouldn&#8217;t restart. I had the client ship me the server, and after a couple hours of tinkering it was apparent that someone had sabotaged the server.</p>
<p>That&#8217;s a long story, that I&#8217;ll probably write about later. The short version is: it&#8217;s fixed, and I&#8217;m using WordPress now. For those of you who had left comments before, they&#8217;re gone now. I&#8217;m really sorry about that :/ The client&#8217;s sites are going to take some time to get back to full capacity, but I should have the base of it done tonight.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2008/05/holy-crap-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Server SBS 2003 and RRAS Headaches</title>
		<link>http://corycollier.com/2007/06/windows-server-sbs-2003-and-rras-headaches/</link>
		<comments>http://corycollier.com/2007/06/windows-server-sbs-2003-and-rras-headaches/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 17:04:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[rras]]></category>
		<category><![CDATA[sbs]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[troubleshoot]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=42</guid>
		<description><![CDATA[Not long ago I got the task of setting up a small server for an engineer in our building. He has a small office with one other person working for him. The idea was for him to have a central repository for files, a system backing up those files, and the ability to remotely access [...]]]></description>
			<content:encoded><![CDATA[<p>Not long ago I got the task of setting up a small server for an engineer in our building. He has a small office with one other person working for him. The idea was for him to have a central repository for files, a system backing up those files, and the ability to remotely access all of those files.</p>
<p>I recommended a Windows SBS 2003 box. The client obliged.</p>
<p>All was fine until the issue of VPN came up. I&#8217;ve done VPN&#8217;s before, but usually it&#8217;s through hardware, not through the OS. The client eventually was paid in full, and the issue still wasn&#8217;t completely resolved. I felt terrible about it, so I made it my priority to fix. The client was really cool, and I didn&#8217;t want them to feel cheated or upset in any way.</p>
<p>I won&#8217;t go through the whole tutorial on how to setup an SBS box, but I will say that usually, it&#8217;s very intuitive. Well, when I set up the box, I configured it to work on one subnet. However, the modem supplied to the client wouldn&#8217;t allow GRE packets through, so they needed to get a new modem.</p>
<p>When that modem arrived, it didn&#8217;t work with their existing Linksys wireless router. So I used the modem as the router, and plugged the wireless box into it, and ran it as a separate subnet. Keep in mind, this was after I had already configured the SBS box for the previous subnet.</p>
<p>I thought I had configured the server to work with the new network settings, but I missed a couple of items.</p>
<p>Clear ARP cache.</p>
<p>Since RRAS was started, you couldn&#8217;t clear the ARP cache (the table with the addresses of machines according to the old subnet). I had to stop the RRAS service to clear the ARP cache. Keep that in mind if you have to move an SBS box from one network to another.</p>
<p>Change ALL network settings. When I changed the TCP/IP information for the network adapter (only one), I only changed the information on the front dialog box. Which means I forgot to change the WINS information! Since the client was using VPN so he could navigate to files on the network, that was pretty important.</p>
<p>Also, I needed to add the dns suffix to the DNS settings area as well.</p>
<p>The moral of the story, take the time to get it done right the first time.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2007/06/windows-server-sbs-2003-and-rras-headaches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shadow Copy Tutorial</title>
		<link>http://corycollier.com/2007/06/shadow-copy-tutorial/</link>
		<comments>http://corycollier.com/2007/06/shadow-copy-tutorial/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 11:11:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shadow copy]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://corycollier.com/?p=35</guid>
		<description><![CDATA[I&#8217;ve been a Network Administrator for several years now. One of my favorite features on Windows Server 2003 is Shadow Copy. Shadow Copy is a backup feature that allows you to right click a file, and restore that file to a previous version. If the file is missing, you can right click it&#8217;s folder, find [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a Network Administrator for several years now. One of my favorite features on Windows Server 2003 is Shadow Copy. Shadow Copy is a backup feature that allows you to right click a file, and restore that file to a previous version. If the file is missing, you can right click it&#8217;s folder, find the file, and put it back!</p>
<p>Shadow Copy is a snapshot of a drive, at a particular moment in time. It&#8217;s comparable to incremental backups, kinda.</p>
<p>While Shadow Copy is not intended to replace regular backups, it&#8217;s a very handy tool to quickly find files that users lose all of the time. Note, this is only available on Windows Server machines. Your XP and Vista machines aren&#8217;t going to do this.</p>
<p>Heres how to use it:</p>
<p>First, make sure the Shadow Copy service is running in the services mmc. You&#8217;re looking for the service called &#8216;Volume Shadow Copy&#8217;. Make sure it&#8217;s started, and it&#8217;s set to Automatically start. Once you have that covered, you can move on.</p>
<p>On the server you wish to use Shadow Copy on, navigate to &#8216;My Computer&#8217;.</p>
<p>Right Click the Drive (usually &#8216;C:&#8217;) that you want to use Shadow Copy on.</p>
<p>Click Properties</p>
<p>Click the tab &#8216;Shadow Copies&#8217;</p>
<p><a title="shadowcopy1" name="shadowcopy1"></a><img title="Shadow Copy Property Box" src="../files/shadowcopy_1.JPG" alt="Shadow Copy Property Box" width="371" height="524" /></p>
<p>Click the enable button if it&#8217;s not grayed out. If the button is grayed out, then you&#8217;re already running Shadow Copy. We&#8217;ll assume you&#8217;re not, so at least pretend to click the enable button.</p>
<p>Now, click the &#8216;Settings&#8217; button. You should see the following dialog box:</p>
<p><img title="Shadow Copy Settings" src="../files/shadowcopy_2.JPG" alt="Shadow Copy Settings" width="394" height="524" /></p>
<p>This is where you set the maxium size you want your shadow copy database to be. As a general rule of thumb, you should never use less than 10% of what your max storage capacity is.</p>
<p>You can also set how often you make Shadow Copies. Keep in mind that the more often you make a Shadow Copy, the more space you will need. The default settings are twice a day, at 7:00am, and 12:00pm. I&#8217;ve never found a reason to change this, but I&#8217;m sure some of you out there will find plenty of reasons.</p>
<p><img title="Shadow Copy Schedule Settings" src="../files/shadowcopy_3.JPG" alt="Shadow Copy Schedule Settings" width="422" height="527" /></p>
<p>Now that Shadow Copy is setup, it&#8217;s time to see it in action. Back in the <a href="../shadowcopy#shadowcopy1">first dialog box we saw</a> , click the &#8216;Create Now&#8217; button to manually create your first Shadow Copy. Don&#8217;t worry, you won&#8217;t have to do this again.</p>
<p>Now here&#8217;s the sort of tricky part. In order to access the shadow copies that have been created via file or folder, you have to view the folders via net connection.</p>
<p>You can either type in the UNC name of the server (i.e. \\YOUR-SERVER-NAME) and navigate to the folder or file you want, or you can view them over a <a title="Map Network Drive" href="../mapnetworkdrive">mapped network drive </a></p>
<p>Once you do that, THEN you can right click your file, or folder, click on properties, and then click on the &#8216;Previous Versions&#8217; tab.</p>
<p><img title="Shadow Copy " src="../files/shadowcopy_4.JPG" alt="Shadow Copy " width="367" height="453" /></p>
<p>From here, you can view a previous version, copy or restore. Usually, your best bet is to view the files you want to restore first. It doesn&#8217;t help anyone to restore old files that were wrong to begin with. Get someone else&#8217;s (think management) OK before restoring files.</p>
]]></content:encoded>
			<wfw:commentRss>http://corycollier.com/2007/06/shadow-copy-tutorial/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

