Installing AnzoGraph on a Cluster

This topic provides instructions for installing AnzoGraph as a non-root user. Because AnzoGraph offers features such as user-defined extensions, it is not secure software certified and Cambridge Semantics recommends that you do not install or run AnzoGraph as the root user.

The tasks below guide you through creating a service user and then installing and running AnzoGraph as that user. Since AnzoGraph will access the data that Anzo writes on the shared file store, install and run AnzoGraph as the same user and group that runs Anzo.

For instructions on installing AnzoGraph on a single server, see Installing AnzoGraph on a Single Server.

  1. Ensure All Servers Meet the Requirements
  2. Add the Anzo User and AnzoGraph Installation Directory on All Servers
  3. Install AnzoGraph on the Slave Servers
  4. Install AnzoGraph on the Leader Server
  5. Configure the AnzoGraph Services

Ensure All Servers Meet the Requirements

Note: Root user privileges are required to complete this task.

  1. Before installing AnzoGraph, make sure that each AnzoGraph host server meets the requirements in AnzoGraph Requirements.
  2. Install the required software on each server in the cluster:
    • GNU Compiler Collection (GCC): AnzoGraph requires the latest version of the GCC tools for your operating system. Run the following command to install GCC:
      # yum install gcc
    • bzip2: Required for unpacking the AnzoGraph tool set during installation. Run the following command to install bzip2:
      # yum install bzip2
  3. Copy the AnzoGraph installation script to the server.
  4. Make note of the IP addresses for each of the servers in the cluster. The installation wizard will prompt you to enter the IP addresses during the installation.
  5. Choose one server to be the leader server.

Add the Anzo User and AnzoGraph Installation Directory on All Servers

Note: Root user privileges are required to complete this task.

On each server in the cluster, follow the instructions below to add the Anzo service user, create the AnzoGraph installation directory, and change ownership of the installation directory to the service user.

  1. As the root user, run the following command to create an AnzoGraph installation directory.
    # mkdir -p /path/directory

    Where path is the location of the directory, and directory is the new directory name to create. The default AnzoGraph installation directory is /opt/anzograph. For example:

    # mkdir -p /opt/anzograph
  2. Run the following command to add the Anzo service user:
    # useradd name

    Where name is the username to create. For example the command below adds a user named anzo:

    # useradd anzo
  3. Run the following command to set a password for the user:
    # passwd name

    Where name is the name of the user that you added. Follow the prompts to set the password.

  4. Run the following command to change ownership of the AnzoGraph installation directory to the new service user and group:
    # chown name:name /path/directory

    Where name is the new username and /path/directory is the path and directory name of the installation directory. For example:

    # chown anzo:anzo /opt/anzograph

Install AnzoGraph on the Slave Servers

Follow the instructions below to install AnzoGraph on each slave server.

Important: Complete the steps as the Anzo service user.

  1. If necessary, run the following command to become the Anzo service user:
    # su name

    Where name is the name of the service user. For example:

    # su anzo
  2. If necessary, run the following command to make the AnzoGraph installation script executable:
    chmod +x script_name
  3. Run the following command to start the installation wizard:
    ./script_name

    The script unpacks the JRE and then waits for input before starting the installation.

  4. Press Enter to proceed with the installation. The wizard displays the AnzoGraph license agreement.
  5. Review the license agreement. Press Enter to scroll through the terms. At the end of the agreement, type 1 to accept the terms or type 2 to disagree and stop the installation.
  6. The wizard prompts you to specify which components to install. Specify 1 (AnzoGraph) and press Enter.
  7. Specify the installation directory. Type the path and directory that you created in Add the Anzo User and AnzoGraph Installation Directory on All Servers and press Enter. Since the installation directory was previously created, the installer notifies you that the directory exists and asks you confirm that you want to install in that location. Press Enter for yes.
  8. At the server installation type prompt, specify option 3 (Cluster Slave) and press Enter.
  9. Indicate whether this installation is for use with Anzo. Press Enter for Yes. Answering yes configures AnzoGraph to use the settings that are optimal for Anzo. Answering no configures the settings that are optimal for AnzoGraph standalone use.
  10. Type a comma-separated list of the IP addresses for each server in the cluster. Type the leader server IP address first, followed by each slave IP address. For example, on a cluster with 4 servers where 192.168.2.1 is the leader server:
    192.168.2.1,192.168.2.2,192.168.2.3,192.168.2.4

    Important: Make sure that you enter this value exactly the same, with IP addresses in the same order, during the installation of each slave.

  11. After typing the list of IP addresses, press Enter. The wizard extracts the AnzoGraph files and completes the installation.
  12. If you did not previously make the Linux kernel configuration changes required by AnzoGraph (as described in Required Linux Kernel Configuration Changes), run the following command to execute the system configuration utility and make the necessary kernel changes:
    sudo ./install_path/bin/azg_system_config

    Note: If you do not have sudo permissions to run azg_system_config, you can skip this step for the slave servers.

  13. Start the AnzoGraph system management daemon (azgmgrd) by running the following command. The system manager daemon is a lightweight program that manages the communication between AnzoGraph servers.
    ./install_path/bin/azgmgrd

Install AnzoGraph on the Leader Server

Follow the instructions below to install AnzoGraph on the leader server.

Important: Complete the steps as the Anzo service user.

  1. If necessary, run the following command to become the Anzo service user:
    # su name

    Where name is the name of the service user. For example:

    # su anzo
  2. If necessary, run the following command to make the AnzoGraph installation script executable:
    chmod +x script_name
  3. Run the following command to start the installation wizard:
    ./script_name

    The script unpacks the JRE and then waits for input before starting the installation.

  4. Press Enter to proceed with the installation. The wizard displays the AnzoGraph license agreement.
  5. Review the license agreement. Press Enter to scroll through the terms. At the end of the agreement, type 1 to accept the terms or type 2 to disagree and stop the installation.
  6. The wizard prompts you to specify which components to install. Specify 1 (AnzoGraph) and press Enter.
  7. Specify the installation directory. Type the path and directory that you created in Add the Anzo User and AnzoGraph Installation Directory on All Servers and press Enter. Since the installation directory was previously created, the installer notifies you that the directory exists and asks you confirm that you want to install in that location. Press Enter for yes.
  8. At the server installation type prompt, specify option 2 (Cluster Leader) and press Enter.
  9. Indicate whether this installation is for use with Anzo. Press Enter for Yes. Answering yes configures AnzoGraph to use the settings that are optimal for Anzo. Answering no configures the settings that are optimal for AnzoGraph standalone use.
  10. Set up the AnzoGraph admin user. Type a username to use for authentication. Anzo will use this username to connect to AnzoGraph. Then press Enter.
  11. Type a password for the Anzo username and press Enter. Note: Some special characters, such as $ and *, are treated as parameters in bash. When typing a password, avoid or escape special characters to remove their special meaning to the command line. For more information, see Quoting in the Bash Reference Manual.
  12. Type a comma-separated list of the IP addresses for each server in the cluster. Type the leader server IP address first, followed by each slave IP address. For example, on a cluster with 4 servers where 192.168.2.1 is the leader server:
    192.168.2.1,192.168.2.2,192.168.2.3,192.168.2.4

    Important: Make sure that you enter this value exactly the same, with IP addresses in the same order as the slave servers.

  13. After typing the list of IP addresses, press Enter. Configure any additional AnzoGraph settings. If Cambridge Semantics Support provided custom settings to use for your configuration, type the supplied values and then press Enter. Separate multiple settings with the new line escape sequence, \n. For example, the following entry sets two custom settings: truncate_clob=true\npersistence_directory=/data/.

    Note: If you are installing AnzoGraph as the root user, add the following value to this prompt:

    enable_root_user=true
  14. The wizard extracts the AnzoGraph files and completes the installation.
  15. If you did not previously make the Linux kernel configuration changes required by AnzoGraph (as described in Required Linux Kernel Configuration Changes), run the following command to execute the system configuration utility and make the necessary kernel changes:
    sudo ./install_path/bin/azg_system_config

    Note: If you do not have sudo permissions to run azg_system_config, follow the instructions in Changing AnzoGraph Configuration Settings to change the os_allow_alternate_vm_config value to true in the AnzoGraph settings file. This setting enables AnzoGraph to start with non-optimal Linux configurations.

  16. Start the AnzoGraph system management daemon by running the following command:
    ./install_path/bin/azgmgrd

    Note: If you run the command as the root user and did not enable root user access during the installation, the system manager displays the following error message:

    azgctl Exiting: Error - Cannot execute as user 'root'.
    To override this security protection, set 'enable_root_user=true':
    Invalid user id

    To resolve the issue, follow the instructions in Changing AnzoGraph Configuration Settings to change the enable_root_user value to true in the AnzoGraph settings file and enable root user access. Then repeat this step.

  17. Run the following command to start the database on the cluster:
    ./install_path/bin/azgctl -start

Configure the AnzoGraph Services

This section provides instructions for completing the post-installation setup. There are three services that Cambridge Semantics recommends that you implement to configure and start AnzoGraph automatically as the Anzo service user any time the host server is rebooted. The first service is configured on every server in the cluster and ensures that the Linux kernel configuration changes are applied. The second service is also configured on every server in the cluster and starts the AnzoGraph system management daemon (azgmgrd), the lightweight program that manages AnzoGraph communication. And the third service is configured only on the leader server and starts the database on the cluster once the system management daemons are running.

Note: Root user privileges are required to complete the tasks in this section.

Configure the Linux Kernel Configuration Service

On each server in the cluster, follow the instructions below to set up a service to re-apply the Linux kernel configuration changes any time the AnzoGraph host server is restarted.

  1. Run the following command to copy the AnzoGraph system configuration script, azg_system_config, to the root directory:
    # cp /install_path/bin/azg_system_config /root/

    For example:

    # cp /opt/anzograph/bin/azg_system_config /root/
  2. Run the following command to remove "sudo" from the azg_system_config script:
    # sed -i 's/sudo//g' /root/azg_system_config
  3. Create a file called azg_system_config.service in the /usr/lib/systemd/system directory. For example:
    # cat > /usr/lib/systemd/system/azg_system_config.service <<EOF
  4. Add the following contents to azg_system_config.service:
    [Unit]
    Description=Configure Linux for AnzoGraph
    [Service]
    Type=oneshot
    ExecStart=/root/azg_system_config
    [Install]
    WantedBy=multi-user.target
    EOF
  5. Press Enter if you followed the example above or save and close the file if you opened it in an editor.
  6. Run the following commands to start and enable the new service:
    # systemctl start azg_system_config.service
    # systemctl enable azg_system_config.service

Configure the AnzoGraph System Management Service

On each server in the cluster, follow the instructions below to set up a service that will automatically start the AnzoGraph system management daemon (azgmgrd) when the host server is restarted.

  1. Create a file called azgmgrd.service in the /usr/lib/systemd/system directory. For example:
    # vi > /usr/lib/systemd/system/azgmgrd.service
  2. Add the following contents to azgmgrd.service:
    [Unit]
    Description=AnzoGraph communication service
    # depends on NetworkManager-wait-online.service enabled
    Wants=network-online.target
    After=network-online.target
    [Service]
    Type=forking
    # The PID file is optional but recommended so that systemd
    # can identify the main process of the daemon
    # PIDFile=/var/run/azgmgrd.pid
    WorkingDirectory=install_path
    StandardOutput=syslog
    StandardError=syslog
    User=Anzo_service_user
    UMask=0022
    Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/install_path/bin:/install_path/tools/bin
    ExecStart=/install_path/bin/azgmgrd /install_path/
    CPUAccounting=false
    MemoryAccounting=false
    [Install]
    WantedBy=multi-user.target

    For example:

    [Unit]
    Description=AnzoGraph communication service
    # depends on NetworkManager-wait-online.service enabled
    Wants=network-online.target
    After=network-online.target
    [Service]
    Type=forking
    # The PID file is optional but recommended so that systemd
    # can identify the main process of the daemon
    # PIDFile=/var/run/azgmgrd.pid
    WorkingDirectory=/opt/anzograph
    StandardOutput=syslog
    StandardError=syslog
    User=anzo
    UMask=0022
    Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/anzograph/bin:/opt/anzograph/tools/bin
    ExecStart=/opt/anzograph/bin/azgmgrd /opt/anzograph/
    CPUAccounting=false
    MemoryAccounting=false
    [Install]
    WantedBy=multi-user.target
  3. Run the following commands to start and enable the new service:
    # systemctl start azgmgrd.service
    # systemctl enable azgmgrd.service

Configure the AnzoGraph Database Service

On the leader server only, follow the instructions below to set up a service that will automatically start AnzoGraph when the host server is restarted. This service is configured to run after the system management daemon is started.

  1. Create a file called anzograph.service in the /usr/lib/systemd/system directory. For example:
    # vi > /usr/lib/systemd/system/anzograph.service
  2. Add the following contents to anzograph.service:
    [Unit]
    Description=AnzoGraph database service
    After=azgmgrd.service
    Wants=azgmgrd.service
    [Service]
    Type=forking
    # The PID file is optional but recommended so that systemd
    # can identify the main process of the daemon
    # PIDFile=/var/run/anzograph.pid
    WorkingDirectory=install_path
    StandardOutput=syslog
    StandardError=syslog
    RemainAfterExit=no
    Restart=on-failure
    RestartSec=60s
    User=Anzo_service_user
    UMask=0022
    Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/install_path/bin:/install_path/tools/bin
    ExecStart=/install_path/bin/azgctl -start
    [Install]
    WantedBy=multi-user.target

    For example:

    [Unit]
    Description=AnzoGraph database service
    After=azgmgrd.service
    Wants=azgmgrd.service
    [Service]
    Type=forking
    # The PID file is optional but recommended so that systemd
    # can identify the main process of the daemon
    # PIDFile=/var/run/anzograph.pid
    WorkingDirectory=/opt/anzograph
    StandardOutput=syslog
    StandardError=syslog
    RemainAfterExit=no
    Restart=on-failure
    RestartSec=60s
    User=anzo
    UMask=0022
    Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/anzograph/bin:/opt/anzograph/tools/bin
    ExecStart=/opt/anzograph/bin/azgctl -start
    [Install]
    WantedBy=multi-user.target
  3. Run the following commands to start and enable the new service:
    # systemctl start anzograph.service
    # systemctl enable anzograph.service

Once the services are in place, AnzoGraph should be stopped and started on the leader server via systemctl. For example, systemctl stop anzograph and systemctl start anzograph.

For instructions on configuring the connection to AnzoGraph in the Anzo console, see Configuring an AnzoGraph Connection.

Related Topics