Skip to Content.
Sympa Menu

grouper-users - managing various environments for Grouper

Subject: Grouper Users - Open Discussion List

List archive

managing various environments for Grouper


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "" <>
  • Subject: managing various environments for Grouper
  • Date: Tue, 2 Mar 2010 02:37:40 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US

Hey,

 

I am doing the Penn upgrade to Grouper 1.5 and the number of environments and grouper modules are a little overwhelming (dev/test/prod  of  UI/WS/loader/client.  In order to not make a mistake, I wrote a build script and will keep everything in CVS, keep separate the files which are different at Penn and in various envs (e.g. the DB password or log directory), and build all the warfiles (and put in zips since they are named the same).

 

Anyways, just wanted to publish this example:

 

https://spaces.internet2.edu/display/GrouperWG/Managing+Grouper+in+several+environments

 

I doubt someone else could use it without modification, but as a guide it could be helpful.

 

Also, I noticed doing the upgrade (not in prod yet), that there were two issues, and I put these in the upgrade instructions.  Details below or here:

 

https://spaces.internet2.edu/display/GrouperWG/v1.5.0+Upgrade+Instructions+from+v1.4.2

 

Regards,

Chris

 

 

1.       If the script fails on:

CREATE UNIQUE INDEX membership_uniq_idx ON GROUPER_MEMBERSHIPS (OWNER_ID, MEMBER_ID, FIELD_ID);


then you need to find the rows which have dupes and delete ONE of them:

select count(*), OWNER_ID, MEMBER_ID, FIELD_ID from grouper_memberships group by OWNER_ID, MEMBER_ID, FIELD_ID having count(*) > 1;

 

This returned 2 rows (of count 2), so I just selected those and deleted one of each


select * from grouper_memberships where owner_id = '002aa8a0-deff-485d-b864-30336bd3b305'

  and member_id = '8b7c2621-15e1-4011-bad2-bd90258594c6' and field_id = '525bb003-c4e2-4ebb-b8a4-e70995c32a1f';

 

delete from grouper_memberships where id in ('e9f886fafa96479c8f96481ad689602f', 'f866c35180b44e279236cf0980c672b9');

 

I added that to the upgrade steps

 

2.       I upgraded from 1.4, and 1.4 had hibernate_version_number cols, with some nulls in there.  Hibernate doesn’t like this.  So I added this to the upgrade steps

 

Run this (should work on any db):

 

update GROUPER_ATTRIBUTES set hibernate_version_number = 0 where hibernate_version_number is null;            

update GROUPER_ATTRIBUTE_ASSIGN set hibernate_version_number = 0 where hibernate_version_number is null;      

update GROUPER_ATTRIBUTE_ASSIGN_VALUE set hibernate_version_number = 0 where hibernate_version_number is null;

update GROUPER_ATTRIBUTE_DEF set hibernate_version_number = 0 where hibernate_version_number is null;         

update GROUPER_ATTRIBUTE_DEF_NAME set hibernate_version_number = 0 where hibernate_version_number is null;    

update GROUPER_ATTRIBUTE_DEF_NAME_SET set hibernate_version_number = 0 where hibernate_version_number is null;

update GROUPER_ATTRIBUTE_DEF_SCOPE set hibernate_version_number = 0 where hibernate_version_number is null;   

update GROUPER_ATTR_ASSIGN_ACTION set hibernate_version_number = 0 where hibernate_version_number is null;    

update GROUPER_ATTR_ASSIGN_ACTION_SET set hibernate_version_number = 0 where hibernate_version_number is null;

update GROUPER_AUDIT_ENTRY set hibernate_version_number = 0 where hibernate_version_number is null;           

update GROUPER_AUDIT_TYPE set hibernate_version_number = 0 where hibernate_version_number is null;            

update GROUPER_CHANGE_LOG_CONSUMER set hibernate_version_number = 0 where hibernate_version_number is null;   

update GROUPER_CHANGE_LOG_TYPE set hibernate_version_number = 0 where hibernate_version_number is null;       

update GROUPER_COMPOSITES set hibernate_version_number = 0 where hibernate_version_number is null;            

update GROUPER_FIELDS set hibernate_version_number = 0 where hibernate_version_number is null;                

update GROUPER_GROUPS set hibernate_version_number = 0 where hibernate_version_number is null;                

update GROUPER_GROUPS_TYPES set hibernate_version_number = 0 where hibernate_version_number is null;          

update GROUPER_GROUP_SET set hibernate_version_number = 0 where hibernate_version_number is null;             

update GROUPER_MEMBERS set hibernate_version_number = 0 where hibernate_version_number is null;               

update GROUPER_MEMBERSHIPS set hibernate_version_number = 0 where hibernate_version_number is null;           

update GROUPER_ROLE_SET set hibernate_version_number = 0 where hibernate_version_number is null;              

update GROUPER_STEMS set hibernate_version_number = 0 where hibernate_version_number is null;                 

update GROUPER_TYPES set hibernate_version_number = 0 where hibernate_version_number is null;                 

commit;

 



  • managing various environments for Grouper, Chris Hyzer, 03/02/2010

Archive powered by MHonArc 2.6.16.

Top of Page