Date: Fri, 29 Mar 2024 13:27:42 +0000 (UTC) Message-ID: <1398828629.8019.1711718862951@ip-10-10-7-29.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8018_545103870.1711718862950" ------=_Part_8018_545103870.1711718862950 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The following instructions describe how you can upgrade to 2.0 from 1.6.= To give you an idea of how long the database upgrade may take, I performed= a test upgrade on an Oracle database with 125,400 groups, 105,710 stems, 1= ,067,124 memberships, and 128,328 members. The actual database upgrade step= s (Step 7, Step 10, Step 11) took the following amount of time:
Your time will vary depending on several factors such as the type of dat= abase you are using, how well it is tuned, how fast your subject source res= ponds to queries, etc... Also, if you really wanted to, you can perfo= rm Step 11 after giving your users access to the Grouper UI/WS, etc again b= ut membership results in the UI may not sort properly until that step is do= ne.
Once you prevent users from making upda= tes to your Grouper instance, run the changeLogTempToChangeLog daemon to cl= ear out the temp changelog using the v1.6 API. Here's an example usin= g GSH.
gsh 0% = loaderRunOneJob("CHANGE_LOG_changeLogTempToChangeLog")
If you are not currently using the chan= ge log for notifications, then you can instead just clear the temp change l= og.
delete = from grouper_change_log_entry_temp; commit;
Using the 2.0 API, perform a registry c= heck using GSH to create an SQL file that will contain the DDL to update yo= ur database. To do this, run: gsh -registry -check = For instance..
$ ./bin= /gsh.sh -registry -check Using GROUPER_HOME: /srv/grouper Using GROUPER_CONF: /srv/grouper/conf Using JAVA: java using MEMORY: 64m-512m Grouper starting up: version: 2.0.0, build date: 2011/07/30 12:40:43, env: = <no label configured> grouper.properties read from: /srv/grouper/conf/grouper.properties Grouper current directory is: /srv/grouper log4j.properties read from: /srv/grouper/conf/log4j.properties Grouper is logging to file: /srv/grouper/logs/grouper_error.log, at min l= evel WARN for package: edu.internet2.middleware.grouper, based on log4j.pro= perties grouper.hibernate.properties: /srv/grouper/conf/grouper.hibernate.propertie= s grouper.hibernate.properties: ims@jdbc:oracle:thin:@imstst-db.oit.duke.edu:= 1668:IMSTST sources.xml read from: /srv/grouper/conf/sources.xml sources.xml groupersource id: g:gsa sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider (note, might need to type in your response multiple times (Java stdin is fl= aky)) (note, you can allow and deny db urls and users in the grouper.properties) Are you sure you want to schemaexport all tables (dropThenCreate=3DF,writeA= ndRunScript=3DF) in db user 'ims', db url 'jdbc:oracle:thin:@imstst-db.oit.= duke.edu:1668:IMSTST'? (y|n): y Continuing... Grouper ddl object type 'Grouper' has dbVersion: 23 and java version: 25 Grouper database schema DDL requires updates (should run script manually and carefully, in sections, verify data before = drop statements, backup/export important data before starting, follow chang= e log on confluence, dont run exact same script in multiple envs - generate= a new one for each env), script file is: /srv/grouper/ddlScripts/grouperDdl_20110730_13_40_54_757.sql Note: this script was not executed due to option passed in To run script via gsh, carefully review it, then run this: gsh -registry -runsqlfile /srv/grouper/ddlScripts/grouperDdl_20110730_13_40= _54_757.sql
If you are okay with the SQL script, ex= ecute using GSH again. To do this, run: gsh -registry -runsqlfi= le /path/to/sql/file.sql For instance..
$ ./bin= /gsh.sh -registry -runsqlfile ddlScripts/grouperDdl_20110730_13_40_54_757.s= ql Using GROUPER_HOME: /srv/grouper Using GROUPER_CONF: /srv/grouper/conf Using JAVA: java using MEMORY: 64m-512m (note, might need to type in your response multiple times (Java stdin is fl= aky)) (note, you can allow and deny db urls and users in the grouper.properties) Are you sure you want to run the sql file in db user 'ims', db url 'jdbc:or= acle:thin:@imstst-db.oit.duke.edu:1668:IMSTST'? (y|n): y Continuing... Script was executed successfully Grouper starting up: version: 2.0.0, build date: 2011/07/30 12:40:43, env: = <no label configured> grouper.properties read from: /srv/grouper/conf/grouper.properties Grouper current directory is: /srv/grouper log4j.properties read from: /srv/grouper/conf/log4j.properties Grouper is logging to file: /srv/grouper/logs/grouper_error.log, at min l= evel WARN for package: edu.internet2.middleware.grouper, based on log4j.pro= perties grouper.hibernate.properties: /srv/grouper/conf/grouper.hibernate.propertie= s grouper.hibernate.properties: ims@jdbc:oracle:thin:@imstst-db.oit.duke.edu:= 1668:IMSTST sources.xml read from: /srv/grouper/conf/sources.xml sources.xml groupersource id: g:gsa sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider
Starting with v2.0, Grouper now stores = member attributes that you can configure and use to sort and search a list = of members. These attributes are populated in the member objects when the s= ubjects are resolved in Grouper. Here is how you can resolve the subjects. = Note that if you have a lot of groups or members, you may have to increase = your JVM heap size before starting GSH.
$ ./bin= /gsh.sh Using GROUPER_HOME: /srv/grouper Using GROUPER_CONF: /srv/grouper/conf Using JAVA: java using MEMORY: 64m-512m Grouper starting up: version: 2.0.0, build date: 2011/07/30 12:40:43, env: = <no label configured> grouper.properties read from: /srv/grouper/conf/grouper.properties Grouper current directory is: /srv/grouper log4j.properties read from: /srv/grouper/conf/log4j.properties Grouper is logging to file: /srv/grouper/logs/grouper_error.log, at min l= evel WARN for package: edu.internet2.middleware.grouper, based on log4j.pro= perties grouper.hibernate.properties: /srv/grouper/conf/grouper.hibernate.propertie= s grouper.hibernate.properties: ims@jdbc:oracle:thin:@imstst-db.oit.duke.edu:= 1668:IMSTST sources.xml read from: /srv/grouper/conf/sources.xml sources.xml groupersource id: g:gsa sources.xml jdbc source id: jdbc: GrouperJdbcConnectionProvider Grouper warning: jarfile mismatch, expecting name: 'subject.jar' size: 1187= 49 manifest version: 1.6.0. However the jar detected is: /srv/grouper/lib/= grouper/subject.jar, name: subject.jar size: 147811 manifest version: 2.0.0 Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInvite Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInviteExpireDate Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInviteDate Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectEmailAddress Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInviteGroupUuids Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInviteMemberId Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInviteUuid Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInviteEmailWhenRegistered Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubj= ectInvite:externalSubjectInviteEmail Grouper note: auto-created attributeDefName: etc:attribute:rules:rule Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleActAsS= ubjectId Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleActAsS= ubjectIdentifier Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleActAsS= ubjectSourceId Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckT= ype Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckO= wnerId Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckO= wnerName Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckS= temScope Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckA= rg0 Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckA= rg1 Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfOwne= rId Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfOwne= rName Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfCond= itionEl Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfCond= itionEnum Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfCond= itionEnumArg0 Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfCond= itionEnumArg1 Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfStem= Scope Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEl Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEn= um Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEn= umArg0 Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEn= umArg1 Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEn= umArg2 Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleValid Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleRunDae= mon Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits= :limitExpression Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits= :limitIpOnNetworks Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits= :limitIpOnNetworkRealm Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits= :limitLabelsContain Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits= :limitAmountLessThan Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits= :limitAmountLessThanOrEqual Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits= :limitWeekday9to5 Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoader Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderType Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderDbName Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderScheduleType Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderQuartzCron Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderIntervalSeconds Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderPriority Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderAttrsLike Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderAttrQuery Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderAttrSetQuery Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderActionQuery Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attri= buteLoaderActionSetQuery Type help() for instructions gsh 0% // run USDU to resolve all the subjects with type=3Dperson gsh 1% subject=3DSubjectFinder.findById("GrouperSystem") subject: id=3D'GrouperSystem' type=3D'application' source=3D'g:isa' name=3D= 'GrouperSysAdmin' gsh 2% session=3DGrouperSession.start(subject) edu.internet2.middleware.grouper.GrouperSession: 8106bdad683d43f88bf24c8e68= 3f6162,'GrouperSystem','application' gsh 3% usdu() usdu completed successfully gsh 4% // resolve the groups gsh 5% GrouperSession.startRootSession(); gsh 6% for (String g : HibernateSession.byHqlStatic().createQuery("select u= uid from Group").listSet(String.class)) { subj =3D SubjectFinder.findByIdAn= dSource(g, "g:gsa", true); GrouperDAOFactory.getFactory().getMember().findB= ySubject(subj).updateMemberAttributes(subj, true); }