Giter Club home page Giter Club logo

hawk's Introduction

HA Web Konsole (Hawk)

Build Status Code Climate

Overview

Hawk is a web-based GUI for managing and monitoring Pacemaker HA clusters. It is generally intended to be run on every node in the cluster, so that you can just point your web browser at any node to access it, e.g.:

Hawk requires users to log in prior to providing access to the cluster. The same rules apply as for pacemaker itself; you need to log in as a user in the haclient group. The easiest thing to do is assign a password to the hacluster user, then log in using that account. Note that you will need to configure this user account on every node you want to use Hawk on.

Once logged in, you will see a screen showing the current state of the cluster. Three views are possible (summary, tree and table), selectable with the buttons on the top right of the screen. The navigation bar down the left hand side provides access to the history explorer, setup wizard, cluster properties, resource and constraints configuration. The little tools menu next to the logout link gives you the simulator, cluster diagram and hb_report generation.

Management operations (start, stop, online, standby, etc.) can be performed by clicking the little menu icon to the right of any node or resource on the status screen.

More detailed usage documentation is available in the SUSE Linux Enterprise High Availability Extension documentation

Screenshot

Status Wizard

Installation

Hawk is a Ruby on Rails app which runs using the Puma web server (http://puma.io/).

There is a special build mode which vendors all the rubygems used by Hawk, to create a package which bundles all of the gems. See the included RPM spec file in rpm/hawk.spec for details.

For details on the rubygems used by hawk, see the gemfile in hawk/Gemfile.

Build Dependencies

The exact versions specified here may not be accurate. Also, note that Hawk also requires the rubygems listed in hawk/Gemfile.

  • ruby version 1.9.3 or higher

  • libpacemaker-devel

  • pacemaker-libs-devel

  • glib2-devel

  • libxml2-devel >= 2.6.21

  • libxslt-devel

  • openssl-devel

  • pam-devel

Dependencies

The exact versions specified here may not be accurate. Also, note that Hawk also requires the rubygems listed in hawk/Gemfile.

  • crmsh

  • graphviz

  • graphviz-gd

  • dejavu

  • pacemaker >= 1.1.8

  • iproute2

Some dependencies may differ depending on the distribution:

  • rubypick (Fedora)

Installing The Easy Way

Hawk is included with SLE HA 11 SP1, openSUSE 11.4, and later SUSE releases. Recent versions are also available for download from OBS.

Just install the RPM, then run:

# chkconfig hawk on
# service hawk start

Installing The Other Easy Way

If you have a SUSE- or Fedora-based system, you can build an RPM easily from the source tree. Just clone this git repo, and run "make rpm".

Once built, install the RPM on your cluster nodes and:

# chkconfig hawk on
# service hawk start

Installing The Hard Way

If the above RPM build doesn’t work for you, you can build and install straight from the source tree, but read the Makefile first to ensure you’ll be happy with the outcome!

# make
# sudo make install

The above will install in /srv/www/hawk. To install somewhere else (e.g.: /var/www/hawk) and/or to use a Red Hat-style init script, try:

# make WWW_BASE=/var/www INIT_STYLE=redhat
# sudo make WWW_BASE=/var/www INIT_STYLE=redhat install

Installing The Other Hard Way

Grab the SRPM from OBS, for example try the one in http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/Fedora_19/src/ if you’re using Fedora 19, and build that.

A Note on SSL Certificates

The Hawk init script will automatically generate a self-signed SSL certificate, in /etc/hawk/hawk.pem. If you want to use your own certificate, replace hawk.key and hawk.pem with your certificate.

Hacking Hawk

To hack on Hawk we recommend to use the vagrant setup. There is a Vagrantfile attached, maybe you need to change some values to get access to the correct files as the current locations are restricted to SUSE employees.

To be prepared for getting our vagrant setup running you need to follow some steps.

  • Install the vagrant package from http://www.vagrantup.com/downloads.html, the minimal version requirement is >= 1.7.0 in order to work properly with openSUSE/SLED workstation setups.

  • Install virtualbox, we assume you know how to do that on your OS. If you prefer libvirt you can use that as well.

Out of the box, vagrant is configured to synchronize the working folder to /vagrant in the virtual machines using NFS. For this to work properly, the vagrant-bindfs plugin is necessary.

Install it using the following command:

  # vagrant plugin install vagrant-bindfs
  • If you plan to use libvirt as provider make sure you have the libvirt-plugin installed:

  # vagrant plugin install vagrant-libvirt
  • You still need to fetch the git submodules to finish your development setup:

  # git submodule update --init --recursive

This is all you need to prepare initally to set up the vagrant environment, now you can simply start the virtual machine with vagrant up and start an ssh session with vagrant ssh webui based on virtualbox. To start the virtual machines on libvirt you have to append --provider=libvirt to the above commands, e.g. vagrant up --provider=libvirt. If you want to access the source within the virtual machine you have to switch to the /vagrant directory.

You can access the Hawk web interface based on the git source through http://localhost:3000 now. If you want to access the version installed through packages you can reach it through https://localhost:7630.

Occasionally it can happen that the source based web interface has not started properly and is not responding. In that case restart it with:

vagrant@webui:~> sudo systemctl restart hawk-development.service

If you need to change something on hawk_chkpwd, hawk_invoke or hawk_monitor you need to provision the machine again with the command vagrant provision to get this scripts compiled and copied to the correct places, setuid-root and group to haclient in /usr/bin again. You should end up with something like:

# ls /usr/sbin/hawk_* -l+ +
-rwsr-x--- 1 root haclient 9884 2011-04-14 22:56 /usr/sbin/hawk_chkpwd+
-rwsr-x--- 1 root haclient 9928 2011-04-14 22:56 /usr/sbin/hawk_invoke+
-rwxr-xr-x 1 root root     9992 2011-04-14 22:56 /usr/sbin/hawk_monitor+

hawk_chkpwd is almost identical to unix2_chkpwd, except it restricts acccess to users in the haclient group, and doesn’t inject any delay when invoked by the hacluster user (which is the user Hawk’s lighttpd instance runs as).

hawk_invoke allows the hacluster user to run a small assortment of Pacemaker CLI tools as another user in order to support Pacemaker’s ACL feature. It is used by Hawk when performing various management tasks.

hawk_monitor is not installed setuid-root. It exists to be polled by the web browser, to facilitate near-realtime updates of the cluster status display. It is not used when running Hawk via WEBrick.

If the development hawk instance isn’t running, it can be started using this command:

webui:/vagrant/hawk # sudo -u vagrant script/rails s

Questions, Feedback, etc.

Hawk is developed at github, please file any issues or submit patches via the github interface at https://github.com/ClusterLabs/hawk/issues .

Please direct comments, feedback, questions etc. to the Pacemaker mailing list at http://clusterlabs.org/mailman/listinfo/users .

hawk's People

Contributors

tserong avatar krig avatar manuelecarlini avatar thutterer avatar tboerger avatar ghoost82 avatar t-d-oe avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.