Filed in "linux"

Docker and Go Hello World

One of the most bandied about buzzwords at the moment has got to be Docker. So many people I’ve spoken to claim to be moving their application environments to it and some even have it running in production with varying degrees of success. Fine in theory The theory of isolating groups of related processes into containers which then themselves can be further orchestrated to build out an environment is very appealing.

Blogging on Ansible

A good friend of mine recently voiced the opinion that the day will soon be upon us when the traditional SysAdmin will no longer be relevant and all operations activities will be some variety of DevOps. Now, I’ve been managing my own infrastructure for some years but every package has been manually installed with every configuration file modified by hand, resulting in snowflake servers which are nigh-on impossible to recreate exactly and have occasionally caused me a lack of sleep.

Using Vagrant and Chef to setup a Ruby 1.9 development environment including RVM and Bundler

It has become common practice these days to use tools like RVM and Bundler to manage a project’s dependencies. When these pacakages are in place, getting up to speed with another project is a breeze. The Pain But how about installing these tools themselves? How about other dependant pieces of software such as databases and the like? What if they have to be compiled from source? What if they have to be installed with a package manager?

Installing RMagick on Debian Lenny

Just a quick reminder to myself on how I installed RMagick on a Debian 5.0.4 “lenny” VPS. All commands to be run as root. Build ImageMagick from source curl -O ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz tar xvzf ImageMagick.tar.gz -C /usr/src/ cd /usr/src/ImageMagick-6.6.6-6/ ./configure make make install Install the RMagick Gem gem install rmagick Bingo! As an interesting aside, ImageMagick handles a lot of image formats via delegate libraries. I previously installed RMagick on a CentOS box and had to separately install TrueType fonts which were necessary for the project in question.

Minder - a simple web-app monitoring tool written in Ruby

Background A few months ago I was tasked with migrating and maintaining a bunch of legacy Rails apps and a couple of them were misbehaving. Requests were hanging which was tying-up the front-end Apache child processes and resulting in all the web-apps on the server becoming unresponsive At the time I didn’t know what was causing the hanging requests, it wasn’t happening in a predictable manner and on the surface I had all the apps dependencies in place.

MySQL database backup with remote storage

Prevent a disaster After reading Jeff Atwood’s backup failure last month I decided to finally get around to doing something I’d been intending to do “one of these days” but had in actual fact been putting off for years. Here’s the steps I took to ensure the databases on my webserver were backed up every night and copies of the dumps stored remotely. On the remote storage machine Generate an ssh key pair with and empty password and put the public key on the remote server.

# shutdown -h now

I’ve just shutdown the beige box that was home to this blog for just over a year and a half until I started renting a VPS. I had intended to shutdown this machine since the start of the year but never got around to it and after a techie chat on IM with Dave Dripps earlier in the day decided to just “pull the finger out” and do the needful.

Belfast Linux meetings restarted on last Wednesday of month

Johnny has kicked the wheel off and BLUG meetings are starting up again on the last Wednesday of the month, starting this evening at 6pm in The Tap House, Lower Crescent, just off Botanic Avenue, Belfast. Some additional information is available on the BLUG Facebook group and on the Belfast Linux newsgroup. See you there!

command line history - me too

I’ve seen this on a couple of blogs recently so I thought I’d give it a go on the VPS this site is hosted on: steve@decaf:~$ history | awk ‘{a[$2]++} END {for(i in a)print a[i] " " i}’ | sort -rn | head -10 190 ls 80 cd 24 cp 22 sudo 19 rm 14 svn 12 history 11 tar 10 wget 10 vi And as root: 172 ls 59 vi 56 cd 22 apt-get 20 less 20 apache2ctl 17 apt-cache 15 cp 10 pwd 10 ps

Updating WordPress via Subversion: it works!

The last time a new version was released I decided to update my WordPress installation with Subversion with the idea being that this would make future updates easier. Well, the good news is that this technique works :) All it took was 3 simple steps: $ cd /var/www/sickbiscuit.com/blog $ svn switch http://svn.automattic.com/wordpress/tags/2.5/ . launch wp-admin/upgrade.php via web-browser To be safe I backed up the database prior to the update and so far everything seems good, job’s a good ‘un!

Updating WordPress via Subversion

I read a few months back that Stuart Langridge was using Subversion to keep his WordPress up-to-date and I thought: “that’s clever” and didn’t do anything about it. Today I was talking to Matt and he mentioned updating one of his WordPress installations and I noticed I was due an update myself. I downloaded the latest release and was having a quick skim through the upgrade procedure to make sure I wasn’t forgetting about anything and I spotted a link to the Subversion update instructions… I’m off work sick today and have the time so I decided to give it a go.

Site migration

I’ve just finished migrating sickbiscuit.com from my home development machine to my new VPS. DNS records have been updated and decaf is now handling mail and web traffic for the domain allow the only thing I’ve copied over is this blog. Hopefully this will give me the motivation needed to spruce things up a bit as the last iteration of sickbiscuit.com looked like it was designed by a programmer ;)

ISP style mail server on Debian VPS

Last month I decided to invest in a VPS from VPSLink. I had been considering this for a while, especially after my experience using an Ubuntu VPS with Infurious and after 2 power failures within as many weeks due to building work nearby to my home, my hand was forced. No more hosting on a Linux box on the end of a DSL connection for me! I opted for a XEN based VPS running Debian Etch.

ASUS Eee PC

I’m currently visiting my family in sunny Fermanagh and typing this from the ASUS Eee PC handed to me by Matt as I left the office yesterday. One word sums up my opinion of this little device: “amazement.” I’m amazed that something of this size and at a price of £220 can run a full Linux distribution, has built-in WiFi and can therefore allow me to perform all my day-to-day tasks.

Reinventing IRC - Jabber is go

After a lot of frustration, reading of documentation and even giving up completely on certain paths of action I finally got Jabber up and running. The “Jabber burnout” as Adian called it was terrible and only now do I feel de-stressed enough to write about it. I initially setup an installation of jabberd2 as I have had previous experience with it and was comfortable with it’s administration. I got it working without difficulty and could connect to it via a standalone client but ended up abandoning it when I tried to get a web interface working with it.

mod_python, trac and ubuntu no go

As I previously mentioned, my current task as Infurious system admin is providing the team with a bug/task tracking system, namely Trac. My initial thought was: “our server runs Ubuntu, this should be easy…” I could get Trac running via tracd and I could see that mod_python was working via mod_python.testhandler but the two didn’t seem to want to play together. Last night, after much frustration, I just gave up and configured Trac to run as a CGI application.

With Infurious Intent

It’s been a busy week. The lads and myself have been quite industrious, making plans and Getting Things Done. I’ve taken on responsibility of taking care of the Linux side of things and last night finished setting up an SSL enhanced, WebDAV accessible Subversion repository, for which Aidan has written an introductory guide. My current task is getting Trac installed and I’m quite enjoying being up to my elbows in command line goodness.

AjaxTerm

During my day job at $BIG_MONEY I’m behind a restrictive corporate firewall and as such can’t ssh to anywhere in the outside world. Which makes me sad. Step in AjaxTerm: What you are seeing is a screenshot of my screen session for a project I’m working on. Editing a Perl script with vi in my web browser, I love it!

MySQL upgrade

I finally got sick of not being able to use SQL subqueries and decided to upgrade my MySQL installation from 4.0.x to 5.0.x. I had wanted to do this previously but was afraid I’d end up breaking something and be left without a working development environment or a website either, for that matter, so I resorted to complicating my custom queries in CakePHP with JOIN statements :( I couldn’t find a 5.

Synchronising production and development code with subversion

Now that MacServ has been deployed keeping development and production copies of the code synchronised has become an issue. The app is still very much a work in progress, with daily requests for fixes & tweaks from the technicians using it and instead of keeping track of modified files and then manually updating them via scp, I decided to let laziness motivate me to utilise a less painful system. I spent a bit of time researching the use of rsync but decided that subversion would better suit my needs.

Ninan 1.1.0

The latest stable of Ninan was released a few days ago and I’ve just gotten around to upgrading my installation of it. There wasn’t much to the upgrade process: I downloaded and untared the archive and I thought I’d play it smart and copy over my old ninanconfig.xml and it appeared to work, but gave up the ghost when it came to actually downloading something. I renamed the file, restarted Ninan, reentered all my details and preferences and I’m now happily downloading at 1.

PHP predefined variables on BSD

I’ve been getting ready for the deployment of wow4kids.com and one of the final features to be into place was restricting access to the administrative back-end. I enabled admin routing in CakePHP and put all the back-end code into admin_* functions in my controller which are accessible via /admin/controller/action. I wanted to enable some form of access control but without utilising a full user management system which would have been overkill.

PyAIMt

Last week I found myself with the need to communicate with some people via AIM. I’d never bothered with that particular protocol before but being a Linux enthusiast I detected the opportunity for a bit of geekery… All my IM needs are taken care of by jabberd running on substance. I can communicate directly with the people I know who use Google Talk and I’ve the MSN transport running to keep in touch with a few folks using that network, so, instead of taking the easy route and switching to a multi-protocol client, I opted to install the AIM transport.

Fun with port forwarding

I’ve been having great fun with tunneling connections through SSH lately and today it dawned on me that I could close another hole in my firewall by connecting to my Jabber server via a tunnel. In the past, when I’ve been working remotely, I’ve made changes to my firewall by connecting to my public-facing machine; from there to my desktop machine through a DMZ-pinhole and once a presence has been established within the “green zone” browsing to the routers web-interface with lynx.

Security Enhancements for Dummies

I read a thread over on linuxquestions.org recently about server “hardening" and got thinking about my own security measures and the lack there of. Here’s an example of the content of /var/log/auth on the machine this site is hosted on: Jan 24 13:43:33 substance sshd[14182]: Invalid user test from 203.242.160.193 Jan 24 13:43:33 substance sshd[14182]: error: Could not get shadow information for NOUSER Jan 24 13:43:33 substance sshd[14182]: Failed password for invalid user test from 203.

Ninan 1.0.5 on Slackware 11.0

A couple of weekends ago I decided to reconstruct the system I use for downloading from Usenet: I had been using a Debian machine which I had setup back when I was still trying to get into using Linux on my desktop and as such it was massively over-powered for the task at hand, namely, leeching files from binary newsgroups and making them available via a network share. What follows is a tidied up version of the notes I made as I went along.

Friday Funk

I got into the office this morning and went through my usual routine; I’d put in a good workout and the weekend is fast approaching: life seemed good. I was logged on to my workstation, launched Outlook (I know, I know) and attempted to connect to substance via Jabber and SSH. My heart fell. That Slackware box has been online for nearly a year now and other than my own lack of technical ability, the only problem I’ve had was when I upgraded my version of OpenSSL and OpenSSH refused to restart.

XP on Kubuntu via VMware via VNC

I finally got around to doing something today that I had been meaning to do since I got Kubuntu installed on my home desktop, namely, setting up a virtual machine running Windows XP so I can perform DVD encoding/editing/authoring. I’m a relative novice when it comes to these techniques and I haven’t put enough effort into finding the equivalent native Linux applications, so it is a case of better the devil you know for the foreseeable future.

httpd Log Analysis

What a fun day yesterday was. I thought it would be interesting to know how many (if any) vistors I am getting to this site and proceeded to install and configure some tools to analyse Apache’s access logs. Through prior research I knew of the existance of Webalizer so I downloaded the source and attempted to build it. The build failed as I didn’t have the GD Graphics Library installed. I tried to build that but failed aswell, quite possibily because of another dependency.

Ruby On Rails

I decided last week to see what all the hype was about and have a look at Ruby On Rails. I’ve been meaning to catalogue my DVD collection on my site for a good while now but nothing ever materialised, so I’ve got something to work towards and if RoR delivers what it promises I should get something up and running quite quickly. The first thing to do was to track down some kind of reference material to learn from and this book seemed like the right place to start.

First Post From Kubuntu

I finally installed Kubuntu on my desktop machine at home at the weekend and I must say I am impressed so far. From my first experience with Red Hat 5.x in early 1999 (I’m guessing the version number from the date, I bought my first Linux book just before the exams of the first semester of my first year of Computer Science at QUB) I knew that *nix was real computing.

Here Lies Belfast

I was out and about with my sponsor on Saturday and we were walking up Stranmillis Ave and Friars Bush happened to be open for tours. My good friend Nicky K lives in one of the gate-keeper’s cottage, but in all my time living in Belfast I don’t think I’ve seen the place open to visitors and so I’d never been in it before. When I was a wee lad I used to live right next door to the graveyard of the local church so walking amongst the graves brought me back a bit.

Out With The Old, In With The New

I thought I’d keep myself current and so I’ve just upgraded my installation of WordPress from 2.0.2 to 2.0.4. I was a bit reluctant to do so as I was happy with what the software was doing, but I remember reading some mention of security updates, so I went for the plunge. The log files on this box are filled with failed login attempts so I know for certain that people are trying to find a way in and if doing something as simple (!

Revolution Now

Up until a few hours ago we had a Symantec firewall appliance protecting the office network from script kiddies and the like, but unfortunately it was prone to crashing and required regular rebooting. As I was returning from my coffee break I passed Kev who was leaving the room to go reboot said device. I was in an impulsive mood and when Kev returned I offered to build a new firewall.

Jabber

I’ve been deep in Linux-country for the past 2 days and have finally gotten a Jabber server up and running, along with the MSN transport. I’m suprised I succeeded to be honest, but by following the instructions It Just Works. jabberd is listening on nulltheory.com, so I can be contacted via ‘steve’ at that domain (having multiple domains definitely seems too complicated at times…). I’ve practically no knowledge of the use of public-private key encryption (studied the theory at uni though) so, as with my mail server, all communication is in plaintext for the time being.

Postfix(ed)

After much frustration I gave up on using Virtual Mailbox Domains and gave Virtual Alias Domains a go instead, and it worked! I wanted to set my mail server up like that of a commercial webhost and not have to rely on having to create a local account for each mailbox, but my Linux-fu isn’t that good :( But I can now send & receive mail from steve {at} <$domain>, job’s a good ‘un!

And So The Legend Grows

Just put the development site live, fingers crossed!