This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Manually deploy Vertica on Microsoft Azure
Manually creating a database cluster for your Vertica deployment lets you customize your VMs to meet your specific needs.
Manually creating a database cluster for your Vertica deployment lets you customize your VMs to meet your specific needs. You often want to manually configure your VMs when deploying a Vertica cluster to host an Eon Mode database.
To start creating your Vertica cluster in Azure using manual steps, you first need to create a VM. During the VM creation process, you create and configure the other resources required for your cluster, which are then available for any additional VMs that you create.
1 - Configure and launch a new instance
An Azure VM is similar to a traditional host.
An Azure VM is similar to a traditional host. Just as with an on-premises cluster, you must prepare and configure the hardware settings for your cluster and network before you install Vertica.
The first steps are:
-
From the Azure marketplace, select an operating system that Vertica supports.
-
Select a VM type.See Recommended Azure VM types and operating systems.
-
Choose a deployment model. For best results, choose the resource manager deployment model.
Vertica has specific network security group requirements, as described in Create a security group.
Create and name your own network security group, following these guidelines.
You must configure SSH as:
You can make additional modifications, based on your specific requirements.
Add disk containers
Create an Azure storage account, which later contains your cluster storage disk containers.
For optimal throughput, select Premium storage and align the storage to your chosen VM type.
For more information about what a storage account is, and how to create one, refer to About Azure storage accounts.
For an Enterprise Mode database deployment, provision enough space
Create a password or assign an SSH key pair to use with Vertica.
For information about how to use key pairs in Azure, see How to create and use an SSH public and private key pair for Linux VMs in Azure.
Assign a public IP address
A public IP is an IP address that you can use to connect to your cluster externally. For best results, assign a single static public IP to a node in your cluster. You can then connect to other nodes in your cluster from your primary node using the internal IP addresses that Azure generated when you specified your virtual network settings.
By default, a public IP address is dynamic; it changes every time you shut down the server. You can choose a static IP address, but doing so can add cost to your deployment.
During a VM installation, you cannot set a DNS name. If you use dynamic public IPs, set the DNS name in the public IP resource for each VM after deployment.
For information about public IP addresses, refer to IP address types and allocation methods in Azure.
Create additional VMs
If needed, to create additional VMs, repeat the previous instructions in this document.
2 - Connect to a virtual machine
Before you can connect to any of the VMs you created, you must first make your virtual network externally accessible.
Before you can connect to any of the VMs you created, you must first make your virtual network externally accessible. To do so, you must attach the public IP address you created during network configuration to one of your VMs.
Connect to your VM
To connect to your VM, complete the following tasks:
-
Connect to your VM using SSH with the public IP address you created in the configuration steps.
-
Authenticate using the credentials and authentication method you specified during the VM creation process.
Connect to other VMs
Connect to other virtual machines in your virtual network by first using SSH to connect to your publicly connected VM. Then, use SSH again from that VM to connect through the private IP addresses of your other VMs.
If you are using private key authentication, you may need to move your key file to the root directory of your publicly connected VM. Then, use PuTTY or WinSCP to connect to other VMs in your virtual network.
3 - Prepare the virtual machines
After you create your VMs, you need to prepare them for cluster formation.
After you create your VMs, you need to prepare them for cluster formation.
Add the Vertica license and private key
Prepare your nodes by adding your private key (if you are using one) to each node and to your Vertica license. These steps assume that the initial user you configured is the DBADMIN user.
-
As the dbadmin user, copy your private key file from where you saved it locally onto your primary node.
Depending upon the procedure you use to copy the file, the permissions on the file may change. If permissions change, the install_vertica
script fails with a message similar to the following:
Failed Login Validation 10.0.2.158, cannot resolve or connect to host as root.
If you receive a failure message, enter the following command to correct permissions on your private key file:
$ chmod 600 /<name-of-key>.pem
-
Copy your Vertica license to your primary VM. Save it in your home directory or other known location.
Install software dependencies for Vertica on Azure
In addition to the Vertica standard Package dependencies, as the root user, you must install the following packages before you install Vertica on Azure:
-
pstack
-
mcelog
-
sysstat
-
dialog
4 - Configure storage
Use a dedicated Azure storage account for node storage.
Use a dedicated Azure storage account for node storage.
Caution
Caution: Do not store your information on the root
volume, especially your data
and catalog
directories. Storing information on the root
volume may result in data loss.
When configuring your storage, make sure to use a supported file system. For details, see File system.
Attach disk containers to virtual machines (VMs)
Using your previously created storage account, attach disk containers to your VMs that are appropriate to your needs.
For best performance, combine multiple storage volumes into RAID-0. For most RAID-0 implementations, attach 6 storage disk containers per VM.
Combine disk containers for storage
If you are using RAID, follow these steps to create a RAID-0 drive on your VMs. The following example shows how you can create a RAID-0 volume named md10
from 6 individual volumes named:
-
Form a RAID-0 volume using the mdadm
utility:
$ mdadm --create /dev/md10 --level 0 --raid-devices=6 \
/dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
-
Format the file system to be one that Vertica supports:
$ mkfs.ext4 /dev/md10
-
Find the UUID on the newly-formed RAID volume using the blkid
command. In the output, look for the device you assigned to the RAID volume:
$ blkid
. . .
/dev/md10 : UUID="e7510a6f-2922-4413-b5fa-9dcd725967fd" TYPE="ext4" PARTUUID="fb9b7449-08c3-4231-9ee5-086f7b0c9001"
. . .
-
The RAID device can be renamed after a reboot. To ensure the filesystem is mounted in a predictable location on your VM, create a directory to use as the mount point to mount the filesystem. For example, you can choose to create a mount point named /data
that you will use to store your database's catalog and data (or depot, if you are running Vertica in Eon Mode).
$ mkdir /data
-
Using a text editor, add an entry to the /etc/fstab
file for the UUID of the filesystem and your mount point so it is mounted when the system boots:
UUID=RAID_UUID mountpoint ext4 defaults,nofail,nobarrier 0 2
For example, if you have the UUID shown in the previous example and the mount point /data
, add the following line to the /etc/fstab
file:
UUID=e7510a6f-2922-4413-b5fa-9dcd725967fd /data ext4 defaults,nofail,nobarrier 0 2
-
Mount the RAID filesystem you added to the fstab file. For example, to mount a mount point named /data
use the command:
$ mount /data
-
Create folders for your Vertica data and catalog under your mount point.
$ mkdir /data/vertica
$ mkdir /data/vertica/data
If you are planning to run Vertica in Eon Mode, create a directory for the depot instead of data:
$ mkdir /data/vertica/depot
Create a swap file
In addition to storage volumes to store your data, Vertica requires a swap volume or swap file to operate.
Create a swap file or swap volume of at least 2 GB. The following steps show how to create a swap file within Vertica on Azure:
-
Install devnull and swapfile:
$ install -o root -g root -m 0600 /dev/null /swapfile
-
Create the swap file:
$ dd if=/dev/zero of=/swapfile bs=1024 count=2048k
-
Prepare the swap file using mkswap
:
$ mkswap /swapfile
-
Use swapon
to instruct Linux to swap on the swap file:
$ swapon /swapfile
-
Persist the swapfile in FSTAB:
$ echo "/swapfile swap swap auto 0 0" >> /etc/fstab
Repeat the volume attachment, combination, and swap file creation procedures for each VM in your cluster.
5 - Form a cluster and install Vertica
Use the install_vertica script to combine two or more individual VMs to form a cluster and install the Vertica database.
Use the install_vertica
script to combine two or more individual VMs to form a cluster and install the Vertica database.
Download Vertica
To download the Vertica server appropriate for your operating system and license type, go to www.vertica.com/download/vertica.
Run the rpm to extract the files.
After you complete the download and extraction, the next section describes how to use the install_vertica
script to form a cluster and install the Vertica database software.
Before you start
Before you run the install_vertica
script:
-
Check the Virtual Network page for a list of current VMs and their associated private IP addresses.
-
Identify your storage location. The installer assumes that you have mounted your storage to /vertica/data
. To specify another location, use the --data-dir
argument.
-
Identify your storage location. To create your database's data
directory on mounted RAID drive, when you run the install_vertica
script, provide /vertica/data
as the value of the --data-dir
option .
Caution
Caution: Do not store your data on the root drive.
Combine virtual machines (VMs)
The following example shows how to combine VMs using the install_vertica
script.
-
While connected to your primary node, construct the following command to combine your nodes into a cluster.
$ sudo /opt/vertica/sbin/install_vertica --hosts 10.2.0.164,10.2.0.165,10.2.0.166 --dba-user-password-disabled --point-to-point --data-dir /vertica/data --ssh-identity ~/<name-of-private-key>.pem --license <license.file>
-
Substitute the IP addresses for your VMs and include your root key file name, if applicable.
-
Include the --point-to-point
parameter to configure spread to use direct point-to-point communication between all Vertica nodes, as required for clusters on Azure when installing or updating Vertica.
-
If you are using Vertica Community Edition, which limits you to three nodes, specify -L CE
with no license file.
-
After you combine your nodes, to reduce security risks, keep your key file in a secure place—separate from your cluster—and delete your on-cluster key with the shred command:
$ shred examplekey.pem
Important
You need your key file to perform future Vertica updates.
-
Reboot your cluster to complete the cluster formation and Vertica installation.
For complete information on the install_vertica
script and its parameters, see Install Vertica with the installation script.
After your cluster is up and running
Now that your cluster is configured and running, take these steps:
-
Log into one of the database nodes using the database administrator account (named dbadmin by default).
-
Create and start a database:
-
Configure your database. See Configuring the database.