Lingxian Kong 602c4d42de Improve the function tests
- Execute test groups in serial to make sure no more than 2 database
  instance are created at the same time.
- Remove some unneccesary tests
- Remove unneeded datastore, e.g. 'Test_Datastore_1'
- Remove unsupported trovestack subcommands
- Move unsupported DIB elements to the 'deprecated-elements' folder
- Decrease default value of 'agent_call_high_timeout' to 5min
- Add initial_deplay for pooling task
- Use socket file to connect with database instead of using localhost
  IP

Change-Id: Ie5030a671fbeb453eafa6cbe04e08da7b52e33c9
2020-01-28 14:27:52 +13:00

57 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
# CONTEXT: GUEST during CONSTRUCTION as ROOT - install.d
# PURPOSE: Install controller base required packages
set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
# Copy the package file to the image,
# as it needs to be used later during configuration.
dd if=/tmp/in_target.d/vertica.deb of=/vertica.deb
# Install base packages
apt-get --allow-unauthenticated install -qy build-essential bc iptables
apt-get --allow-unauthenticated install -qy curl sysstat pstack mcelog
apt-get --allow-unauthenticated install -qy python-dev g++ unixODBC unixODBC-dev dialog
apt-get --allow-unauthenticated install -qy dialog libbz2-dev libboost-all-dev libcurl4-gnutls-dev
apt-get --allow-unauthenticated install -qy openjdk-7-jdk
# Install Vertica package
dpkg -i /vertica.deb
# Creating dbadmin user and verticadba group
groupadd verticadba
useradd -g verticadba -d /home/dbadmin -s /bin/bash -m dbadmin
echo "export PATH=/opt/vertica/bin:\$PATH" >> ~dbadmin/.profile
echo "export TZ=`date +%Z`" >> ~dbadmin/.profile
# Create base directory for to be used for database creation
mkdir /var/lib/vertica
chown dbadmin:verticadba /var/lib/vertica
# Backup /etc/hosts
cp -p /etc/hosts /etc/hosts.bkp
# Compile the SDK examples - the supplied UDFs can then be loaded
cd /opt/vertica/sdk/examples
TMPDIR=/tmp JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 make
cd
cat > "/etc/rc.local" << _EOF_
#!/bin/bash
# Vertica requires THP to be turned off
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
exit \$?
_EOF_