2024:Grooper Command Console (Application): Difference between revisions

From Grooper Wiki
Line 502: Line 502:
<pre>services install <connectionNo> <typeName> <userName> <password> [threadCount] [queueName]</pre>
<pre>services install <connectionNo> <typeName> <userName> <password> [threadCount] [queueName]</pre>
|valign=top style="padding-top: 24px"|
|valign=top style="padding-top: 24px"|
Installs a new instance of a Grooper service.
Installs a new instance of a Grooper service.  Newly installed services will need to be started after successful installation.
* <code>connectionNo</code>:  The connection number, as shown by the <code>connections list</code> command.
* <code>connectionNo</code>:  The connection number, as shown by the <code>connections list</code> command.
* <code>typeName</code>:  The type name of the service.  Use the <code>services types</code> command for a list of service types.
* <code>typeName</code>:  The type name of the service.  Use the <code>services types</code> command for a list of service types.
Line 514: Line 514:
|valign=top style="padding-top: 24px"|
|valign=top style="padding-top: 24px"|
List ''all'' Grooper services installed on the ''machine''.
List ''all'' Grooper services installed on the ''machine''.
<!---- deprecated command
|-
|-
|valign=top|
|valign=top|
Line 520: Line 521:
List all Grooper services for the specified Grooper Repository connection.
List all Grooper services for the specified Grooper Repository connection.
* <code>connectionNo</code>:  The connection number, as shown by the <code>connections list</code> command.
* <code>connectionNo</code>:  The connection number, as shown by the <code>connections list</code> command.
--->
|-
|-
|valign=top|
|valign=top|
Line 529: Line 531:
* <code>threadCount</code>: ''Only applicable to installing Activity Processing services.'' The thread count, if the typeName is ActivityProcessing. The default value is "1".
* <code>threadCount</code>: ''Only applicable to installing Activity Processing services.'' The thread count, if the typeName is ActivityProcessing. The default value is "1".
* <code>queueName</code>: ''Only applicable to installing Activity Processing services.'' The Grooper '''Processing Queue''' to pull work from, if the typeName is ActivityProcessing.  The "default" '''Processing Queue''' will be used if left blank.
* <code>queueName</code>: ''Only applicable to installing Activity Processing services.'' The Grooper '''Processing Queue''' to pull work from, if the typeName is ActivityProcessing.  The "default" '''Processing Queue''' will be used if left blank.
|-
|valign=top|
<pre>services host <connectionNo> <typeName> [settings]</pre>
|valign=top style="padding-top: 24px"|
Hosts a Grooper service in-process.
* <code>connectionNo</code>:  The connection number, as shown by the <code>connections list</code> command.
* <code>typeName</code>:  The type name of the service.  Use the <code>services types</code> command for a list of service types.
* <code>settings</code>:  JSON content, enclosed in quotes, representing property settings for the service. (i.e. NumberOfThreads, ThreadPriority, QueueName, HoursOfOperation, and etc.)
|-
|valign=top|
<pre>services host_copy <instanceNo></pre>
|valign=top style="padding-top: 24px"|
Hosts a copy of a Grooper service installed on the local machine in-process.  Use this command to spin up additional Activity Processing worker services.
* <code>instanceNo</code>:  The service number, as shown by the <code>services list</code> command.
|-
|-
|valign=top|
|valign=top|
Line 564: Line 580:
* <code>instanceNo</code>:  The service number, as shown by the <code>services list</code> command.
* <code>instanceNo</code>:  The service number, as shown by the <code>services list</code> command.
|}
|}
=== Command Group: services ===
Miscellaneous utilities.  These utilities are uncommonly used by most Grooper users.
{|
|style="width:40%"|
'''Command'''
|
'''Description'''
|-
|valign=top|
utils about
Displays information about the installed Grooper version.
utils analyze <connectionNo>
Analyzes custom objects within Object Libraries.
Classes and properties that are missing documentation comments will be listed.
connectionNo
The connection number, as shown by the connections 'list' command.
utils exec <filename>
Executes a Grooper Command Console batch file.
filename
The path to a text file containing GCC commands.
utils ping <connectionNo> <name> [interval]
Tests a [CMIS Connection] or a [Data Connection]
connectionNo
The connection number, as shown by the connections 'list' command.
name
The name of a [CMIS Connection] or [Data Connection].
interval [default=]
Optional repeat interval.  If set, the ping will repeat on the specified interval.  Examples: 15s, 5m, 1h 30m.
utils update <machineName> [applyChanges] [rebuild]
Updates binaries on another machine to match the local machine.
machineName
The name of the machine to update.
applyChanges [default=False]
If true, the update will be applied.  If false or not set, a comparison will be displayed, but no files will be modified.
rebuild [default=False]

Revision as of 14:31, 5 June 2024

Grooper Command Console (or GCC) is an administrative application used to add and remove connections to Grooper Repositories, upgrade existing Grooper Repositories to a newer version, and install and uninstall Grooper Services.

About

FYI

Grooper Command Console (GCC) replaced Grooper Config in version 2024. All setup and configuration previously done in Grooper Config is now done in Grooper Command Console.

Grooper Command Console (GCC) is a command line interface for performing system configuration and administrative tasks. GCC is used to:

  • Set up new and connecting to existing Grooper Repositories.
  • Install and uninstall Grooper Services, such as Activity Processing services.
    • Be aware: GCC's primary function is to install services. Managing and configuring them should be done from the Machines node in the Design page.
  • Installing product licensing


GCC performs system admin operations using command prompts. The syntax for executing a GCC command is as follows:

gcc> group command parameters

  • FYI: The GCC documentation lists required parameters in angle brackets <> and optional parameters in square brackets []


There are seven (7) GCC command groups:

  • connections - Used to manage Grooper Repository connections
  • databases - Used to manage Grooper databases
  • services - Used to manage Grooper services
  • license - Used to manage licensing for a local Grooper license server
  • scripts - Used to manage Grooper scripts
  • utils - Various utility commands
  • help - Use help commands for more information about commands in a group.
    • help commands should always follow the syntax help groupName.
    • For example, help connections will give you information about the various commands in the connections group.

How To: Grooper Repository Connections

GCC must be run as an administrator to perform most of its functionality. It performs functions that require elevated access in Windows.

This portion of the article will instruct you how to use Grooper Command Console to do the following things:

Connect to an existing Grooper Repository

When using GCC to connect to an existing Grooper Repository, you just need to enter a single GCC command.

  1. Open GCC.
    • GCC can be accessed from the Windows Start menu.
    • The executable gcc.exe can be found in the Grooper install directly.
  2. Use the following GCC command to connect to the Grooper Repository:
    • connections add <server> <database> [user] [password]
      • <server> is a required parameter. Enter the server name (or IP address) hosting the Grooper database.
      • <database> is a required parameter. Enter the name of the Grooper database. If the database name contains spaces, you must enclose the whole name in quotes (i.e. "database name")
      • [user] and [password] are optional parameters. Windows will pass through the currently logged on user's credentials if not entered.


For example, if I wanted to connect to a Grooper Repository whose database named "2024 Grooper DB" was hosted on a server named "GROOPERSQL01", I would enter the following GCC command.

  • connections add GROOPERSQL01 "2024 Grooper DB"

FYI

If you want to verify which Grooper Repositories you are connected to, use the following command:

  • connections list
  • This command will list all current Grooper Repository connections.

Create and connect to a new Grooper Repository

Creating a new Grooper Repository is done with three GCC commands. (1) You will use a command to create a new Grooper database. (2) You will use a command to add the connection to the newly created Grooper Database. (3) You will initialize the new Grooper Repository.

  1. Open GCC.
    • GCC can be accessed from the Windows Start menu.
    • The executable gcc.exe can be found in the Grooper install directly.
  2. Use the following GCC command to create a new Grooper Database:
    • databases create <serverName> <databseName> [user] [password]
      • <serverName> is a required parameter. Enter the server name (or IP address) hosting MSSQL where the database will be created.
      • <databaseName> is a required parameter. Enter the name of the Grooper database.
        • If the database name contains spaces, you must enclose the whole name in quotes
        • Ex: "2024 Grooper Database"
      • [user] and [password] are optional parameters. Windows will pass through the currently logged on user's credentials if not entered.
  3. Use the following GCC command to add a connection to the new Grooper Database:
    • connections add <serverName> <databaseName> [user] [password]
      • <serverName> is a required parameter. Enter the server name (or IP address) from step 2.
      • <databaseName> is a required parameter. Enter the name of the Grooper database from step 2.
        • If the database name contains spaces, you must enclose the whole name in quotes.
        • Ex: "2024 Grooper Database"
      • [user] and [password] are optional parameters. Windows will pass through the currently logged on user's credentials if not entered.
  4. Use the following GCC command to initialize the new Grooper Repository:
    • connections init <connectionNo> <repositoryName> <storagePath>
      • Grooper Repositories must be initialized before they can be used.
        • Initialization builds the tables in the Grooper Database and associates the Grooper File Store's path with the Grooper Repository.
        • If you do not have a folder location created for the File Store, do so now. You will need to enter a UNC path for the Grooper File Store for the storagePath parameter
      • connectionNo is a required parameter. Enter the connection number for the Grooper Repository you want to initialize.
      • <repositoryName> is a required parameter. By default, uninitialized Grooper Repositories are named "New Grooper Repository" use the <repositoryName> parameter to rename your Grooper Repository.
        • Please enclose this parameter in quotes to avoid conflicts. Spaces in Grooper Repository names will break the GCC command.
        • Ex: "2024 Grooper Repo"
      • storagePath is a required parameter. Enter the storage path for your Grooper File Store's folder location.
        • Only use fully qualified UNC paths. Mapped and local drive references may not be accessible to other users or machines.
        • Please enclose this parameter in quotes to avoid conflicts. Spaces and special characters in the storage path will break the GCC command.
        • Ex: "\\servername\Grooper File Stores\2024 Grooper Repo File Store"


For example, the following three commands would create a new Grooper Repository named "2024 Grooper Repo" (presuming this is the first Grooper Repository connection added to GCC).

databases create SQLSERVER01 "2024 Grooper Database"
connections add SQLSERVER01 "2024 Grooper Database"
connections init 1 "2024 Grooper Repository" "\\servername\Grooper File Stores\2024 Grooper Repo File Store"

FYI

Knowing which Grooper Repository connection number you need to enter is critical to using the connections init command. If you do not know the connection number to enter, use the following command:

  • connections list


This will list all Grooper Repository connections and display some basic information about them.

In this image see connection number "3" is not initialized.

Upgrade a Grooper Repository to a new version

FYI

Major versions of Grooper change the Grooper Database in meaningful ways. These changes to the database must be reflected by upgrading the Grooper Repository. For major version upgrades (For example, 2023 to 2024), all Grooper Repositories configured on an older version must be upgraded in order to connect to them to Grooper.

For minor build upgrades (For example, 24.0.0001 to 24.0.0002) you do not need to upgrade each Grooper Repository. No major changes are made to the Grooper Database. You do not need to run the upgrade command in GCC when upgrading minor builds.

When using GCC to connect to an existing Grooper Repository, you just need to enter a single GCC command. This GCC command will run upgrade code on an older Grooper Repository, allowing it to be used in a newer Grooper version.

  • IMPORTANT!!! DON'T FORGET TO BACKUP YOUR REPOS
  • You should always perform a complete backup of your Grooper Repository's file store and database before upgrading to any newer Grooper version.
    • If, for whatever reason, something goes wrong during the upgrade process and your file store and/or database is corrupted, you could loose critical components, such as your Batch Processes, Content Models, or documents in testing or production Batches.
    • Performing a backup will ensure you have something to revert to in the rare cases where the upgrade does improperly overwrite existing database values or files in your file store.
  • For information how to backup and restore your Grooper database and file store, please visit the article below:


To upgrade a Grooper Repository:

  1. Open GCC.
    • GCC can be accessed from the Windows Start menu.
    • The executable gcc.exe can be found in the Grooper install directly.
  2. Use the following GCC command to upgrade the Grooper Repository:
    • connections upgrade <connectionNo>
      • connectionNo is a required parameter. Enter the connection number for the Grooper Repository you want to upgrade.

IMPORTANT - If present, make sure you compile all Object Libraries after the upgrade.

IMPORTANT - The devs also strongly recommend that you perform validation on your repository after upgrading.

  • Object Libraries should be compiled before validating your repository to ensure best results.

FYI

Knowing which Grooper Repository connection number you need to enter is critical to using the connections upgrade command. If you do not know the connection number to enter, use the following command:

  • connections list


This will list all Grooper Repository connections and display some basic information about them.

In this image see connection number "3" is an older version and needs to be upgraded.

How To: Grooper Services

BE AWARE: Managing Grooper Services has changed somewhat in version 2024

Prior to version 2024, Grooper Services were installed in and configured in the Grooper Config application.

In version 2024, Grooper Services are only installed in GCC. Services are configured using the Machines node of the Design page.

Command Quick Reference

Command Group: help

Help-related commands.

Command

Description

help

Displays a list of commands.

help <group>

Displays help for a specific command group.

help <group> <command>

Displays help for a specific command.

help list

Displays a list of commands.

help list <group>

Displays help for a specific command group.

help list <group> <command>

Displays help for a specific command.

Command Group: connections

Manage Grooper repository connections.

Command

Description

connections

List the Grooper Repository connections for this machine.

connections add <server> <database> [user] [password]

Add a Grooper Repository connection.

  • server: The SQL server name or IP address
  • database: The name of an existing Grooper Database.
  • user: The user name to be used for connecting the database.
    • Leave blank to use windows authentication.
    • Use a built-in account ("NT AUTHORITY\\NetworkService" or "NT AUTHORITY\\SYSTEM") when running in a docker container.
  • password: The user's password. Leave blank when using Windows authentication or if using a built-in account
connections delete <connectionNo>

Deletes (removes) a connection to a Grooper Repository.

  • connectionNo: The connection number, as shown by the connections list command.
connections init <connectionNo> <repositoryName> <storagePath>

Initializes a new Grooper repository.

  • connectionNo: The connection number, as shown by the connections list command.
  • repositoryName: The name for the new Grooper Repository.
  • storagePath: The UNC storage path to use for the primary Grooper file store.
connections list

List the Grooper Repository connections for this machine.

  • Same as connections command.
help list <group> <command>

Displays help for a specific command.

connections move <connectionNo> <newPosition>

Moves a data source to new position in the list. Use this to reorder Grooper Repositories in the connection list.

  • connectionNo: The connection number, as shown by the connections list command.
  • newPosition: The position to move the data source to.
connections purge <connectionNo>

Destroys all database tables and files for a connections. USE WITH CARE!! THIS EFFECTIVELY TRASHES A GROOPER REPOSITORY!!!

  • connectionNo: The connection number, as shown by the connections list command.
connections reindex <connectionNo> [recreate]

Rebuilds all indices on Grooper database tables.

  • connectionNo: The connection number, as shown by the connections list command.
  • recreate: Default is false. If true, table indices will be dropped and re-created instead.
connections rename <connectionNo> <newName>

Renames a Grooper Repository.

  • connectionNo: The connection number, as shown by the connections list command.
  • newName: The Grooper Repository's new name.
connections repair <connectionNo> [files]

Starts a database repair operation to detect and fix problems in the Grooper database.

  • connectionNo: The connection number, as shown by the connections list command.
  • files: Default is false. If true, Grooper file store repairs will be additionally executed.
connections setDefault <connectionNo>

Sets a Grooper Repository connection as the default connection.

  • connectionNo: The connection number, as shown by the connections list command.
connections test <connectionNo>

Tests a specific Grooper Repository conneciton.

  • connectionNo: The connection number, as shown by the connections list command.
connections upgrade <connectionNo>

Upgrades the selected Grooper database to the currently installed version.

  • connectionNo: The connection number, as shown by the connections list command.
connections upgradeType <connectionNo> <upgraderTypeName>

Runs a specific node upgrader. This command is not commonly used.

  • connectionNo: The connection number, as shown by the connections list command.
  • upgraderTypeName: The type name of the upgrader to execute.
connections validate <connectionNo>

Validates the properties of all nodes in the Grooper Repository. Produces a list of validation messages.

  • connectionNo: The connection number, as shown by the connections list command.

Command Group: databases

Manage Grooper repository connections.

Command

Description

databases create <serverName> <databaseName> [user] [password]

Creates a new MSSQL database.

  • serverName: The server name
  • databaseName: The database name
  • user: The user name to be used for connecting the database.
    • Leave blank to use Windows authentication.
    • Use a built-in account ("NT AUTHORITY\\NetworkService" or "NT AUTHORITY\\SYSTEM") when running in a docker container.
  • password: The user's password. Leave blank when using Windows authentication or if using a built-in account.
databases delete <serverName> <databaseName> [user] [password]

Deletes MSSQL database using MSSQL authentication. USE WITH CAUTION!!

  • serverName: The server name
  • databaseName: The database name
  • user: The user name to be used for connecting the database.
    • Leave blank to use Windows authentication.
    • Use a built-in account ("NT AUTHORITY\\NetworkService" or "NT AUTHORITY\\SYSTEM") when running in a docker container.
  • password: The user's password. Leave blank when using Windows authentication or if using a built-in account.
databases list <serverName> [user] [password]

Lists the databases on an MSSQL server using MSSQL authentication.

  • serverName: The server name
  • user: The user name to be used for connecting the database.
    • Leave blank to use Windows authentication.
    • Use a built-in account ("NT AUTHORITY\\NetworkService" or "NT AUTHORITY\\SYSTEM") when running in a docker container.
  • password: The user's password. Leave blank when using Windows authentication or if using a built-in account.

Command Group: license

Manage licensing for a local Grooper license server.

Command

Description

license

Displays information about the Grooper license bound to this machine, if one exists.

license download <serialNo>

Downloads a Grooper license and binds it to this machine.

  • serialNo: The Grooper licensing serial number.
license import <filename>

Imports a Grooper license file for local hosting on this machine.

  • filename: The full path to a Grooper license file (.lic).
license refresh

Checks for license updates.

license rehost <exportPath>

Unbind licensing from this machine.

  • exportPath: The directory where the rehost token will be saved. E-Mail the token to licensing@bisok.com to receive a new serial number.
license view

Displays information about the Grooper license bound to this machine, if one exists.

Command Group: scripts

Manages Grooper scripts.

Command

Description

scripts getLatest <path> <repositoryId> <nodeId>

Updates the local script with files from the Grooper node.

  • path: The Visual Studio destination project directory.
  • repositoryId: The Grooper Repository's id. This can be obtained by selecting the root node of the Grooper Repository in the Design page and copying the "Repository ID" property's value.
  • nodeId: The ID of the node to save the script on. This can be obtained by selecting the node in the Design page, navigating to the Advanced tab and copying the "ID" property's value.
scripts mismatch <path> <repositoryId> <nodeId>

Compares the local script files to the files stored on the Grooper node.

  • path: The Visual Studio destination project directory.
  • repositoryId: The Grooper Repository's id. This can be obtained by selecting the root node of the Grooper Repository in the Design page and copying the "Repository ID" property's value.
  • nodeId: The ID of the node to save the script on. This can be obtained by selecting the node in the Design page, navigating to the Advanced tab and copying the "ID" property's value.
scripts update <path> <repositoryId> <nodeId>

Saves a script project to Grooper from a file system directory.

  • path: The Visual Studio destination project directory.
  • repositoryId: The Grooper Repository's id. This can be obtained by selecting the root node of the Grooper Repository in the Design page and copying the "Repository ID" property's value.
  • nodeId: The ID of the node to save the script on. This can be obtained by selecting the node in the Design page, navigating to the Advanced tab and copying the "ID" property's value.
scripts updateAndCompile <path> <repositoryId> <nodeId>

Saves a script project to Grooper from a file system directory and compile it.

  • path: The Visual Studio destination project directory.
  • repositoryId: The Grooper Repository's id. This can be obtained by selecting the root node of the Grooper Repository in the Design page and copying the "Repository ID" property's value.
  • nodeId: The ID of the node to save the script on. This can be obtained by selecting the node in the Design page, navigating to the Advanced tab and copying the "ID" property's value.

Command Group: services

Manage Grooper services.

Command

Description

services install <connectionNo> <typeName> <userName> <password> [threadCount] [queueName]

Installs a new instance of a Grooper service. Newly installed services will need to be started after successful installation.

  • connectionNo: The connection number, as shown by the connections list command.
  • typeName: The type name of the service. Use the services types command for a list of service types.
  • userName: The user name to run the service under. This user must have the "Log on as Service" permission in Windows.
  • password: The password for the provided user name.
  • threadCount: Only applicable to installing Activity Processing services. The thread count, if the typeName is ActivityProcessing. The default value is "1".
  • queueName: Only applicable to installing Activity Processing services. The Grooper Processing Queue to pull work from, if the typeName is ActivityProcessing. The "default" Processing Queue will be used if left blank.
services list

List all Grooper services installed on the machine.

services spinup <connectionNo> <typeName> [threadCount] [queueName]

Spins up an instance of a Grooper service in a Docker container, running under the NETWORK SERVICE account.

  • connectionNo: The connection number, as shown by the connections list command.
  • typeName: The type name of the service. Use the services types command for a list of service types.
  • threadCount: Only applicable to installing Activity Processing services. The thread count, if the typeName is ActivityProcessing. The default value is "1".
  • queueName: Only applicable to installing Activity Processing services. The Grooper Processing Queue to pull work from, if the typeName is ActivityProcessing. The "default" Processing Queue will be used if left blank.
services host <connectionNo> <typeName> [settings]

Hosts a Grooper service in-process.

  • connectionNo: The connection number, as shown by the connections list command.
  • typeName: The type name of the service. Use the services types command for a list of service types.
  • settings: JSON content, enclosed in quotes, representing property settings for the service. (i.e. NumberOfThreads, ThreadPriority, QueueName, HoursOfOperation, and etc.)
services host_copy <instanceNo>

Hosts a copy of a Grooper service installed on the local machine in-process. Use this command to spin up additional Activity Processing worker services.

  • instanceNo: The service number, as shown by the services list command.
services start

Stops all services on the machine.

services start <instanceNo>

Starts a Grooper service.

  • instanceNo: The service number, as shown by the services list command.
services stop

Stops all Grooper services on the machine.

services stop <instanceNo>

Stops a Grooper service.

  • instanceNo: The service number, as shown by the services list command.
services types [connectionNo]

Displays a list of available service types. Use this command to learn what service types are available when configuring a typeName parameter.

  • connectionNo: An optional parameter for a Grooper Repository connection number. You will only include this parameter to show custom service types from custom Grooper Object Libraries.
services uninstall <instanceNo>

Remove an instance of a Grooper service.

  • instanceNo: The service number, as shown by the services list command.

Command Group: services

Miscellaneous utilities. These utilities are uncommonly used by most Grooper users.

Command

Description

utils about Displays information about the installed Grooper version. utils analyze <connectionNo> Analyzes custom objects within Object Libraries. Classes and properties that are missing documentation comments will be listed. connectionNo The connection number, as shown by the connections 'list' command. utils exec <filename> Executes a Grooper Command Console batch file. filename The path to a text file containing GCC commands. utils ping <connectionNo> <name> [interval] Tests a [CMIS Connection] or a [Data Connection] connectionNo The connection number, as shown by the connections 'list' command. name The name of a [CMIS Connection] or [Data Connection]. interval [default=] Optional repeat interval. If set, the ping will repeat on the specified interval. Examples: 15s, 5m, 1h 30m. utils update <machineName> [applyChanges] [rebuild] Updates binaries on another machine to match the local machine. machineName The name of the machine to update. applyChanges [default=False] If true, the update will be applied. If false or not set, a comparison will be displayed, but no files will be modified. rebuild [default=False]