Cloud Computing


11
May 11

Testing with DotCloud

Summer is almost here and it was really the time to clean up my blog a bit. Now there is a much more readable theme and all the CityDeal hamburger campaigns are gone. Hopefully nobody will be missing those?

I’ve been writing already about deploying applications instead of virtual machines and how I would like to move away from the machine instance and to a some kind of a service where you could select a system and the service would deploy and manage the needed computing resources. It now seems like this is starting to become a reality as there are providers like DotCloud and PHP Fog who take care of the infra while the customer just deploys the code.

I requested a beta invite to DotCloud which in contrary to PHP Fog is somewhat more multipurpose with other services than the PHP only. Actually, currently they have java, mysql, nodejs, perl, php, php-worker, postgresql, python, python-worker, rabbitmq, redis, ruby, ruby-worker, smtp, static as the deployment options. They also have some nice tutorials about how to use the system. The system is operated mostly locally from CLI and the code is pushed to dotcloud which seems like a nice way to do it as it is analogous to for example editing files locally and then using FTP to transfer the files to a web server.

As a test run, I went with installing WordPress as there is a good tutorial for that and only a few minutes later I had a running blog in DotCloud. I’m really liking this!


23
Jan 11

Pageload performance with Aegir

I’ve been working with Aegir recently to get some ideas how to host multiple Drupal sites in a somewhat automated and scalable way. To my surprise the performance was actually a lot better with the t1.micro instance which runs the Aegir platform than what I get from the small instance. A video below has a demo when running the identical sites on both servers:

The pageload was around 2.6 seconds with the standard Drupal installation and around a second faster with the Aegir platform. The site on Aegir was dump from the other site taken a few days ago with no significant differences. Have to say I really really like Aegir!


23
Jan 11

Installing Aegir on Fedora 8

These are more like notes for myself, but I am happy to share if someone else would be interested. No warranties though, if you can’t get Aegir running with these notes :)

Get the packages:

yum install httpd php php-mysql php-gd mysql-server postfix sudo rsync git-core unzip alpine screen

Set the PHP.ini memory limits, 192M works ok

Fix your DNS and how your host resolves:

edit /etc/hosts

x.x.x.x FQDN hostname

hostname FQDN

Install MTA (I run Postfix, so just copypaste from other server)

upload posfix configuration to /etc/postfix

Edit the /etc/postfix/canonical

This will rewrite the name which Drupal uses to send emails to what you need

create canonical db

postmap /etc/postfix/canonical
service postfix start

Create a group for the Aegir user and which Apache uses as well:

groupadd www-data

edit /etc/httpd/conf/httpd.conf to run as www-data

The Aegir user home folder needs to have 755 as the permissions (at least this works)

adduser -r –groups www-data –home-dir /var/home/aegiruser aegiruser

Edit the httpd.conf to have the Aegir confs included

Include /var/home/providus/config/apache.conf

Edit sudoers file

aegiruser ALL=NOPASSWD: /usr/sbin/apachectl

start mysqld

/usr/bin/mysqladmin -u root password ‘password’

wget -O /tmp/install.sh ‘http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=install.sh.txt;hb=provision-0.4-beta2′

su -s /bin/sh aegiruser -c “sh /tmp/install.sh”

./drush/drush.php dl drupal


7
Oct 10

Testing t1.micro with loadimpact.com

Well hello there! It’s been a while, but I finally found some time to work with the sites and the latest of Amazon Web Services. Lately, AWS has introduced the tiny micro instances with a tempting price tag for small businesses with not too much of a need for high performance. For me, those do sound fantastic for testing purposes as I have been wanting to try running the two sites, this and vkaiser.com on a bit more robust architecture than the current one with just an EBS based AMI and the videos in S3.

I run the typical LAMP stack on one AMI, thus the idea was first to boot up one micro instance and have a look. Well, I chose to go with some old image I had created way long time ago. It also had a LAMP stack installed, but of course it was kind of outdated and the vkaiser.com did not look too good (well, does it now either…), so I figured I could rsync the html folder of the Drupal installation and I did eventually get the rsync with public key working. Then I realized that the db wasn’t really up to date either and the drupal modules would not of course work, so how about connecting to the database on the current “production” which would kind of resemble the hopefully future setup too as running a separate db server (and slave) would just be the way to go at least with Drupal.

Settings in Drupal for remote database connections are really simple. First edit the MySQL configuration (/etc/my.cnf) to have

Bind-address=database_ip

And if you have skip networking defined, comment that out.

Then add remote access permissions to the database for a db user

GRANT ALL ON *.* TO ‘dbuser’@'remote_ip’ IDENTIFIED BY ‘password’;

And modify the settings.php on the remote application server to point to the database server:

$db_url = ‘mysql://dbuser:password@database_ip/database_name’;

Then you can test the connection to the database. At least I got that working, though I was first editing the wrong settings.php file which of course did not prove to be very useful in getting the db connection working.

The real deal was though to see how the t1.micro performs under stress. I browsed a while for some tools with how to do the test, but then I found loadimpact.com which simulates really well concurrent users from 0-50 for free! With some euros, you can get up to 5000 users and customized tests and what not. I like the service, though it went down just as I got my t1.micro tested. The average response time was around 1.5 seconds for the vkaiser.com frontpage and it did not show any real implications of getting slower, thus I should put more load on the micro if I coughed up some cash. I next went on and tested my good old small instance and got about the same results

This wasn’t too scientific, though the results are encouraging. I mean, 50 concurrent users is about 49 more than this site usually has and the micro worked well, so I am planning to make a switch soon… More about that later!


2
Jul 10

Summer break

It’s been a hectic past month to say the least! First of all, I’ve been a proud father for about a month now and everything is fine on that front. Then again, we had a water damage (a forty year old weld let go) in our place and are currently trying to get permits from the city officials if we could actually fix and renovate the appartment a bit. Have a look here of what it looks like:

Sucks…

I have not been doing much of anything cloud related as I also moved to a new job from HP to Fortum and I guess somewhat also because I’m getting fed up with the hype. In my mind, cloud is just a way of sourcing the necessary resources, albeit having some characteristics not found elsewhere.

But, I’ll continue with clouds in fall when I hopefully have some more time.

Have a nice summer!