Category: Labs

We are working on a range of lab projects which form an important part of our web hosting products. This category includes blog posts about our lab projects.

Access Control – Are you in or out?

access-control-feature

As CatN continue on our journey towards ISO 27001 accreditation, part of the information security policy requires that we have an active and enforced security model in place at our office location.

Since introducing an access control system in June 2010, all employees have been required to tap in and out of the office using RFID technology, however the process for keeping track of guests coming in and out of the building has been very much a manual process.

Read More…

Create an OpenStack instance with just Curl

For some reason, the idea of direct interaction with the various OpenStack components seemed like a good idea. The aim was to create an instance, set sane security rules, and add a public key all through the API.

I struggled with the documentation. It was a little hard to find, and what I did find seemed a little thin. However with the –debug option on the cli clients, which prints out all of the calls made to the various API endpoints as it goes along, it was game on.

First things first, we need an OpenStack environment to play with. RedHat with their newly released RDO comes to the rescue here. Out of all the one click OpenStack tools I’ve tried, RDO has been the simplest by far. Just three simple steps. Well, if you don’t include step 0 of course: http://openstack.redhat.com/Quickstart . We also installed a machine image through the dashboard to make life a little easier.

Read More…

Building a virtual machine image for CentOS

CentOS Images Featured Header

This post describes the process of creating a CentOS virtual machine image. Creating a base or master image is incredibly useful in a cloud environment as it allows the creation of multiple nodes / VMs or guests based on the original template.

We have an existing CatN Labs project where we are hosting pre-built CentOS golden master images for use when deploying multiple nodes. You can read about the project on the CatN Labs CentOS Images page.

The base image is a static template of software including OS which is mounted when the VM runs and referenced by further clone nodes. To get started on the base template you will need to have some tools installed on your Linux node. Adapt the following commands for your distribution of choice!

Read More…

CatN goes to CentOS Dojo Antwerp

It’s no secret that we use a lot of CentOS at CatN, in fact we have deployed thousands of instances over time on both physical and virtual machines, and we have 4 Red Hat Certified Engineers (soon to be 6) on staff.

As a company with deep expertise and experience with CentOS it makes complete sense that we understand where our software comes from. You only have to look at the state of our food chain to see that interest in your upstream makes a lot of sense. At the end of the day we have to trust the food [software] that we eat [install]!

Getting to events like this is a great way to get a feel for a community, meet people and potentially find a way to contribute back into the ecosystem as well. What’s not to like about that?

Read More…

Advanced PHP error handling in the cloud

LogPipe is a PHP extension module that extends the default PHP error messages with additional information and allows you to pipe the logs to an external program or write them to a syslog facility.

When a user connects to a PHP website hosted on a cloud platform like vCluster, the response may come from different web servers running on different virtual and physical machines. This introduced the problem of needing to aggregate the PHP error logs from different cluster nodes and then split them up again based on the virtual host. Unfortunately the default PHP error message handler does not provide the information or ability to pipe the error logs to an external program, unlike the CustomLog directive in Apache does.

Read More…

Unit Testing WordPress Plugins: The Right Way

Whether you are currently writing a WordPress plugin and have decided to embrace unit testing or you are about to begin development of a plugin and want to unit test it from the start, learning how to do it correctly is a must.

This guide assumes you have a working LAMP stack (or similar) setup on your development machine and have reasonable knowledge of databases. For easy set up of a LAMP stack see XAMMP (windows/linux) or MAMP (Mac). You should also have Git installed.

Read More…

TCPWebLog – Collecting and Aggregating Web Logs on the Cloud

TCPWebLog is a Free Open Source Software system to collect and aggregate Web-type logs (i.e. Apache, Varnish, PHP, FTP …) from multiple GNU/Linux computers running on a Cloud.

When a user connects to a Website hosted at CatN, the response may come from different Web servers running on different virtual and physical machines. This first introduced the problem of needing to aggregate the logs from multiple cluster nodes to a central log server, and then split them up again based on the virtual host. Here at CatN, for each virtual host we used to write on a central place distinct log files for Apache Access log, Apache Error Log, Varnish, etc. These files are then rotated and processed using other software tools which required a significant administrative overhead.

Read More…

How to create TCPWebLog RPM packages for Enterprise Linux

This is a short hands-on tutorial on creating TCPWebLog RPM packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL).

TCPWebLog is a Free Open Source Software system designed to collect and aggregate Web logs (i.e. Apache and Varnish) from multiple GNU/Linux computers running on a Cloud. For more information please read the blog post: TCPWebLog – Collecting and Aggregating Web Logs on the Cloud.

Read More…

DevOps Ninja Assassinates Web Logs!

Hello, I’m Ben and I recently joined the CatN team as a Systems Engineer / DevOps Ninja.

My first proper task was to get statistics working for two sites hosted on an early alpha of vCluster version 2; housepricecrash.co.uk and insanelymac.com. This proved to be quite tricky and required a good understanding of the way things worked.

First off I looked at the PHP script on our syslog1 server that runs daily on the cron and fetches stats from AWStats for the previous day.  This uses a MySQL database to find which sites it will fetch stats for, and screen scrapes an AWStats page for each one to do so. Read More…

ServerUsage – Measuring users’ activity on Linux hosts

ServerUsage is a Free Open Source Software system to collect and process usage statistic information from multiple computers running a GNU-Linux Operating System.

Since CatN is a “cluster” hosting company, one of the challenges is to track and analyse the customers’ activity spread on multiple physical hosts for both monitoring and billing purposes. From each physical host we need to collect at regular intervals the total disk I/O, the network traffic and the CPU ticks used by each system user, process and IP address. This “raw” log data must be then aggregated and processed on a central point to extract relevant information.

After spending some time searching for a ready-made solution I decided to start the ServerUsage project to best-fit our needs. This project is now available as a Free Open Source Software, so anyone can freely use and contribute to it.

Read More…