Wednesday, April 3, 2024

Installation of 3 node cluster of TigerGraph DB on Oracle Linux 7

Step 1: Provision 3 nodes of Oracle Linux 7

Step 2: Install pre-requisite OS packages.

$ sudo yum install tar curl cronie iproute util-linux-ng net-tools nc coreutils openssh-clients openssh-server sshpass jq

Note: If a package is not found, try resolving by installing manually. In my case sshpass  is not found with yum install, so downloaded package from official repositories.

$ wget https://yum.oracle.com/repo/OracleLinux/OL7/openstack30/x86_64/getPackage/sshpass-1.05-5.el7.x86_64.rpm

$ sudo rpm -ivh sshpass-1.05-5.el7.x86_64.rpm

Step 3: Create "tigergraph" user

$ sudo useradd tigergraph
$ sudo passwd tigergraph

Note: You might need to add the tigergraph user to "Allowuser" in "/etc/ssh/sshd_config" and reboot/restart sshd.

Example: 

## AllowUsers OLD-USER NEW-USER

AllowUsers pramod user2 user3 tigergraph

Step 4: Download official Tigergraph DB package to desired location.

$ wget https://dl.tigergraph.com/enterprise-edition/tigergraph-3.9.2-1-offline.tar.gz

Step 5: Make sure the mount for logs, data, kafka, etc to be owned by "tigergraph" user and corresponding group.

Example:

$ ls -ld /tigergraph/kafka
drwxr-x--- tigergraph tigergraph /tigergraph/kafka

Step 6: Add "tigergraph" to sudoers file.

# visudo
tigergraph          ALL=(ALL) ALL

Step 7: Make configuration changes.

Example:

$ cd /tigergraph-3.9.3-3-offline
$ cat install_conf.json
{
  "BasicConfig": {
    "TigerGraph": {
      "Username": "tigergraph",
      "[comment]":"Provide password for tigergraph user, if the user already exists, we won't change the password. If the password is empty, we will set it to default value 'tigergraph'.",
      "[comment]": "TigerGraph does not support passwords with special characters such as '$'. Please change your password if it contains such special characters.",
      "Password": "tigergraph",
      "SSHPort": 22,
      "[comment]":"(Optional)Provide valid private key file below to replace tigergraph.rsa and tigergraph.pub, which will be generated by default.",
      "PrivateKeyFile": "",
      "PublicKeyFile": ""
    },
    "RootDir": {
      "AppRoot": "/tigergraph_tmp/app",
      "DataRoot": "/tigergraph_tmp/data",
      "LogRoot": "/tigergraph_tmp/log",
      "TempRoot": "/tigergraph_tmp/tmp"
    },
    "License": "Replace_With_Trial_Or_Official_License_Key_String",
    "[comment]":"You can add more nodes by string 'node_id: IP', appending to the following json array. Otherwise, it installs single node locally by default.",
    "NodeList": [
      "m1: 1.10.18.15",
      "m2: 1.10.14.7",
      "m3: 1.10.14.3"
    ]
  },
  "AdvancedConfig": {
    "[comment]": "Keep the default ClusterConfig if installing locally",
    "ClusterConfig": {
      "[comment]": "All nodes must have the same login configurations",
      "LoginConfig": {
        "SudoUser": "tigergraph",
        "[comment]": "choose login method: 'P' for SSH using password or 'K' for SSH using key file (e.g. ec2_key.pem)",
        "[comment]": "TigerGraph does not support passwords with special characters such as '$'. Please change your password if it contains such special characters.",
        "Method": "P",
        "P": "sudoUserPassword",
        "K": "/path/to/my_key.pem_rsa"
      },
      "[comment]": "To install a high-availability cluster, please specify the ReplicationFactor greater than 1",
      "ReplicationFactor": 1
    }
  }
}

Step 8: Install as "root" user

Note: If tried with "tigergraph" or other user it might fail at port check etc.

# sudo ./install.sh -n

Step 9: Validate

As "tigergraph" user

$ gadmin status -v

***


SFTP error:


In logs check for statement "The SFTP tool is missing. TG requires SFTP to be properly installed."

Then check if sftp is setup correctly setup or installed.

$ sudo grep -P '^\s*Subsystem\s+sftp' /etc/ssh/sshd_config

if no output, then it indicates that the sftp is not enabled.

Edit /etc/ssh/sshd_config and add below line

Subsystem sftp /usr/libexec/openssh/sftp-server

to it, then restart sshd 

# systemctl restart sshd

Then try install again.

***

No comments:

Post a Comment