Halite
DEPRECATED: A client-side web application interface to a running Salt infrastructure
Install / Use
/learn @vmware-archive/HaliteREADME
====== Halite
DEPRECATED
This project has been retired <https://groups.google.com/d/msg/salt-users/rmMWLSaw0RY/N5PGRqDkwQgJ>_.
The original README is below.
Old README Content
(Code-name) Halite is a Salt GUI.
For best results, it is recommended to use Halite with the develop branch of Salt.
Halite is, however, known to work with Salt version greater than Hydrogen.
To install the develop branch of Salt:
.. code-block:: bash
$ git clone -b develop https://github.com/saltstack/salt.git $ cd salt && python setup.py install $ salt-master --version $ salt-master -l debug
This version of Halite is designed to work out of the box with SaltStack when
the PyPi package version of Halite is installed. The PyPi (PIP) version of Halite
is a minified version tailored for this purpose. (https://pypi.python.org/pypi/halite)
Halite makes use of the Bottle (WSGI) web framework. Servers that are tested and
known to work with Halite are paste, cherrypy and gevent.
To pip install Halite.
.. code-block:: bash
$ pip install -U halite
This purpose of the repository is to enable development of custom versions of the UI that could be deployed with different servers, different configurations, etc. and also for development of future features for the Salt packaged version.
Features
Highstate Consistency Check
Halite can poll for highstate consistency. This is similar to executing
salt \* state.highstate test=True and checking for the results.
Polling is turned OFF by default.
To switch polling ON, navigate to the Preferences tab and check
highStateCheck.performCheck. The poll timer can be adjusted using
highStateCheck.intervalSeconds and is set to 300 seconds (5 minutes) by
default. Once these settings are updated, click Update and reload the page.
These options are depicted in the screenshot below.
.. image:: screenshots/HighstatePollSettings.png
Highstate consistency check results can be seen on the minion view. Minions that have inconsistent state have a flag next to them as shown in the screenshot.
.. image:: screenshots/MinionWithFlag.png
The Highstate subtab for each minion displays the state items that lack
consistency. All of the inconsistent items will be displayed here for easy
visualization. The screenshot below shows a message that might appear
when highstate consistency is disturbed.
.. image:: screenshots/HighstateSubtab.png
The cog icon that appears in the Monitor section can be clicked to perform
highstate consistency check. The on demand check only works in the
scenario where polling is off. In the case where polling is switched on (as
discussed above) the cog icon will appear to be spinning (and does not respond
to clicks).
.. image:: screenshots/HighstateCheckCog.png
Installation quickstart
This section explains installation of the development version of Halite.
If you are interested in installing Halite as an end user, please follow the
tutorial <http://docs.saltstack.com/topics/tutorials/halite.html>_ instead.
- Setup permissions for users who will use Halite For example in master config:
.. code-block:: bash
external_auth: pam: myusername: - .* - '@runner' - '@wheel'
Halite uses the runner manage.present to get the status of minions so runner
permissions are required. Currently Halite allows but does not require any
wheel modules.
- Clone the Halite repository::
.. code-block:: bash
git clone https://github.com/saltstack/halite
- Run halite/halite/server_bottle.py (use with -h option to get parameters)
The simplest approach is to run the server with it dynamically generating the main web app load page (main.html) in coffescript mode, where the coffeescript is transpiled to javascript on the fly. In each case the appropriate server package must be installed.
.. code-block:: bash
$ ./server_bottle.py -d -C -l debug -s cherrypy
$ ./server_bottle.py -d -C -l debug -s paste
$ ./server_bottle.py -d -C -l debug -s gevent
-
Navigate HTML5 compliant browser to http://localhost:8080/app
-
Login The default eauth method is 'pam'. To change, go to the
Preferencespage.
Documentation
Preferences
The navbar has a login form. Enter the eauth username and password to login to salt.
.. image:: screenshots/LoggedOut.png
Once logged in, the navbar will display the username highlighted in blue and a logout button.
To logout click on the Logout button.
.. image:: screenshots/LoggedIn.png
Click on the SaltStack logo to go to the preferences page
.. image:: screenshots/Preferences.png
On this page, one can change the eauth method to something other than 'pam' such as 'ldap'.
Check fetchGrains if you want grains data to be loaded when Halite loads.
Checking preloadJobCache will fetch all previously completed, cached jobs.
Once all changes are made, click Update and refresh the browser page.
Commands
To navigate to the console, view click on the Console tab.
.. image:: screenshots/HomeConsole.png
This view has two sections. The Command section and the Monitor section.
The Command section is collapsed by default. Clicking on the downward chevron will
expand the Command section.
The top section of the Console view has controls for entering basic salt commands. The target field will target minions with the command selected. There is ping button with the bullhorn icon and the action menu has some preselected common commands.
Expanded Commands
.. image:: screenshots/CommandForm.png
Click on the downward chevron button to expand the Command form with additional
fields for entering any salt module function. To enter "runner" functions, prepend
"runner." to the function name. For example, "runner.manage.status". To enter wheel
functions, prepend "wheel." to the wheel function name. For example, "wheel.config.values".
For commands that require arguments, enter them in the arguments fields. The number of argument
fields equals the number of arguments accepted by the function.
Click on the Execute button or press the Return key to execute the command.
You can choose the Target Format which will be used by the Target field to target minions.
There is a ping button with the bullhorn icon and the Macro menu has some preselected commands for "speed dial".
There is also a history feature which appears as a book icon on the top right corner of the Command panel.
Checking Live Doc Search will show the documentation related to the command being
entered in the Function field. Un-check it to conserve screen real estate.
Monitors
The bottom section of the console view has monitor view buttons. Each button will show panels with the associated information.
- Command Monitor
Shows panels, one per command that has been executed by this user on this console. Clicking on the dropdown button will show the associated job ids that have been run with this command and the completion status via an icon. Red is fail, green is success. Clicking on the button on the panel will rerun the command.
.. image:: screenshots/CommandMonitor.png
- Job Monitor
Shows panels, one per job that has been run by any minion associated with this
master. Clicking on the associated dropdown button with expand to show Result and Event data.
Selecting the Result button will show the returner and return data
for each minion targeted by the job.
.. image:: screenshots/JobMonitor.png
Selecting the Event button will show the events associated with the job.
.. image:: screenshots/JobMonitorEvent.png
- Minion Monitor
Shows panels, one per minion that have keys associated with this master. The minion panels have icons to show the up/down status of the minion and the grains status. Selecting dropdown buttons will show grains data as well as minion (not job) generated events.
.. image:: screenshots/MinionMonitor.png
With the Grains button selected, one can see all the grains for the minion.
.. image:: screenshots/MinionGrains.png
- Event Monitor
Shows panels, one per event associated with this Master.
.. image:: screenshots/EventMonitor.png
More details coming. TBD
Browser requirements
Support for ES5 and HTML5 is required. This means any modern browser or IE10+.
Server requirements
- The static media for this app is server-agnostic and may be served from any web server at a configurable URL prefix.
- This app uses the HTML5 history API.
Libraries used
Client side web application requirements:
- AngularJS framework (http://angularjs.org/)
- Bootstrap layout CSS (http://twbs.github.io/bootstrap/)
- AngularUI framework (http://angular-ui.github.io/)
- Underscore JS module (http://underscorejs.org/)
- Underscore string JS module (http://epeli.github.io/underscore.string/)
- Font Awesome Bootstrap Icon Fonts (http://fortawesome.github.io/Font-Awesome/)
- CoffeeScript Python/Ruby like javascript transpiler (http://coffeescript.org/)
- Karma Test Runner (http://karma-runner.github.io/0.8/index.html)
- Jasmine unit test framework (http://pivotal.github.io/jasmine/)
- Protractor E2E test framework for angular apps (https://github.com/angular/protractor)
Optional dependencies:
- Cherrypy web server (http://http://www.cherrypy.org/)
- Paste web server (http://pythonpaste.org/)
- Gevent web server(http://www.gevent.org/)
For nodejs testing:
- Express javascript web server
Deployment
There are two approaches to deploying Halite.
- Use it from Salt. The 0.17 release of salt will run halite automatically if the Halite package is installed. So for example, after installing SaltStack, one can install the Halite python package with
.. code-block:: bash
$ pip install -U
Related Skills
tmux
334.5kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
blogwatcher
334.5kMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
prd
Raito Bitcoin ZK client web portal.
product
Cloud-agnostic Kubernetes infrastructure with Terraform & Helm for homelabs, edge, and production clusters.
