9.2. Administering a Fabric Ensemble
Recommendations for an ensemble in production
- Deploy a minimum of five Fabric servers in production (if one server is taken down for maintenance, one other server can fail, and the Fabric registry will still be available).
- Fabric servers should be deployed on separate host machines.
- Each Fabric server should only have a Fabric registry agent deployed inside it. No other profiles should be deployed in it.
- The size of the ensemble should be fixed at the outset, and not changed later (if you subsequently add or remove containers from the ensemble, the ZooKeeper IP ports would be re-assigned).
Expanding the ensemble
fabric:ensemble-addcommand. To expand the ensemble, perform the following steps:
- Create some new managed containers in the current fabric, which you can then add to the ensemble. Use the default profile for these new containers. For a production environment, it is recommended that you create at least four new managed containers (must be an even number), each running on their own host.
- While logged on to a container in the fabric, use the
fabric:ensemble-addcommand to add the managed containers to the ensemble. For example, given the four managed containers,
container4, you would enter the following command:
> fabric:ensemble-add container1 container2 container3 container4NoteYou must specify an even number of containers to the
- To check that the ensemble has been successfully created, invoke the
Changing an ensemble password
--zookeeper-passwordoption to define the ensemble password. If you do not then Zookeeper creates an ensemble password for you. You might want to change the ensemble password when a test ensemble becomes a production ensemble. To display the current ensemble password, execute the following command:
fabric:ensemble-passwordcommand and specify the new password. For example, to change the password to
tiger, enter the following command:
> fabric:ensemble-password tiger
> fabric:ensemble-password --commit
Taking a Fabric server down for maintenance
fabric:container-stopcommand, specifying the name of the Fabric server.