Build AWS RedHat AMI for OmicSoft Cloud Computing

From Array Suite Wiki

Jump to: navigation, search

Contents

Build AWS AMI for OmicSoft Cloud Computing

Although all computing nodes in Omicsoft Cloud use Ubuntu AMIs, admin can build a Red Hat machine in AWS for their ArrayServer server, or use one of OmicSoft's pre-configured images.

Steps here are based on Red Hat Enterprise Linux 7.2 (HVM) as backbone. Use sudo to run command below.

Here are final public AMI in East Coast and West Coast regions, with all required packages installed and configured:

## East Virginia
Ami=ami-a34c8ace
AmiSnapshot=snap-faf63b1d

## Oregon
Ami=ami-3df3355d
AmiSnapshot=snap-498191b4

Install Required Linux packages

Make sure you have some basic packages installed:

    yum install gcc gcc-c++ bison pkgconfig libtool libstdc++-devel \
       glib2-devel gettext make freetype-devel fontconfig-devel \
       libXft-devel libpng-devel libjpeg-devel libtiff-devel giflib-devel \
       ghostscript-devel libexif-devel libX11-devel
[back to top]

Install Mono 2.10.9

yum install wget bzip2
Tips.pngFor Linux kernels prior to 3.10.0-327 we recommended to use mono 2.10.9 in Linux. For newer kernels, mono4.0.4 is required.
Install mono2
  • Download Mono 2.10.9
    cd /opt
    wget -c  http://origin-download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2

The bz2 file can be saved to a temporary location, e.g. ~/temp/

  • Extract and modify certificate if necessary
    tar  jxvf   mono-2.10.9.tar.bz2
    cd  /opt/mono-2.10.9

For mono 2.10.9, it is recommended to modify X509Certificate to the latest standard.

  • Compile and install. On the command line, type
    cd  /opt/mono-2.10.9
    ./configure  --prefix=/opt/mono-2.10.9 --with-large-heap=yes
    make
    make  install

Note:

  • The location of mono installed is set by the option "--prefix" in the configure step, which can be changed to another location.
  • The option --with-large-heap=yes is to enable support for GC heaps larger than 3gb, which is required for NGS alignment, as well as some Array Server functions)

Double check mono installation and version

ls /opt/mono-2.10.9/bin/mono* -all
/opt/mono-2.10.9/bin/mono --version
/opt/mono-2.10.9/bin/mono-sgen --version
[back to top]

use sudo.

Install Mono 4.0.4

Install Mono 4.0.4 is optional; just in case some proc requires newer mono. Mono 4.0.4 contains latest certificate standard.

Install Mono 4.0.4
  • Download Mono 4.0.4
    wget -c http://download.mono-project.com/sources/mono/mono-4.0.4.1.tar.bz2

The bz2 file can be saved to a temporary location, e.g. ~/temp/

  • Compile and install. On the command line, type
    tar jxvf mono-4.0.4.1.tar.bz2
    cd  mono-4.0.4
    ./configure  --prefix=/opt/mono-4.0.4 --with-large-heap=yes
    make
    make  install

Note:

  • The location of mono installed is set by the option "--prefix" in the configure step, which can be changed to another location.
  • The option --with-large-heap=yes is to enable support for GC heaps larger than 3gb, which is required for NGS alignment, as well as some Array Server functions)

Double check mono installation and version

ls /opt/mono-4.0.4/bin/mono* -all
/opt/mono-4.0.4/bin/mono --version
/opt/mono-4.0.4/bin/mono-sgen --version
[back to top]

use sudo in ubuntu.

Install libgdiplus

sudo yum install yum-utils
sudo rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
sudo yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
sudo yum install libgdiplus

Add "/usr/lib64/libgdiplus.so" to

/MonoPrefix/etc/mono/config: Add the following line at the end of the file before </configuration>

<dllmap dll="gdiplus.dll" target="/usr/lib64/libgdiplus.so"/>

Add to both 2.10.9 and 4.0.4

Sqlite

Sqlite can be downloaded from: sqlite download. The tar.gz file is recommended for installation.

wget -c http://www.sqlite.org/sqlite-autoconf-3071401.tar.gz
tar zxvf sqlite-autoconf-3071401.tar.gz
sudo mv sqlite-autoconf-3071401 sqlite
cd sqlite
./configure --prefix=/opt/sqlite
make
make install

sqlite3  --version
[back to top]

use sudo in ubuntu.

Set ulimit

Make sure the ulimit for "max user processes" and "open files" are set to the max value: 65536. You can check the values by typing: ulimit -a.

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 515184
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 65536
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Modify ulimit in two config files following ulimit setup wiki.


[back to top]


Install Oshell

cd /opt
sudo mkdir oshell
cd oshell
sudo wget -c  http://omicsoft.com/software_update/OmicsoftUpdater.exe
sudo touch oshell.exe
sudo /opt/mono-2.10.9/bin/mono ./OmicsoftUpdater.exe
[back to top]

Install AWS CLI

sudo curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py
sudo pip install awscli
[back to top]


Related Articles

[back to top]

EnvelopeLarge2.png