Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > RightLink 6 > Advanced Topics > RightLink Source Packages

RightLink Source Packages

Overview

Starting with RightLink 6.1, full source packages are available in deb Debian/Ubuntu compatible) and RPM (Red Hat Enterprise Linux, Oracle Linux, CentOS, SUSE, etc) formats. The following guide will detail how to build or rebuild these packages. This would be useful to porting packages to new operating system variants, or tweaking/modifying aspects of the packages.

 

RightLink currently consists of three packages:

  1. The RightLink sandbox package. Named something like 'rightlink6-sandbox'. This package consists of ruby and rubygems. This package provides a stable ruby environment segregated from the system environment that is installed into /opt/rightscale/sandbox. This package must be built and/or installed before the RightLink package can be built.
  2. The RightLink package. Named like 'rightlink6'.  This package consists of all executable code for rightlink. The code itself is a bundle of rubygems centered around the right_link gem. Supporting init scripts (sysvinit, upstart, systemd) are also included in this package. 
  3. RightLink cloud packages. Named like rightlink6-cloud-ec2, rightlink6-cloud-openstack, etc. See the install guides below for lists of cloud package names. RightLink always needs to be installed in tandem with a cloud package to satisfy its package dependencies. Although source packages exist for these files they are architecture neutral packages which only lay down configuration files, so it's easier just to download them.

 

Building .deb packages

The following guide was developed on an Ubuntu system, though it should be applicable to Debian as well.

 

  1. Set up rightlink repositories according to http://support.rightscale.com/12-Guides/RightLink/RightLink_6.0/Install_RightLink/Ubuntu in order to pull down the source code.
  2. Install prerequisites
    1. apt-get install -y devscripts fakeroot gdebi-core
  3. Install source packages for rightlink and rightlink-sandbox. Also download the appropriate cloud package, such as rightlink6-cloud-ec2.  Available clouds are listed in the guide in Step 1 above.
    1. apt-get source rightlink6
      apt-get source rightlink6-sandbox
      apt-get download rightlink6-cloud-<cloudname>
      
  4. Build the sandbox source package, if needed. The sandbox package contains ruby and rubygems. If you're not rebuilding for an alternate system or upgrading ruby you also use the existing package. Assuming rebuild of package version of 6.1.5 in this case.
    1. apt-get build-dep -y rightlink6-sandbox 
      pushd rightlink6-sandbox-6.1.5
      # debuild used here, though many methods will do
      debuild -us -uc -b
      popd
      
  5. Build the rightlink package, if needed. The rightlink package needs the sandbox to be installed to build first. You may need to manually install dependencies of the sandbox package as well if they're not already installed on the system. gdebi is an alternate to dpkg that will also install dependencies for a package on disk. This saves the need to place the sandbox package in a repository so that apt may use dependency solving on it. 
    1. 
      gdebi -n rightllink6-sandbox_6.1.5-0~precise_amd64.deb
      pushd rightlink6-6.1.5
      ​debuild -us -uc -b
      popd
      
  6. Packages will be placed in root directory.

 

Building RPM packages CentOS/RHEL

The following guide was developed on CentOS, though any RHEL compatible variant should work as well. Examples are given using rpmbuild though mock may be used as well.

  1. Set up repositories according to http://support.rightscale.com/12-Guides/RightLink/RightLink_6.0/Install_RightLink/Red_Hat_Enterprise_Linux_and_CentOS in order to pull down source code.
  2. Install prerequisite packages: 
    1. yum install yum-utils rpm-build
  3. Download and install source packages for rightlink and rightlink-sandbox. Also download the appropriate cloud package, such as rightlink6-cloud-ec2.  Available clouds are listed in the guide in Step 1 above.
    1. yumdownloader --source rightlink6​
      yumdownloader --source rightlink6-sandbox
      rpm -i rightlink6*.src.rpm
      yumdownloader rightlink6-cloud-<cloudname>
  4. Build the sandbox source package, if needed.  The sandbox package contains ruby and rubygems. If you're not rebuilding for an alternate system you also use the existing package.
    1. yum-builddep -y rightlink6-sandbox*.src.rpm
      rpmbuild -bb /root/rpmbuild/SPECS/rightlink-sandbox.spec
  5. Build the rightlink package. The rightlink package needs the sandbox to be installed to build first. 
    1. yum install /root/rpmbuild/RPMS/x86_64/rightlink6-sandbox*.rpm
      yum-builddep -y rightlink6-6*.src.rpm
      ​rpmbuild -bb /root/rpmbuild/SPECS/rightlink.spec
  6. Packages will be placed in /root/rpmbuild/RPMS/x86_64.

 

RPM packages on SUSE

  1. Set up repositories according to http://support.rightscale.com/12-Guides/RightLink/RightLink_6.0/Install_RightLink/SUSE_Linux_Enterprise_Server in order to pull down source code.
  2. Get rightlink and rightlink-sandbox source packages. Download appropriate cloud package as well. Zypper will download packages to/var/cache/zypp/packages/rightlink and /var/cache/zypp/packages/rightlink-SRPMS
    1. zypper refresh
      zypper install -y -d -t package rightlink6-cloud-<cloudname>
      cp /var/cache/zypp/packages/rightlink*/*.
  3. Download and build the sandbox package
    1. zypper source-install rightlink6-sandbox​
      rpmbuild -bb /usr/src/packages/SPECS/rightlink-sandbox.spec
  4. Download  and build rightlink package. The rightlink package needs the sandbox to be installed to build first. 
    1. zypper install /usr/src/packages/RPMS/x86_64/rightlink6-sandbox*
      zypper source-install rightlink6​
      rpmbuild -bb /usr/src/packages/SPECS/rightlink.spec

 

You must to post a comment.
Last modified
10:57, 10 Oct 2014

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


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