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

cortx py utils multi node manual provisioning

rohit-k-dwivedi edited this page Jan 21, 2022 · 31 revisions

Pre-Requisites

Kafka Server (on all the nodes)

  • Kafka server has been installed at path /opt/kafka. Kafka configuration is complete and it is running. For more details refer Kafka setup. Note that kafka may not be installed on all the nodes in CORTX cluster.

Required python packages (on all the nodes)

Refer required python packages from list 1 and list 2 to get the list of required python packages. (Use the above mentioned requirements files in the same order).
Download these files and use below commands to install these python packages
# sudo pip3 install -r <local-path>/python_requirements.txt
# sudo pip3 install -r <local-path>/python_requirements.ext.txt

Install cortx-py-utils rpm (on all nodes in the CORTX cluster)

Get the rpm.
#yum install -y cortx-py-utils-2.0.0-90_8b3c613.noarch.rpm <== RPM name would be different

Mini Provisioning steps

  • Edit this template with required keys for respective phase and store the filled in value /tmp/utils.miniprovisioning.tmpl.1-node

Post Install

  • Update these values for Post Install
  • cortx>common>storage>log ==> This indicates log path
  • cortx>common>storage>local ==> This indicates local storage path
  • node>TMPL_MACHINE_ID ==> This indicates the unique machine ID of the local system.
  • node>TMPL_MACHINE_ID>hostname ==> This indicates the hostname of the local system.
  • node>TMPL_MACHINE_ID>name ==> This indicates the name of node eg. srvnode-1, srvnode-2, etc.
**NOTE : Add node>TMPL_MACHINE_ID, node>TMPL_MACHINE_ID>hostname & node>TMPL_MACHINE_ID>name for all the nodes in the cluster
  • Run post install command
  • Update these values for Config /opt/seagate/cortx/utils/bin/utils_setup post_install --config yaml:///tmp/utils.miniprovisioning.tmpl.1-node

Config

  • Update these values for Config
  • cortx>common>storage>log ==> This indicates log path
  • cortx>common>storage>local ==> This indicates local storage path
  • cortx>utils>message_bus_backend ==> This indicates message bus type. Currently only "kafka" is supported.
  • cortx>external>kafka>endpoints ==> This key holds an array of values in format <protocol>://<FQDN>:<port>. Port is optional.
  • node>TMPL_MACHINE_ID ==> This indicates the unique machine ID of the local system.
  • node>TMPL_MACHINE_ID>site_id ==> A numeric string value identifies a single data center site.
  • node>TMPL_MACHINE_ID>rack_id ==> A numeric string value that identifies a single Rack in a single site.
  • node>TMPL_MACHINE_ID>node_id ==> A numeric string value that indicates node ID (UUID)
**NOTE : Add node>TMPL_MACHINE_ID, node>TMPL_MACHINE_ID>hostname & node>TMPL_MACHINE_ID>name for all the nodes in the cluster
**NOTE : Add all kafka servers under cortx>external>kafka>endpoints list
  • Run config command
    /opt/seagate/cortx/utils/bin/utils_setup config --config yaml:///tmp/utils.miniprovisioning.tmpl.1-node
    NOTE: Config creates /etc/cortx/message_bus.conf and /etc/cortx/cluster.conf

Init

  • Update these values for Init
  • cortx>common>storage>log ==> This indicates log path
  • cortx>common>storage>local ==> This indicates local storage path
  • cortx>utils>message_bus_backend ==> This indicates message bus type. Currently only "kafka" is supported.
  • cortx>external>kafka>endpoints ==> This key holds an array of values in format <protocol>://<FQDN>:<port>. Port is optional.
**NOTE : Add all kafka servers under cortx>external>kafka>endpoints list
  • Run init command
    /opt/seagate/cortx/utils/bin/utils_setup init --config yaml:///tmp/utils.miniprovisioning.tmpl.1-node

Test

  • Update these values for Test
  • cortx>common>storage>log ==> This indicates log path
  • cortx>common>storage>local ==> This indicates local storage path
  • Run the test command
    /opt/seagate/cortx/utils/bin/utils_setup test --config yaml:///tmp/utils.miniprovisioning.tmpl.1-node --plan sanity

  • In test phase, with sanity as a plan argument, it will run the sanity test cases present in py-utils-test.

refer Procedure to run tests

Reset

  • Update these values for Reset
  • cortx>common>storage>log ==> This indicates log path
  • cortx>common>storage>local ==> This indicates local storage path
  • cortx>utils>message_bus_backend ==> This indicates message bus type. Currently only "kafka" is supported.
  • cortx>external>kafka>endpoints ==> This key holds an array of values in format <protocol>://<FQDN>:<port>. Port is optional.
**NOTE : Add all kafka servers under cortx>external>kafka>endpoints list
  • Run the reset command
    /opt/seagate/cortx/utils/bin/utils_setup reset --config yaml:///tmp/utils.miniprovisioning.tmpl.1-node

  • In reset phase:

  • It deletes all messages from all message_types from node.
  • Clears all log files from '/var/log/cortx/utils/' directory.

Cleanup

  • Update these values for Config
  • cortx>common>storage>log ==> This indicates log path
  • cortx>common>storage>local ==> This indicates local storage path
  • cortx>utils>message_bus_backend ==> This indicates message bus type. Currently only "kafka" is supported.
  • cortx>external>kafka>endpoints ==> This key holds an array of values in format <protocol>://<FQDN>:<port>. Port is optional.
**NOTE : Add all kafka servers under cortx>external>kafka>endpoints list
  • Run the cleanup command
    /opt/seagate/cortx/utils/bin/utils_setup cleanup --config yaml:///tmp/utils.miniprovisioning.tmpl.1-node

  • In cleanup phase:

  • It deletes all message_types from node
  • It deletes the config files created by config phase