(Or how to set up a fully functioning Joomla, Drupal, LAMP, LAPP, Zimbra, Torrent, etc. server, in a couple of minutes)
Turnkey Linux included a set of free Ubuntu-based applications. software devices which are mainly available for server-type usage scenarios, such as database, web, forum, wiki, and photo gallery server setup. Each device is preconfigured to work out of the box, with ease of use being the primary focus of the Turnkey Linux project.
This is extremely useful in itself, but if you wanted to experiment with these devices, potentially to evaluate or test them, it would be great if you could install with minimal effort.
Using turnkey Linux on virtual private servers
Various hosting providers provide Linux VPS services, which generally allow users to have their own virtual server with automatic provisioning of major Linux distributions, such as Debian, Ubuntu, or CentOS. The work has been done in conjunction with the Turnkey Linux team and has taken the concept of automatic installation one step further to allow this to work with all Turnkey Linux devices. This is made possible by using frameworks provided by the server’s excellent open source control panel, DTC.
Turnkey Linux devices allow users to easily deploy primarily web-based applications within a complete set of Ubuntu and Linux kernel-based packages. Once a distribution is chosen within the control panel, the installation is complete in a few minutes and is ready to be customized. This enables rapid deployment of a proven configuration, with full upgrade and security support provided by Linux and Ubuntu package maintainer.
Our efforts are available to all who use the DTC control panel, with Debian packages for Lenny provided. Additionally, scripts have been written so that when new or updated devices are released, new deployable packages are created for the DTC control panel and made available to our repository automatically.
Script technical details
It’s not really too difficult to configure images to work for automatic deployment, but doing this manually for each device is a time-consuming process. The scripts we have written will automatically perform the following steps for each device:
- Create a new directory with a name similar to the actual release version, eg. Ex. turnkey-core-2009.02-hardy-x86.
- Copy to common template files. These include the following:
- custom_os: Customize each device by configuring basic networks, generating gettys on the correct devices, and configuring a custom MOTD with the VPS number and hostname.
- install_os: Custom instructions to install this device, which basically involve unchecking the image provided in the VPS.
- setup_network: Custom instructions called when setting up the network. Because Turnkey Linux uses resolveconf for DNS configuration, it reads information from /etc/resolv.conf del dom0 (this is designed for use with Xen) and copies it to / etc / network / interfaces in the domU.
- debian / *: These are the change log files, control, compatibility, copyright, files, installation, and rules that are required to create a.deb packages. These have substitution variables (eg for the package name) that are overwritten by our script.
- Copy the pre-installed image (a.tar.bz2 file).
- Adapt the template files (as shown above).
- Invoke dpkg-buildpackage in this directory to create the current.deb file.
- Call reprimand, a tool that we use to manage the directory structures of the Debian repository, to remove old versions of this device and to add the new one.
It’s as simple as that. If interested, the raw scripts can be downloaded. They will need some customization for their setup as there are hard-coded directories there.
I want to play with one!
If you are satisfied playing with a single device, you can of course download it from the Turnkey Linux website and install it on your PC (or use a virtualization solution like Xen or VMWare).
However, if you want to quickly test a variety of devices using the setup we’ve made, the fastest way would be to rent a VPS. Alternatively, you can install the DTC control panel yourself and add our Debian repository to your /etc/apt/sources.list. This configuration requires you to run a full-featured Xen configuration and requires significant configuration.