grouper-users - Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH
Subject: Grouper Users - Open Discussion List
List archive
- From: "David A. Kovacic" <>
- To: Jonathan Keller <>
- Cc: , "" <>
- Subject: Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH
- Date: Wed, 16 Jun 2021 09:19:33 -0400
Yes, running a GSH script to set up the basis, ref, app, etc. folders prior to adding some sub-folders (in the same script) to the structure is exactly what I want to do. From what we can tell, running the GDG template from the Grouper UI also sets some permissions and privileges, and we want to set that all up in addition to using addStem in GSH to just create the basic folders. Once we have the basic folder structure correctly in place the next part of the script will add our desired sub-folders.
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 KellerOn 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. KovacicEmail: Phone: 216.368.5892
Sr. Technical Lead
RCIS
University Technology, [U]Tech
Case Western Reserve University
--
Phone: 216.368.5892
David A.
Kovacic
Sr. Technical Lead
RCIS
University Technology, [U]Tech
Case Western Reserve University
Email:Sr. Technical Lead
RCIS
University Technology, [U]Tech
Case Western Reserve University
Phone: 216.368.5892
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
- [grouper-users] Adding the Grouper Deployment Guide structure via GSH, David A. Kovacic, 06/15/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, Jonathan Keller, 06/15/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, David A. Kovacic, 06/16/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, David A. Kovacic, 06/17/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, Jonathan Keller, 06/17/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, David A. Kovacic, 06/21/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, David A. Kovacic, 06/21/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, David A. Kovacic, 06/21/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, Jonathan Keller, 06/17/2021
- Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH, Jonathan Keller, 06/15/2021
Archive powered by MHonArc 2.6.24.