GPMSWiki/AdministratorDocumentation/MaintainingGPMS

From BRF-Software
Jump to navigation Jump to search

Interfaces

In this section we describe several ways for accessing and using the GPMS. In addition to the API that allows programmers to directly manipulate all objects stored in the database we provide a number of scripts for maintaining the system. A web frontend for managing users and members was also implemented. For documentation on how to maintain projects at the CeBiTec at the Bielefeld University go to the InternalWiki.

GPMS scripts

The scripts listed in table 1 can be used to initially set up the system and for maintaining projects, users, and their memberships.

name description
add_host add a new Host to the GPMS
add_datasource_!type register a new DataSource
add_db_api_!type register a new API_Type
add_dbms_!type create a DBMS_Type
add_db create a new Database
add_project_class create a new ProjectClass
add_project create a new Project
add_datasource2project add a DataSource to a Project
add_project_config add configurations to a Project
add_role read and store the Role definitions for a ProjectClass
add_rights parse a Right definition-file and store it in the GPMS
add_user register a new User
add_member add an existing User as a new Member to a Project
add_meta_project create a new MetaProject
add_project2meta_project add a Project to a MetaProject
del_host remove a Host
del_datasource_!type delete a DataSource_Type
del_datasource remove a DataSource from the GPMS
del_db_api_!type delete a DB_API_Type
del_dbms_!type remove a DBMS_Type from the GPMS
del_project_class delete a ProjectClass from the GPMS
del_project delete a Project
del_project_config remove configurations from a Project
del_role remove roles from a ProjectClass
del_rights delete rights from a ProjectClass
del_user remove a User from the GPMS
del_member remove a User from a Project
change_member_role change the Role of an existing Member
export_members print a list of all Members of a Project or
all Members of all Projects of a ProjectClass to a file
rem_datasource_from_project remove a DataSource from a Project
rem_project_from_meta_project remove a Project from a MetaProject
list_project_members print a list of all Members of a Project
list_projects print a list of all Projects and Roles available for the Project
list_user_projects display a list of all Projects that can be accessed by a User
list_extern_user print list of all extern Users

Available scripts for manipulating the GPMS. All currently implemented scripts for manipulating the GPMS are listed above. Executing a script without parameters will print a detailed description and a complete list of available options.

All scripts listed above are executed using the wrapper script GPMS which sets several installation specific environment variables. Executing this script without parameters will list all available scripts and print a usage message. The following paragraphs describe the use of each script and introduce their options.

add_datasource2project

add a Datasource to a Project in the GPMS

usage: add_datasource2project -D <datasource name> -p <project name> [-v]

where: -D <datasource name> name of the Datasource

      -p <project name> the Proejcts name
      -v verbose 
      -h print this help message

example: add_datasource2project -D gendb_test -p gendbtest

add_datasource_!type

add a Datasource_Type to project management database

usage: add_datasource_!type -y <name> [-s <SQL_dump_file> -v]

where: -y <name> the Datasource_Types name

      -s <SQL_dump_file> SQL dump file, with SQL statements creating
                         a Database of this Type
      -v verbose
      -h print this help message

example: add_datasource_!type -y GENDB -s /vol/gendb/src/dbschema/GenDB.sql

add_db

add a Database (Datasource::DB) to project management database

usage: add_db -H <hostname> -t <dbms_!type> -y <datasource_!type>

             -A <db_api_!type> ( -D db_name | -p <project> )
             [-d <description> -e -v]

where: -H <hostname> name of the Databases Host

      -t <dbms_!type> name of the Databases DBMS_Type
      -y <datasource_!type> name of the Databases Datasource_Type
      -A <db_api_!type name> name of the Datasourced DB_API_Type
      -D the Databases name
         if -D is omitted Database gets same name as Project
      -p <project> name of Project the Database shall be added to
                   Note that either -D or -p or both must be specified
      -d <description> text describing the Database
      -e register existing Database to gpms and therefore
         without creating MySQL Database
      -v verbose
      -h print this help message

example: add_db -D gendb_test -H dbhost -t MySQL-3.23.27 -y GENDB -A O2DBI2

add_dbms_!type

add a DBMS_Type to project management database

usage: add_dbms_!type -t <name> -V <version number>

where: -t <name> the DBMS_Types name

      -V <version number> the DBMS_Types version
      -h print this help message

example: add_dbms_!type -t MySQL -V '3.23.27'

add_project2meta_project

add a Project to a META Project in the GPMS

usage: add_project2meta_project -p <project_name> -m <meta_project_name> [-v]

where: -p <project_name> the Projects name

      -m <meta_project_name> name of the META Project
      -v verbose
      -h print this help message

example: add_project2meta_project -p gendb_test -m meta_test

del_project

removes a Project and the project members from the GPMS

usage: del_project -p <project name> [-z -v]

where: -p <project name> name of the Project

      -z drop and remove the Projects Databases and Datasources not used by 
         any other Project from the gpms databases
      -v verbose 
      -h print this help massage

example: del_project -p gendb_test

add_host

add a Database Host to project management database

usage: add_host -H <hostname> [-P <port number>] [-d <description>]

where: -H <hostname> the Hosts name

      -P <port number> the Hosts port number
      -d <description> text decribing the Host
      -h print this help message

example: add_host -H dbhost

add_member

add a new Member to a Project in project management database

usage: add_member -l <user login> -p <project name> -r <role> [-v]

where: -l <user login> User login of new Member

      -p <project name> name of Project the User shall be added to as Member
      -r <role> the new Members Role
      -v verbose 
      -h print this help message

example: add_member -l juser -p gendb_test -r Annotator

add_meta_project

use add_project with -m option!

add_project

add a new Project to project management database

usage: add_project -p <name> -c <project_class> -d <description>

      [-v -s <project sub class>]

where : -p <name> the Projects name

       -c <project_class> the Projects Project_Class
       -d <description> Project description
       -s <project sub class> subclass of ProjectManagement::Project
          available subclasses: EMMA, GenDB, ProDB, Biomake, GPMS, META, WHOIS
       -v verbose
       -h print this help message

example: add_project -p gendb_test -c GENDB -d "The GenDB DB" -s GenDG

del_rights

removes single Right or all Rights of a Project_Class from the GPMS

Note: before script can be used all Roles using the Rights of the Project_Class

     must be removed!

usage: del_rights -c project_class (-r <right_name> | -a) [-v]

where: -r <right_name> name of a single Right to be removed

      -a remove all rights of the Project_Class
      -v verbose
      -h print this help message

example: del_rights -r use_gpmsdb -c GENDB

add_project_class

add a Project_Class to project management database

usage: add_project_class -c <project class name> [-d description]

                        [-i <max instance number> -u <config file>]

where : -c <project class name> name of new Project_Class

       -d <description> description of new Project_Class
       -i <max instance number> maximal number of Projects a
          Meta Project of this Project_Class may contain 
       -u <config file> default config file for new Projects of this Class
       -h print this help message

example: add_project_class -c GENDB -d GENDB Projects

add_project_config

add Project Configs to project management system

usage: add_project_config -p <project> -k <config_key> -V <config_value>

where: -p <project> the Projects name

      -k <config_key> the key of the Config to be added,
                      since Project Configs are a hash
      -V <config_value> the Configuration values
      -h print this help message

example: add_project_config -p gendb_test -k genetik_code -V 11

add_rights

adds new Rights to Project_Class to project management database

usage: add_rights -f <file name> [-v]

where: -f <file name> name of file defining the Rights

      -v verbose
      -h print the help message

example: add_rights.pl -f "/vol/gendb/src/rights"

add_role

add new Roles to a Project_Class in project management database

usage: add_role -f <file_name> [-v]

where: -f <file name> name of file defining the Roles to be added

      -v verbose
      -h print this help message

example: add_role -f roles.txt

add_user

add a User to project management database

usage: add_user -l <login> -f <full name> [-e <email address> -x]

where: -l <login> the Users login

      -f <full name> the Users surname and first name
      -e <email address> the Users email adress
      -x User is extern
      -h print this help message

example: add_user -l juser -f 'Joe User' -e juser@Genetik.Uni-Bielefeld.DE

change_member_role

change the Role from a Project Member

usage: change_member_role.pl -l <user login> -p <project> -r <role> [-v]

where: -l <user login> the Members login

      -p <project> name of the Project
      -r <role> the new Role the Member shall get
      -v verbose
      -h print this help message

example: change_member_role.pl -l juser -p gendbtest -r Annotator

del_datasource

removes a Datasource from project management database

usage: del_datasource.pl -D <datasource name> [-z -v]

where: -D <datasource name> the Datasouces name

      -z drop database from the MySQL DB
      -v verbose
      -h print this help message

example: del_datasource.pl -D gendb_test -z

del_datasource_!type

removes a Datasource_Type from project management database

usage: del_datasource_!type.pl -y <datasource_!type name>

where: -y <datasource_!type name> name of the Datasource_Type to be removed

      -h print this help message

example: del_datasource_!type.pl -y GENDB

del_dbms_!type

removes a DBMS_Type from project management database

usage: del_dbms_!type -n <dbms_!type_name> -V <version> [-v]

where: -n <dbms_!type_name> name of the DBMS_Type

      -V <version> the DBMS_Types version
      -v verbose
      -h print this help message

example: del_dbms_!type -n MySQL -V 3.23.48

del_host

removes a Host from project management database

usage: del_host -H <host_name> name

where: -H <host_name> name of Host to be removed

      -h print this help message

example: del_host -H dbhost

del_member

removes single or all Members from a Project

usage: del_member ( -a | -l <user login> [-q] ) -p <project name> [-f -v]

where: -p <project name> name of the Project

      -a remove all Members from Project
      -l user login from single Member to be removed
      -q do not revoke MySQL privileges when removing single Member
      -f force: Member is deleted even if the db privileges
                can not be revoked
      -v verbose
      -h print this help message

example: del_member -l jouser -p gendbtest

del_role

removes one or all Roles of a Project_Class from the GPMS

usage: del_role -c <project_class> (-a | -r <role name> ) [-f -v]

where: -c <project_class> name of the Project_Class

      -a remove all Roles of the Project_Class
      -f force, Members of all Projects of Project_Class first
      -v verbose
      -h print this help message

example: del_role -r User -c GENDB

del_project_class

removes a Project_Class from project management database

usage: del_project_class -c <project_class name>

where: -c <project_class name> name of the Project_Class

      -h print this help message

example: del_project_class -c GENDB

del_project_config

delete Project Configs from project management system

usage: del_project_config -p <project_name> -k <config key>

where: -p <project_name> name of the Project

      -k <config key> the key value of configuration entry to be removed
      -h print this help message

example: del_project_config -p gendb_test -k genetik_code

export_members

print a list of all Members of a Project or all Members of all

                Projects of a Project_Class to a file

usage: export_members (-p <project name> | -c <project_class> | -a)

                     -f <file_name>

where: -p <project name> Print all Members of this Project to a file

      -c <project_class name> Print all Members of Projects of this
                              Project_Class to a file
      -a Print all Members of every Project to a file
      -h print this help message

example: export_members -p gendbtest -f gendbtest_members

del_user

removes a User of project management database

usage: del_user -l <login> [-v]

where: -l <login> the Users login

      -v verbose
      -h print this help message

example: del_user -l jouser

rem_datasource_from_project

removes a Datasource from a Project

usage: rem_datasource_from_project -D <datasource_name> -p <project_name>

                                  [-f -v]

where: -D <datasource_name> name of the Datasource to be removed from Project

      -p <project_name> name of the Project
      -f force: also remove datasource even if not all member privileges
                could be revoked
      -v verbose
      -h print this help message

example: rem_datasource_from_project -D gendb_test -p gendb_test_project

list_projects

list Projects with available Roles from

               project management database

usage: list_projects

where: -h print this help message

add_db_api_!type

add a DB_API_Type to project management database

usage: add_db_api_!type -A <db_api_!type name> -d <description> [-v]

where: -A <db_api_!type name> the DB_API_Types name

      -d <description> text describing the DB_API_Type
      -v verbose
      -h print this help message

example: add_db_api_!type -A O2DBI -d "The O2DBI I database api"

list_user_projects

get Projects of a User from project management database

usage: list_user_projects -l <user login>

where: -l <user login> the Users login

      -h print this help message

example: list_user_projects -l juser

del_db_api_!type

removes a DB_API_Type from project management database

usage: del_db_api_!type -A <db_api_!type_name>

where: -A <db_api_!type_name> name of the DB_API_Type

      -h print this help message

example: del_db_api_!type -A O2DBI

list_project_members

list Project Members with their Role

usage: list_project_members -p <Project name> [-r]

where: -p <Project name> the Projects name

      -r sort Members by Role
      -h print this help message

example: list_project_members -p gendb_test

list_extern_users

list_extern_user - list all extern Users and genereates MySQL statements to obtiain

                  consistent MySQL privileges for extern users

usage: list_user_projects [-g]

where: -g generate MySQL statements

      -h print this help message

example: list_user_projects -l juser

rem_project_from_meta_project

removes a Project from a META Project

usage: rem_project_from_meta_project -p <project_name> -m <meta_project_name>

where: -p <project_name> name of Project to be removed from META Project

      -m <meta_project_name> name of META Project
      -h print this help message

example: rem_project_from_meta_project -p gendb_test -m gendb_meta

Author: Lutz Krause