ibmcb / cbtool

Cloud Rapid Experimentation and Analysis Toolkit
Apache License 2.0
78 stars 49 forks source link

Orchestrator node installation issues on Centos #439

Open rayx opened 4 months ago

rayx commented 4 months ago

This is a summary of the issues I observed why running install -r orchestrator --clouds=PLM on Centos 7 (note I specified PLM as cloud backend so some dependencies were skipped). IIUIC the check and install commands are converted from docker/orchestrator/Dockerfile-centos_cb_orchestrator, so I think these issues apply to docker installation too.

Given the fast changes of these dependencies (for example, their newer versions may use different package names or different config file format, etc.), I understand it's hard and probably not the purpose of the project to write an install script that works in all situations. Also, the fact that user can run the install script multiple time also greatly mitigates the issue. So this is only FYI and it's fine to close the issue as "will not fix". However, as a user who ran the tool before I find the orchestrator installation process is daunting. I wonder if it's possible to

Below I list the installation issues:

1) Centos doesn't start service automatically

Workaround: I read through docker/orchestrator/Dockerfile-centos_cb_orchestrator to identify services and start them manually. The services are: gmetad, gmond, rsyslog, htttpd, mongod, redis. There is also mysql, but docker file for centos doesn't have instructions for it.

2) Ganglia

CBTOOL uses the following command to install ganglia:

CORRECTIVE ACTION: Please install/configure "gmond" by issuing the following command: "cd /root/; wget -N http://mirrors.lug.mtu.edu/fedora/linux/development/rawhide/Everything/source/tree/Packages/g/ganglia-3.7.2-31.fc33.src.rpm;sudo yum -y install perl-Pod-Html-1.22.02-416.el8.noarch rpm-build autoconf automake libtool apr-devel;sudo yum -y install rsync rrdtool-devel rpcgen libtirpc-devel libmemcached-devel libconfuse-devel; sudo wget -N https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/source/tree/Packages/l/libart_lgpl-2.3.21-23.fc32.src.rpm; cd /root/; sudo rpmbuild --rebuild libart_lgpl-2.3.21-23.fc32.src.rpm;sudo rpm -i /root/rpmbuild/RPMS/x86_64/libart_lgpl-2.3.21-23.el8.x86_64.rpm /root/rpmbuild/RPMS/x86_64/libart_lgpl-devel-2.3.21-23.el8.x86_64.rpm;sudo yum -y install git; cd /root/; sudo rpmbuild --rebuild ganglia-3.7.2-31.fc33.src.rpm;sudo rpm -i /root/rpmbuild/RPMS/x86_64/ganglia-3.7.2-31.el8.x86_64.rpm /root/rpmbuild/RPMS/x86_64/ganglia-gmetad-3.7.2-31.el8.x86_64.rpm /root/rpmbuild/RPMS/x86_64/ganglia-gmond-3.7.2-31.el8.x86_64.rpm;sudo chkconfig gmond off;"

It has two issues:

a) As it writes under /root, it requires user should be root. Workaround: run install script as root

b) The urls in above commands are broken. Workaround: I find ganglia packages are available in epel repo.

3) rrdtool related dependencies

rrdplot is a script under util/plot. It's not required for using CBTOOL. However, its dependencies are installed by install script. I find two issues on centos:

a) There is no python3-rrdtool package on centos. Workaround: install the module manually before running install script.

$ sudo pip3 install rrdtool

BTW, I later found there was rrdtool-python.x86_64 package on centos base repository. I didn't try it so I don't know if it's a python2 or python3 package.

b) Python module jsonschema doesn't have version attribute, which causes the check command in the script fails. Workaround: just ignore the error

Related discussion: https://stackoverflow.com/questions/64783012/failed-to-find-package-metadata-for-jsonschema

4) docker/orchestrator/Dockerfile-centos_cb_orchestrator doesn't have instructions for mysql

CBTOOL uses mongodb by default. However, install script tries to install it for two reasons: a) install script isn't aware of config and always install all dependencies, and b) the same is true with lib/stores/stores_initial_setup.py. Workaround: I modified lib/stores/stores_initial_setup.py to comment this line manually:

from .mysql_datastore_adapter import MysqlMgdConn

5) The mongodb uses different package name and config file format

mongodb-org-shell has been renamed mongodb-mongosh. And mongod.conf is a YAML file now. Workaround: I modified mongod.conf manually as below:

net:
  bindIp: 0.0.0.0 
  port: 27017

6) libvirt python module

The package name for libvirt python3 module should be python36-libvirt. It's available in epel repo.

7) libxml2 python3 binding

There are two issues:

a) PLM requires this module, but it's not installed. b) There is no such a package in yum repos. To install it, one should use pip:

$ pip3 install libxml2-python3

8) genisoimage

This is required when using PLM.

$ sudo yum install -y genisoimage

9) chronyd

As both orchestrator node and workload nodes uses NAT in my environment, I uncommented the following two lines in /etc/chrony.conf. Otherwise the ntpd daemon can't connect to the the one on orchestrator node.

# Allow NTP client access from local network.
allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
local stratum 10