Linode PHP Library Composer Package

I use Linode to host my VPS’s that run my websites and various other services online. I also use their DNS manager to host DNS services for the hundreds of domain names I own or manage for my clients.

Many of my domains are duplicates from different Top Level Domains (TLDs), for example, I own hampelgroup.com, hampelgroup.net, hampelgroup.com.au, hampelgroup.net.au, etc.

I choose one of the domains to be the primary and the others are all set up as aliases so that if you visit hampelgroup.com.au you will be automatically redirected to hampelgroup.com.

With well over 500 domains that I am responsible for, maintaining DNS records for them is a challenging task.

To help with many of the repetitive tasks I found myself doing, a couple of years back I built a DNS management utility which interacted with Linode’s API and allowed me to automate many tasks.

Because I was building a lot of WordPress sites at the time, I built the original application as a custom WordPress theme. This allowed me to effectively use WordPress as a framework giving me access to their database access routines and a nice interface for managing configuration options and such.

While this worked, it is certainly not ideal and there were some quirks with the interface I found a bit annoying. There were some additional functions I was interested in adding to my management interface, but the prospect of further hacking was not particularly appetising.

However, now that I’m starting to get into Laravel, I thought this would be a great opportunity to learn while also improving on my DNS tool.

First step was to re-write my Linode API wrapper (previously a very simple PHP class). I’ve built a new Composer Package and started with the domain.* and domain.resource.* API calls. One day when I have some spare time, I’ll look at adding support for all the other Linode API calls (or someone could fork my code and help me write them!).

Bitbucket / Git: Hampel Linode

Composer: hampel/linode

Just a warning – once I start re-writing my DNS management application, I might find some changes I need to make to my Linode API library to make it easier to work with, but for now, it works well enough to use.

I may even decide to open-source my DNS management application, there might be one or two people out there who have similar challenges as I do with managing large domain portfolios.

Tags: ; ; ; ;

  • Share it!

Leave a Reply

Your email address will not be published. Required fields are marked *