Hi,
i´m trying to install the Dashing for Icinga 2 and stuck at the bundling process.
At “Proceed with bundling for all systems (CentOS, Ubuntu, Debian etc.)”, it says “Do not run this as root.”
But executing this as user, bundle is asking for sudo pw and telling me to try
“bundle install --path vendor/bundle”
But this gives me an error complaining about missing write permission on
“/usr/share/dashing-icinga2/.bundle/config”
But this directory doesn´t exist, so I´m confused.
Thank you in advance and sorry for that question, I´m not that familiar with linux
You are misunderstanding the output of bundler here, which can be a bit confusing.
While the installation documentation on GitHub says, “do not run this as root”, you are indeed supposed to enter your root password when bundle asks for it.
While the bundling in general should happen under “normal” user context, some files which are created in the process of bundling need to be placed in directories where standard users might not have access, e.g. /usr/local/bin or /var/lib/gems
Bundler knows that and will ask you for your root password if needed during the bundling process.
As I have gone through many problems trying to install dashing correctly in the recent past, here is how a managed to do it:
# as root:
apt purge ruby bundler nodejs
apt autoremove
rm -rf /var/lib/gems/2.5.0 # only if you don't need ruby for other things running on this instance
rm -rf dashing-icinga2
git clone https://github.com/mocdaniel/dashing-icinga2.git
apt-get -y install ruby nodejs bundler
gem install bundler
cd dashing-icinga2
chown USERNAME:USERNAME -R .
# as USERNAME:
cd [...]/dashing-icinga2
bundle # IGNORE ALL WARNINGS REGARDING SUDO
cp config/icinga2.json config/icinga2.local.json
edit icinga2.local.json
# as root:
cp tools/systemd/dashing-icinga2.service /lib/systemd/system/dashing-icinga2.service
systemctl daemon-reload
# you might face an error page displaying a stacktrace in your browser
# with this procedure, if this is the case execute
chown USERNAME:USERNAME /tmp/dashing-icinga2.log