Red Hat Training

A Red Hat training course is available for Red Hat Fuse

3.3. Fabric Containers on Windows

Abstract

Fabric supports the deployment of containers on Windows platforms. In this case, however, it is necessary to install the container manually on the target host.

Overview

Because Windows does not support the Secure Shell (SSH) protocol, it is not possible to install the container software remotely on to a Windows machine. The installation must be performed manually. But the remote deployment of applications (by assigning profiles to the container) is fully supported.

Creating a Fabric container on Windows

Perform the following steps to create a Fabric container on Windows (assuming the container is to join an existing fabric):
  1. Following the instructions in the JBoss Fuse Installation Guide, manually install the JBoss Fuse product on the Windows target host.
  2. Open a new command prompt and enter the following commands to start the container on the target host:
    cd InstallDir\bin
    fuse.bat
  3. If the Fabric servers from the Fabric ensemble are not already running, start them now.
  4. Join the container to the existing fabric, by entering the following console command:
    JBossFuse:karaf@root> fabric:join --zookeeper-password ZooPass RegistryHost
    Where ZooPass is the ZooKeeper password for the Fabric ensemble (as specified when you originally created the fabric with fabric:create); and RegistryHost is the hostname or IP address of one of the hosts where a Fabric server is running.
    Note
    By default, Fabric uses the default IP port number, 2181, to connect to the Fabric server on the RegistryHost host. If, for some reason, the ZooKeeper service is listening on a different IP port, you can specify the IP port number explicitly using the syntax, RegistryHost:RegistryIPPort.
After joining the fabric, the container becomes a managed Fabric container and initially has the default profile deployed on it.

Creating a Fabric server on Windows

If you don't have an existing fabric, you can create a new fabric on the Windows host. The starting point for any fabric is a Fabric server instance, which can act as a seed for the rest of the fabric. Perform the following steps to create a Fabric server on Windows:
  1. Following the instructions in the JBoss Fuse Installation Guide, manually install the JBoss Fuse product on the Windows target host.
  2. To start the container on the target host, open a new command prompt and enter the following commands:
    cd InstallDir\bin
    fuse.bat
  3. To create a new fabric (thereby turning the current host into a Fabric server), enter the following console command:
    fabric:create --new-user AdminUser --new-user-password AdminPass
      --zookeeper-password ZooPass
      --resolver manualip --manual-ip StaticIPAddress --wait-for-provisioning
    The current container, named root by default, becomes a Fabric Server with a registry service installed. Initially, this is the only container in the fabric. The --new-user and --new-user-password options specify the credentials for a new administrator user. The Zookeeper password is used to protect sensitive data in the Fabric registry service (all of the nodes under /fabric). The --manual-ip option specifies the Fabric Server's static IP address StaticIPAddress (see the section called “Static IP address required for Fabric Server”).

Managing remote containers on Windows

Because a Fabric container on Windows is added to the fabric by joining (that is, using fabric:join), there are certain restrictions on which commands you can use to manage it. In particular, the following commands are not supported:
fabric:container-stop
fabric:container-start
fabric:container-delete
To stop and start a Fabric container running on Windows, you must log on to the Windows host and use the regular Windows system commands to manage the container process (in particular, you could potentially install the container as a Windows service and use the Windows service commands to manage the container lifecycle).