此内容没有您所选择的语言版本。

9.33. fabric:join


Abstract

join a container to an existing fabric

Synopsis

fabric:join [ --help ] [[ -f ] | [ --force ]] [[ -p ] | [ --profile ]Profile] [[ -n ] | [ --non-managed ]] [ --zookeeper-password zooPassword ] [[ -r ] | [ --resolver ]policy] [[ -m ] | [ --manual-ip ]ipAddress] [ --min-port port ] [ --max-port port ] [[ -b ] | [ --bind-address ]BindAddress] [[ -v ] | [ --version ]Version] URL [ ContainerName ]

Description

The fabric:join command can be used to join a standalone container to fabric.

Arguments

Table 9.33, “fabric:join Arguments” describes the command's arguments.
Table 9.33. fabric:join Arguments
ArgumentInterpretation
--help Displays the online help for this command.
-f, --forceForces the provided container name to be used.
-p, --profileSpecifies the profile to associate with the container after it joins the fabric. The fabric profile, which installs the Fabric Agent, is automatically assigned to all managed containers.
-n, --non-managedRegisters the container with the fabric's ensemble, but does not install a Fabric Agent into the container. The container's configuration is not managed by the fabric and continues to behave like a standalone container except that it can be discovered through the fabric's ensemble.
--zookeeper-password The ensemble password for the fabric that you are trying to join. If you do not specify this option, you will be prompted to enter the password.
-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 the --resolver option), 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.
-b, --bind-addressSpecifies the IP address of the embedded Zookeeper server (if there is one). For example, this can be a useful option to specify if the container is deployed on a multi-homed host. Note that it only makes sense to specify this option if the current container deploys a Zookeeper server (for example, if the current container is an ensemble container).
-v, --versionSpecifies the version of the container after joining the fabric. Default is 1.0.
URL Specifies the URL of one of the Fabric Servers, specified in the format Host[:Port]. The Port value defaults to 2181.
ContainerNameSpecifies a unique name for the container to use when joining the fabric. By default, the value of the karaf.name property from the etc/system.properties file is used.

Examples

The following command will add a standalone container to a fabric as a managed container:
fabric:join myhostA ishmael
Where myhostA is the hostname of a Fabric Server (you must connect to a Fabric Server, not an ordinary fabric container) and the container is assigned the name ishmael. You will be prompted to enter the fabric's Zookeeper password.
Important
If the container being added to a fabric is assigned the same name as a container that is already a part of the fabric, the original container will be reset to have the same settings as the new container.
Warning
If no container name is specified as part of the command, the command will use the value of the karaf.name property from the etc/system.properties file. The default setting for this property is root. To avoid conflicts, you should either specify a container name or change the value of the karaf.name property.
Note
The container where you run the fabric:join command must be a standalone container. It is an error to invoke fabric:join in a container that is already part of a fabric.
To make sure that the container starts up with a specific profile, you use the -p argument as follows:
fabric:join -p whaler myhostA ishmael
The container ishmael is assigned the profile, whaler, when it joins the fabric.
If you want to be able to configure the container manually, but take advantage of the fabric's discovery features, you can add the container as a non-managed container using the following command:
fabric:join -n myhostA ishmael
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.