Starting with opCharts 2.0 and opEvents 1.2, all Opmantek products ship with our new interactive installer program which greatly simplifies installations and upgrades.
This document explains the most essential installer features.
Starting the installer
The installer needs to run with root
privileges.
Unpacking your product tarball creates a new directory called <Product Name>-<Version>/, e.g. opEvents-1.2.0/.
Simply change into that directory, and then invoke the installer program:
sudo sh cd opEvents-1.2.0 # to see the command line options ./installer -h # to actually start a default installation ./installer
- If you want to perform a simulation run of the installation, use the
-n
option - the installer will only print what it would do, what files it would copy and so on, but will not perform any of these steps. - By default the installer is interactive and will prompt you for decisions and confirmations; If you want to run it in automatic batch mode, use the
-y
option. In this case all dialogs and prompts are automatically answered 'y'.
Logs and Backups
The installer saves a log of all actions taken, files copied etc. in the installation directory as install.log
, ie. normally it'll be in /usr/local/omk/install.log
. Subsequent upgrades or installations of other Opmantek products will add to that logfile, so you may very well want to remove or clear the install.log file before upgrading or adding extra software.
Unless this is the very first installation of an Opmantek product on this system, the installer will offer taking a backup of all affected files before the installation commences. This backup will be saved in the root
user's home directory as omk-backup-YYYY-MM-DD.tgz. The backup includes:
- all the directories that the installer will later copy files to,
- the
conf
directory, - the old software manifest,
- and the old install.log.
Software Dependencies
Wherever possible the installer will help you with the installation of any missing software dependencies, using yum
or apt-get
depending on your operating system platform.
You'll see a prompt similar to this:
++++++++++++++++++++++++++++++++++++++++++++++++++++++ Required package httpd is not installed. ++++++++++++++++++++++++++++++++++++++++++++++++++++++ opEvents requires package httpd to be installed and configured. Do you want to install this package now? Type 'y' or hit <Enter> to accept, any other key for 'no':
If you answer this prompt with 'n' the installer will continue the installation, but the software will likely not work (at all or partially) until you manually fix the missing dependency.
In other cases where the dependency is a "soft" one or where automatic installation isn't an option you will be shown a warning dialog about the missing dependency and the installer will wait until you confirm before continuing.
Product Coexistence, Migration and Upgrades
Before installing any Opmantek software components, a thorough check of the existing state of your system will be made to ensure that the new product does integrate correctly with other already existing Opmantek products. This check relies on the software manifests stored in the installation directory (default /usr/local/omk
) and the product tarball, and thus won't be fully precise if no manifests exist.
When an installation of older/legacy Opmantek products is detected or if the manifest is missing, then the installer will take a comprehensive backup snapshot of your installation directory first. This is to ensure that you could revert back to the pre-installation state quickly and with minimal downtime, should the installer unexpectedly fail the coexistence check or break existing old applications. Here is an example of the prompts in this situation:
++++++++++++++++++++++++++++++++++++++++++++++++++++++ An old legacy installation was detected. ++++++++++++++++++++++++++++++++++++++++++++++++++++++ The installer has found a pre-existing installation of one or more Opmantek products in /usr/local/omk. The installation can proceed but may cause disruptions to installed legacy products other than opEvents. If you agree to continue, the installer will take a backup snapshot of your complete previous installation and then prepare the installation environment for opEvents. Do you want to continue the installation? Type 'y' or hit <Enter> to accept, any other key for 'no': y Creating legacy snapshot, please wait... Snapshot created, file name: /root/omk-legacy-2014-07-14.tgz The installer has created a full snapshot of your previous installion in /root/omk-legacy-2014-07-14.tgz. The installation of opEvents will now proceed. Should you need to revert to your previous installation status, simply remove all contents of /usr/local/omk and unpack the snapshot: rm -rf /usr/local/omk/* && tar -C / -xzvf /root/omk-legacy-2014-07-14.tgz Hit <Enter> when ready to continue:
If the installer detects an unresolvable conflict between the module dependencies for your existing products and the new product, it will abort the installation with a detailed error message: in this case we recommend that you contact Opmantek Support for a resolution.
For product upgrades the installer will perform the same check and upgrade only the files and modules that are required, taking great care to not damage the function of any other existing Opmantek products. In that case the installer will also recommend a shut down of any Opmantek daemons before the installation commences, so that all files can be copied safely and without negatively affecting running daemons.
Integration and Initial Configuration
After all necessary files have been installed in their appropriate locations the installer will take deal with integrating your product with the operating system, web servers and so on.
Typically this will at the minimum involve the installation of up-to-date init scripts for the Opmantek daemon, integration of the Opmantek GUI with your Apache webserver, setting up of log rotation and the optional first start of the Opmantek daemon. The dialogs in question are all very similar to the following:
++++++++++++++++++++++++++++++++++++++++++++++++++++++ Updated init script for the Opmantek daemon available ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Ok to install the init script for the Opmantek daemon? Type 'y' or hit <Enter> to accept, any other key for 'no': y
If you answer the prompt with 'n' the installer will continue after displaying a brief outline of the steps you'll have to take manually later and a confirmation dialog:
++++++++++++++++++++++++++++++++++++++++++++++++++++++ Opmantek Daemon Startup ++++++++++++++++++++++++++++++++++++++++++++++++++++++ The Opmantek daemon can now be started, but you might want to delay that until you have adjusted the configuration files. Do you want to start the Opmantek daemon now? Type 'y' or hit <Enter> to accept, any other key for 'no': n Skipping start of OMKD Please note that you will have to start the Opmantek daemon to activate the Opmantek GUI. You can do so by running 'service omkd start' as the root user. Hit <Enter> when ready to continue:
The installer will also offer to copy any missing default configuration files from the install
to the conf
directory to provide you with a basic initial configuration to start with.
In case of an upgrade it'll offer to import any new default config settings. Furthermore, you will be given the opportunity to have all your configuration files compared to the defaults:
++++++++++++++++++++++++++++++++++++++++++++++++++++++ Detecting Configuration Changes ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Would you like to see an overview of all changed configuration items? Type 'y' or hit <Enter> to accept, any other key for 'no': Performing config diff check, please wait... The configuration comparison tool has detected some differences between the shipped defaults (in /usr/local/omk/install) and the active settings (in /usr/local/omk/conf). The affected files are: EventActions.nmis opCommon.nmis A detailed listing of these differences has been saved in /tmp/opEvents-config-diffs-2014-07-14. You should review those differences (using less or an editor like nano, vi or emacs) and adjust your configuration settings accordingly. Hit <Enter> when ready to continue:
Finally, at the end of the installation process you'll see a message like this:
++++++++++++++++++++++++++++++++++++++++++++++++++++++ opEvents is Ready for Configuration ++++++++++++++++++++++++++++++++++++++++++++++++++++++ This initial installation of opEvents is now complete. However, to configure and fine-tune the application suitably for your environment you will need to make certain configuration adjustments. We highly recommend that you visit the documentation site for opEvents at https://community.opmantek.com/display/opEvents/Home The next step is to determine what configuration changes will be required for your environment. If you have started the Opmantek and the opEvents daemons, then your new opEvents dashboard should now be accessible at http://<HOSTNAME_OR_IP>/omk/opEvents/ If your browser is running on the same machine as opEvents was installed onto, this would be http://localhost/omk/opEvents/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++ installation complete. ++++++++++++++++++++++++++++++++++++++++++++++++++++++
FAQ
There are no Frequently Asked Questions about the installer yet - but feel free to submit a comment or email us with your questions!