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 RedHat Enterprise Linux (RHEL)

MindTouch
Copyright (c) 2006-2014 MindTouch Inc.
http://mindtouch.com

This file and accompanying files are licensed under the MindTouch Master Subscription Agreement (MSA).

At any time, you shall not, directly or indirectly: (i) sublicense, resell, rent, lease, distribute, market, commercialize or otherwise transfer rights or usage to: (a) the Software, (b) any modified version or derivative work of the Software created by you or for you, or (c) MindTouch Open Source (which includes all non-supported versions of MindTouch-developed software), for any purpose including timesharing or service bureau purposes; (ii) remove or alter any copyright, trademark or proprietary notice in the Software; (iii) transfer, use or export the Software in violation of any applicable laws or regulations of any government or governmental agency; (iv) use or run on any of your hardware, or have deployed for use, any production version of MindTouch Open Source; (v) use any of the Support Services, Error corrections, Updates or Upgrades, for the MindTouch Open Source software or for any Server for which Support Services are not then purchased as provided hereunder; or (vi) reverse engineer, decompile or modify any encrypted or encoded portion of the Software.

A complete copy of the MSA is available at http://www.mindtouch.com/msa

RightLink 5.8 Installer for RedHat Enterprise Linux (RHEL)

Objective

Boot a non-RightScale enabled RHEL instance, perform some manual configuration, install the RightLink package, and re-bundle the instance into a new, RightScale-enabled AMI. Optionally, test compatibility before bundling and create an MCI (MultiCloud Image) for your new image.

Important!

  1. 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.
  2. These instructions apply only to RightLink v5.5 and above. RightLink packages prior to v5.5 did not install clean under RHEL and required extensive changes.

Overview

RightScale officially supports AWS pay-by-the-hour AMIs for RHEL, or custom RHEL AMIs that use a customer supported satellite server. RightScale RHEL RightImages are coming soon. In the meantime, you can install RightLink on a RHEL AMI.

Steps

Launch a Bare RHEL EC2 Instance

If you do not wish to prepare your image for testing, you can launch a "bare" instance that is not attached to a RightScale Server.

In the RightScale Dashboard, navigate to the appropriate cloud in the menu (e.g., Clouds > AWS Region > Instances > New) and launch a new instance with the AMI you would like to RightLink-enable.

Note: RightScale only provides a 64-bit RightLink package at the current time, so be certain your instance architecture is compatible before proceeding.

SSH Into the Instance

Once the instance or server becomes operational, we will need to open an SSH terminal to the bare instance.

Note: These instructions are for an RHEL 6.4 x64 image, so you may be able to simply use the SSH Console button in the RightScale dashboard for a different image, or may need to login as a different user. The below directions are also specific to the OpenSSH client on a *nix platform. 

 

First, obtain the private key that the raw instance was launched with. To do so, navigate to your instance in the RightScale Dashboard under the Clouds > AWS Region > EC2 Instances menu, then click on the SSH key link on the Info page of the instance. This should expose the private SSH key that the instance was launched with.

 

Copy and paste this key into a file on your local workstation and save the file (using a text editor, such as vim, nano, etc). Once the file is saved, change it's permissions to 'read only' for the owner:

chmod 400 <path_to_key>

Now, you should be able to SSH into the instance as the 'ec2-user' user, like so:

ssh -i <path_to_key> ec2-user@<hostname_or_IP_of_instance>

Important! All commands run in an SSH terminal from this point forward should be run as root. To gain root access, simply type:

sudo su

and you should be granted full root privileges to the instance.

Set the Cloud Type

Run the following command to set the cloud type to Amazon EC2:

mkdir -p /etc/rightscale.d && echo -n <cloud_type> > /etc/rightscale.d/cloud

This file is used by the RightLink agent to recognize which cloud type the instance is running in. Valid cloud types are as follows:

 

  • ec2
  • rackspace
  • eucalyptus
  • cloudstack
  • none
Install EPEL Package

The Extra Packages for Enterprise Linux (EPEL) project provides thousands of prebuilt RPMs for supplemental packages that are built and maintained by the Fedora open-source community. The RightLink RPM depends on some of these packages as prerequisites and cannot be installed unless EPEL is available to satisfy the dependencies.

You can EPEL-enable your system by installing the EPEL repository package. The repository package configures your system's YUM or up2date system to use EPEL's repositories. You can then install packages with your usual method, and the EPEL repository will be included and used to satisfy any dependencies:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Or for a different architecture or version:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Install DependenciesEdit section

Install the RPM package dependencies manually prior to installing RightLink:

yum -y install git curl bash lsb

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:

sudo cat >/etc/yum.repos.d/RightScale-epel.repo<<-EOF
[rightscale-epel]
name=RightScale Software
baseurl=http://cf-mirror.rightscale.com/rightscale_software/epel/6/x86_64/archive/latest/
gpgcheck=1
enabled=1
gpgkey=http://s3.amazonaws.com/rightscale_key_pub/rightscale_key.pub
EOF

Then, install the package:

yum install rightimage-extras -y
Install RightLink

Browse RightScale's mirror (http://mirror.rightscale.com/rightscale_rightlink/) 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 one of the "latest" directories, 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 the appropriate RPM package. You can copy and paste the link from your browser if desired.

Latest Package


The following script downloads the latest x86_64 RedHat Enterprise Linux (RHEL) package from the mirror:

 

#!/bin/bash
arch=x86_64
rpms=$(curl -s http://mirror.rightscale.com/rightscale_rightlink/latest/rhel/ | perl -0ne 'print "$1\n" while (/<a\s*href\s*=\s*\"(.*?)\">.*?<\/a>/igs)' | grep .rpm | grep "$arch") && rpm=$(grep "$arch" <<<"$rpms") && \
echo Installing "$rpm". && rpm -iv http://mirror.rightscale.com/rightscale_rightlink/latest/rhel/"$rpm" || echo 'RightLink installation failed!'
Specific Package

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.

64-bit instance

rpm -iv http://mirror.rightscale.com/rightscale_rightlink/latest/rhel/rightscale_5.8.8-rhel_5.8-x86_64.rpm
Set the RightLink version

Run the following command to specify which version of RightLink you installed:

echo -n 5.8.13 > /etc/rightscale.d/rightscale-release

Bundle the Instance

Note: the RightScale BundleWorker requires the SFTP subsystem to be enabled on your instance. This is disabled in many images.
You can usually re-enable with:

sed -i s/#Subsystem/Subsystem/g /etc/ssh/sshd_config && service sshd restart

To create a new AMI from the running instance, click the Bundle button in the Dashboard.
Once the bundle worker has completed the task, view the audit entry and take note of the AWS ID that was used to register the new AMI.

Note: Free space required when bundling an instance-store (S3-based) AMI (the below is not required for EBS AMIs).
You may also need to mount an ephemeral disk if /mnt does not have enough room to store the bundle created (instance-store images have a 10GB size limit). The instance or image you are running must have the correct device block mapping and using an instance type which provides instance storage. You can ensure the first default ephemeral device is mounted using the following (you may need to replace 'sdb' with it's xvd* counterpart):

mkdir -pv /mnt && mount | grep /mnt ||  mount /dev/sdb /mnt

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

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:

provides:rs_agent_type=right_link

You now have an MCI that points to a RightLink-enabled image for launching RHEL instances. Just like any other instance that's launched using one of our v5 RightImages (which are RightLink-enabled), you will be able to see monitoring graphs and execute scripts inside the Dashboard.

You must to post a comment.
Last Modified
09:02, 13 Dec 2013

Tags

Classifications

This page has no classifications.

Announcements

None

Glossary | 用語용어 Site Map | Site Help Community Corporate Site Get Support Dashboard Login
Doc Feedback Product Feedback Resources MultiCloud Marketplace Forums

Dashboard Status


© 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.