Difference between revisions of "Slurm-web Installation"

From Supercomputación y Cálculo Científico UIS
Line 38: Line 38:
 
<h3>Configuration and customisation</h3>
 
<h3>Configuration and customisation</h3>
 
<p>In /usr/share/slurm-web/ there is a folder called static.&nbsp; Put a custon logo there.&nbsp; In /etc/slurm-web/ there is a file called racks.xml.&nbsp; That file must be edited. The example for GUANE is presented below, but a more general version is shown in the oficial documentation of slurm-web [http://edf-hpc.github.io/slurm-web/installation.html]</p>
 
<p>In /usr/share/slurm-web/ there is a folder called static.&nbsp; Put a custon logo there.&nbsp; In /etc/slurm-web/ there is a file called racks.xml.&nbsp; That file must be edited. The example for GUANE is presented below, but a more general version is shown in the oficial documentation of slurm-web [http://edf-hpc.github.io/slurm-web/installation.html]</p>
<p>{{File|nano python-pyslurm|&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;!DOCTYPE rackmap SYSTEM "/usr/share/slurm-web/restapi/schema/dtd/racks.dtd"&gt;<br />&lt;rackmap&gt;<br />&nbsp; &lt;nodetypes&gt;<br />&nbsp;&nbsp;&nbsp; &lt;nodetype id="psl390s-1"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; model="HP Proliant SL390s"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height="4"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width="0.5"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br />&nbsp;&nbsp;&nbsp; &lt;nodetype id="psl390s-2"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; model="HP Proliant SL390s"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height="4"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width="0.5"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br />&nbsp; &lt;/nodetypes&gt;<br /><br />&nbsp; &lt;racks&gt;<br /><br />&nbsp;&nbsp;&nbsp; &lt;!-- Rack A1 --&gt;<br />&nbsp;&nbsp;&nbsp; &lt;rack id="guane" posx="0"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nodes&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nodeset id="guane[01-16]"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type="psl390s-1"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posx="0"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posy="31"<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;draw="down"&nbsp;&nbsp;&nbsp; &nbsp;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/nodes&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/rack&gt;<br />&nbsp;&lt;/racks&gt;<br />&lt;/rackmap&gt;}}</p>
+
<p>{{File|nano python-pyslurm|&lt;nowiki&gt;&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;!DOCTYPE rackmap SYSTEM "/usr/share/slurm-web/restapi/schema/dtd/racks.dtd"&gt;<br />&lt;rackmap&gt;<br />&nbsp; &lt;nodetypes&gt;<br />&nbsp;&nbsp;&nbsp; &lt;nodetype id="psl390s-1"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; model="HP Proliant SL390s"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height="4"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width="0.5"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br />&nbsp;&nbsp;&nbsp; &lt;nodetype id="psl390s-2"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; model="HP Proliant SL390s"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height="4"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width="0.5"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br />&nbsp; &lt;/nodetypes&gt;<br /><br />&nbsp; &lt;racks&gt;<br /><br />&nbsp;&nbsp;&nbsp; &lt;!-- Rack A1 --&gt;<br />&nbsp;&nbsp;&nbsp; &lt;rack id="guane" posx="0"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nodes&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nodeset id="guane[01-16]"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type="psl390s-1"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posx="0"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; posy="31"<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;draw="down"&nbsp;&nbsp;&nbsp; &nbsp;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/nodes&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/rack&gt;<br />&nbsp;&lt;/racks&gt;<br />&lt;/rackmap&gt;&lt;/nowiki&gt;}}</p>
 
<p>&nbsp;</p>
 
<p>&nbsp;</p>
 
<h3>To do:</h3>
 
<h3>To do:</h3>
 
<p>Figure out a distribution independent way of installation.&nbsp; Since it only uses javascript and python, it should be possible to install via "sources" and paths.</p>
 
<p>Figure out a distribution independent way of installation.&nbsp; Since it only uses javascript and python, it should be possible to install via "sources" and paths.</p>

Revision as of 22:13, 13 October 2015

Back to Job Scheduler Slurm

Slurm-web installation

First, let's review the prerequisites:

  • python
  • pyslurm (python module)
  • Flask (python module)
  • clusterShell (python module)
  • bootstrap (javascript library)
  • jQuery
  • Flot (jQuery extension for graph drawing)

all python modules and javascript libraries ought to be installed via apt packages for the slurm-web installation to work

Installing prerequisites

Some previous packages:

aptitude install apache2-dev
aptitude install libapache2-mod-wsgi
apt-get install debuild

Flask:

aptitude install python-flask
Test it by the procedure detailed in http://flask.pocoo.org/

ClusterShell:

aptitude install clustershell
Check the project page for more info http://cea-hpc.github.io/clustershell/

PySlurm:

The slurm-web package require pyslurm to be provided by a package called python-pyslurm. In the debian release where this procedure was tested that package didn't exist, so it had to be provided by a dummy package.

First, install the real pyslurm using pip

pip install pyslurm

Test it using the examples shown in http://www.gingergeeks.co.uk/pyslurm/

Then create a dummy package using equivs. First, install equivs if your system doesn't have it:

aptitude install equivs
then create a configuration file for our new package
equivs-control python-pyslurm
.  Now, we should edit the configuration file for the package to provide python-pyslurm [1].  The package will provide nothing in reality, but the package management system will be fooled into thinking that the package is present. The actual functionality is going to be provided by the pyslurm pip package. The important options are presented below:

File: nano python-pyslurm

Section: misc
Priority: optional
Standards-Version: 3.5.10

Package: python-pyslurm
Provides: python-pyslurm
Architecture: all

Description: Dummy package whichs only purpose is to provide pyslurm

Now, build the package:

equivs-build python-pyslurm

And, install it:

dpkg -i python-pyslurm_1.0_all.deb

Bootstrap, jQuery y Float

aptitude install libjs-bootstrap libjs-jquery-flot libjs-jquery-tablesorter

Now, bootstrap must be activated using:

apache - a2enconf javascript-common

 

Installation of the main package

First, it is required to get the latest snapshot of slurm-web from github:

Then, build the package from the project directory:

debuild -us -uc

Finally, install using dpkg, first the REST api package then the dashboard:

dpkg -i slurm-web-restapi_1.1.3_amd64.deb
dpkg -i slurm-web-dashboard_1.1.3_amd64.deb

 

Configuration and customisation

In /usr/share/slurm-web/ there is a folder called static.  Put a custon logo there.  In /etc/slurm-web/ there is a file called racks.xml.  That file must be edited. The example for GUANE is presented below, but a more general version is shown in the oficial documentation of slurm-web [2]

File: nano python-pyslurm
{{{2}}}

 

To do:

Figure out a distribution independent way of installation.  Since it only uses javascript and python, it should be possible to install via "sources" and paths.