9.26. fabric:create


Abstract

creates a new fabric and imports fabric profiles

Synopsis

fabric:create [ --help ] [ --clean ] [ --no-import ] [ --import-dir dir ] [[ -v ] | [ --verbose ]] [[ -t ] | [ --time ]millis] [[ -n ] | [ --non-managed ]] [[ -p ] | [ --profile ]profile] [[ -b ] | [ --bind-address ]bindAddr] [ --new-user username ] [ --new-user-password password ] [ --new-user-role role ] [ --zookeeper-password zooPassword ] [ --generate-zookeeper-password ] [ --zookeeper-data-dir dataDir ] [ --zookeeper-init-limit ticks ] [ --zookeeper-sync-limit ticks ] [ --zookeeper-ticktime millis ] [ --zookeeper-server-port zkport ] [ --wait-for-provisioning ] [[ -t ] | [ --time ]millis] [[ -g ] | [ --global-resolver ]policy] [[ -r ] | [ --resolver ]policy] [[ -m ] | [ --manual-ip ]ipAddress] [ --min-port port ] [ --max-port port ] [ --external-git-url gitURL ] [ --external-git-user gitUser ] [ --external-git-password gitPass ] [ --bootstrap-timeout ] [ ContainerList ] [ --zookeeper-purge-interval hours ] [ --zookeeper-snap-retain-count number ]

Description

This command is used to create a new fabric. It can also be used to change the Fabric Servers in an existing fabric. Converting the current container into a fabric has two important side effects:
  • The contents of a container should now be managed using fabric profiles. Do not try to deploy bundles and features directly in a fabric container.
  • The default JAAS realm is superseded by the Zookeeper login module, which stores user data in the Zookeeper registry. As the fabric is created it initializes the user data by importing all of the user data that it finds in the etc/users.properties file. If the users.properties file is empty, you can specify a new user explicitly using the --new-user and --new-user-password options (at least one user must be defined).

Arguments

Table 9.26, “fabric:create Arguments” describes the command's arguments.
Table 9.26. fabric:create Arguments
ArgumentInterpretation
--help Displays the online help for this command
--clean Clean local zookeeper cluster and configurations.
--no-import Disable the import of the sample registry data.
--import-dir Directory of files to import into the newly created ensemble.
-v, --verbose Flag to enable verbose output of files being imported.
-t, --time How long to wait (milliseconds) for the ensemble to start up, before trying to import the default data.
-n, --non-managedSpecifies that the container remains unmanaged.
-p, --profile Specifies the profile (or profiles) to use for the ensemble containers in the new fabric. To specify multiple profiles, specify this flag multiple times on the command line—for example, --profile foo --profile bar.
-b, --bind-addressSpecifies the IP address of the embedded Zookeeper server. For example, this can be a useful option to specify if the container is deployed on a multi-homed host.
--new-user
Create a new user in the new fabric's JAAS realm. Because the fabric:create command automatically imports user data from the etc/users.properties file, you would only need to specify this option, if the etc/users.properties file contains no valid user entries.
When using this option, you must also specify a password using the --new-user-password option.
--new-user-password Used in combination with the --new-user option to specify the new user's password. No default value.
--new-user-role Used in combination with the --new-user option to specify the new user's role. Default is admin.
--zookeeper-password
Specifies the Zookeeper password, which is used to access the Zookeeper nodes under the /fabric/ path. Defaults to the password of the current session user.
Subsequently, because the Zookeeper password is cached in the current session, you normally do not need to provide it when executing fabric commands. You can display the Zookeeper password at any time using the fabric:ensemble-password command.
--generate-zookeeper-password Directs Fabric to generate a random Zookeeper password. Subsequently, you can display the Zookeeper password using the fabric:ensemble-password command.
--zookeeper-data-dirThe location where ZooKeeper stores the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database. Defaults to data/zookeeper.
--zookeeper-init-limitThe amount of time, in ticks, to allow followers to connect and sync to a leader. Defaults to 10.
--zookeeper-sync-limitThe amount of time, in ticks, to allow followers to sync with ZooKeeper. Defaults to 5.
--zookeeper-ticktimeThe length of a single tick, which is the basic time unit used by ZooKeeper, as measured in milliseconds. It is used to regulate heartbeats and timeouts. For example, the minimum session timeout is two ticks. Defaults to 2000.
--zookeeper-server-portSpecifies the IP port number of the ZooKeeper server, on which ZooKeeper listens for incoming connections. Default is 2181.
--zookeeper-purge-intervalSet the interval in hours between triggers of the autopurge task. Must be set to a positive integer (1 and above). The default is 0.
--zookeeper-snap-retain-countDefine the number of recent Snapshots and corresponding transaction logs in the dataDir and dataLogDir to retain on autopurge. The minimum number is 3.
--wait-for-provisioningFlag to wait for the initial container provisioning.
-g, --global-resolver Specifies the global resolver policy, which becomes the default resolver policy applied to all new containers created in this fabric. Possible values are: localip, localhostname, publicip, publichostname, manualip. The default is localhostname.
-r, --resolver Specifies the local resolver policy. Possible values are: localip, localhostname, publicip, publichostname, manualip. The default is localhostname.
-m, --manual-ip If you select the manualip resolver policy (using either the --resolver or --global-resolver options), specifies the IP address to use for the resolver.
--min-port Specifies the minimum port number of the allowed IP port range. Default is 0.
--max-port Specifies the maximum port number of the allowed IP port range. Default is 65535.
--external-git-urlSpecifies an external git url.
--external-git-userSpecifies an external git user.
--external-git-passwordSpecifies an external git password.
--bootstrap-timeoutHow long to wait (in milliseconds) for the initial fabric bootstrap. Default is 120000.
ContainerList The list of containers to include in the ensemble. An empty list implies the current container.

Examples

Create a fabric and import sample profiles from the ESBInstallDir/fabric/import directory, as follows:
fabric:create --clean
Create a fabric without imported profiles, as follows:
fabric:create --clean --no-import
Create a fabric and import profiles from the custom import directory, CustomImportDir, as follows:
fabric:create --clean --import-dir CustomImportDir
Re-create a fabric such that the containers, reg1, reg2, and reg3, are now included in the registry ensemble (an ensemble must consist of an odd number of containers):
fabric:create reg1 reg2 reg3
In this case, the contents of the Zookeeper registry are preserved and the ensemble is expanded to include the specified containers.

Related topics

For more details about resolver policies, see:
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.