Installing Vertica on AWS m3.medium RHEL instance…

Initiate the instance on AWS using RHEL AMI with instance type c3.medium. We’ll be installing Vertica on single node.

Please note

  1. For RHEL instance the login user is ec2-user (and not root). However ec2-user is already in sudoers list and has all the required privileges for Vertica install. In this post we’ll walk through step by step for installing Vertica 7.0.2.2 from scratch.
  2. Though Vertica Installation Guide recommends AWS installation procedure (using AMI) I wanted to try the following detail process.

I started the instance with pre-configured security group for HP Vertica. There are several ports that need to be opened. For more details on the ports and security group requirement for HP Vertica Please check here.

Before you start installation:

ssh into AWS instance and check the sudoers privileges.

[ec2-user@ip-10-167-158-108 ~]$ which sudo
/usr/bin/sudo
[ec2-user@ip-10-167-158-108 ~]$ sudo vi /etc/sudoers
[ec2-user@ip-10-167-158-108 ~]$

… Please ensure root has ALL command privileges and so does the userid you use to login (for root actions)

## Allow root to run any commands anywhere
 root ALL=(ALL) ALL
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
 #includedir /etc/sudoers.d
 ec2-user ALL=(ALL) NOPASSWD: ALL

Verify HW / Linux installation and configuration

Vertica installation only supports bash shell. Please verify and change (if required) the default shell of root (or ec2-user) to bash.

# getent passwd | grep root
root:x:0:0:root:/root:/bin/dash
# chsh
Changing shell for root.
New shell [/bin/dash]: /bin/bash
Shell changed.

ALSO chenge the symbolic link...

# rm /bin/sh
# ls -l /bin/bash /bin/sh
  • Network configuration is exactly the same for single nodes as for multi-node clusters, with one special exception. If you install HP Vertica on a single host machine that is to remain a permanent single-node configuration (such as for development or Proof of Concept), you can install HP Vertica using localhost or the loop-back IP (typically 127.0.0.1) as the value for –hosts. Do not use the host-name localhost in a node definition if you are likely to add nodes to the configuration later.
  • Make sure that /dev/pts is mounted. Installing HP Vertica on a host that is missing the mount point /dev/pts could result in the following error when you create a database:
[ec2-user@ip-10-167-158-108 ~]$ mount | grep devpts
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
[ec2-user@ip-10-167-158-108 ~]$
  • A 2GB swap partition is required. Partition the remaining disk space in a single partition under “/”. Also Block Size for disk is 4KB (4096).

By default the AMI  does not provide required swap space. Use the steps described here to add swap space.

  • The dbadmin user must be authorized for passwordless ssh.
  • Download Vertica Software rpm.
sudhakar@sudhakar-Latitude-E6420:~$ ssh -i Downloads/TSPORA.pem ec2-user@ec2-54-91-129-22.compute-1.amazonaws.com
The authenticity of host 'ec2-54-91-129-22.compute-1.amazonaws.com (54.91.129.22)' can't be established.
RSA key fingerprint is 49:f7:d8:4e:76:85:44:a3:c3:bd:2a:52:fa:9d:8a:db.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-54-91-129-22.compute-1.amazonaws.com,54.91.129.22' (RSA) to the list of known hosts.
[ec2-user@ip-10-93-174-252 ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 10321208 2034084 7762888 21% /
tmpfs 1858492 0 1858492 0% /dev/shm
[ec2-user@ip-10-93-174-252 ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 10321208 2034084 7762888 21% /
tmpfs 1858492 0 1858492 0% /dev/shm
[ec2-user@ip-10-93-174-252 ~]$ grep SwapTotal /proc/meminfo
SwapTotal: 0 kB
[ec2-user@ip-10-93-174-252 ~]$ dd if=/dev/zero of=/swapfile1 bs=4096 count=524288
dd: opening `/swapfile1': Permission denied
[ec2-user@ip-10-93-174-252 ~]$ sudo dd if=/dev/zero of=/swapfile1 bs=4096 count=524288
524288+0 records in
524288+0 records out
2147483648 bytes (2.1 GB) copied, 60.5959 s, 35.4 MB/s
[ec2-user@ip-10-93-174-252 ~]$ chown root:root /swapfile1
chown: changing ownership of `/swapfile1': Operation not permitted
[ec2-user@ip-10-93-174-252 ~]$ sudo chown root:root /swapfile1
[ec2-user@ip-10-93-174-252 ~]$ sudo chmod 0600 /swapfile1
[ec2-user@ip-10-93-174-252 ~]$ sudo mkswap /swapfile1
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=dba50cdb-92ac-405f-9cf6-1349083b0d06
[ec2-user@ip-10-93-174-252 ~]$ sudo swapon /swapfile1
[ec2-user@ip-10-93-174-252 ~]$ sudo vi /etc/fstab
[ec2-user@ip-10-93-174-252 ~]$ sudo shutdown -r now

Broadcast message from ec2-user@ip-10-93-174-252
 (/dev/pts/0) at 12:52 ...

The system is going down for reboot NOW!
[ec2-user@ip-10-93-174-252 ~]$ Connection to ec2-54-91-129-22.compute-1.amazonaws.com closed by remote host.
Connection to ec2-54-91-129-22.compute-1.amazonaws.com closed.
sudhakar@sudhakar-Latitude-E6420:~$ ssh -i Downloads/TSPORA.pem ec2-user@ec2-54-91-129-22.compute-1.amazonaws.com
Last login: Sun Nov 2 12:46:33 2014 from c-98-235-205-164.hsd1.pa.comcast.net
[ec2-user@ip-10-93-174-252 ~]$ grep SwapTotal /proc/meminfo
SwapTotal: 2097148 kB
[ec2-user@ip-10-93-174-252 ~]$ exit;
logout
Connection to ec2-54-91-129-22.compute-1.amazonaws.com closed.
sudhakar@sudhakar-Latitude-E6420:~$ sftp -i Downloads/TSPORA.pem ec2-user@ec2-54-81-73-172.compute-1.amazonaws.com
^Csudhakar@sudhakar-Latitude-E6420:~$ sftp -i Downloads/TSPORA.pem ec2-user@ec2-54-91-129-22.compute-1.amazonaws.com
Connected to ec2-54-91-129-22.compute-1.amazonaws.com.
sftp> lls Downloads/
107_Sensoy Optimized Analitical Processing.pdf looker-2.4.12.zip pws (1).txt
BIOENGINEERING UNDERGRADUATE CURRICULUM (1).pdf Madam_Secretary_PSNS_20141003.txt pws.txt
BIOENGINEERING UNDERGRADUATE CURRICULUM.pdf MySQL-python-1.2.4b4 python-2.7.8-docs-pdf-letter.tar.bz2
dbvis_linux_9_1_10.rpm MySQL-python-1.2.4b4.tar sms_package.zip
eclipse-jee-luna-RC3-linux-gtk-x86_64.tar.gz mysql_wp_cluster_performance.pdf strings_package.zip
email_package.zip Online_Statistics_Education.pdf TSPORA.pem
employees_db oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm TSPVERTICA.pem
employees_db-full-1.0.6.tar.bz2 oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm vertica-7.1.1-0.x86_64.RHEL5.rpm
export_0.zip oraosch-3.0.0.zip vertica-console-7.1.1-0.x86_64.RHEL5.rpm
jdev_suite_121300_linux64.bin Orientation! Subtitles.zip xml_package.zip
jq PDF (Published version).pdf
sftp> put Downloads/vertica-7.1.1-0.x86_64.RHEL5.rpm /tmp/.
Uploading Downloads/vertica-7.1.1-0.x86_64.RHEL5.rpm to /tmp/./vertica-7.1.1-0.x86_64.RHEL5.rpm
Downloads/vertica-7.1.1-0.x86_64.RHEL5.rpm 100% 88MB 699.5KB/s 02:09 
sftp> quit
sudhakar@sudhakar-Latitude-E6420:~$ ssh -i Downloads/TSPORA.pem ec2-user@ec2-54-91-129-22.compute-1.amazonaws.com
Last login: Sun Nov 2 12:54:11 2014 from c-98-235-205-164.hsd1.pa.comcast.net
[ec2-user@ip-10-93-174-252 ~]$ ll
total 0
[ec2-user@ip-10-93-174-252 ~]$ cd /tmp
[ec2-user@ip-10-93-174-252 tmp]$ ll
total 90248
-rwx------. 1 root root 5735 Sep 29 09:04 ks-script-JYFex1
-rwxr-xr-x. 1 root root 353 Sep 29 09:04 ks-script-JYFex1.log
-rw-r-----. 1 ec2-user ec2-user 92398830 Nov 2 12:58 vertica-7.1.1-0.x86_64.RHEL5.rpm
-rw-------. 1 root root 0 Sep 29 08:57 yum.log
[ec2-user@ip-10-93-174-252 tmp]$ sudo mv vertica-7.1.1-0.x86_64.RHEL5.rpm /opt/.
[ec2-user@ip-10-93-174-252 tmp]$ cd /opt
[ec2-user@ip-10-93-174-252 opt]$ ll
total 90240
drwxr-xr-x. 2 root root 4096 May 17 2013 rh
-rw-r-----. 1 ec2-user ec2-user 92398830 Nov 2 12:58 vertica-7.1.1-0.x86_64.RHEL5.rpm
[ec2-user@ip-10-93-174-252 opt]$ sudo rpm -Uvh vertica-7.1.1-0.x86_64.RHEL5.rpm 
Preparing... ########################################### [100%]
 1:vertica ########################################### [100%]

Vertica Analytic Database V7.1.1-0 successfully installed on host ip-10-93-174-252.ec2.internal

---------------------------------------------------------------------------------- 
Important Information 
---------------------------------------------------------------------------------- 
If you are upgrading from a previous version, you must backup your database before 
continuing with this install. After restarting your database, you will be unable 
to revert to a previous version of the software.
---------------------------------------------------------------------------------- 

To download the latest Vertica documentation in zip or tar format please visit the
myvertica web site.

To complete installation and configuration of the cluster,
run: /opt/vertica/sbin/install_vertica


[ec2-user@ip-10-93-174-252 opt]$

SEVERAL ERRORS were reported by installer…

[ec2-user@ip-10-93-174-252 opt]$ sudo /opt/vertica/sbin/install_vertica --hosts localhost --rpm vertica-7.1.1-0.x86_64.RHEL5.rpm
Vertica Analytic Database 7.1.1-0 Installation Tool


>> Validating options...


Mapping hostnames in --hosts (-s) to addresses...
 localhost => 127.0.0.1

>> Starting installation tasks.
>> Getting system information for cluster (this may take a while)...

Default shell on nodes:
127.0.0.1 /bin/bash

>> Validating software versions (rpm or deb)...


>> Beginning new cluster creation...

backing up admintools.conf on 127.0.0.1 

>> Creating or validating DB Admin user/group...

Password for new dbadmin user (empty = disabled)
Successful on hosts (1): 127.0.0.1
 Provided DB Admin account details: user = dbadmin, group = verticadba, home = /home/dbadmin
 Creating group... Adding group
 Validating group... Okay
 Creating user... Adding user
 Validating user... Okay


>> Validating node and cluster prerequisites...

Prerequisites not fully met during local (OS) configuration for
verify-127.0.0.1.xml:
 HINT (S0305): https://my.vertica.com/docs/7.1.x/HTML/index.htm#cshid=S0305
 TZ is unset for dbadmin. Consider updating .profile or .bashrc
 HINT (S0041): https://my.vertica.com/docs/7.1.x/HTML/index.htm#cshid=S0041
 Could not find the following tools normally provided by the mcelog
 package: mcelog
 FAIL (S0150): https://my.vertica.com/docs/7.1.x/HTML/index.htm#cshid=S0150
 These disks do not have 'deadline' or 'noop' IO scheduling: '/dev/xvda1'
 ('xvda1') = 'cfq'
 FAIL (S0020): https://my.vertica.com/docs/7.1.x/HTML/index.htm#cshid=S0020
 Readahead size of xvda1 (/dev/xvda1) is too low for typical systems: 256
 < 2048
 FAIL (S0030): https://my.vertica.com/docs/7.1.x/HTML/index.htm#cshid=S0030
 ntpd process is not running: ['ntpd', 'ntp']
 FAIL (S0081): https://my.vertica.com/docs/7.1.x/HTML/index.htm#cshid=S0081
 SELinux appears to be enabled and not in permissive mode.

System prerequisites failed. Threshold = WARN
 Hint: Fix above failures or use --failure-threshold

Installation FAILED with errors.

****
AdminTools and your existing Vertica databases may be unavailable.
Investigate the above warnings/errors and re-run installation.
****
[ec2-user@ip-10-93-174-252 opt]$

We’ll correct each error one by one.

Setting TZ

[ec2-user@ip-10-93-174-252 opt]$ sudo yum update tzdata
Loaded plugins: amazon-id, rhui-lb, security
rhui-REGION-client-config-server-6 | 2.9 kB 00:00 
rhui-REGION-client-config-server-6/primary_db | 4.0 kB 00:00 
rhui-REGION-rhel-server-releases | 3.7 kB 00:00 
rhui-REGION-rhel-server-releases/primary_db | 29 MB 00:00 
rhui-REGION-rhel-server-releases-optional | 3.5 kB 00:00 
rhui-REGION-rhel-server-releases-optional/primary_db | 3.0 MB 00:00 
rhui-REGION-rhel-server-rh-common | 2.9 kB 00:00 
rhui-REGION-rhel-server-rh-common/primary_db | 35 kB 00:00 
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package tzdata.noarch 0:2014g-1.el6 will be updated
---> Package tzdata.noarch 0:2014i-1.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================
 Package Arch Version Repository Size
=============================================================================================================================================================================
Updating:
 tzdata noarch 2014i-1.el6 rhui-REGION-rhel-server-releases 449 k

Transaction Summary
=============================================================================================================================================================================
Upgrade 1 Package(s)

Total download size: 449 k
Is this ok [y/N]: y
Downloading Packages:
tzdata-2014i-1.el6.noarch.rpm | 449 kB 00:00 
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Updating : tzdata-2014i-1.el6.noarch 1/2 
 Cleanup : tzdata-2014g-1.el6.noarch 2/2 
 Verifying : tzdata-2014i-1.el6.noarch 1/2 
 Verifying : tzdata-2014g-1.el6.noarch 2/2 

Updated:
 tzdata.noarch 0:2014i-1.el6 

Complete!
[ec2-user@ip-10-93-174-252 opt]$

To set the system time zone on Red Hat and SUSE Linux systems, edit: /etc/sysconfig/clock
l To set the TZ variable, edit, /etc/profile, or /dbadmin/.bashrc or /home/dbadmin/.bash_profile and add the following line (for example, for the US Eastern Time Zone): export TZ=”America/New_York”

Setting packages including mcelog

Support Tools

HP Vertica suggests that the following tools are installed so support can assist in troubleshooting your system if any issues arise:

  • pstack (or gstack) package. Identified by issue S0040 when not installed.
  • mcelog package. Identified by issue S0041 when not installed.
  • sysstat package. Identified by issue S0045 when not installed.

RedHat Based Systems

To install the required tools on RedHat based systems, run the following commands as sudo or root:

yum install pstack
yum install mcelog
yum install sysstat
[ec2-user@ip-10-93-174-252 ~]$ sudo yum install pstack
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gdb.x86_64 0:7.2-64.el6_5.2 will be updated
---> Package gdb.x86_64 0:7.2-75.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================
 Package Arch Version Repository Size
=============================================================================================================================================================================
Updating:
 gdb x86_64 7.2-75.el6 rhui-REGION-rhel-server-releases 2.3 M

Transaction Summary
=============================================================================================================================================================================
Upgrade 1 Package(s)

Total download size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
gdb-7.2-75.el6.x86_64.rpm | 2.3 MB 00:00 
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Updating : gdb-7.2-75.el6.x86_64 1/2 
 Cleanup : gdb-7.2-64.el6_5.2.x86_64 2/2 
 Verifying : gdb-7.2-75.el6.x86_64 1/2 
 Verifying : gdb-7.2-64.el6_5.2.x86_64 2/2 

Updated:
 gdb.x86_64 0:7.2-75.el6 

Complete!
[ec2-user@ip-10-93-174-252 ~]$ sudo yum install mcelog
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mcelog.x86_64 2:101-0.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================
 Package Arch Version Repository Size
=============================================================================================================================================================================
Installing:
 mcelog x86_64 2:101-0.el6 rhui-REGION-rhel-server-releases 61 k

Transaction Summary
=============================================================================================================================================================================
Install 1 Package(s)

Total download size: 61 k
Installed size: 124 k
Is this ok [y/N]: y
Downloading Packages:
mcelog-101-0.el6.x86_64.rpm | 61 kB 00:00 
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing : 2:mcelog-101-0.el6.x86_64 1/1 
 Verifying : 2:mcelog-101-0.el6.x86_64 1/1 

Installed:
 mcelog.x86_64 2:101-0.el6 

Complete!
[ec2-user@ip-10-93-174-252 ~]$ 
[ec2-user@ip-10-93-174-252 ~]$ sudo yum install sysstat
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package sysstat.x86_64 0:9.0.4-22.el6_5.1 will be updated
---> Package sysstat.x86_64 0:9.0.4-27.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================
 Package Arch Version Repository Size
=============================================================================================================================================================================
Updating:
 sysstat x86_64 9.0.4-27.el6 rhui-REGION-rhel-server-releases 233 k

Transaction Summary
=============================================================================================================================================================================
Upgrade 1 Package(s)

Total download size: 233 k
Is this ok [y/N]: y
Downloading Packages:
sysstat-9.0.4-27.el6.x86_64.rpm | 233 kB 00:00 
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Updating : sysstat-9.0.4-27.el6.x86_64 1/2 
 Cleanup : sysstat-9.0.4-22.el6_5.1.x86_64 2/2 
 Verifying : sysstat-9.0.4-27.el6.x86_64 1/2 
 Verifying : sysstat-9.0.4-22.el6_5.1.x86_64 2/2 

Updated:
 sysstat.x86_64 0:9.0.4-27.el6 

Complete!
[ec2-user@ip-10-93-174-252 ~]$ 

References

http://my.vertica.com/docs/7.0.x/PDF/HP_Vertica_7.0.x_Install_Guide.pdf

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s