Note: Please go to to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > RightLink 6 > RightLink Legacy Versions > RightLink 5.8 and Lower > Create RightScale-Enabled Images with RightLink 5.8 and lower > RightLink 5.8 Installer for Debian

RightLink 5.8 Installer for Debian


Boot a non-RightScale enabled Debian GNU/Linux cloud instance or server, perform some additional configuration, install the RightLink package, and re-bundle the instance into a new, RightScale-enabled image. Optionally, create an MCI (MultiCloud Image) for your new image.

Do not forget to tag the MultiCloud Image! Any MCI that points to custom images that have RightLink installed must be tagged appropriately to successfully operate with the RightScale management platform; see the last step in this article for more information.

NOTE: Although the steps provided below for bundling an instance may still be applicable in some scenarios, we encourage you to explore using the Instance Provisioner for RightLink-enabling existing running instances. See Create New Instance with the Instance Provisioner for additional information.


The following tutorial assumes that you are not using a RightImage to launch a Debian instance. (You do not need to install RightLink if you are using v5 RightImages or later.)


Launch a cloud instance or RightScale server

To create a new RightLink-enabled Debian image, first launch a cloud instance in the desired cloud using the image you wish to RightScale-enable. At this time, Amazon EC2 and Rackspace have been tested and should work depending on the kernel used by your image. Official Debian images for various cloud providers can be found on the Debian Wiki.

Optionally, you can choose to launch the instance under a RightScale server (using the image for the 'Machine Image' field on the server). This is recommended if you wish to test connection to RightScale with RightLink prior to snapshotting or bundling an image. See the Test RightLink section below for more details after completing the RightLink install.

Note: With Amazon EC2 you will need to launch the instance using a Security Group where TCP port 22 is open (see Create a Security Group for details). 

SSH into the instance

Once the instance becomes operational, we need to open an SSH session to provide a terminal for the commands to follow below. To SSH into your newly operational instance, you will first want to copy the private key associated with the instance (such as the EC2 launch key associated with the instance) and save it to a file. This will be used as our private key to access the instance with SSH going forward. You can view this private key and copy it in the RightScale dashboard by navigating to the Clouds > desired cloud > Instances, locating your newly launched Debian instance, then clicking on the link for the SSH key on the Info tab.


Once the key is copied and saved to a local file on your workstation, you can then proceed to use an SSH client, such as Putty on Windows or OpenSSH on *nix based systems to open an SSH session to the server. The debian images mentioned above provide an SSH user of 'root' or 'admin,' so an example OpenSSH command might look like this:

ssh -i <path_to_private_key> admin@<instance_public_ip>

Replace <path_to_private_key> and <instance_public_ip> with the path to the private key (which you copied earlier from the Rightscale Dashboard) and the public IP of your instance. Once you have opened a successful SSH session you can proceed with the next steps in this guide.


Note: All terminal commands from this point forward assume you are acting as the 'root' user. If logged in as the 'admin' user, you can access full root permissions by issuing the command:

sudo su

Install prerequisites

Some tools will be required to complete task. Ensure you have installed any applicable software below before moving on to bundling.

Install Amazon EC2 AMI Tools

For Amazon EC2 (only), If the AMI you launched does not include Amazon EC2 AMI Tools, install them now.
Installing from ZIP (via the link above) and following the Amazon doc is recommended, however you can consider the quick method below.

Quick install from Ubuntu 12.04 (Precise)

Some users find it easy to install the ec2-ami-tools package from Ubuntu. This example installs the package from the Oneiric multiverse repository then reverts the Apt configuration:

mkdir -p /etc/apt/sources.list.d
test -e /etc/apt/sources.list.d/ubuntu-multiverse.list || touch /etc/apt/sources.list.d/ubuntu-multiverse.list
cat <<EOF>/etc/apt/sources.list.d/ubuntu-multiverse.list
deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse
gpg --keyserver hkp:// --recv-keys 40976EAF437D05B5
gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -
apt-get update && sudo apt-get -y install ec2-ami-tools
rm -fv /etc/apt/sources.list.d/ubuntu-multiverse.list
apt-get update

Install RightLink

Check if a RightScale package is already installed
dpkg -l | grep rightscale

if doing an upgrade (or re-initializing rightscale/right_dlink), it may be preferable to stop RightLink and all processes:


# check if any rightscale processes are running
ps aux | grep rightscale

# stop rightlink
/opt/rightscale/right_link/scripts/rnac.rb --stop instance
service rightlink stop

# arbitrary kill of all rightscale processes
ps ax | grep rightscale | awk '{print $1}' | xargs kill

Optionally, remove the existing rightscale package (generally only used if you have problems doing a package upgrade below):


dpkg --purge rightscale
Locate a suitable Debian package

Currently no native Debian packages are available. However, the Ubuntu packages have been know to work.

Browse RightScale's mirror ( for available RightLink packages. Although we recommend using the latest available RightLink package, it may not be available for your particular release.

The most recently published packages can be found in the "latest" RightLink packages directory. If you do not find a suitable package in the "latest" directory, you can also browse for a different version from one of the archived directories. You must choose the distribution package that's most appropriate for your purposes, based upon your instance's operating system and CPU architecture (32-bit or 64-bit).

Install RightScale package dependencies

There are a few dependencies to the RightLink package. Manually install the following packages (some of these will likely already be installed).

apt-get -y install libc6 debconf curl git-core lsb lsb-release bash dnsutils

We also need to install the 'rightimage-extras' package, which is a meta package that lists other packages essential to ServerTemplate functionality. To install, configure a repository:

# Import RightScale public key
curl | apt-key add
cat > /etc/apt/sources.list.d/rightscale_extra.sources.list <<-EOF
deb precise main

Then, update APT and install the package:

apt-get update
apt-get install rightimage-extras -y
Set the Cloud Type

The /etc/rightscale.d/cloud file is used by the RightLink agent to recognize the cloud platform the instance is running on.
Run the following command to set the cloud type for the image to that of your running instance:

Amazon EC2
mkdir -p /etc/rightscale.d && echo -n ec2 > /etc/rightscale.d/cloud
mkdir -p /etc/rightscale.d && echo -n rackspace > /etc/rightscale.d/cloud

Other possibilities for 'cloud type' include:

  • ec2
  • rackspace
  • eucalyptus
  • cloudstack
  • none
Install the RightLink package

Install the desired RightLink package. If upgrading RightLink or re-initializing, ensure you have stopped all Rightscale/Rightlink processes before upgrading. This will assist in a smooth package upgrade and assist in testing the server.

Latest Ubuntu package

The following script downloads the latest x86_64 Ubuntu debian package from the mirror. Use variable value arch=i386 for 32-bit instances and images.

debs=$(curl -s"$distro"/ | perl -0ne 'print "$1\n" while (/<a\s*href\s*=\s*\"(.*?)\">.*?<\/a>/igs)' | grep .deb | grep "$arch") && deb=$(grep "$arch" <<<"$debs")
echo Installing "$deb".
cd /tmp
(wget "$distro/$deb" && dpkg -i ./"$deb" ) || echo 'RightLink installation failed!'
Specific package on mirror

Alternatively, install a specific version from the mirror (only recommended if a specific reason to not use the latest exists).

The following installs RightLink 5.8.8 on a 32-bit instance:

cd /tmp
wget -q
dpkg -i ./rightscale_5.8.8-ubuntu_10.04-amd64.deb
RightLink 5.7 package with Alien

Alternatively, using this method installs a RightLink 5.7 RPM package using Alien.

Warning! This is experimental and not recommended!

# install rpm via alien because a deb package for 5.7 not yet available
cd /tmp
apt-get -y install alien && alien --scripts ./rightscale_5.7.14-centos_5.6-x86_64.rpm
dpkg -i ./rightscale_5.7.14*.deb && rm /tmp/rightscale_5.7.14*.deb
Rackspace workarounds

Because XenServer 3.3. utilities are not provided in Debian (only Xen 4). The following can be used to disable waiting for the instance and addressing RightLink's need for the xenstore binary (as opposed to xenstore-read in Xen 4.x):

# comment out wait_for_instance_ready in rightscale/rightlink
sed -e 's%/opt/rightscale/bin/right_link_cloud.rb --name $RS_CLOUD --action wait_for_instance_ready%#/opt/rightscale/bin/right_link_cloud.rb --name $RS_CLOUD --action wait_for_instance_ready%g' -i /opt/rightscale/etc/init.d/rightscale_functions

# add a dummy xenstore binary just in case its referenced
cat <<EOF>/usr/bin/xenstore
# substitute for xenstore to always return 0 after a sleep
sleep 30
exit 0
chmod +x /usr/bin/xenstore

Test RightLink

If you decided to start your instance under a RightScale Server that uses a ServerTemplate, run the following to bootstrap and start the agent:

/opt/rightscale/right_link/scripts/rnac.rb --stop instance
service rightlink stop
service rightscale start
service rightboot start
service rightlink start

You many notice some errors with the first 2 commands above. These are run just to ensure the agent is fully stopped first, however they do not need to be run if carried out earlier.

Check result in system log

When completed, start tailing the system log to observe the agent booting and running any boot scripts your server has:

tail -f /var/log/syslog || tail -f /var/log/messages

Bundle the Instance

If using Amazon EC2, create a new AMI from the running instance by clicking the Bundle button in the dashboard.
Once the bundle worker has completed the task, view the bundler audit entry on the Audit Entries tab and take note of the AWS ID that was used to register the new AMI.

Note: You may only see an audit entry if bundling an instance store AMI and not an EBS backed AMI. If bundling an EBS backed AMI (such as the official Debian images listed in their wiki), then when bundling you may be redirected to the AMI info page in the dashboard directly. You can also always locate your image after bundling by navigating to the Clouds > Cloud/Region > (EC2) Images > Personal tab and searching for your image.


For Rackspace's legacy cloud, the above process can be used to essentially RightScale-enable a Rackspace Cloud Server without the need for reboot.
See the document, Creating a New Cloud Server (Cloning) From a Saved Backup Image.

Test the Bundled Image (optional)

To perform a compatibility test on the new private RightLink-enabled image that you just created, see Testing your Private RightLink-enabled Image.

Create a MultiCloud Image (optional)

In order to properly use the new RightScale-enabled image with ServerTemplates, you should create a MultiCloud Image (MCI) that references the new image. See Create a New MultiCloud Image. The MCI can then be added to any local (HEAD) ServerTemplates in your account. If you need to make that image available in a different AWS region, follow the Replicate an Image to different AWS regions

Tag the MultiCloud Image (mandatory)

Once you've created the MCI, you will need to add the following tag to the MCI so that RightScale will be able to identify the created image as a RightLink-enabled image:



Congratulations! You now have an MCI that points to a RightLink-enabled image for launching Debian instances. Just like any other instance that is launched using one of our v5 RightImages (which are RightLink-enabled by default), you will be able to see monitoring graphs and execute Rightscripts inside the Rightscale Dashboard.

You must to post a comment.
Last modified
09:56, 19 Feb 2015


This page has no custom tags.


This page has no classifications.



© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.