<?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> &#187; Scalr</title>
	<atom:link href="http://abraham.taherivand.net/tag/scalr/feed/" rel="self" type="application/rss+xml" />
	<link>http://abraham.taherivand.net</link>
	<description></description>
	<lastBuildDate>Tue, 24 Aug 2010 13:17:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Scalr 1.1.0 – getting in touch – Part II</title>
		<link>http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-ii/</link>
		<comments>http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-ii/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 02:16:06 +0000</pubDate>
		<dc:creator>abraham</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Scalr]]></category>
		<category><![CDATA[cloud tools]]></category>
		<category><![CDATA[scalr installation]]></category>

		<guid isPermaLink="false">http://abraham.taherivand.net/?p=197</guid>
		<description><![CDATA[As I promised in a further post I document here in my blog further steps and experiences in running Scalr on an own server infrastructure. After Scalr was set up as described in my first post, some additional configurations have to be done to get in detailed touch with Scalr 1.1.0. First log in as [...]]]></description>
			<content:encoded><![CDATA[<p>As I promised in a further <a href="http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-i/">post</a> I document here in my blog further steps and experiences in running Scalr on an own server infrastructure.</p>
<p>After Scalr was set up as described in my first <a href="http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-i/">post</a>, some additional configurations have to be done to get in detailed touch with Scalr 1.1.0.<br />
First log in as admin user to the Scalr frontend and create a new system user (&#8220;Client&#8221;) and activate it. After successful login with the new created and active user, you have to enter your AWS credentials and upload your public and private key from your AWS account.</p>
<p>The next screenshot show the configuration within my user.<br />
<img class="size-full wp-image-198 alignnone" title="scalr system user AWS settings" src="http://abraham.taherivand.net/wp-content/uploads/2009/08/scalr2_2.jpg" alt="scalr system user AWS settings" width="358" height="224" /></p>
<p>Be aware to set this configuration right otherwise you will not be able to proceed.</p>
<p><span id="more-197"></span></p>
<p>If all settings are correct, you will be redirected to your dashboard view (which is known from the admin view).</p>
<p><img class="size-full wp-image-200 alignnone" title="scalr dashboard" src="http://abraham.taherivand.net/wp-content/uploads/2009/08/scalr2_3.tiff" alt="scalr dashboard" width="415" height="439" /></p>
<p>In the next step we create a so called &#8220;Farm&#8221;. Within this option we assigne &#8220;Roles&#8221; &#8211; that means we will instance images (you can take a look for the available images under the option &#8220;Roles&#8221;).</p>
<blockquote><p>A Server Farm is a logical group of EC2 machines that serve your application. It can include load balancers, databases, web severs, and other custom servers. Servers in these farms can be redundant, self curing, and auto-scaling.</p></blockquote>
<p>If you receive an error while loading the site &#8211; &#8220;Error Type: LoadXML Description: Incorrect XML&#8221;, you will get a solution here in this <a href="http://blog.getasysadmin.com/2008/11/scalr-errors-after-install.html" target="_blank">blog post</a> by <em>Octavian Neacsu. </em>You have to modify your apache settings as mentioned in Octavian&#8217;s post.</p>
<p>When the farm is configured and set up, scalr build it when you click the save button (I decided to launch the instances manually). In the farm overview you can now launch the instances you need. For that you only have to click under &#8220;Farms&#8221; on &#8220;Roles -view&#8221;. Under the drop down &#8220;Options&#8221; button it is possible to launch instances manually.</p>
<p>If launching instances throws an exception as &#8220;<em>&#8230; \nFatal error: Class \&#8217;HttpRequest\&#8217; not found &#8230;</em>&#8221; <a href="http://1.abe.nu/5nu">this post</a> in Scalr discussion group will help you out of that problem.</p>
<p>When instances are launched successful it should look like this screenshot.<br />
<img class="size-full wp-image-203 alignnone" title="Scalr Farm with launched Instances" src="http://abraham.taherivand.net/wp-content/uploads/2009/08/scalr2_5.tiff" alt="Scalr Farm with launched Instances" width="997" height="179" /></p>
<p>As the screenshot above shows, within my workflow, I launched 2 instances.</p>
<p>Details are available under &#8220;Intances&gt;View&#8221;. In my case I launched for the start one base <em>www </em>and one <em>app</em>&#8220;Farm role&#8221;.</p>
<p>As best know from connecting to EC2 instances, you can download under &#8220;Farms&#8221; your private key and login via ssh with the command:</p>
<p><code>ssh -i &lt;nameofyourfarm.pm&gt; &lt;public IP&gt;</code></p>
<p>Don&#8217;t forget to <code>chmod</code> your private key, otherwise you will get an error like this: <code>"It is recommended that your private key files are NOT accessible by others. This private key will be ignored."</code></p>
<p>At this point I want to warn you about a possible issue (I reported to the mailinglist): launched instances are not shown in the <a href="https://console.aws.amazon.com/">AWS console</a> under &#8220;Instances&#8221;. You will only see them at the frontpage of the AWS console dashboard. But you can terminate the launched instances within the Sclar interface under &#8220;Instances » View&#8221; &gt; &#8220;Options&#8221; &gt; &#8220;Terminate&#8221; (you can enable the option &#8220;Decrease &#8216;Mininimum instances&#8217; setting&#8221; &#8211; the detailed instances settings you can modify under &#8220;Edit Farm&#8221; &gt; &#8220;Shared Roles&#8221; &gt; &#8220;Scaling options&#8221;).</p>
<p>At this point Scalr is installed and configured with an another system user as the admin user. It is possible to add Farms and launch instances through EC2.</p>
<p>In the next step I will deploy a grails application in my Scalr environment and will do some loadbalancing and performance configurations and tests &#8211; Iwill post my results in my blog under the title &#8220;Scalr 1.1.0 – getting in touch – Part III&#8221;.</p>
<p>Feel free to comment &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-ii/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Scalr 1.1.0 &#8211; getting in touch &#8211; Part I</title>
		<link>http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-i/</link>
		<comments>http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-i/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 21:05:11 +0000</pubDate>
		<dc:creator>abraham</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Scalr]]></category>
		<category><![CDATA[scalr installation]]></category>

		<guid isPermaLink="false">http://abraham.taherivand.net/?p=121</guid>
		<description><![CDATA[Today my friend and business partner Raphael pointed me to the new release of Scalr. I knew Scalr from the past, but i did not get in detailed touch yet. Scalr released version 1.1.0 under the GPL v2- and now I thought about to give it a detailed try. Scalr promise alot of value within [...]]]></description>
			<content:encoded><![CDATA[<p>Today my friend and business partner Raphael pointed me to the new release of <a href="http://code.google.com/p/scalr/">Scalr</a>. I knew Scalr from the past, but i did not get in detailed touch yet. Scalr released version <a href="http://code.google.com/p/scalr/downloads/list">1.1.0</a> under the GPL v2- and now I thought about to give it a detailed try.<br />
Scalr promise alot of value within Cloud Computing and the use of <a href="http://aws.amazon.com">Amazon EC2</a>.</p>
<blockquote><p>Scalr is a fully redundant, self-curing and self-scaling hosting environment using Amazon&#8217;s EC2.</p>
<p>It allows you to create server farms through a web-based interface using prebuilt AMI&#8217;s for load balancers (pound, nginx, or Amazon&#8217;s load balancing service), app servers (apache, rails, others), databases (mysql master-slave, others), and a generic AMI to build on top of.</p>
<p>The health of the farm is continuously monitored and maintained. When the Load Average on a type of node goes above a configurable threshold a new node is inserted into the farm to spread the load and the cluster is reconfigured. When a node crashes a new machine of that type is inserted into the farm to replace it.</p>
<p>Multiple AMI&#8217;s are provided for load balancers, mysql databases, application servers, and a generic base image to customize. Scalr allows you to further customize each image, bundle the image and use that for future nodes that are inserted into the farm. You can make changes to one machine and use that for a specific type of node. New machines of this type will be brought online to meet current levels and the old machines are terminated one by one.</p></blockquote>
<p>Under http://www.scalr.net is also a pay service available, but i want to build my own environment.</p>
<p>If you want to install Scalr the<a href="http://code.google.com/p/scalr/w/list"> wiki </a>is a good starting point.<br />
I droped some lines here in my blog to document my installation on a Ubuntu 9.04 Server.</p>
<p>Systemrequirements are definied on the project website as follows:</p>
<li>PHP 5.2.5 or higher</li>
<li>MySQL 5.0 or higher (MySQL 5.1 or higher preferred)</li>
<p>My server installation was build up with a LAMP. A good How-To for LAMP installation you can find <a href="http://www.ubuntugeek.com/step-by-step-ubuntu-904-jaunty-lamp-server-setup.html">here</a>.</p>
<p>I had to customize my PHP5 installation for the <a href="http://code.google.com/p/scalr/wiki/Installation">required PHP extension</a> listed in the project wiki. I searched for the plugins with following command<br />
<code>apt-cache search php5-*</code>, and installed the required extensions manually.</p>
<p>Furthermore I created a database for scalr and a valid user for it.</p>
<p><code># mysql -u  -p<br />
Enter password:<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 41<br />
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)<br />
mysql&gt; CREATE DATABASE ;<br />
Query OK, 1 row affected (0.00 sec)</code></p>
<p><code> </code></p>
<p><code>mysql&gt; GRANT ALL PRIVILEGES ON .* TO ""@"localhost" IDENTIFIED BY "";<br />
Query OK, 0 rows affected (0.00 sec)</code></p>
<p><code>mysql&gt; FLUSH PRIVILEGES;<br />
Query OK, 0 rows affected (0.01 sec)</p>
<p></code></p>
<p><code>mysql&gt; EXIT<br />
Bye</code></p>
<p><span id="more-121"></span></p>
<p>MySQL Server is running in my environment on the same host. Choose a database-name, database-user and a password for database-user.<br />
Now you can check if your environment is set up for Scalr. For that I downloaded a script from the project site to test it.</p>
<p><code>wget http://scalr.googlecode.com/files/testenvironment.php</code></p>
<p>Move this to your webserver directory e.g.:</p>
<p><code>mv testenvironment.php /var/www</code></p>
<p>Point your webserver to <code>http:///testenvironment.php</code> to check your environment.<br />
I got an error &#8220;<em>Cannot find SSH2 functions. Make sure that SSH2 Functions enabled.</em>&#8221;<br />
Searching for that error in google pointed to a <a href="http://blog.getasysadmin.com/2008/11/how-to-install-scalr-on-ubuntu-810-ec2.html">blog entry</a>.</p>
<p>Installed the following with <em>apt-get</em>.<br />
<code>apt-get install php-pear libssh2-1 libssh2-1-dev</code></p>
<p>The missing php extension can be installed with this command: <code>pecl install ssh2 "channel://pecl.php.net/ssh2-0.10"</code></p>
<p>An error occured <code>ERROR: `make' failed</code>. I followed the blog entry from Octavian Neacsu, but I did not do all the same he documented.<br />
I edited also the file <em>/tmp/pear/download/ssh2-0.10/ssh2.c</em> and replaced like mentoined the line containing:</p>
<p><code>#if LIBSSH2_APINO &lt; 200412301450</code><br />
with<br />
<code>#if false</code></p>
<p>Changed my directory with <code>cd /tmp/pear/download/ssh2-0.10/</code> and compiled manually again with following commands:<br />
<code>./configure</code><br />
<code>make</code><br />
<code>make install</code><br />
Be aware of errors at this point!</p>
<p>Check again if your environment is set up probably with pointing your browser to your webserver</p>
<p>If everything is set up correctly you can download the latest version of Scalr from <a href="http://code.google.com/p/scalr/downloads/list">here</a>.<br />
In my case I did this with  <code>wget http://scalr.googlecode.com/files/scalr-1.1.0.zip</code><br />
Unzip the downloaded file and move it to your webserver directory.<br />
Like it is mentoined in the wiki, Scalr will not work from the subfolder. For that i changed my Apache webserver environment a little. This is up to you do to this like you want. In my case nothing else run on my webserver, so Scalr was moved to the root directory of Apache.</p>
<p>Next i imported the sql script to the created database with following command<br />
<code>mysql -p  &lt; scalr/sql/database.sql</code><br />
and configured the database connection details in <em>/scalr_home_dir/etc/config.ini</em> file.</p>
<p>Go ahead with the wiki install description and set the permissions 777 on the following folders:</p>
<li>cache</li>
<li>cron/cron.pid</li>
<li>etc/.passwd</li>
<p>The cron jobs were set up in my environment with the following command:</p>
<p><code>crontab -e</code><br />
and pasted this modified to my paths:<br />
<code>* * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --Poller<br />
* * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --Scaling<br />
1 1 * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --RotateLogs<br />
*/15 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --MySQLMaintenance<br />
*/6 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --DNSMaintenance<br />
*/10 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --EBSArraysMaintenance<br />
*/5 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --EBSMaintenance<br />
*/3 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --DNSZoneListUpdate<br />
*/2 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --DBQueueEvent<br />
*/3 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --MessagingQueue<br />
*/11 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --Cleaner<br />
*/2 * * * * /usr/bin/php -q /scalr_home_dir/cron/cron.php --EBSQueue<br />
*/3 * * * *  /usr/bin/php -q /scalr_home_dir/cron/cron.php --UsageStatsPoller</code></p>
<p>Finally I had to set up my AWS cradentials as it is described on the wiki pages of Scalr.</p>
<blockquote><p>1. Put your EC2 access certificate into /scalr_home_dir/etc/cert-XXXXXXXXXXXX.pem<br />
2. Put your EC2 private key into /scalr_home_dir/etc/pk-XXXXXXXXXXXX.pem<br />
Where XXXXXXXXXXXX is Your Access Key name, which you specify on &#8220;Settings-&gt;Core settings&#8221; page.</p></blockquote>
<p>Now I was able to point my browser to http://mydomain.com/ and login in with admin and password admin. (Change this settings after login!)</p>
<p>Within the next days I will post Scalr 1.1.0 &#8211; getting in touch &#8211; Part II on my blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://abraham.taherivand.net/2009/08/scalr-1-1-0-getting-in-touch-part-i/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
