ClusterLabs / crmsh

Command-line interface for High-Availability cluster management on GNU/Linux systems.
GNU General Public License v2.0
131 stars 94 forks source link

Create and publish RPM package of "crmsh" for CentOS 8 #588

Open rodolfojcj opened 4 years ago

rodolfojcj commented 4 years ago

Hello. For CentOS 8 there is no available "crmsh" binary RPM package ready to install. I know there is a way to install it in CentOS 7 via OBS repository, as instructed at https://crmsh.github.io/download/, then it would be useful to have its equivalent for CentOS 8, which was a version released in 2019. In a CentOS 8.1 test installation I got crmsh 4.2.0 manually installed from its sources, with these steps:

# crmsh is Python based, needing some dependencies via dnf
dnf install python3
dnf install python3-lxml
dnf install python3-pyyaml
dnf install make # I did not check it, but I assume it will be required later
dnf install autoconf automake # this is needed to run autogen a bit later
dnf install which # this is needed to properly detect autoconf when running autogen a bit later
# use pip for those dependencies not available in CentOS 8 repositories
pip3 install parallax
# get the crmsh sources for version 4.2.0 and install them
# with the instructions at https://github.com/ClusterLabs/crmsh#installation
cd /tmp/
wget https://github.com/ClusterLabs/crmsh/archive/4.2.0.tar.gz
tar xf 4.2.0.tar.gz
cd crmsh-4.2.0/
./autogen.sh
./configure
make
make install
# At this moment crmsh is installed, with the crm binary available
# in the system path (its full path is /usr/local/bin/crm), but I got this
# error when running it:
# ERROR: crmd exited with 127 [err: /bin/sh: crmd: command not found][out: 
# But after installing "pacemaker", the error disappeared when running again the
# "crm" command. It's probably because the file /usr/libexec/pacemaker/crmd
# is provided by the pacemaker package
# pacemaker is installed with this:
dnf --enablerepo=HighAvailability install pacemaker

My desired outcomes are these:

To achieve that, I can contribute with these:

I hope to find help here, so please let me know your feedback. Regards.

zbalogh commented 1 year ago

Hi,

I have the same problem. I would need an RPM package that can be installed offline at the customer server while setting up the system. We always use an automation script for setup.

My idea is to implement an RPM package that automatically executes these steps written above. So the RPM installer (the post-install script) will unzip the crmsh tar.gz file, install the parallax dependencies and other dependencies, and execute the steps for crmsh install.

Zoltan Balogh