-
Notifications
You must be signed in to change notification settings - Fork 38
LR2: SSPL Self Provisioning
Please refer --> https://github.com/Seagate/cortx-monitor/wiki/Cortx-monitor-single-node-VM-provisioning-manual
Onward LR2, SSPL can be deployed and initialized without hard dependencies like provisioner, consul, and HA.
Component: SSPL
Solution: LR2
Cortx version: 2
SSPL version: 2.0.0
Pre-requisites:
-
Ensure below RPM dependencies are installed
Package Version hdparm 9.43 ipmitool 1.8.18 lshw B.02.18 python3 3.6.8 python36-dbus 1.2.4 python36-gobject 3.22.0 python36-paramiko 2.1.1 python36-psutil 5.6.7 shadow-utils 4.6 smartmontools 7.0 systemd-python36 1.0.0 udisks2 2.8.4 -
Ensure below PIP dependencies are installed
Package Version cryptography 2.8 jsonschema 3.2.0 pika 1.1.0 pyinotify 0.9.6 python-daemon 2.2.4 requests 2.25.1 zope.component 4.6.2 zope.event 4.5.0 zope.interface 5.2.0 -
Ensure cortx-py-utils RPMs are installed.
-
Ensure SSPL rpms are installed.
Deploy and setup SSPL:
/opt/seagate/cortx/utils/bin/utils_setup post_install --config [<global_config_url>]
/opt/seagate/cortx/sspl/bin/sspl_setup post_install --config [<global_config_url>]
/opt/seagate/cortx/utils/bin/utils_setup config --config [<global_config_url>]
/opt/seagate/cortx/sspl/bin/sspl_setup config --config [<global_config_url>]
/opt/seagate/cortx/sspl/bin/sspl_setup init --config [<global_config_url>]
/opt/seagate/cortx/sspl/bin/sspl_setup check
Pre-requisites:
Execute the following commands on your VM shell:
yum install -y rpm-build gcc openssl-devel graphviz python-pep8 python36-devel libffi-devel
CORTX_MONITOR_BASE_URL="https://raw.githubusercontent.com/Seagate/cortx-monitor/main"
curl $CORTX_MONITOR_BASE_URL/low-level/files/opt/seagate/sspl/setup/sspl_dev_deploy -o sspl_dev_deploy
chmod a+x sspl_dev_deploy
./sspl_dev_deploy --cleanup
**Caution: Do not run this cleanup command in PROD or on any provisioned setup**
sspl_dev_deploy
takes care of rabbitmq and SSPL RPMS installation and configuration. (Dev Purpose Only)
Refer argument usage for better understanding
./sspl_dev_deploy -h
usage: sspl_dev_deploy [-h] [-V PRODUCT_VERSION] [-A CNTRLR_A] [-B CNTRLR_B]
[-L LOCAL_RPMS_PATH] [-T TARGET_BUILD_URL]
[-Ap CNTRLR_A_PORT] [-Bp CNTRLR_B_PORT]
[-U CNTRLR_USER] [-P CNTRLR_PASS] [-i BMC_IP]
[-u BMC_USER] [-p BMC_PASSWD] [-Ru RMQ_USER]
[-Rp RMQ_PASSWD] [-St STORAGE_TYPE] [-Sr SERVER_TYPE]
[-N CLUSTER_NODES] [--standalone_installation]
[--setup_repo] [--cleanup]
SSPL prerequisite script. (Bounded to single node provisioning)
optional arguments:
-h, --help show this help message and exit
-V PRODUCT_VERSION, --product_version PRODUCT_VERSION
Product version
-A CNTRLR_A, --cntrlr_a CNTRLR_A
Controller-A IP
-B CNTRLR_B, --cntrlr_b CNTRLR_B
Controller-B IP
-L LOCAL_RPMS_PATH, --local_rpms_path LOCAL_RPMS_PATH
Local RPMS location
-T TARGET_BUILD_URL, --target_build_url TARGET_BUILD_URL
Target build base url pointed to release bundle base
directory. if specified the following directory
structure is assumed: <base_url>/ centos7.7 <-- OS ISO
is mounted here 3rd_party <-- CORTX 3rd party ISO is
mounted here cortx_iso <-- CORTX ISO (main) is mounted
here
-Ap CNTRLR_A_PORT, --cntrlr_a_port CNTRLR_A_PORT
Controller-A Port
-Bp CNTRLR_B_PORT, --cntrlr_b_port CNTRLR_B_PORT
Controller-B Port
-U CNTRLR_USER, --cntrlr_user CNTRLR_USER
Controller Username
-P CNTRLR_PASS, --cntrlr_pass CNTRLR_PASS
Controller Password (Encrypted)
-i BMC_IP, --bmc_ip BMC_IP
BMC IP
-u BMC_USER, --bmc_user BMC_USER
BMC User
-p BMC_PASSWD, --bmc_passwd BMC_PASSWD
BMC Password (Encrypted)
-Ru RMQ_USER, --rmq_user RMQ_USER
Rabbitmq username
-Rp RMQ_PASSWD, --rmq_passwd RMQ_PASSWD
Rabbitmq password (Encrypted)
-St STORAGE_TYPE, --storage_type STORAGE_TYPE
Storage type ie. jbod, rbod, 5u84, virtual
-Sr SERVER_TYPE, --server_type SERVER_TYPE
Server type ie. physical, virtual
-N CLUSTER_NODES, --cluster_nodes CLUSTER_NODES
Nodes separated by delimeter ',' ie. node1,node2
--standalone_installation
Configure SSPL 3rd party dependencies like consul,
rabbitmq
--setup_repo Setup yum repos
--cleanup Stop sspl-ll and remove installed SSPL RPMs
STEP 1: Setup yum repos
Setup yum repo for local SSPL RPMS deployment
./sspl_dev_deploy --setup_repo
Setup yum repos for build specific deployment
./sspl_dev_deploy --setup_repo -T http://cortx-storage.colo.seagate.com/releases/cortx/github/main/centos-7.8.2003/<build_number>/prod/
For Example:
./sspl_dev_deploy --setup_repo -T http://cortx-storage.colo.seagate.com/releases/cortx/github/main/centos-7.8.2003/830/prod/
where 830
is the build number.
STEP 2: Install cortx-prereq rpm.
yum install -y <cortx-prereq rpm url>
You can find latest cortx_prereq rpm here: cortx-prereq rpm url
For Example:
yum install -y http://cortx-storage.colo.seagate.com/releases/cortx/github/main/centos-7.8.2003/last_successful/cortx-prereq-2.0.0-12_git81f775d_el7.x86_64.rpm
STEP 3: Generate SSPL RPMS (Optional)
Note: Follow these steps if you want to build and deploy local rpms.
yum install -y git rpm-build autoconf automake libtool check-devel doxygen
mkdir SSPL
cd SSPL
git clone git@github.com:Seagate/cortx-monitor.git
cd cortx-monitor
cat VERSION --> This should be 2.0.0 if not, checkout to correct repo
./jenkins/build.sh
mkdir -p /root/MYRPMS
cp -R /root/rpmbuild/RPMS/noarch/cortx-sspl-* /root/rpmbuild/RPMS/x86_64/cortx-libsspl_sec-* /root/MYRPMS
STEP 4: Deploy SSPL RPMS and Setup SSPL
NOTE: Like LDR_R1, encrypt password for controller and rabbitmq using cluster_id and pass that encrpyted password in below command (-P -Rp ).
Deploy local SSPL RPMS
-L
--> Local RPMS path, ****
--> Encrypted password
./sspl_dev_deploy -V LR2 -A 10.0.0.2 -B 10.0.0.3 \
-Ap 80 -Bp 80 -U manage -P '****' \
-Ru sspluser -Rp '****' \
-L /root/MYRPMS \
-St virtual -Sr virtual --standalone_installation ;
or
./sspl_dev_deploy -L /root/MYRPMS --standalone_installation ;
OR
Deploy SSPL RPMS from build.
In case the deployment is build specific, then build url must be passed.
-T
--> Target build URL, ****
--> Encrypted password
./sspl_dev_deploy -V LR2 -A 10.0.0.2 -B 10.0.0.3 \
-Ap 80 -Bp 80 -U manage -P '****' \
-Ru sspluser -Rp '****' \
-T http://cortx-storage.colo.seagate.com/releases/cortx/github/main/centos-7.8.2003/<build_number>/prod/ \
-St virtual -Sr virtual --standalone_installation ;
STEP 5: Start SSPL Service
systemctl start sspl-ll
[root@ssc-vm-1919.colo.seagate.com ~]# systemctl status sspl-ll
● sspl-ll.service - SSPL Low Level Process
Loaded: loaded (/etc/systemd/system/sspl-ll.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-01-29 00:00:24 MST; 5s ago
Process: 28004 ExecStartPre=/usr/bin/chown sspl-ll:root /var/run/sspl_ll (code=exited, status=0/SUCCESS)
Process: 28000 ExecStartPre=/usr/bin/mkdir -p /var/run/sspl_ll (code=exited, status=0/SUCCESS)
Process: 27986 ExecStartPre=/opt/seagate/cortx/sspl/bin/sspl_setup check (code=exited, status=0/SUCCESS)
Main PID: 28006 (sspl_ll_d)
CGroup: /system.slice/sspl-ll.service
└─28006 /usr/bin/python3.6 /usr/bin/sspl_ll_d
How to run sanity test for SSPL
/opt/seagate/cortx/sspl/bin/sspl_setup test --config [<global_config_url>] --plan [sanity|alerts|self_primary|self_secondary]
For Example:
/opt/seagate/cortx/sspl/bin/sspl_setup test --config yaml:///opt/seagate/cortx/sspl/conf/sample_global_cortx_config.yaml --plan sanity
Test cases will be executed successfully only for enabled sensors, it depends on the platform type. Otherwise skipped.
Note: On VM, we can enable all tests by providing -St 5u84
and -Sr physical
during sspl_dev_deploy execution. That will override config in /opt/seagate/cortx/sspl/conf/sample_global_cortx_config.yaml
For Example:
./sspl_dev_deploy -V LR2 -A 10.0.0.2 -B 10.0.0.3 \
-Ap 80 -Bp 80 -U manage -P '****' \
-Ru sspluser -Rp '****' \
-L /root/MYRPMS \
-St 5u84 -Sr physical --standalone_installation ;
How to enable DEBUG mode for SSPL
We can set SSPL log_level to DEBUG using ConfStore CLI.
# url=yaml:///etc/sspl.conf
# conf $url set "SYSTEM_INFORMATION>log_level=DEBUG"
# conf $url get "SYSTEM_INFORMATION>log_level"
["DEBUG"]
Alternatively, set log_level in /etc/sspl.conf. Once done, restart SSPL to see the impact on SSPL log.