Closed mtdeguzis closed 4 years ago
Why not just go and use the newly added docker image or take the Dockerfile and adjust it to your needs?
@mocdaniel , suppose I could. The main reason for this issue is to at least adjust the readme expectations for CentOS 7 users / upgrade that expectation to CentOS 8 / remove it.
Hm, I don't quite understand why you would need SCL. Inside the Icinga Vagrant boxes, Dashing is fully integrated with the default Ruby versions.
On another note, SCL probably makes sense. I just don't have the time right now to look into this.
I'm getting a similar error when attempting to issue the following command on CentOS 7:
gem install bundler
However, this step appears that it may be able to be skipped as it seems that the rubygem-bundler package installs a compatible version of bundler already, so the above command just works to attempt to update bundler to the latest version, which requires the updated Ruby version.
The modified steps I had to go through to use SCL(and Ruby 2.6) would be as follows:
Install EPEL and SCL Repositories for CentOS 7 and then the packages
yum makecache
yum -y install epel-release centos-release-scl-rh
yum -y install rh-ruby26-rubygems rh-ruby26-rubygem-bundler rh-ruby26-ruby-devel openssl gcc-c++ make nodejs
Switch your current session to use the SCL Ruby version
scl enable rh-ruby26 bash
Update Bundler
gem install bundler
Install the dependencies using Bundler
cd /usr/share/dashing-icinga2
bundle
Systemd Service Had to edit the Systemd file provided at tools/systemd/dashing-icinga2.service and change the ExecStart and ExecStop lines to the following:
ExecStart=/usr/bin/scl enable rh-ruby26 -- dashing start -d -p 8005 --pid /var/run/thin.pid
ExecStop=/usr/bin/scl enable rh-ruby26 -- dashing stop
@thozook the above SCL usage seems to work for me. Need to fix up the dashboard, but it seems to work.
I went through several scenarios of installing dashing-icinga in Centos7 and it turned out that the proposed installation method works just fine as long as you omit gem install bundler
.
As @thozook already mentioned, a working bundler version is getting installed when installing ruby, nodejs, make etc, it is the forced update which breaks the installation process. I will update the README accordingly.
Expected Behavior
There is no ruby version that satisfies the requirement
Current Behavior
EPEL has no higher version of Ruby.
IRC:
solution
Use RHSCL and document how, or use
rbenv
.Your Environment
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7" REDHAT_BUGZILLA_PRODUCT_VERSION=7.4 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="7.4"