RackHD Release Installation Guide

Version List

for RackHD sprint release versions list, please refer to RackHD Release Page




Installation :

Installation FromRecommendation
docker

Recommended !

docker/docker-compose is required. refer below for detail.

debian packagePre-setup required. 
npm packagePre-setup required.
source codesimilar as npm package.
VMWare OVAsupported on demand or self-service.
vagrant boxsupported on demand or self-service.


1.Docker

Prerequisite:

sprint release

Get docker images
git clone https://github.com/RackHD/RackHD.git
cd RackHD/docker


# for example, if you are installing RackHD latest release:
sudo TAG=latest docker-compose pull               # Download pre-built docker images.
sudo TAG=latest docker-compose up                 # Create containers and Run RackHD.

# or just use `TAG=2.53.0` for 2.53.0 release instead

Latest nightly build

Get latest nightly build
git clone https://github.com/RackHD/RackHD.git
cd RackHD/docker
sudo TAG=nightly docker-compose pull               # Download pre-built docker images.
sudo TAG=nightly docker-compose up                 # Create containers and Run RackHD.



2.NPM


Sprint release


  • Install latest sprint release:
for service in $(echo "on-dhcp-proxy on-http on-tftp on-syslog on-taskgraph");
do
npm install $service;
done


  • Install specify version

          Below code use 1.1.0 as an example:

for service in $(echo "on-dhcp-proxy on-http on-tftp on-syslog on-taskgraph");
do
npm install $service@1.1.0;
done


  • Download static images & Start Services
    1.. Create static directory and download static images for PXE boots

       you can follow steps in Line 51 - Line 77 of install_src.sh 


    2.Start services with pm2

             2.1. Create a pm2.yml like below, the ```cwd``` field should locate the where the on-xxx package lives.

             2.2. Run  $sudo pm2 start pm2.yml

apps:
  - script: index.js
     name: on-taskgraph
     cwd: on-taskgraph
  - script: index.js
     name: on-http
     cwd: on-http
  - script: index.js
     name: on-dhcp-proxy
     cwd: on-dhcp-proxy
  - script: index.js
     name: on-syslog
     cwd: on-syslog
  - script: index.js
     name: on-tftp
     cwd: on-tftp

Latest nightly build

  • Prerequisite : 

          - Install NodeJS 4.0 and dependencies 

  • Install latest nightly build:
for service in $(echo "on-dhcp-proxy on-http on-tftp on-syslog on-taskgraph");
do
npm install $service@ci-release;
done
  • Start Services
    Start services with the same steps as sprint release.


3.Debian packages

  • Prerequisites

            Please install NodeJS 4.x before below steps if you are running on Ubuntu 14.04

            http://rackhd.readthedocs.io/en/latest/rackhd/npm_based_installation.html#prerequisites

           Otherwise, on-http will not be installed due to error " on-http : Depends: nodejs (>= 4.4.5-1nodesource1~) but it is not going to be installed"


  • sprint release

  • Update Source List

Update Source List
# 1. Remove the original nightly build debian source(main) in /etc/apt/sources.list if any (using ```sed``` to replace that line with blank line)
sudo sed -i  's#deb https://dl.bintray.com/rackhd/debian trusty main##' /etc/apt/sources.list
# 2. add release debian source(release) in /etc/apt/sources.list 
echo deb https://dl.bintray.com/rackhd/debian trusty release | sudo tee -a /etc/apt/sources.list

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
sudo apt-get update
  • Install RackHD
Install RackHD release version
sudo apt-get install rackhd
  • Install previous( or specific ) RackHD release version, example : version 1.0.0

    Install specific RackHD release version
    sudo aptitude install rackhd=1.0.0

NOTE

If the nightly build debian source exists in /etc/apt/sources.list (```deb https://dl.bintray.com/rackhd/debian trusty main```)

the RC(release candidate) build will be treated newer than offical released version, say, "apt-get" will think of 1.0.0-20170116UTC is newer than 1.0.0.

and you will never install release version using ```apt-get install rackhd```.

  • Latest nightly build

  • Update Source List 
Update Source List
 echo deb https://dl.bintray.com/rackhd/debian trusty main | sudo tee -a /etc/apt/sources.list
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
 sudo apt-get update
  • Get available version list
Get available version list
sudo apt-cache policy rackhd
  • Install specified RackHD , the ${version} is the one of the version list obtained by above step
Install RackHD
sudo apt-get install aptitude
sudo aptitude install rackhd=${version}



4.Install from source code

sprint release

Prerequisite : 

http://rackhd.readthedocs.io/en/latest/rackhd/npm_based_installation.html#prerequisites

Install RackHD from src code of specific version :

 To clone and checkout to sprint release code( the version naming is like 1.0.0/1.1.0...etc). you can use the helper script or follow below steps.


wget https://raw.githubusercontent.com/panpan0000/RackHD/805d9958818f4d1283d8bd17baa83ba59ccc09d7/example/install_src.sh
sudo ./install_src.sh  release/1.1.0

Tips: you can find the "tag names"(like 1.1.0) from github , example:  https://github.com/RackHD/on-core/releases 

above command line will clone and build local code , according to git tag "release/1.1.0". then using PM2 to start services.

the tag name is actually a git-tag . you can change the tag name from version tagging to other tag.

OR

if you would like to do it by yourselves , you can follow:

1. clone all RackHD repos, then go into each on them:
git fetch --all --tags
git checkout 1.1.0        # or 1.1.0-rc , depends on which tag you want to checkout
npm install --production

2.  link the on-core/on-tasks repo, to other repo's node_modules

cd $repo/node_modules
rm on-core -rf
rm on-tasks -rf
ln -s ../../on-core      on-core
ln -s ../../on-tasks     on-tasks

3. Create static directory and download static images for PXE boots

   you can follow steps in Line 51 - Line 77 of install_src.sh 

4. using PM2 to start services

create a pm2.yml like below, the ```cwd``` field should locate the where the on-xxx code lives.

then run  $sudo pm2 start pm2.yml

apps:
  - script: index.js
     name: on-taskgraph
     cwd: on-taskgraph
  - script: index.js
     name: on-http
     cwd: on-http
  - script: index.js
     name: on-dhcp-proxy
     cwd: on-dhcp-proxy
  - script: index.js
     name: on-syslog
     cwd: on-syslog
  - script: index.js
     name: on-tftp
     cwd: on-tftp




5. Vagrant box (legacy)


If you are looking to run RackHD in  vagrant/virtualbox image, please email to rackhd@emc.com or contact us in Slack Channel.


Before using vagrant we suggest to read vagrant docs first.

If you will use virtualbox/vagrant box under Windows, here's a blog article for your reference: How to set up RackHD demo under Windows (vagrant box)

sprint release

  • Get RackHD vagrant box
  • (warning) Note : vagrant version should be at least >= 1.8.5, to support `--box-version` parameter. ( check by ```vagrant -v ```)

This code snippet will pull the rackhd vagrant box of version 1.1.0. You can read the generated Vagrantfile for more configuration information.

below code use 1.1.0 version as an example:

Get rackhd vagrant box
vagrant init rackhd/rackhd --force --box-version 1.1.0  # rackhd/rackhd is the Atlas repository of rackhd, this cmd will generate a simple Vagrantfile
vagrant up                                              # start the rackhd vagrant box according to Vagrantfile
vagrant ssh                                             # enter the box


  • (warning) Important Tips

For running RackHD service successfully, you need to up a second netcard.

For change configuration of RackHD, you need to mount local config into vagrant.

For connecting RackHD out of box, you need to forward internal ports to outside .

(lightbulb)Please see our example Vagrantfile for details. ( it's recommended to customized the vagrant file based on this example )

Latest nightly build

Format of nightly build version is 0.mm.dd. For example, you can get the nightly build on January 13 with

Get latest nightly build
vagrant init rackhd/rackhd --force --box-version 0.01.13


If you have own Vagrantfile, just modify the version number in it to 0.mm.dd, and then you can up the vagrant box of related nightly build.

ATTENTION: nightly builds will only be kept for two weeks.



6. OVA (legacy)

If you are looking to run the RackHD OVA image, please email to rackhd@emc.com .  You are also welcome to create your own OVA leveraging this script: https://github.com/RackHD/RackHD/blob/master/packer/build_ova.sh

RackHD OVA deployment out of the CI/CD pipeline will be discontinued as of 10/27/17.  Script capabiltiies will continue to be supported and validated allowing users to generate their own RackHD OVA. 



Limitation

for OVA before RackHD 2.2.0, you can't directly deploy the OVA to a vSphere.

please follow below as a workaround..

------------------------------------

So far, vSphere(ESX server) is NOT supported with customized property (OVF 2.0 format ?). only vCenter can support this OVA (because there's a customized prosperity feature to config IP during deployment.)

reference: https://blogs.vmware.com/vapp/2009/07/commandline-ovf-deployments-.html

Error message will be like below:

Error: OVF Package is not supported by target:
- Line 155: Unsupported element 'Property'


if you want to deploy to vSphere/ESXi, follow below steps:

$# 1. Demote  the OVA file name is rackhd-ubuntu-14.04 , example
FNAME=rackhd-ubuntu-14.04
$# 2. covert OVA to OVF and VMDK
ovftool   ${FNAME}.ova        ${FNAME}.ovf    
#  or using 7zip :  -->     7z x ${FNAME}.ova   
# then there will be 3 files: ${FNAME}-disk1.vmdk             ${FNAME}.mf                   ${FNAME}.ovf

$# 3. replace the Property XML fields from the .ovf file
sed  -i  "/<Property/,/<\/Property>/c\ "  ${FNAME}.ovf
$# 4. then deploy with the updated ${FNAME}.ovf file via ESXi vSphere GUI or ovftool command line
      #below is an example of ovftool usage, please replace the ${xx} to your real values.
 ovftool  --skipManifestCheck  --name=${GivenNameOfTheVM} --datastore=${TargetDatastore} --net:"ADMIN"="${AdminBridge}"      ${FNAME}.ovf           vi://user:pwd@${ESXi_IP}

If you deploy using VSphere GUI under Windows, please delete the *.mf file before deployment, because the *.ovf file has been updated, and the sha256 checksum in the *.mf file has changed. the vSphere GUI will report "sha256 checksum mismatched".