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

CORTX Manager Single Node Deployment on VM

Udayan Yaragattikar edited this page May 31, 2021 · 37 revisions

Pre-Requisites Installation:

  1. Setup and Install third party software : Refer wiki Setup and Install third party software

  2. Install Cortx-manager and required cortx components. 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:

$ 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.1-node
    • Replace template fields with their corresponding values:
      • Replace TMPL_MACHINE_ID with machine-id of node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID with enclosure id of node. Refer Step 6.
    • Sample template for reference: csm.post_install.tmpl.1-node.sample

    b. prepare

    • Template file path: /opt/seagate/cortx/csm/conf/csm.prepare.tmpl.1-node
    • Replace template fields with their corresponding values:
      • Replace TMPL_MACHINE_ID with machine-id of node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID with enclosure id of node.Refer Step 6.
      • Replace TMPL_SERVER_NAME with server name of node Ex- srvnode-1
      • Replace TMPL_SERVER_HOSTNAME with server hostname of node. Refer Step 5.
      • Replace TMPL_CLUSTER_ID with UUID of node.
      • Replace TMPL_CSM_SECRET_KEY with CSM secrete key in encrypted form. Refer Step 7
      • Replace TMPL_SGIAM_SECRET_KEY with S3 ldap secrete key in encrypted form. Refer Step 7
    • Sample template for reference: csm.prepare.tmpl.1-node.sample

    c. config

    • Template file path: /opt/seagate/cortx/csm/conf/csm.config.tmpl.1-node
    • Replace template fields with their corresponding values:
      • Replace TMPL_MACHINE_ID with machine-id of node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID with enclosure id of node. Refer Step 6.
      • Replace TMPL_SERVER_NAME with server name of node Ex- srvnode-1
      • Replace TMPL_SERVER_HOSTNAME with server hostname of 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. Refer Step 7
      • Replace TMPL_SGIAM_SECRET_KEY with S3 ldap secrete key in encrypted form. Refer Step 7
    • Sample template for reference: csm.config.tmpl.1-node.sample

    d. init

    • Template file path: /opt/seagate/cortx/csm/conf/csm.init.tmpl.1-node
    • Replace template fields with their corresponding values:
      • Replace TMPL_MACHINE_ID with machine-id of node. Refer Step 5.
      • Replace TMPL_ENCLOSURE_ID with enclosure id of node. Refer Step 6.
      • Replace TMPL_SERVER_NAME with server name of node Ex- srvnode-1
      • Replace TMPL_SERVER_HOSTNAME with server hostname of 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. Refer Step 7
      • Replace TMPL_SGIAM_SECRET_KEY with S3 ldap secrete key in encrypted form. Refer Step 7
    • Sample template for reference: csm.init.tmpl.1-node.sample

Cortx-manager mini Provisioning.

Execute cortx-py-utils and cortx-manager mini provisioning commands.

  1. Post Install
$ /opt/seagate/cortx/utils/bin/utils_setup post_install --config json:///opt/seagate/cortx/utils/conf/utils.post_install.tmpl.1-node
$ /opt/seagate/cortx/csm/bin/csm_setup post_install --config json:///opt/seagate/cortx/csm/conf/csm.post_install.tmpl.1-node
  1. Prepare
$ /opt/seagate/cortx/csm/bin/csm_setup prepare --config json:///opt/seagate/cortx/csm/conf/csm.prepare.tmpl.1-node
  1. Config
$ /opt/seagate/cortx/utils/bin/utils_setup config --config json:///opt/seagate/cortx/utils/conf/utils.config.tmpl.1-node
$ /opt/seagate/cortx/csm/bin/csm_setup config --config json:///opt/seagate/cortx/csm/conf/csm.config.tmpl.1-node
  1. Init
$ /opt/seagate/cortx/csm/bin/csm_setup init --config json:///opt/seagate/cortx/csm/conf/csm.init.tmpl.1-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