Deploying the CLI to GateIn

In this recipe, we will deploy the GateIn management CLI to a GateIn instance, and then verify that the deployment was successful.

Getting ready

The following is required for this recipe:

  • GateIn-3.2.0.Final

How to do it...

To deploy the GateIn management CLI:

  1. Go to https://repository.jboss.org/nexus/content/groups/public/org/gatein/management/gatein-management-cli/1.0.1-GA/ and download gatein-management-cli-1.0.1-GA.war.
  2. Copy it into the standalone/deployments folder of the GateIn installation and start the server.
  3. Open an SSH connection to the CLI by entering the following command:
    > ssh -p 2000 root@localhost
    
  4. Enter the password for root when requested. With the standard GateIn install, the password is gtn.
  5. The initial output from the CLI shell will be similar to the following screenshot:
    How to do it...
  6. At the shell prompt, enter the following to connect to the management console:
    > mgmt connect
    
  7. Enter the password for root user again.
  8. At the shell prompt, enter the following to list all the nodes at the current location:
    > ls
    
  9. The CLI shell will be similar to the following screenshot:
    How to do it...

How it works...

Step 6 connects the user to the management CLI of portal, which is the default portal container on GateIn. If you wanted to connect to a different portal deployed to GateIn, just pass the name of the portal as a -c argument in the mgmt connect command.

Step 8 demonstrates one of the commands available from the portal CLI. In this case, ls will list all the management extension components that are present in the portal. If ls were executed from within the mop folder, the result would be a list of JCR nodes at that level.

There's more...

Now we show you how to build the CLI with the latest source available.

Building the CLI WAR from source

To take advantage of the latest updates to the GateIn management component CLI, it may sometimes be necessary to build it from source.

There are two options for retrieving the source for building:

Building the source is then a matter of either going to the location where GIT cloned the repository to, or where the source ZIP was unpacked, and entering the following command on a command line:

> mvn clean install

Note

For Maven to find any JBoss dependencies that are required to build gatein-management, follow the instructions on https://community.jboss.org/wiki/MavenSettings to add the JBoss repository.

The WAR file required to be deployed is then located in the cli/target folder.

See also

  • The Retrieving a managed resource with RESTful Interface recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.107.152