<?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>Geospecialling &#187; Automated Build Studio</title>
	<atom:link href="http://www.geospecialling.com/index.php/tag/automated-build-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geospecialling.com</link>
	<description>Being a (G)IS Developer...</description>
	<lastBuildDate>Sun, 25 Jul 2010 05:15:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Automated Build Studio to automate offsite backups</title>
		<link>http://www.geospecialling.com/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/</link>
		<comments>http://www.geospecialling.com/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 04:33:39 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Automated Build Studio]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/</guid>
		<description><![CDATA[The importance of an offsite backup of your data is well known.&#160; There are companies out there that do simply that – offsite data storage.&#160; Take for example Iron Mountain’s LiveVault service.&#160; Depending on the amount of data you have to protect, LiveVault can be&#160; great service.
I’ve been using Automated Build Studio (ABS) for some [...]]]></description>
			<content:encoded><![CDATA[<p>The importance of an offsite backup of your data is well known.&#160; There are companies out there that do simply that – offsite data storage.&#160; Take for example Iron Mountain’s <a title="Iron Mountain&#39;s LiveVaul" href="http://www.ironmountain.com/digital/server/" target="_blank" rel="tag">LiveVault</a> service.&#160; Depending on the amount of data you have to protect, LiveVault can be&#160; great service.</p>
<p>I’ve been using <a title="Automated Build Studio" href="http://www.automatedqa.com/products/abs/index.asp" target="_blank" rel="tag">Automated Build Studio</a> (ABS) for some time now to ensure consistent, and fast builds of our products.&#160; I’m incredibly pleased with it.&#160;&#160; One of the key benefits to ABS is its versatility.&#160; Yes, the primary goals of this product is to automate the software build process – and a lot of specific tools are provided in the product to accomplish this (e.g. working with source control, easy tools to automate compiling etc).&#160; Build systems are really just a collection of tasks, usually very small tasks – but often there are dozens, hundreds or even thousands of these tasks.&#160; Task as small as running a dos command line statement, copying files, making a zip file.&#160; When I noticed that ABS gives you the ability to automate FTP operations, it got me thinking – this “build” tool could be used to automate so many of those little tasks I’ve always meant to ‘just write a small batch file’ for – but never got around to doing…</p>
<p>One of our most critical pieces of data is our <a title="Sourcegear Vault - The best version control..." href="http://www.sourcegear.com/vault/" target="_blank" rel="tag">Sourcegear Vault</a> database for our source code version control.&#160;&#160; No source code, no software company – don’t think I need to say much more.&#160;&#160; Vault uses SQL server to store its bits.&#160; Well would you look at that.&#160; ABS has a “backup database” component.&#160; The workflow of what I want to accomplish is quite simple:</p>
<ol>
<li>1. Backup and verify SQL server databases </li>
<li>2. Zip up said backup files </li>
<li>3. Upload the zip file to an FTP server that cannot burn down or blow up at the same time as our database server. </li>
</ol>
<p>&#160;</p>
<p>Pretty simple – and ABS will do everything we need – and then some.&#160; So let’s get started.&#160; First, I have to assume you have an SQL server running with databases in it.&#160; I also assume you have an FTP server setup and running.&#160; If you really wanna get fancy – get an FTP server that supports SSL running.&#160; I recommend <a title="FileZilla Server" href="http://filezilla-project.org/download.php?type=server" target="_blank" rel="tag">FileZilla server</a>.</p>
<h3>ABS Installed on same machine as SQL Server<a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absdbbackup.png" target="_blank"><img title="Automated Build Studio SQL Server Backup Operation" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="228" alt="Automated Build Studio SQL Server Backup Operation" src="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absdbbackup-thumb.png" width="244" align="right" border="0" /></a></h3>
<p>If ABS is installed on the same machine as SQL server we can make use of the built in macro operations to backup SQL server.&#160; Start up ABS and create a new macro.&#160; We’re going to start off simple – and maybe we’ll add some cool later.&#160; First we’ll add a database backup operation.&#160; From the left hand Operations “toolbox” click on SQL to expand the operations available there.&#160; Double click on “Back Up Database”.&#160; This will add a database backup action to our macro.&#160; On the right hand side of the screen in the “macro” section, double click on the new macro operation and fill in the needed information to connect to your SQL server.&#160; Be sure to specify the database, destination path and that the type of output is File.&#160; If you have more than one database you want to backup – add another backup operation and repeat the process.&#160; To backup Vault – we need to backup the sgvault and the sgmaster databases. </p>
<p>If you run your macro at this point you will be prompted with a message that “The executable file of the “SQLMaint” tool is not specified.&#160;&#160; The SQLMaint executable is installed with your SQL server instance and can be found in the Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn folder.&#160; Setup your tools to point to this file.&#160; Note, MSSQL.1 will change depending on the <a title="Explanation of SQL Server instances" href="http://www.informit.com/guides/content.aspx?g=sqlserver&amp;seqNum=29" target="_blank" rel="tag">instance of SQL server</a> you are running. </p>
<h3>But, SQL Server is installed on another machine and that’s the way I like it!</h3>
<p>Yup, me too.&#160; The built in SQL Server backup operations depend on the SQLMaint executable to run backup process.&#160; Again, this file is installed with SQL server and I could not get this file to run on machine that did not have SQL Server installed.</p>
<p>Instead what I did was created a batch file/SQL script combo on the machine running SQL server and scheduled a task to execute this batch file. The SQL script looks like this:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">BACKUP</span> <span style="color: #0000ff">DATABASE</span> [sgmaster] <span style="color: #0000ff">TO</span>  <span style="color: #0000ff">DISK</span> = N<span style="color: #006080">'C:\MSSQLData\backups\sgmaster.bak'</span> <span style="color: #0000ff">WITH</span> FORMAT, INIT,  NAME = N<span style="color: #006080">'Full Database Backup'</span>, SKIP, NOREWIND, NOUNLOAD,  STATS = 10</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #0000ff">GO</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #0000ff">BACKUP</span> <span style="color: #0000ff">DATABASE</span> [sgvault] <span style="color: #0000ff">TO</span>  <span style="color: #0000ff">DISK</span> = N<span style="color: #006080">'C:\MSSQLData\backups\sgvault.bak'</span> <span style="color: #0000ff">WITH</span> FORMAT, INIT,  NAME = N<span style="color: #006080">'Full Database Backup'</span>, SKIP, NOREWIND, NOUNLOAD,  STATS = 10</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> GO</pre>
</p></div>
</div>
<p>&#160;</p>
<p>A batch file that executes this script is scheduled to run at a fixed interval and simply consists of this:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #006080">&quot;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE&quot;</span> -S localhost -i <span style="color: #006080">&quot;C:\AdminScripts\SQL Server\backup.sql&quot;</span></pre>
</p></div>
</div>
<p>&#160;</p>
<p>This batch file on execution creates two files in c:\MSSQLData\backups.&#160; These files will be processed by the next step in the macro.&#160; Note that because no username or password information is being specified here, the user set to run this task must have the appropriate rights in SQL server.&#160; This batch file is executed by adding a windows scheduler task.</p>
<p>Whichever path you chose for creating your backup file.&#160; Go ahead and run the macro item for an SQL backup, or from the SQL server execute your batch file to get a backup made of the database(s).<a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/abszip.png"><img title="Automated Build Studio Create Zip operation" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="244" alt="Automated Build Studio Create Zip operation" src="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/abszip-thumb.png" width="239" align="right" border="0" /></a></p>
<h3>Building the zip file</h3>
<p>The next operation we need can be found in the “Archivers” section on the left.&#160; I’m using Zip for this example.&#160;&#160; Add a “Pack Files With zip” operation to the macro and setup the properties.&#160; Define the archive name locally.&#160; Next we’ll need to set the path to the files to zip.&#160; We’ll use UNC paths to access a share on our SQL server.&#160; Depending on the rights of the user executing the macro, the administrative shares on the SQL server can be used or a new share can be created with the appropriate permissions assigned. </p>
<p>I set the zip to use the “Best” compression for the “Pack Level” and told it to “Move to archive” which results in the files being zipped getting deleted.&#160; I also set a password on the zip – but make sure you write that down somewhere =).</p>
<p>Select the new archive item and click the “Run the selected operation” button.&#160; This should create a new zip file for you in the appropriate location.</p>
<h3>Uploading the zip</h3>
<p>In the toolbox expand FTP and we’re going to add a “Connect to FTP” operation.&#160; Double click this operation in the macro section and setup the properties.&#160; Add your hostname, user name, password.&#160; Set the port if necessary.&#160; If your FTP server is using SSL setup the SSL information.&#160; You can now click the “Run the selected operation” button to test the FTP connection.&#160; If needed add some “Create FTP Directory” and “Set Current FTP Directory” items as needed.&#160; Finally we’ll upload the newly created zip.</p>
<p>Add a new “Upload File(s) to FTP” operation to your macro.&#160;&#160; Browse to and select the newly create zip file.</p>
<p>Click the big Green Go button – and your backup should be created (for a local SQL server), a zip files made, and that zip file should be uploaded to your SSL enabled FTP server.</p>
<h3>Scheduling the macro run<a href="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absschedule.png"><img title="Automated Build Studio Scheduled Execution" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="192" alt="Automated Build Studio Scheduled Execution" src="http://www.landoris.com/blogs/darrin/wp-content/uploads/2009/03/absschedule-thumb.png" width="244" align="right" border="0" /></a></h3>
<p>ABS comes with a nice little interface to add scheduled executions.&#160; From the “Tasks” menu choose “Windows Scheduler”.&#160; This will bring up the task scheduler window.&#160; Click Add to add a new task.&#160; Up will come a helpful wizard that will help you setup the task.&#160; Set the various options like name, macro file, execution time and frequency and you’re done.&#160;&#160; If your SQL server is on another machine, and you have scheduled that backup to run, you will need to ensure that this task is scheduled to execute after the backup is complete – otherwise your backup could be incomplete.</p>
<h3>Summary</h3>
<p>Building this macro let us cancel our LiveVault account, saving the company a decent amount of cash per month.&#160; While making use of a tool we needed for our <a title="RADE and FullCircle One Click Build" href="http://www.landoris.com/blogs/darrin/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/" target="_blank" rel="tag">one click build system</a> for <a title="RADE - configurable web based database solutions" href="http://www.landorIS.com/solutions/RADE" target="_blank" rel="tag">RADE</a> and <a title="FullCircle - Excel to Database" href="http://www.landorIS.com/solutions/FullCircle" target="_blank" rel="tag">FullCircle</a>, and our dedicated <a title="Rackspace - Amazing hosting provider" href="http://www.rackspace.com" target="_blank" rel="tag">Rackspace</a> server, we were able to ensure we critical offsite backups being automatically taken care of. </p>
<p>This basic macro should help you get started with ABS to implement your own offsite backup solution – possibly making use of resources you already have in place.&#160; Obviously this macro can be enhance significantly – other resources can be zipped up and backed up.&#160; The ABS scripting and variables can be implemented to append a unique number or a date to the file name which would allow for a range of backups to be stored.&#160; </p>
<p>Enjoy!</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8f0c7b7b-acc8-44f9-9f7d-09f8ab0fd6f0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Automated+Build+Studio" rel="tag">Automated Build Studio</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/03/using-automated-build-studio-to-automate-offsite-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Click Builds Are A Beautiful Thing &#8211; Automated Build Studio</title>
		<link>http://www.geospecialling.com/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/</link>
		<comments>http://www.geospecialling.com/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 13:00:00 +0000</pubDate>
		<dc:creator>Darrin Maidlow</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Automated Build Studio]]></category>
		<category><![CDATA[One Click Build]]></category>

		<guid isPermaLink="false">http://www.landoris.com/blogs/darrin/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/</guid>
		<description><![CDATA[I’ve known for a long time that an automated build system is valuable, hey it’s number two on the Joel test.&#160; Recently the complexity of some of our products made an automated build system a requirement.&#160; It was getting to the point where creating a build of RADE was a four plus hour ordeal.&#160; It [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve known for a long time that an automated build system is valuable, hey it’s number two on <a title="The Joel Test" href="http://www.joelonsoftware.com/articles/fog0000000043.html" target="_blank" rel="tag">the Joel test</a>.&#160; Recently the complexity of some of our products made an automated build system a requirement.&#160; It was getting to the point where creating a build of <a title="RADE - Configurable Web based Solutions" href="http://www.landorIS.com/solutions/RADE" target="_blank" rel="tag">RADE</a> was a four plus hour ordeal.&#160; It had dozens of little steps, and missing even one would result in a defect.&#160;&#160; This defect would be a vicious cycle.&#160; We would have to debug to find the problem and fix it.&#160; This would cause ANOTHER four hour rebuilt, and the “cycle of bug” would continue.</p>
<p>This complexity resulted in infrequent builds and as a result the code was not tested as well as it should have been.&#160; Not to mention, I’d get really frustrated and even pissed off on build days.&#160;&#160; It took me a while to find a system that really made me happy.&#160; On a whim one night I downloaded <a title="Automated Build Studio - One Click Build Goodness!" href="http://www.automatedqa.com/products/abs/index.asp" target="_blank" rel="tag">Automated Build Studio</a> (ABS) and gave it a shot.&#160; After installing ABS on a new virtual machine that would become our dedicated build system I fired it up.&#160; I was pretty impressed with the wide range of actions and&#160; tools it supported.&#160; In our environment we had several must have items:</p>
<ul>
<li>1. SourceGear Vault </li>
<li>2. Visual Studio 2008 </li>
<li>3. Oracle/SQL Server </li>
<li>4. Installshield 2009 </li>
</ul>
<p>&#160;</p>
<p>ABS worked with all of them.&#160; In addition to the key requirements I had &#8211; it supported a <a title="Automated Build Studio operations" href="http://www.automatedqa.com/products/abs/operations.asp" target="_blank">plethora of other operations</a>.</p>
<p>First thing I did was sketch out a rough outline of what was involved in creating a build.&#160; Get latest source code, compile, delete temporary files, etc etc etc.&#160; I started selecting various options from the ABS and fleshing out my macro.&#160; Within a couple of hours, I had a sweet macro in place.&#160; My macro started to look like this:</p>
<ul>
<li>Getting the latest code from Vault </li>
<li>Compile all assemblies </li>
<li>Delete the temporary files </li>
<li>Build the needed release folder structure </li>
<li>Move the new files into the needed structure </li>
<li>Execute <a title="Remotesoft Protector" href="http://www.remotesoft.com/salamander/protector.html" target="_blank" rel="tag">Remotesoft Protector</a> on all assemblies </li>
<li>Increment the build version, and set the version on all assemblies </li>
<li>Create a label of the build in Vault </li>
<li>Build a zip of the release </li>
<li>Build the Installshield installer </li>
<li>Connect to the build FTP and upload the new build </li>
</ul>
<p>&#160;</p>
<p>The best part – all of this was occurring in a 100% reliable fashion, oh and it took minutes for a full build to occur.&#160; Over time, this project was tweaked, and copied.&#160; It evolved as I learned more about ABS – or thought up new requirements.&#160; Take <a title="FullCircle - Excel to Database" href="http://www.landorIS.com/solutions/fullcircle" target="_blank" rel="tag">FullCircle</a> for example, it has evolved into three editions, sharing a similar yet different set of source files.&#160; ABS lets me rebuild all three editions with the click of a button – in minutes.&#160;&#160; Long long ago, in the before times something like this would have taken days, and years off my life.</p>
<p>I’ve only scratched the surface of what I’ve been able to do with ABS – some other cool features worth mentioning is that builds can be scheduled to run, there is a web application for viewing build history as well as kicking off builds.&#160; It has a scripting language, and the support I’ve received is fantastic.&#160; The price of the product makes the decision to buy ABS a non issue.</p>
<p>Man, now I’m starting to sound like a sales guy. =)&#160; Seriously though, check out <a title="Automated Build Studio" href="http://www.automatedqa.com/products/abs/index.asp" target="_blank" rel="tag">Automated Build Studio</a> if you develop boxed, or even custom software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geospecialling.com/index.php/2009/03/one-click-builds-are-a-beautiful-thing-automated-build-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
