Tag Archives: Apache

First Look: Apache DeltaCloud

As I was browsing my Twitter feed last night I can across a tweet that talked about the 1.0 Release of Apache DeltaCloud.

As described on the website:

Deltacloud provides the API server and drivers necessary for connecting to cloud providers.

Deltacloud maintains long-term stability for scripts, tools and applications and backward compatibility across different versions.

Using single API Deltacloud enables management of resources in different clouds.

Start an instance on an internal cloud, then with the same code start another on EC2 or RHEV-M

For something that has come out of the relative blue, it tweaked my interest right off the bat. Where I see value in this, isn’t so much in the fact you can seamlessly control compute/storage instances from the one platform, but in the ability to look at using the API’s/REST mechanisms to control vSphere instances. Now, I’ll be up front and honest that I’ve never had a chance to look at coding/developing at this level…it’s all very much outside of my current ability, but I am seeing the need to be at least familiar with these mechanisms…I see them begin increasingly useful in the (sic) Software Defined Datacentre era. It’s a skill that needs to be learnt on my part.

Anyways, I dove straight into the installation on a spare Ubuntu 12.04 Lab VM I have running her at Anittel. I followed the step by step here: and went about installing the various packages and dependencies. I cam across a few issues where I had to look for slightly different package names then the ones listed (which may be a reason why I have run into some issues: below). But i’ve listed my initial installs below:

 

Once that’s been done you can run DeltaCloud from the cli as per the instructions here: Right off the bat, trying to run against the vSphere driver I got the following error:

So, something is obviously wrong with the vSphere/Rubi driver. After a little searching, I couldn’t find anything definitive, so I have given up on the vSphere angle for the moment. It might well require a fresh server build as my lab instance is a little dirty.

In any case, the guys at Apache have given you the option to run up a mock instance by running this command. Note that if you want to access the website from the server IP outside of the OS you need to specify the -r command.

 

Browsing to that address you are presented with a very clean interface:

deltacloud_1

Without anything real (in terms of instances behind it) all the options look useful in the cloud compute/storage world, and clicking through a couple of the areas, you start to get a feel of the potential usefulness of the platform.

deltacloud_2
deltacloud_3

And a list of the supported cloud/storage provider drivers (once you get them working)

deltacloud_4

So, without being able to actually do anything useful…as a first look the platform looks very interesting. Hopefully with a fresh build I can get the vSphere driver working and really start to put it to work.

And if anyone has a quick fix for the issue above, feel free to post or email.

Load Balancer Internal IP’s Appearing in IIS/Apache Logs: Quick Fix

If you are NAT’ing public to private addresses with a load balancer in between your web server and your Gateway/FireWall device you might come across the situation where the IIS/Apache logs report the IP of the Load Balancer, when what you really want, is the client IP.

It’s obvious that the biggest issue with this is that any Log Parser/Analytic’s you do against the site will all be relative to the IP of the load balancer. All useful client and geographical information is lost.

Most Load Balancer’s get around this by inserting a Header into the packet that relates to Client IP. In most cases that I have seen, both Juniper and NetScalers the Header is set to rlnclientipaddr.

What needs to be done at the web server configuration level to help pick up on and translate the header info so it can be used to translate the correct client IP into the log files. There are obviously different way to achieve this in Apache, compared to IIS and Apache has a much simply solution than IIS.

Apache:

In your apache.conf go to the LogFormat sections and modify the default format as shown below (Replace the Red text with the green text) and restart the Apache Service.


IIS
:

The IIS 5/6/7/8 solution is a little more involved, but still just as efficient and not overly complicated at the end of the day…in fact for me the hardest part was actually chasing up the DLL’s linked below. It must be noted that while this has worked perfectly for me against both a Juniper DX and NetScaler VPX load balancer I would suggest testing the solution before putting it into production. Reason being is that the ISAPI filters are specifically sourced for the Juniper DX series, but in my testing I found that they worked for the NetScalers as well. Sourcing the x64 DLL’s was a mission, so in this I am saving you a great deal of time by provided the files below.

rllog-ISAPI

Download and extract those files into your Windows root. Go to the Features View -> ISAPI Filters and Click on Add. Enter in the Name and Executable Location and click ok. Note that it’s handy to add both 32 and 64 bit version to a 64bit IIS Web Server just in case you are dealing with legacy Application that are required to run in 32bit mode. Adding the ISAPI Filter at the root config of the Web Server so it propagates down to all existing sites and any newly created sites.

isapi_dll