Installing the Database in Azure
This section provides information about installing the ArcSight Database in Azure.
- Preparing the Azure Virtual Machine
- Installing Prerequisites
- Configuring and Installing the Database Server
Preparing the Azure Virtual Machine
This section describes how to prepare the Azure virtual machine for database installation.
- Log in to the Azure portal.
- Select an active Azure subscription.
- Click Create a Resource or select an existing resource.
- In the search box (case-insensitive), enter Centos-based HPC.
- Click create.
- In the Virtual machine name field, enter a name for the virtual machine.
- In the Image drop-down list, select supported image.
- In the Size drop-down list, select the VM that will be accomplishing the database requirements. For example, D8s_v3.
- Select the appropriate Authentication type, and enter the details.
- In the Select inbound ports drop-down list, be sure SSH (22) is selected.
- In the Public inbound ports area, select the Allow selected ports option.
- Click Next: Disks.
- From the Disks tab and create a new disk of minimum size 256 GB.
- For Data disks and Host caching select Read/write.
- Select the Networking and your Virtual network.
- Create a subnet for the database and select it in the subnet drop down.
- Click Review + create to review and create a VM ; wait to complete deployment.
- Click Go to your resource and launch the new VM.
- In the left navigation panel, click Overview, find DNS name, and click the associated link.
- Set Assignment to static and enter the DNS name label.
- Click Save.
- In the left navigation pane, click Networking.
- Select your Network Interface.
- From the left menu, select IP configuration.
- Navigate to the IP Forwarding Field, and select Enabled.
- Click Save.
- SSH to your VM with it's public IP address.
- Log in with your VM user, then become root.
- Change your root password.
- Create a folder for Vertica by running the command:
- Create partitions on the datadisk.
Vertica requires a minimum 2 GB swap partition irrespective of the amount of RAM installed. The remaining part of the disk, you can disk format ext4 and mount to /opt/vertica.
- Create a swap by running the command:
- Activate the swap by running the command:
- To format rest of disk to ext4, run the command:
- Get the last created UUID of disks from the output by running the command:
- For swap (/dev/sdc1) and for rest disk (/dev/sdc2) take note of the given UUID values, modify the /etc/fstab file, and add the following lines by replacing the UUIDs:
- Mount all by running the command:
- Check if
/opt/verticais assigned by running the command: - Enable the swap by running the command:
- Check the swap size by running the command:
- Repeat these steps for each expected database node.
mkdir /opt/vertica
[root@vertica1 ~]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2)
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x2959fe99.
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-536870911, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-536870911, default 536870911): ${sizePartitionForSwap}
Partition 1 of type Linux and of size 4 GiB is set
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p):
Using default response p
Partition number (2-4, default 2):
First sector (4196352-536870911, default 4196352):
Using default value 4196352
Last sector, +sectors or +size{K,M,G} (4196352-536870911, default 536870911):
Using default value 536870911
Partition 2 of type Linux and of size 254 GiB is set
Command (m for help): p
Disk /dev/sdc: 274.9 GB, 274877906944 bytes, 536870912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0xcca9a285
Device Boot Start End Blocks Id System
/dev/sdc1 2048 2097152 1047552+ 83 Linux
/dev/sdc2 2099200 536870911 267385856 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
mkswap /dev/sdc1
swapon /dev/sdc1
mkfs.ext4 /dev/sdc2
blkid
UUID=<UUID sdc1> none swap sw 0 0 UUID=<UUID sdc2> /opt/vertica ext4 defaults 0 0
mount -a
df -h
swapon -a
free -h
Installing Prerequisites
This section describes how to install the prerequisites necessary to install the Azure database.
- Configure passwordless communication from the node1 server to all of the node servers in the cluster.
-
On the node1 server, run the ssh-keygen command:
ssh-keygen -t rsa
-
Copy the key from node1 to all of the nodes, including node1, using the node IP address:
ssh-copy-id -i ~/.ssh/id_rsa.pub root@$node1,root@$node2,root@$node3
- Set up and activate
/etc/rc.localby running the following command: -
Add the following parameters to
/etc/sysctl.conf. - Next, run the following command:
-
To disable the firewall WARN (N0010), use
iptables:iptables -Fiptables -t nat -Fiptables -t mangle -Fiptables -Xsystemctl mask firewalldsystemctl disable firewalldsystemctl stop firewalldThe database requires several ports to be open on the local network. Micro Focus does not recommend that you place a firewall between nodes (all nodes should be behind a firewall), but if you must use a firewall between nodes, ensure that all the database ports are available (see Firewall ports in Technical Requirements for ArcSight Platform). For more information, see Firewall Considerations. - Set SELinux to permissive mode in
/etc/selinux/config.SELINUX=permissive
For more information, see SELinux Configuration.
-
In
/etc/default/grub, append lineGRUB_CMDLINE_LINUXwithintel_idle.max_cstate=0 processor.max_cstate=1by running the following command:grub2-mkconfig -o /boot/grub2/grub.cfg
For example:
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet intel_idle.max_cstate=0 processor.max_cstate=1 intel_pstate=disable"
- Depending on your OS, RHEL/CentOS 8.x or CentOS 7.x, run the following command:
- Run the following commands:
- If you have a high concurrency workload and if the database is CPU bound, reboot the virtual machine by running the following command:
- Reboot for your changes to take effect.
- For RHEL/CentOS 8.x, you must run RHEL/CentOS 8.x using the following command:
- Install the packages by running the following command:
- Modify the /etc/bashrc by running the following command:
- Apply the changes by running the following command:
- Repeat these steps for each expected database node.
#!/bin/sh
function drive {
block_device=`realpath $(df $1 | grep '^/' | cut -d' ' -f1)`
partition=$(echo $block_device | sed -e "s#/dev/##")
if [[ $partition == dm-* ]]; then
echo $partition
else
echo $partition | cut -c1-3
fi
}
cat > /etc/rc.local << EOF
#!/bin/sh
touch /var/lock/subsys/local
/sbin/blockdev --setra 2048 /dev/$(drive /)
/sbin/blockdev --setra 2048 /dev/$(drive /opt)
echo deadline > /sys/block/$(drive /)/queue/scheduler
echo deadline > /sys/block/$(drive /opt)/queue/scheduler
echo always > /sys/kernel/mm/transparent_hugepage/enabled
tuned-adm profile throughput-performance
EOF
chmod 755 /etc/rc.local
/etc/rc.local
| Parameter | Description |
net.core.somaxconn = 1024
|
Increases the number of incoming connections |
net.core.wmem_max = 16777216
|
Sets the send socket buffer maximum size in bytes |
net.core.rmem_max = 16777216
|
Sets the receive socket buffer maximum size in bytes |
net.core.wmem_default = 262144
|
Sets the receive socket buffer default size in bytes |
net.core.rmem_default = 262144
|
Controls the default size of receive buffers used by sockets |
net.core.netdev_max_backlog = 100000
|
Increase the length of the network interface input queue |
net.ipv4.tcp_mem = 16777216 16777216 16777216
|
|
net.ipv4.tcp_wmem = 8192 262144 8388608
|
|
net.ipv4.tcp_rmem = 8192 262144 8388608
|
|
net.ipv4.udp_mem = 16777216 16777216 16777216
|
|
net.ipv4.udp_rmem_min = 16384
|
|
net.ipv4.udp_wmem_min = 16384
|
|
vm.swappiness = 1
|
Defines the amount and frequency at which the kernel copies RAM contents to a swap space For more information, see Check for Swappiness. |
sysctl -p
echo always > /sys/kernel/mm/transparent_hugepage/enabled #### 7.7 and 7.8 always 8.1 madvise ##? echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag ##> echo no > /sys/kernel/mm/redhat_transparent_hugepage/khugepaged/defrag ### Changed: cpupower frequency-set --governor performance #### CentOS only, resolve WARN (S0140/S0141)
myroot=`df -h | grep '/$' | awk '{print $1}'`
myopt=`df -h | grep '/opt' | awk '{print $1}'`
echo deadline > /sys/block/sdb/queue/scheduler #### Resolve FAIL (S0150)
/sbin/blockdev --setra 8192 $myopt #### Resolve FAIL (S0020)
/sbin/blockdev --setra 2048 $myroot
echo always > /sys/kernel/mm/transparent_hugepage/enabled
echo deadline > /sys/block/sda/queue/scheduler
tuned-adm profile throughput-performance #### CentOS only, resolve WARN (S0140/S0141)
/sbin/blockdev --setra 2048 /dev/$drive
echo deadline > /sys/block/$drive/queue/scheduler
echo always > /sys/kernel/mm/transparent_hugepage/enabled
tuned-adm profile throughput-performance #### CentOS only, resolve WARN (S0140/S0141)
sudo sysctl -w net.core.netdev_max_backlog=2000
dnf install libnsl
yum install -y java-1.8.0-openjdk gdb mcelog sysstat dialog chrony tzdata wget
export VERTICA_FAILURE_THRESHOLD=FAIL
~/.bashrc
Configuring and Installing the Database Server
This section describes how to configure and install the Azure database.
- On the Database cluster node1 server, create a folder for the database installer.
- From the master node where you performed the Downloading Installation Packages steps, copy the following directory on the Database cluster node1 server:
- To extract the installer file and place it in the correct directory, run the following commands:
- Edit the
config/db_user.propertiesfile. Thehostsproperty is required. - Install the database.
- When prompted, create the database administrator user.
- Create the schema.
- When prompted, create the following users:
-
App admin user: A regular database user granted elevated permissions for performing operations on the database to manage the database, schema, and resource pools. The credentials for this user will need to be provided later in the CDF Management Portal when you are deploying capabilities.
-
Search user: A regular database user with permissions restricted to event search operations. The credentials for this user will need to be provided later in the CDF Management Portal when you are deploying capabilities.
- Monitor your database cluster status constantly. For more information, see Monitoring the Database.
- Database nodes status: Ensures all nodes are up
- Database nodes storage status: Ensures storage is sufficient
For example:
mkdir /opt/arcsight-db-tools
/opt/arcsight-db-tools should not be under /root or /opt/vertica.{unzipped-installer-dir}/installers/database/db-installer_x.x.x-x.tar.gz file to the /opt/arcsight-db-tools
cd /opt/arcsight-db-tools tar xvfz db-installer_x.x.x.x.tar.gz
|
Property |
Description |
|---|---|
|
|
A comma separated list of the database servers in IPv4 format (for example, 1.1.1.1,1.1.1.2,1.1.1.3). If it is necessary to construct the cluster, avoid using local loopback (localhost, 127.0.0.1, etc.). |
./db_installer install
The database administrator user account is used during database deployment, configuration, upgrade, and debugging. For security reasons, the platform deployed capabilities will not ask you for the credentials for this user.
./db_installer create-schema