-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
import sgas luts3 service into repository
- Loading branch information
Henrik Thostrup Jensen
committed
Jan 7, 2010
1 parent
ec9b865
commit 76df10a
Showing
45 changed files
with
3,634 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Copyright (2009) Nordic Data Grid Facility | ||
Copyright (2010) Nordic Data Grid Facility | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include README | ||
include Makefile | ||
recursive-include datafiles * | ||
recursive-include docs * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.PHONY: compile install clean | ||
|
||
compile: | ||
true | ||
|
||
install: | ||
python setup.py install --root ${DESTDIR} | ||
|
||
clean: | ||
rm -rf _trial_temp MANIFEST build dist | ||
find . -name "*.pyc"|xargs rm -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
SGAS LUTS3 server (accounting server). | ||
|
||
|
||
An SGAS accounting system consist of two parts: | ||
|
||
* The SGAS LUTS, which is used for storing usage records, and | ||
extracting usage data from. See docs/server-setup for more information. | ||
|
||
* A logger. This is typically a plugin for a grid middleware. The arc-ur-logger | ||
and arc-ur-registrant from ARC 0.8.1 or newer is recommended as a baseline for | ||
starting. | ||
|
||
There is also a small seperate client in the module called luts3-client. | ||
|
||
|
||
Install: | ||
|
||
$ python setup sdist | ||
Will create a tarball suitable for distrubution in the dist/ directory. | ||
See docs/server-setup for further instructions. | ||
|
||
|
||
Credits: | ||
|
||
Gerhard Weis for writing the excellent isodate module, which | ||
is used (and included in a modified form) in this software. | ||
|
||
Olli Tourunen and Jost Berthold for testing and feedback. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#! /bin/sh | ||
# /etc/init.d/sgas: start the SGAS accounting server | ||
|
||
### BEGIN INIT INFO | ||
# Provides: sgas | ||
# Required-Start: $network | ||
# Required-Stop: $network | ||
# Should-Start: $time | ||
# Should-Stop: $time | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: SGAS Accounting server | ||
### END INIT INFO | ||
|
||
. /lib/lsb/init-functions | ||
|
||
TACFILE=/usr/local/share/sgas/sgas.tac | ||
PIDFILE=/var/run/sgas.pid | ||
LOGFILE=/var/log/sgas.log | ||
|
||
|
||
do_start() { | ||
twistd --pidfile $PIDFILE -l $LOGFILE -y $TACFILE | ||
} | ||
|
||
do_stop() { | ||
kill `cat $PIDFILE` || rm $PIDFILE | ||
} | ||
|
||
case "$1" in | ||
start) | ||
echo "Starting SGAS accounting server" | ||
do_start | ||
;; | ||
stop) | ||
echo "Stopping SGAS accounting server" | ||
do_stop | ||
;; | ||
restart|reload) | ||
echo "Restarting sgas accounting server" | ||
do_stop | ||
# erhm... | ||
sleep 1 | ||
do_start | ||
;; | ||
status) | ||
status_of_proc -p $PIDFILE "twistd" "SGAS Accounting server" && exit 0 || exit $? | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart|reload|status}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# example sgas.authz file | ||
# loggers - for inserting into the database | ||
#"/O=Grid/O=NorduGrid/CN=host/benedict.grid.aau.dk" insert | ||
# retrieval / views - accessing the database | ||
#"/O=Grid/O=NorduGrid/OU=ndgf.org/CN=Henrik Thostrup Jensen" retrieval,view | ||
#"/O=Grid/O=NorduGrid/OU=ndgf.org/CN=Josva Kleist" view | ||
#"/O=Grid/O=NorduGrid/OU=ndgf.org/CN=Anders Rhod Gregersen" view:wdmn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# sgas sample configuration file | ||
# normal place to put this is /etc/sgas.conf, but other | ||
# places are possible (but you'll have to read documentation) | ||
|
||
[server] | ||
# It's is possible to specify specific key and certs, like this: | ||
# | ||
# hostkey=/etc/grid-security/hostkey.pem | ||
# hostcert=/etc/grid-security/hostcert.pem | ||
# certdir=/etc/grid-security/certificates | ||
|
||
# database to use, you should set this | ||
db=http://localhost:5984/usagerecords | ||
|
||
# where to get js/css files | ||
# /usr/local/share/sgas/webfiles is the default | ||
#webfiles=/usr/local/share/sgas/webfiles | ||
|
||
# authz file, /etc/sgas.authz is the default | ||
#authzfile=/etc/sgas.authz | ||
|
||
# view definitions, read doc/views first | ||
|
||
#[view:weekly_machine] | ||
#design=test1 | ||
#view=awdmn | ||
#description=Accumulated wall duration (hours) per machine, last week | ||
#filter=last_week | ||
#postprocess=seconds_to_hours, flip12 | ||
|
||
#[view:wdmn] | ||
#design=test1 | ||
#view=awdmn | ||
#description=Accumulated wall duration (hours) / Day / Machine Name | ||
#postprocess=seconds_to_hours | ||
|
||
#[view:wdgun] | ||
#design=test1 | ||
#view=awdgun | ||
#description=Accumulated wall duration (hours) / Day / Global User Name | ||
#postprocess=seconds_to_hours | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from sgas.server import setup | ||
|
||
application = setup.createSGASServer() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* css for views */ | ||
body { font-size: 70%; font-family: Verdana, sans-serif; } | ||
|
||
/* table layout */ | ||
table { | ||
width: 800px; border-collapse: collapse; margin-left: 30px; | ||
border-width: 2px 2px 2px 2px; border-spacing: 2px; border-style: double ; | ||
} | ||
caption {margin: 0 0 .5em; font-size: 1.3em; text-align: left; } | ||
th {text-align: left ; border: 1px solid #ddd; height: 1.5em; padding: 7px;} | ||
td {text-align: right; border: 1px solid #ddd; height: 1.5em; padding: 7px;} | ||
|
||
/* some positining for the graph */ | ||
.visualize { margin: 60px 0 0 30px; } | ||
|
||
/*plugin styles*/ | ||
.visualize { border: 1px solid #888; position: relative; background: #fafafa; } | ||
.visualize canvas { position: absolute; } | ||
.visualize ul,.visualize li { margin: 0; padding: 0;} | ||
|
||
/*table title, key elements*/ | ||
.visualize .visualize-info { padding: 3px 5px; background: #fafafa; border: 1px solid #888; position: absolute; top: -20px; right: 10px; opacity: .8; } | ||
.visualize .visualize-title { display: block; color: #333; margin-bottom: 3px; font-size: 1.1em; } | ||
.visualize ul.visualize-key { list-style: none; } | ||
.visualize ul.visualize-key li { list-style: none; float: left; margin-right: 10px; padding-left: 10px; position: relative;} | ||
.visualize ul.visualize-key .visualize-key-color { width: 6px; height: 6px; left: 0; position: absolute; top: 50%; margin-top: -3px; } | ||
.visualize ul.visualize-key .visualize-key-label { color: #000; } | ||
|
||
/*pie labels*/ | ||
.visualize-pie .visualize-labels { list-style: none; } | ||
.visualize-pie .visualize-label-pos, .visualize-pie .visualize-label { position: absolute; margin: 0; padding:0; } | ||
.visualize-pie .visualize-label { display: block; color: #fff; font-weight: bold; font-size: 1em; } | ||
.visualize-pie-outside .visualize-label { color: #000; font-weight: normal; } | ||
|
||
/*line,bar, area labels*/ | ||
.visualize-labels-x,.visualize-labels-y { position: absolute; left: 0; top: 0; list-style: none; } | ||
.visualize-labels-x li, .visualize-labels-y li { position: absolute; bottom: 0; } | ||
.visualize-labels-x li span.label, .visualize-labels-y li span.label { position: absolute; color: #555; } | ||
.visualize-labels-x li span.line, .visualize-labels-y li span.line { position: absolute; border: 0 solid #ccc; } | ||
.visualize-labels-x li { height: 100%; } | ||
.visualize-labels-x li span.label { top: 100%; margin-top: 5px; } | ||
.visualize-labels-x li span.line { border-left-width: 1px; height: 100%; display: block; } | ||
.visualize-labels-x li span.line { border: 0;} /*hide vertical lines on area, line, bar*/ | ||
.visualize-labels-y li { width: 100%; } | ||
.visualize-labels-y li span.label { right: 100%; margin-right: 5px; } | ||
.visualize-labels-y li span.line { border-top-width: 1px; width: 100%; } | ||
.visualize-bar .visualize-labels-x li span.label { width: 100%; text-align: center; } |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.