Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH


Chronological Thread 
  • From: "David A. Kovacic" <>
  • To: Jonathan Keller <>
  • Cc: , "" <>
  • Subject: Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH
  • Date: Thu, 17 Jun 2021 14:50:55 -0400

The groovy script seems to have failed:  The imports and create GrouperSession s... seem to have worked but the following comands are giving a "definition not found error":

groovy:000> GrouperSession s = GrouperSession.startRootSession();
===> 7733c440b1144f00a986befb9bbb3e28,'GrouperSystem','application'
groovy:000> Stem stem = StemFinder.findByName(s, ":");
===> Stem[displayName=,name=,uuid=91aa5a37cc6145968295bd5e9ad79701,creator=cc0c3db0ccb84923ad9833d1d2821ef2]
groovy:000> GrouperRequestContainer.assignUseStaticRequestContainer(true);
ERROR java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServletRequest
groovy:000> GrouperRequestContainer grouperRequestContainer = GrouperRequestContainer.retrieveFromRequestOrCreate();
ERROR java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServletRequest

Any idea what we might be doing wrong?  This is under Grouper 2.5.44

Dave
On 6/15/21 7:02 PM, Jonathan Keller wrote:
If by command line you mean running a GSH script: Yes - I was setting up to do this.  We have not automated the running of the script on deployment, but the script to perform the GDG provisioning is part of the image.  But this is the relevant part.  I hope this helps your use case.  After this, the script proceeds to set up a number of stems within the GDG we also want to have as a standard.


import edu.internet2.middleware.grouper.grouperUi.beans.ui.GrouperRequestContainer;
import edu.internet2.middleware.grouper.grouperUi.beans.ui.StemTemplateContainer;
import edu.internet2.middleware.grouper.grouperUi.beans.ui.GrouperTemplateLogicBase;
import edu.internet2.middleware.grouper.grouperUi.beans.ui.ServiceAction;
import edu.internet2.middleware.grouper.grouperUi.serviceLogic.UiV2Template;


GrouperSession s = GrouperSession.startRootSession();

// This block pulls the GDG template (known as tierStructure) and applies it to the database
// Template application commands like these must be run against the UI server
Stem stem = StemFinder.findByName(s, ":");
GrouperRequestContainer.assignUseStaticRequestContainer(true);
GrouperRequestContainer grouperRequestContainer = GrouperRequestContainer.retrieveFromRequestOrCreate();
StemTemplateContainer stemTemplateContainer = grouperRequestContainer.getStemTemplateContainer();
GrouperTemplateLogicBase templateLogic = UiV2Template.getTemplateLogic("tierStructure", stemTemplateContainer);
templateLogic.setStemId(stem.getUuid());
stemTemplateContainer.setCreateNoSubfolder(true);
List allServiceActions = templateLogic.getServiceActions();
for (ServiceAction serviceAction: allServiceActions) { serviceAction.getServiceActionType().createTemplateItem(serviceAction); }

--
Jonathan Keller
Application Architect - Administrative IT

On Jun 15, 2021, at 10:38 AM, David A. Kovacic <> wrote:

AT CWRU, we are trying to make deployment of Grouper more consistent using  ansible playbooks.  We have a number of sub-folders we would like to add to the basic app, basis, etc structure and would like to do them all as one GSH script.  It looks like the current GDG template uses straight Java rather than Groovy.  Is there any way to run the GDG template directly from the command line?

--
David A. Kovacic
Sr. Technical Lead
RCIS
University Technology, [U]Tech
Case Western Reserve University
Email: Phone: 216.368.5892





--
David A. Kovacic
Sr. Technical Lead
RCIS
University Technology, [U]Tech
Case Western Reserve University
Email:
Phone: 216.368.5892



JPEG image

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.24.

Top of Page