The Admin CLI

Fabric3 comes with simple but powerful command-line utility that can be used for managing a domain. To run the Admin CLI. follow the steps given below.

1. Download the Admin CLI from Fabric3 downloads page and unpack it.

2. The directory structure is organized as follows:

/bin

Main admin utility class

/config

Contains settings.xml for configuring the admin tool

/legal

Legal information

/lib

Necessary libraries and modules

3. Configure Admin CLI by adding your domain configuration to /config/settings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings>
     <domains>
         <domain name="default" url="http://127.0.0.1:7001/management" username="user" password="pass"/>
     </domains>
</settings>


The URL points to the server IP and port - for WebLogic the default values are 127.0.0.1 or locahost and the port 7001.

4. Run the Admin CLI:

java -jar f3.jar

Fabric3 Administration Interface
Using default [http://localhost:8181/management]

f3>

By default, Admin CLI works in interactive mode. Each command must be confirmed by hitting 'Enter'.

5. At startup, Admin CLI connects to the domain configuration named 'default' from /config/settings.xml. If there's no such configuration, it uses the hardcoded default: http://localhost:8181/management.

6. To change managed domain to the one named <domain_name>, type:

f3>use <domain_name>

7. For getting help, type: 

f3>help

8. Admin CLI commands can also be executed from the script. To do it, prepare your script containing Admin CLI commands according to the following rules:

  - one line may contain one command,

  - no empty lines is allowed.

Then run your script by typing:

java -jar f3.jar r <script_name>