Configuring the Target Cluster if Different from the Source Cluster - Aster Analytics on AWS

Teradata Aster Analytics on AWS Getting Started Guide

Product
Aster Analytics on AWS
Release Number
1.5
Published
October 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
gkp1499384139306.ditamap
dita:ditavalPath
AWS.ditaval
dita:id
tsu1471542219751
lifecycle
previous
Product Category
Cloud
If Aster is restored onto a cluster that is not the one where the backup was taken (that is, source and target clusters are different), you need to manually reconfigure the network and QueenDB settings of the target cluster after restoration.
This post-restoration operation is required only in the case when the target cluster is different from the source cluster.
Use the IP addresses and MAC addresses of your system when following this procedure to reconfigure the target cluster.
  1. Enable passwordless root SSH between all nodes of the target cluster.
    1. From AWS web console, start all the nodes of target cluster.
    2. Get the IP addresses of all the nodes from AWS web console.
    3. SSH to the queen node of the target cluster, as ec2-user and using <instance key>.pem file.
    4. Edit the /etc/ssh/sshd_config file and restart the sshd service.
      sudo su -
      sed -i 's/^PermitRootLogin/#PermitRootLogin/' /etc/ssh/sshd_config
      sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
      service sshd restart
    5. Repeat Step c to Step d on all the worker nodes.
    6. Verify that passwordless root SSH is enabled between all nodes (queen and workers) of the target cluster. For each node, run these commands, and repeat the ssh <node_ip> date command to test SSH connections to all other nodes in the cluster.
      sudo su -
      ssh localhost date
      ssh <node_ip> date
      ...
  2. Gather the network configuration information from the QueenDB of the target cluster.
    The QueenDB of the target cluster currently reflects the network configuration information of the source cluster, and must be replaced by the actual network configuration information of the target cluster.
    1. SSH to the queen node of the target cluster, as ec2-user and using <instance key>.pem file.
    2. Load the Aster environment /home/beehive/config/asterenv.sh.
      sudo su -
      source /home/beehive/config/asterenv.sh
    3. Run SQL query on the QueenDB of the target cluster.
      ncli queendb start
      psql -p 8000 -U _bee_sysman -d _bee_stats
      select node_ip, node_mac, node_type, node_uid from _bee_special.nc_physical_node_info;

      Record the node_ip, node_mac, node_type, node_uid in the output as:

      old_node_ip, old_node_mac, node_type, node_uid

      Write down this information for the queen node and all the worker nodes, for use in the reminder of this procedure.

  3. Gather the network configuration information of the target cluster.
    This is the actual network configuration of the target cluster.
    1. SSH to the queen node of the target cluster, as ec2-user and using <instance key>.pem file.
    2. sudo su -
    3. Determine the IP and MAC addresses of the queen node of the target cluster, from 'eth0' interface.
      The interface name may be different in your system. For example, 'byn0'.
      ifconfig eth0

      Locate the inet addr and HWaddr in the output, and write down the information as the new_node_ip and new_node_mac for the queen node.

    4. Determine the node_uid of the queen node of the target cluster.
      cat /home/beehive/installer/config/installerConfig | grep nodeUid

      Write down the output as the node_uid for the queen node.

    5. Combine the information for the queen node from Step c and Step d, and record them as: new_node_ip, new_node_mac, node_uid
    6. Repeat Step a to Step e on all worker nodes of the target cluster.
  4. Create a table, cross-referencing records from Step 2 and Step 3 on node_uid.
    Use the following table (one queen and two workers) as a template, and add one row for each additional worker node in your system.
    Node Type / node_type node_uid old_node_ip new_node_ip old_node_mac new_node_mac
    Queen/sysman          
    Worker/worker          
    Worker/worker          
  5. Reconfigure the QueenDB of the target cluster to reflect new IP addresses and new MAC addresses, using the table created in the previous step.
    1. SSH to the queen node of the target cluster, as ec2-user and using <instance key>.pem file.
    2. Load the Aster environment /home/beehive/config/asterenv.sh.
    3. Run SQL update query on QueenDB to reconfigure the queen node and all the worker nodes.
      ncli queendb start
      psql -p 8000 -U _bee_sysman -d _bee_stats

      For the queen node:

      update _bee_special.nc_physical_node_info set node_ip='<new_node_ip>' where node_ip='<old_node_ip>';

      For each worker node:

      update _bee_special.nc_physical_node_info  set node_ip='<new_node_ip>', display_name='<new_node_ip>', node_mac='<new_node_mac>' where node_ip='<old_node_ip>';
      <new_node_mac> in this command is lowercase and the colon delimiter is stripped off.

      For example: mmmmmmssssss

      Check the QueenDB of the target cluster after the reconfiguration:

      select node_ip, node_mac, node_type, node_uid from _bee_special.nc_physical_node_info;

      The output should show the new IP addresses and new MAC addresses of the queen node and all the worker nodes.

  6. Reconfigure all local config files on the queen node to reflect the new IP addresses of the queen and all worker nodes.
    1. SSH to the queen node, as ec2-user and using <instance key>.pem file.
    2. Load the Aster environment /home/beehive/config/asterenv.sh.
    3. Reconfigure the local config file to reflect the new IP and MAC addresses.
      ncli node changeconfiglocal <old_node_ip> <new_node_ip> <new_node_mac>
      Repeat this command for the queen node and all the worker nodes.
      <new_node_mac> in this command is lowercase and the colon delimiter is not stripped off.

      For example: mm:mm:mm:ss:ss:ss

  7. Reconfigure the local config file on each worker node to reflect the new IP address of the queen node. For each worker node, use the following steps:
    1. SSH to the worker node, as ec2-user and using <instance key>.pem file.
    2. Load the Aster environment /home/beehive/config/asterenv.sh.
    3. Reconfigure the local configuration file to reflect the new IP and MAC addresses of the queen node.
      ncli node changeconfiglocal <old_node_ip> <new_node_ip> <new_node_mac>
      <new_node_mac> in this command is lowercase and the colon delimiter is not stripped off.
  8. Reconfigure all local Aster hosts files on the queen node to reflect the new MAC addresses of all the worker nodes.
    1. SSH to the queen node of the target cluster, as ec2-user and using <instance key>.pem file.
    2. sudo su -
    3. Edit /home/beehive/cluster-management/hosts file, replacing the old MAC addresses of the worker nodes with new ones.
      New MAC address is lowercase and the colon delimiter is not stripped off.
  9. Restart Aster and activate the cluster.
    1. SSH to the queen node of the target cluster, as ec2-user and using <instance key>.pem file.
    2. Load the Aster environment /home/beehive/config/asterenv.sh.
    3. Restart Aster and activate the cluster.
      ncli queendb stop
      ncli system softrestart
      ncli system activate