Chapter 5. Command Line Configuration
The kie-config-cli
tool is a command line configuration tool that provides capabilities to manage the system repository from the command line and can be used in an online or offline mode.
- Online mode (default and recommended)
-
On startup, the tool connects to a Git repository using a Git server provided by
kie-wb
. All changes are made locally and published to upstream only after explicitly executing the push-changes command. Use the exit command to publish local changes. To discard local changes on exit, use the discard command. - Offline mode (installer style)
- Creates and manipulates the system repository directly on the server (there is no discard option).
The tool is available on the Red Hat Customer Portal. To download the kie-config-cli
tool, do the following:
- Go to the Red Hat Customer Portal and log in.
- Click DOWNLOADS at the top of the page.
In the Product Downloads page that opens, click Red Hat JBoss BPM Suite.
- From the Version drop-down menu, select 6.4.0.
- In the displayed table, navigate to the Supplementary Tools row and then click Download.
Extract the zip package for supplementary tools you downloaded from the Red Hat Customer Portal. It contains the directory kie-config-cli-6.MINOR_VERSION-redhat-x-dist
with file kie-config-cli.sh
.
5.1. Starting the kie-config-cli Tool in Online Mode
-
To start the
kie-config-cli
tool in online mode, navigate to thekie-config-cli-6.MINOR_VERSION-redhat-x-dist
directory where you installed the tool and then execute the following command. In a Unix environment run:
./kie-config-cli.sh
In a Windows environment run:
./kie-config-cli.bat
By default, the tool starts in online mode and asks for user credentials and a Git URL to connect to (the default value is git://localhost/system
). To connect to a remote server, replace the host and port with appropriate values.
Example: git://kie-wb-host:9148/system
5.2. Starting the kie-config-cli Tool in Offline Mode
To operate in offline mode, append the offline parameter to the command as below.
-
Navigate to the
kie-config-cli-6.MINOR_VERSION-redhat-x-dist
directory where you installed the tool. In a Unix environment, run:
./kie-config-cli.sh offline
In a Windows environment, run:
./kie-config-cli.bat offline
Executing this command changes the tool’s behaviour and displays a request to specify the folder where the system repository (.niogit
) is located. If .niogit does not yet exist, the folder value can be left empty and a brand new setup is created.
5.3. Commands Available for the kie-config-cli Tool
The following commands are available for managing the Git repository using the kie-config-cli
tool:
-
add-deployment
: Adds a new deployment unit -
add-repo-org-unit
: Adds a repository to the organizational unit -
add-role-org-unit
: Adds role(s) to an organizational unit -
add-role-project
: Adds role(s) to a project -
add-role-repo
: Adds role(s) to a repository -
create-org-unit
: Creates new organizational unit -
create-repo
: Creates a new git repository -
discard
: Does not publish local changes, cleans up temporary directories and closes the tool -
exit
: Publishes work, cleans up temporary directories and closes the tool -
fetch-changes
: Fetches changes from upstream repository -
help
: Prints available commands with descriptions -
list-deployment
: Lists available deployments -
list-org-units
: Lists available organizational units -
list-repo
: Lists available repositories -
push-changes
: Pushes changes to upstream repository (in online mode only) -
remove-deployment
: Removes existing deployment -
remove-org-unit
: Removes existing organizational unit -
remove-repo
: Removes an existing repository from config only -
remove-repo-org-unit
: Removes a repository from the organizational unit -
remove-role-org-unit
: Removes role(s) from an organizational unit -
remove-role-project
: Removes role(s) from a project -
remove-role-repo
: Removes role(s) from a repository