grouper-users - Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH
Subject: Grouper Users - Open Discussion List
List archive
- From: Jonathan Keller <>
- To: "David A. Kovacic" <>
- Cc: "" <>
- Subject: Re: [grouper-users] Adding the Grouper Deployment Guide structure via GSH
- Date: Tue, 15 Jun 2021 23:02:38 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ucdavis.edu; dmarc=pass action=none header.from=ucdavis.edu; dkim=pass header.d=ucdavis.edu; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rueV7kModY90OM4pFeDgJt9bQY0Kqn3L4AZeahSVQN8=; b=OyZvPsQG6QMIE6rb0g1m4fiZPp7mgB6QjYMHni94hW84QOTkXx/YALeQmdasmiJl4zg4VTS+nH/oDJFi+ihD+64TS7v7drhbU/rDAEjXQh05r+a6SyfZ/xEPodFHPDsOZzzdzsrclnnRU7rxZvC6U0xoXg0FbIUEf8b9/zlphOwHyNBHjCMFkLAK3CNwqDZqI0sIDAIFBvs7nvUxynUR+Qv/zk8nDxLaCB3z5XFzBSqo5uqtuY7rLfH6Q9wpGiVGJWBeGtq5WyX8yXCKq5a0RBkIDtcJxYIzIRtZell0BBqZcLh7eh6aPPsbuz3SHlU/zo7lwvrtZnTckdKBqStrwg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A2TSpdM+XwQ0q/YLl25qCnH0pBtSd2ruE69fAR1bWU7VjJRmeUIF3wPqa/s9hWHs1bMDUkxDsdi1FVgWdCNOnBLnk6o+jVQjPoRFexws6834CmtA8lL2rhuKpED0nhTPKTtg2a+GIDf3D0dwjF9gg1V9s5P7PC98YqEuB6wHMUP6oOBNvbl4Z7gG8oWZ5Pkv2edF3N7Dr9FG3cyXQ1zrBm9K45WEhbqTekEOx/YAzTkdxqA5XYr2putu0f7FRiY84ltj8eb9bKXq75+rq73foi9zgsbzYElZ7qN/XYqyHMHnGqKXjIMVKG3ajffmZhB9AU2x02mlrGvlqprtowbF3g==
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?
- [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.