The Turnkey Linux project is an online library of Debian-based operating system images that offers installed and preconfigured sets of popular open source software. Currently, it has just over 100 ready-to-use solutions (you can see the full list on the Turnkey Linux website: http://www.turnkeylinux.org/).
So if, for example, you are web developer who doesn’t want to spend too much time on infrastructure setup and configuration, Turnkey Linux is the way to go. The downside is that it will provide extra server functionalities which you may not need.
In this blog post, I’m going to describe an environment enrollment process for a small team of developers who are working on the same project using Alberta’s Rapid Access Cloud. To follow this setup, you will need the following:
development platform – LAMP stack server (http://www.turnkeylinux.org/lampstack)
version control system – GitLab (http://www.turnkeylinux.org/gitlab)
open source continuous integration server – Jenkins (http://www.turnkeylinux.org/jenkins)
project management and bug-tracking tool – Trac (http://www.turnkeylinux.org/trac)
The default Rapid Access Cloud account resources are 8 CPUs, 8G of memory, IPv6 for each compute instance, and only one IPv4 public address. Unfortunately, most of the internet providers for residential areas have yet to implement IPv6, which is why you will also need to configure a VPN connection to your cloud. You can read more information about this in Cybera’s guide to RAC and IP Addresses.
Let’s start by creating a virtual machine inside the Rapid Access Cloud, which will be used to create all of the other virtual machines. We’ll call it “TurnKeyBootstrap”. (More information on launching and configuring virtual machines, security groups, private keys, etc., can be found on Cybera’s website: http://www.cybera.ca/projects/cloud-resources/rapid-access-cloud/documentation).
When configuring your Security Groups, make sure you only allow access from trusted and known IP addresses.
To start, launch the TurnKeyBootsrap instance with the m1.micro flavor, assign the IPv4 address, and then login.
Now update your system and install the nova tools and git application:
> apt-get update
> apt-get-y upgrade
> apt-get-y install git
There is a small script on GitHub’s website (https://github.com/belimor/turnkey.to.RAC/blob/master/turnkey_to_rac.sh) which will help you to avoid typing all commands manually. All you need to do is specify the TurnKey image name and Key Pair name. Don’t forget to create and source the Openstack RC file.
> source openrc
>Please enter your OpenStackPassword
> git clone https://github.com/belimor/turnkey.to.RAC
> cd turnkey.to.RAC
Please, enter your KeyPairName:
Repeat these steps for other images:
(You still have the resources to install several lamp servers for other users).
The final result should look similar to this:
Your infrastructure is almost ready! The final step is to configure the VPN connection to your virtual environment, and setup passwords for all services. To do this, just ssh to the servers with your private key, and follow the on-screen instructions:
ssh -i blogpost.pem firstname.lastname@example.org
ssh -i blogpost.pem email@example.com
ssh -i blogpost.pem firstname.lastname@example.org
ssh -i blogpost.pem email@example.com
Check your results by navigating to the web pages using the servers’ private IPs:
This is just a simple example of how to build a development, test or “proof of concept” environment with the Linux Turnkey images. You can easily replace the LAMP stack with Ruby on Rails or Python frameworks. You can also use the Github public repository instead of a private one, or setup your own VPN server to do many other things. So go ahead and check what is available on the website (http://www.turnkeylinux.org/) and see how it fits to your needs, and leave your comments below if you have any suggestions or questions about the process.
comments powered by Disqus