Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX Manager Three Node Deployment on VM

Udayan Yaragattikar edited this page Apr 16, 2021 · 22 revisions

Execute each command on all the three nodes

Pre-Requisites Installation:

  1. Setup and Install third party software on each of 3-node : Refer wiki Setup and Install third party software

  2. Install Cortx-manager and required cortx components on each of 3-node. Refer wiki Install Required Cortx Software

  3. Follow Pre-requisite for Cortx-py-utils mini provisioning (Refer wiki here)

  4. Generate cortx-py-utils configuration templates for Cortx-py-utils mini provisioning steps. (Refer wiki here)

  5. Fetch Machine Id and Hostname of VM using following command on each of 3-node:

$ cat /etc/machine-id

$ hostname

  1. Enclosure Id of VM using Following Command:

$ echo enc$(cat /etc/machine-id)

  1. Generate encrypted password.
   python3 -W "ignore" -c  "from cortx.utils.security.cipher import Cipher; key = Cipher.generate_key('bae4b468-565d-49df-9495-a43a5d89babc','cortx');print((Cipher.encrypt(key, b'Seagate@1')).decode('utf-8'))"`
  1. Update configuration templates for each phase as given below:

    a. post_install

    • Template file path: /opt/seagate/cortx/csm/conf/csm.post_install.tmpl.3-node
    • Replace template fields with their corresponding values:
      • Replace TMPL_MACHINE_ID_1 TMPL_MACHINE_ID_2 TMPL_MACHINE_ID_3 with machine-id of each node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID_1 TMPL_ENCLOSURE_ID_2 TMPL_ENCLOSURE_ID_3 with enclosure id of node. Refer Step 6.
    • Sample template for reference: csm.post_install.tmpl.3-node.sample

    b. prepare

    • Template file path: /opt/seagate/cortx/csm/conf/csm.prepare.tmpl.3-node
    • Replace template fields with their corresponding values:
      • Replace TMPL_MACHINE_ID_1 TMPL_MACHINE_ID_2 TMPL_MACHINE_ID_3 with machine-id of each node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID_1 TMPL_ENCLOSURE_ID_2 TMPL_ENCLOSURE_ID_3 with enclosure id of node. Refer Step 6.
      • Replace TMPL_SERVER_NAME_1 TMPL_SERVER_NAME_2 TMPL_SERVER_NAME_3 with server name of each node Ex- srvnode-1 srvnode-2 srvnode-3
      • Replace TMPL_SERVER_HOSTNAME_1 TMPL_SERVER_HOSTNAME_2 TMPL_SERVER_HOSTNAME_3 with server hostname of each node. Refer Step 5.
      • Replace TMPL_CLUSTER_ID with UUID of node. Ex: bae4b468-565d-49df-9495-a43a5d89babc
      • Replace TMPL_CSM_SECRET_KEY with CSM secrete key in encrypted form.
      • Replace TMPL_SGIAM_SECRET_KEY with S3 ldap secrete key in encrypted form.
    • Sample template for reference: csm.prepare.tmpl.3-node.sample

    c. config

    • Template file path: /opt/seagate/cortx/csm/conf/csm.config.tmpl.3-node
    • Replace template fields with their corresponding values:
      • Replace TMPL_MACHINE_ID_1 TMPL_MACHINE_ID_2 TMPL_MACHINE_ID_3 with machine-id of each node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID_1 TMPL_ENCLOSURE_ID_2 TMPL_ENCLOSURE_ID_3 with enclosure id of node. Refer Step 6.
      • Replace TMPL_SERVER_NAME_1 TMPL_SERVER_NAME_2 TMPL_SERVER_NAME_3 with server name of each node Ex- srvnode-1 srvnode-2 srvnode-3
      • Replace TMPL_SERVER_HOSTNAME_1 TMPL_SERVER_HOSTNAME_2 TMPL_SERVER_HOSTNAME_3 with server hostname of each node. Refer Step 5.
      • Replace TMPL_CLUSTER_ID with UUID of node. Ex: bae4b468-565d-49df-9495-a43a5d89babc
      • Replace TMPL_CSM_SECRET_KEY with CSM secrete key in encrypted form.
      • Replace TMPL_SGIAM_SECRET_KEY with S3 ldap secrete key in encrypted form.
    • Sample template for reference: csm.config.tmpl.3-node.sample

    d. init

    • Template file path: /opt/seagate/cortx/csm/conf/csm.config.tmpl.3-node
    • Replace template feilds with their corresponding values:
      • Replace TMPL_MACHINE_ID_1 TMPL_MACHINE_ID_2 TMPL_MACHINE_ID_3 with machine-id of each node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID_1 TMPL_ENCLOSURE_ID_2 TMPL_ENCLOSURE_ID_3 with enclosure id of node. Refer Step 6.
      • Replace TMPL_SERVER_NAME_1 TMPL_SERVER_NAME_2 TMPL_SERVER_NAME_3 with server name of each node Ex- srvnode-1 srvnode-2 srvnode-3
      • Replace TMPL_SERVER_HOSTNAME_1 TMPL_SERVER_HOSTNAME_2 TMPL_SERVER_HOSTNAME_3 with server hostname of each node. Refer Step 5.
      • Replace TMPL_CLUSTER_ID with UUID of node. Ex: bae4b468-565d-49df-9495-a43a5d89babc
      • Replace TMPL_CSM_SECRET_KEY with CSM secrete key in encrypted form.
      • Replace TMPL_SGIAM_SECRET_KEY with S3 ldap secrete key in encrypted form.
    • Sample template for reference: csm.init.tmpl.3-node.sample

Cortx-manager mini Provisioning.

Execute cortx-manager mini provisioning commands on each of 3 node.

  1. Post Install
$ /opt/seagate/cortx/utils/bin/utils_setup post_install --config json:///opt/seagate/cortx/utils/conf/utils.post_install.tmpl.3-node
$ /opt/seagate/cortx/csm/bin/csm_setup post_install --config json:///opt/seagate/cortx/csm/conf/csm.post_install.tmpl.3-node
  1. Prepare
$ /opt/seagate/cortx/csm/bin/csm_setup prepare --config json:///opt/seagate/cortx/csm/conf/csm.prepare.tmpl.3-node
  1. Config
$ /opt/seagate/cortx/utils/bin/utils_setup config --config json:///opt/seagate/cortx/utils/conf/utils.config.tmpl.3-node
$ /opt/seagate/cortx/csm/bin/csm_setup config --config json:///opt/seagate/cortx/csm/conf/csm.config.tmpl.3-node
  1. Init
$ /opt/seagate/cortx/csm/bin/csm_setup init --config json:///opt/seagate/cortx/csm/conf/csm.init.tmpl.3-node

Start and Test Cortx-manager service

  1. Run Cortx-Manager using the Following Command:
$ systemctl enable csm_agent
$ systemctl start csm_agent
  1. Execute Cortx-manager test phase:
$ /opt/seagate/cortx/csm/bin/csm_setup test -t /opt/seagate/cortx/csm/test/plans/self_test.pln -f /opt/seagate/cortx/csm/test/test_data/args.yaml -l /tmp/csm_test 
PASS