Tag Archives | CloudServices

How the cloud failed me.

We host our Linux boxes on Rackspace’s Cloud Server platform. We pay extra per month to use their Redhat Linux images. In return we receive all our patches and updates through Rackspace’s RHN Satellite server. Our thinking was that, we could purchase a Redhat support contract, and  since we were running Redhat we would have OS/Application support if needed.

We were every happy with the service until the cloud failed me.

It all started when the new WordPress 3.2 required PHP 5.2.4 or higher. Redhat 5.5 only shipped with 5.1.x. I needed to update my Redhat VMs to 5.6 as Redhat 5.6 had PHP 5.3.x. BUT. Rackspace decided not to deploy 5.6. They said it is coming, but weeks later I still can’t access it.

They suggested I go to a non supported repo and install it from there. But that defeats the whole purpose of using Redhat on their VMs – I would not have a support path – Redhat would not support a package that was not in their repo (understandably).

I was forced to buy Redhat support contracts for my servers. Now, we are paying twice for updates, with a support contract and with Rackspace’s extra cost per VM for running Redhat.

We have all heard that “forced upgrades” is a downside of cloud services.

This is the opposite – their cloud service is holding me back.

Rackspace Cloud Files download script

A new(er) tool in the services I use/recommend is Rackspace Cloud servers and Rackspace Cloud Files.

We were evaluating cloud services to host client websites, and I ended up choosing Rackspace’s cloud offerings. I really like the services the provide.

With their Cloud files, I can upload files that can be accessed anywhere. I decided that I wanted to put our common scripts there, that way when we provision a new server, behind a firewall or in the cloud, we can pull from the same place. All I would have to do is keep them up to date in one place.

Before I knew about Chef (future project I can’t wait to have time for), I created simple scripts to install a common set of packages on every server – our SOE (Standard Operatin Environment). Once a server is provisioned, from any other server, we can update the new server to have the same core set of packages and configurations. The most important part of this is that we install GIT and pulldown the python-cloudfiles:

yum install git -y
git clone git://github.com/rackspace/python-cloudfiles.git

Once python-cloudfiles is installed, we use the following script to pull down the common set of scripts:

conn = cloudfiles.get_connection('usename','keynumberthatisreallylong')
cont = conn.get_container(container)
obj = cont.get_objects(path=sourcepath)
for filename in obj:
	print "Downloading " + (os.path.join("/",container,sourcepath,os.path.basename(filename.name))) + " to " + destpath
	filename.save_to_filename(os.path.join(destpath, os.path.basename(filename.name)))
	destfile = os.path.join(destpath, os.path.basename(filename.name))
	timestamp = filename.last_modified[:filename.last_modified.find(".")-3].replace('-','').replace(':','').replace('T','')
	cmd = "touch -m -t " + timestamp + " " + destfile

What this does is pull down each file in a directory in the Cloud Files infrastructure and saves it locally. Then I added the extra step of setting the modified date to the Cloud Files last_modified date, so that we can tell what downloaded files have been changed recently (uploaded to Rackspace Cloud Files).

I look to replace this with Chef one day, but right now it works really well for us