GPMSWiki/AdministratorDocumentation/MaintainingGPMS: Difference between revisions

From BRF-Software
Jump to navigation Jump to search
No edit summary
 
m (5 revisions)
 
(4 intermediate revisions by one other user not shown)
Line 2: Line 2:
== Interfaces ==
== Interfaces ==
In this section we describe several ways for accessing and using the GPMS.  
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
In addition to the API that allows programmers to directly manipulate all objects
stored in the database we provide a number of scripts for
stored in the database we provide a number of scripts for
maintaining the system and a Gtk graphical user interface for the
maintaining the system. A web frontend for managing users and members was also
management of users and project members. A simplified web frontend was also
implemented. For documentation on how to maintain projects at the CeBiTec at the
implemented that supports a restricted user management for "external"
Bielefeld University go to the [http://www.cebitec.uni-bielefeld.de/groups/brf/internal/GPMSWiki/AdministratorDocumentation/AdminGPMSinBielefeld InternalWiki].
maintainers of projects.  


=== GPMS scripts ===
=== GPMS scripts ===
Line 25: Line 24:
|-
|-
| add_db_api_!type  
| add_db_api_!type  
|  register a new  !API_!Type
|  register a new  API_Type
|-
|-
| add_dbms_!type  
| add_dbms_!type  
|  create a  !DBMS_!Type
|  create a  DBMS_Type
|-
|-
| add_db  
| add_db  
|  create a new  !Database
|  create a new  Database
|-
|-
| add_project_class  
| add_project_class  
Line 37: Line 36:
|-
|-
| add_project  
| add_project  
|  create a new  !Project
|  create a new  Project
|-
|-
| add_datasource2project  
| add_datasource2project  
|  add a  DataSource to a  !Project  
|  add a  DataSource to a  Project  
|-
|-
| add_project_config  
| add_project_config  
|  add configurations to a  !Project
|  add configurations to a  Project
|-
|-
| add_role  
| add_role  
|  read and store the  !Role definitions for a  ProjectClass
|  read and store the  Role definitions for a  ProjectClass
|-
|-
| add_rights  
| add_rights  
|  parse a  !Right definition-file and store it in the GPMS
|  parse a  Right definition-file and store it in the GPMS
|-
|-
| add_user  
| add_user  
|  register a new  !User
|  register a new  User
|-
|-
| add_member  
| add_member  
|  add an existing  !User as a new  Member to a  !Project
|  add an existing  User as a new  Member to a  Project
|-
|-
| add_meta_project  
| add_meta_project  
|  create a new  Meta!Project
|  create a new  [[MetaProject]]
|-
|-
| add_project2meta_project  
| add_project2meta_project  
|  add a  !Project to a  Meta!Project
|  add a  Project to a  [[MetaProject]]
|}
|}


Line 69: Line 68:
|-
|-
| del_datasource_!type  
| del_datasource_!type  
|  delete a  DataSource_!Type
|  delete a  DataSource_Type
|-
|-
| del_datasource  
| del_datasource  
Line 75: Line 74:
|-
|-
| del_db_api_!type  
| del_db_api_!type  
|  delete a  !DB_!API_!Type
|  delete a  DB_API_Type
|-
|-
| del_dbms_!type  
| del_dbms_!type  
|  remove a  !DBMS_!Type from the GPMS
|  remove a  DBMS_Type from the GPMS
|-
|-
| del_project_class  
| del_project_class  
Line 84: Line 83:
|-
|-
| del_project  
| del_project  
|  delete a  !Project
|  delete a  Project
|-
|-
| del_project_config  
| del_project_config  
|  remove configurations from a  !Project
|  remove configurations from a  Project
|-
|-
| del_role  
| del_role  
Line 96: Line 95:
|-
|-
| del_user  
| del_user  
|  remove a  !User from the GPMS
|  remove a  User from the GPMS
|-
|-
| del_member  
| del_member  
|  remove a  !User from a  !Project
|  remove a  User from a  Project
|}
|}


{| border="1" cellpadding="2" cellspacing="0"
{| border="1" cellpadding="2" cellspacing="0"
| change_member_role  
| change_member_role  
|  change the  !Role of an existing  Member
|  change the  Role of an existing  Member
|-
|-
| export_members  
| export_members  
|  print a list of all  Members of a  !Project or
|  print a list of all  Members of a  Project or
|-
|-
|  all  Members of all  !Projects of a  ProjectClass to a file
|  all  Members of all  Projects of a  ProjectClass to a file
|-
|-
| rem_datasource_from_project  
| rem_datasource_from_project  
|  remove a  DataSource from a  !Project
|  remove a  DataSource from a  Project
|-
|-
| rem_project_from_meta_project  
| rem_project_from_meta_project  
|  remove a  !Project from a  Meta!Project
|  remove a  Project from a  [[MetaProject]]
|-
|-
| list_project_members  
| list_project_members  
|  print a list of all  Members of a  !Project
|  print a list of all  Members of a  Project
|-
|-
| list_projects  
| list_projects  
|  print a list of all  !Projects and  !Roles available for the  !Project
|  print a list of all  Projects and  Roles available for the  Project
|-
|-
| list_user_projects  
| list_user_projects  
|  display a list of all  !Projects that can be accessed by a  !User
|  display a list of all  Projects that can be accessed by a  User
|-
|-
| list_extern_user  
| list_extern_user  
|  print list of all extern  !Users  
|  print list of all extern  Users  
|}
|}


Line 143: Line 142:
=== add_datasource2project ===
=== add_datasource2project ===


add a !Datasource to a !Project in the GPMS
add a Datasource to a Project in the GPMS


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


where: -D <datasource name> name of the !Datasource
where: -D <datasource name> name of the Datasource
       -p <project name> the Proejcts name
       -p <project name> the Proejcts name
       -v verbose  
       -v verbose  
Line 156: Line 155:
=== add_datasource_!type ===
=== add_datasource_!type ===


add a !Datasource_!Type to project management database
add a Datasource_Type to project management database


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


where: -y <name> the !Datasource_!Types name
where: -y <name> the Datasource_Types name
       -s <SQL_dump_file> SQL dump file, with SQL statements creating
       -s <SQL_dump_file> SQL dump file, with SQL statements creating
                           a !Database of this !Type
                           a Database of this Type
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message


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


=== add_db ===
=== add_db ===


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


usage: add_db -H <hostname> -t <dbms_!type> -y <datasource_!type>
usage: add_db -H <hostname> -t <dbms_!type> -y <datasource_!type>
Line 176: Line 175:
               [-d <description> -e -v]
               [-d <description> -e -v]


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


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


=== add_dbms_!type ===
=== add_dbms_!type ===


add a !DBMS_!Type to project management database
add a DBMS_Type to project management database


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


where: -t <name> the !DBMS_!Types name
where: -t <name> the DBMS_Types name
       -V <version number> the !DBMS_!Types version
       -V <version number> the DBMS_Types version
       -h print this help message
       -h print this help message


Line 206: Line 205:
=== add_project2meta_project ===
=== add_project2meta_project ===


add a !Project to a META !Project in the GPMS
add a Project to a META Project in the GPMS


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


where: -p <project_name> the !Projects name
where: -p <project_name> the Projects name
       -m <meta_project_name> name of the META !Project
       -m <meta_project_name> name of the META Project
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message
Line 219: Line 218:
=== del_project ===
=== del_project ===


removes a !Project and the project members from the GPMS
removes a Project and the project members from the GPMS


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


where: -p <project name> name of the !Project
where: -p <project name> name of the Project
       -z drop and remove the !Projects !Databases and !Datasources not used by  
       -z drop and remove the Projects Databases and Datasources not used by  
           any other !Project from the gpms databases
           any other Project from the gpms databases
       -v verbose  
       -v verbose  
       -h print this help massage
       -h print this help massage
Line 233: Line 232:
=== add_host ===
=== add_host ===


add a !Database Host to project management database
add a Database Host to project management database


usage: add_host -H <hostname> [-P <port number>] [-d <description>]
usage: add_host -H <hostname> [-P <port number>] [-d <description>]
Line 246: Line 245:
=== add_member ===
=== add_member ===


add a new Member to a !Project in project management database
add a new Member to a Project in project management database


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


where: -l <user login> !User login of new Member  
where: -l <user login> User login of new Member  
       -p <project name> name of !Project the !User shall be added to as Member
       -p <project name> name of Project the User shall be added to as Member
       -r <role> the new Members !Role
       -r <role> the new Members Role
       -v verbose  
       -v verbose  
       -h print this help message
       -h print this help message
Line 263: Line 262:
=== add_project ===
=== add_project ===


add a new !Project to project management database
add a new Project to project management database


usage: add_project -p <name> -c <project_class> -d <description>
usage: add_project -p <name> -c <project_class> -d <description>
       [-v -s <project sub class>]
       [-v -s <project sub class>]


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


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


=== del_rights ===
=== del_rights ===


removes single !Right or all !Rights of a !Project_!Class from the GPMS
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
Note: before script can be used all Roles using the Rights of the Project_Class
       must be removed!
       must be removed!


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


where: -r <right_name> name of a single !Right to be removed
where: -r <right_name> name of a single Right to be removed
       -a remove all rights of the !Project_!Class
       -a remove all rights of the Project_Class
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message


example: del_rights -r use_gpmsdb -c !GENDB
example: del_rights -r use_gpmsdb -c GENDB


=== add_project_class ===
=== add_project_class ===


add a !Project_!Class to project management database
add a Project_Class to project management database


usage: add_project_class -c <project class name> [-d description]
usage: add_project_class -c <project class name> [-d description]
                         [-i <max instance number> -u <config file>]
                         [-i <max instance number> -u <config file>]


where : -c <project class name> name of new !Project_!Class
where : -c <project class name> name of new Project_Class
         -d <description> description of new !Project_!Class
         -d <description> description of new Project_Class
         -i <max instance number> maximal number of !Projects a
         -i <max instance number> maximal number of Projects a
           Meta !Project of this !Project_!Class may contain  
           Meta Project of this Project_Class may contain  
         -u <config file> default config file for new !Projects of this Class
         -u <config file> default config file for new Projects of this Class
         -h print this help message
         -h print this help message


example: add_project_class -c !GENDB  -d !GENDB !Projects
example: add_project_class -c GENDB  -d GENDB Projects


=== add_project_config ===
=== add_project_config ===


add !Project Configs to project management system
add Project Configs to project management system


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


where: -p <project> the !Projects name
where: -p <project> the Projects name
       -k <config_key> the key of the Config to be added,
       -k <config_key> the key of the Config to be added,
                       since !Project Configs are a hash
                       since Project Configs are a hash
       -V <config_value> the Configuration values
       -V <config_value> the Configuration values
       -h print this help message
       -h print this help message
Line 326: Line 325:
=== add_rights ===
=== add_rights ===


adds new !Rights to !Project_!Class to project management database
adds new Rights to Project_Class to project management database


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


where: -f <file name> name of file defining the !Rights
where: -f <file name> name of file defining the Rights
       -v verbose
       -v verbose
       -h print the help message
       -h print the help message
Line 338: Line 337:
=== add_role ===
=== add_role ===


add new !Roles to a !Project_!Class in project management database
add new Roles to a Project_Class in project management database


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


where: -f <file name> name of file defining the !Roles to be added
where: -f <file name> name of file defining the Roles to be added
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message
Line 350: Line 349:
=== add_user ===
=== add_user ===


add a !User to project management database
add a User to project management database


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


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


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


=== change_member_role ===
=== change_member_role ===


change the !Role from a !Project Member
change the Role from a Project Member


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


where: -l <user login> the Members login
where: -l <user login> the Members login
       -p <project> name of the !Project
       -p <project> name of the Project
       -r <role> the new !Role the Member shall get
       -r <role> the new Role the Member shall get
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message
Line 378: Line 377:
=== del_datasource ===
=== del_datasource ===


removes a !Datasource from project management database
removes a Datasource from project management database


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


where: -D <datasource name> the !Datasouces name
where: -D <datasource name> the Datasouces name
       -z drop database from the MySQL !DB
       -z drop database from the MySQL DB
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message
Line 391: Line 390:
=== del_datasource_!type ===
=== del_datasource_!type ===


removes a !Datasource_!Type from project management database
removes a Datasource_Type from project management database


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


where: -y <datasource_!type name> name of the !Datasource_!Type to be removed
where: -y <datasource_!type name> name of the Datasource_Type to be removed
       -h print this help message
       -h print this help message


example: del_datasource_!type.pl -y !GENDB  
example: del_datasource_!type.pl -y GENDB  


=== del_dbms_!type ===
=== del_dbms_!type ===


removes a !DBMS_!Type from project management database
removes a DBMS_Type from project management database


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


where: -n <dbms_!type_name> name of the !DBMS_!Type
where: -n <dbms_!type_name> name of the DBMS_Type
       -V <version> the !DBMS_!Types version
       -V <version> the DBMS_Types version
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message
Line 426: Line 425:
=== del_member ===
=== del_member ===


removes single or all Members from a !Project
removes single or all Members from a Project


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


where: -p <project name> name of the !Project
where: -p <project name> name of the Project
       -a remove all Members from !Project
       -a remove all Members from Project
       -l user login from single Member to be removed
       -l user login from single Member to be removed
       -q do not revoke MySQL privileges when removing single Member
       -q do not revoke MySQL privileges when removing single Member
Line 443: Line 442:
=== del_role ===
=== del_role ===


removes one or all !Roles of a !Project_!Class from the GPMS
removes one or all Roles of a Project_Class from the GPMS


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


where: -c <project_class> name of the !Project_!Class
where: -c <project_class> name of the Project_Class
       -a remove all !Roles of the !Project_!Class
       -a remove all Roles of the Project_Class
       -f force, Members of all !Projects of !Project_!Class first
       -f force, Members of all Projects of Project_Class first
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message


example: del_role -r !User -c !GENDB  
example: del_role -r User -c GENDB  


=== del_project_class ===
=== del_project_class ===


removes a !Project_!Class from project management database
removes a Project_Class from project management database


usage: del_project_class -c <project_class name>
usage: del_project_class -c <project_class name>


where: -c <project_class name> name of the !Project_!Class
where: -c <project_class name> name of the Project_Class
       -h print this help message
       -h print this help message


example: del_project_class -c !GENDB
example: del_project_class -c GENDB


=== del_project_config ===
=== del_project_config ===


delete !Project Configs from project management system
delete Project Configs from project management system


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


where: -p <project_name> name of the !Project
where: -p <project_name> name of the Project
       -k <config key> the key value of configuration entry to be removed
       -k <config key> the key value of configuration entry to be removed
       -h print this help message
       -h print this help message
Line 480: Line 479:
=== export_members ===
=== export_members ===


print a list of all Members of a !Project or all Members of all
print a list of all Members of a Project or all Members of all
                 !Projects of a !Project_!Class to a file
                 Projects of a Project_Class to a file


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


where: -p <project name> Print all Members of this !Project to a file
where: -p <project name> Print all Members of this Project to a file
       -c <project_class name> Print all Members of !Projects of this
       -c <project_class name> Print all Members of Projects of this
                               !Project_!Class to a file
                               Project_Class to a file
       -a Print all Members of every !Project to a file
       -a Print all Members of every Project to a file
       -h print this help message
       -h print this help message


Line 496: Line 495:
=== del_user ===
=== del_user ===


removes a !User of project management database
removes a User of project management database


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


where: -l <login> the !Users login
where: -l <login> the Users login
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message
Line 508: Line 507:
=== rem_datasource_from_project ===
=== rem_datasource_from_project ===


removes a !Datasource from a !Project
removes a Datasource from a Project


usage: rem_datasource_from_project -D <datasource_name> -p <project_name>
usage: rem_datasource_from_project -D <datasource_name> -p <project_name>
                                   [-f -v]
                                   [-f -v]


where: -D <datasource_name> name of the !Datasource to be removed from !Project
where: -D <datasource_name> name of the Datasource to be removed from Project
       -p <project_name> name of the !Project
       -p <project_name> name of the Project
       -f force: also remove datasource even if not all member privileges
       -f force: also remove datasource even if not all member privileges
                 could be revoked
                 could be revoked
Line 524: Line 523:
=== list_projects ===
=== list_projects ===


list !Projects with available !Roles from  
list Projects with available Roles from  
                 project management database
                 project management database


Line 533: Line 532:
=== add_db_api_!type ===
=== add_db_api_!type ===


add a !DB_!API_!Type to project management database
add a DB_API_Type to project management database


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


where: -A <db_api_!type name> the !DB_!API_!Types name
where: -A <db_api_!type name> the DB_API_Types name
       -d <description> text describing the !DB_!API_!Type
       -d <description> text describing the DB_API_Type
       -v verbose
       -v verbose
       -h print this help message
       -h print this help message
Line 546: Line 545:
=== list_user_projects ===
=== list_user_projects ===


get !Projects of a !User from project management database
get Projects of a User from project management database


usage: list_user_projects -l <user login>
usage: list_user_projects -l <user login>


where: -l <user login> the !Users login
where: -l <user login> the Users login
       -h print this help message
       -h print this help message


Line 557: Line 556:
=== del_db_api_!type ===
=== del_db_api_!type ===


removes a !DB_!API_!Type from project management database
removes a DB_API_Type from project management database


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


where: -A <db_api_!type_name> name of the !DB_!API_!Type
where: -A <db_api_!type_name> name of the DB_API_Type
       -h print this help message
       -h print this help message


Line 568: Line 567:
=== list_project_members ===
=== list_project_members ===


list !Project Members with their !Role
list Project Members with their Role


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


where: -p <!Project name> the !Projects name
where: -p <Project name> the Projects name
       -r sort Members by !Role
       -r sort Members by Role
       -h print this help message
       -h print this help message


Line 580: Line 579:
=== list_extern_users ===
=== list_extern_users ===


list_extern_user - list all extern !Users and genereates MySQL statements to obtiain
list_extern_user - list all extern Users and genereates MySQL statements to obtiain
                   consistent MySQL privileges for extern users
                   consistent MySQL privileges for extern users


Line 592: Line 591:
=== rem_project_from_meta_project ===
=== rem_project_from_meta_project ===


removes a !Project from a META !Project
removes a Project from a META Project


usage: rem_project_from_meta_project -p <project_name> -m <meta_project_name>
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
where: -p <project_name> name of Project to be removed from META Project
       -m <meta_project_name> name of META !Project
       -m <meta_project_name> name of META Project
       -h print this help message
       -h print this help message



Latest revision as of 08:15, 26 October 2011

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