-
Notifications
You must be signed in to change notification settings - Fork 0
SGAS - Logging and Usage Tracking Service - Luts (Client)
sgas/luts3-client
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SGAS LUTS3 Client == Installation == python setup.py install If you just need to use the scripts, you can just use them directly from unpacked tarball. No need to install. == Usage == There are currently for tools/script in the package: sgas-ur-register Register usage records to an SGAS instance. sgas-ur-update Upgrade the usage records format (CouchDB only). sgas-db-migrate Migrate from CouchDB to another, while updating _id sgas-postgres-migrate Create PostgreSQL insert statements from CouchDB. Usage of the four tools follows: === sgas-ur-register === To register usage records to an SGAS instance: sgas-ur-register <url> <urfile1> [<urfile2> ...] e.g., sgas-ur-register https://orval.grid.aau.dk:7143/sgas ur1.xml By default the host certificate will be used. It is possible to use other certificates. Run "sgas-ur-register --help" for more information. === sgas-ur-update === To update old document versions: sgas-ur-update <couchdb-url> e.g., ./sgas-ur-update http://localhost:7984/usagerecords It is recommended to create a replica database and try the operations on that first. Note: This will take for bloody ever on a big database. === sgas-db-migrate === The sgas-db-migrate will read all the documents from one CouchDB collection, transform the _id field to the new smaller format, and insert the document into another collection. 1. Stop SGAS (i.e., /etc/init.d/sgas stop) 2. Create a new database with the web interface (http://localhost:5984/_utils/) 3. Run the migration script, e.g, ./sgas-db-migrate http://localhost:5984/db-source http://localhost:5984/db-target 4. Change the SGAS database to use new collection (edit /etc/sgas.conf) 5. Update SGAS to 3.1.0 or later (can be done in paralllel with running the migration script) 6. Start SGAS. You probably want to perform compaction on the database, and views (must be done after initial generation for the views). === sgas-postgres-migrate === The script will read all documents from a CouchDB database and produce insert statements for the SGAS PostgreSQL schema. Usage: ./sgas-postgres-migrate <couchdb-url> <records.sql> e.g., ./sgas-postgres-migrate http://localhost:5984/usagerecords usagerecords.sql The script can be run while SGAS is still running, however usage records which inserted during the script is running, is not guarantied to be included. After the file has been created start "psql <database>" and do: \i records.sql === sgas-sr-registrant === Client for registering storage records to SGAS. The client will need a configuration file, which typically look like this: --- [logger] log_dir=/var/spool/sgas/ log_all="https://orval.grid.aau.dk:8143/sgas" registrant_logfile=/var/spool/sgas-sr-registrant.log --- The log_all entry should be the only required attribute (the [logger] section must also be present). The configuration file is specified with -c. The client is typically invoked with cron at a regular interval.
About
SGAS - Logging and Usage Tracking Service - Luts (Client)
Resources
Stars
Watchers
Forks
Packages 0
No packages published