1 |
您好,我是 Mike Thompson,是 WebSphere Liberty 概要文件的开发者。今天我将向您简要介绍 Liberty 概要文件的集合体这一新管理域。 |
显示开发者正通过摄像头发言。 |
2 |
开始 Liberty 概要文件 Network Deployment
安装,我们将创建一个简单集合体。这可通过八个步骤来完成。第一步是创建要成为管理服务器的服务器。我将呼叫此 myController。 |
显示在 wlp/bin 处打开的命令窗口,运行 server create myController,会显示消息:已创建服务器 myController。
|
3 |
一旦创建服务器 myController,我们建立服务器充当控制器所必需的集合体配置。作为此配置的一部分,我们将指定密钥库密码。密钥库密码不是预定义的。我们不随附预定义用户名或密码。
因此,使用密钥库密码 demoPassword 将建立集合体控制器的配置。 |
显示在 wlp/bin 处打开的命令窗口,然后运行以下命令:collective create myController --keystorePassword=demoPassword
|
4 |
这需要大约三秒钟,基本上会建立一些 SSH 证书。需要复制输出到屏幕的配置,并更新服务器配置文件。 |
显示此命令生成的消息,标记以下消息进行复制:<featureManager>
<feature>collectiveController-1.0</feature>
</featureManager>
<!-- Define the host name for use by the collective.
If the host name needs to be changed, the server should be
removed from the collective and re-joined or re-replicated. -->
<variable name="defaultHostName" value="myhost.ibm.com" />
<!-- TODO: Set the security configuration for Administrative access -->
<quickStartSecurity userName="" userPassword="" />
<!-- clientAuthenticationSupported set to enable bidirectional trust -->
<ssl id="defaultSSLConfig"
keyStoreRef="defaultKeyStore"
trustStoreRef="defaultTrustStore"
clientAuthenticationSupported="true" />
<!-- inbound (HTTPS) keystore -->
<keyStore id="defaultKeyStore" password="{xor}OzoyMA8+LCwoMC07"
location="${server.config.dir}/resources/security/key.jks" />
<!-- inbound (HTTPS) truststore -->
<keyStore id="defaultTrustStore" password="{xor}OzoyMA8+LCwoMC07"
location="${server.config.dir}/resources/security/trust.jks" />
<!-- server identity keystore -->
<keyStore id="serverIdentity" password="{xor}OzoyMA8+LCwoMC07"
location="${server.config.dir}/resources/collective/serverIdentity.jks" />
<!-- collective trust keystore -->
<keyStore id="collectiveTrust" password="{xor}OzoyMA8+LCwoMC07"
location="${server.config.dir}/resources/collective/collectiveTrust.jks" />
<!-- collective root signers keystore -->
<keyStore id="collectiveRootKeys" password="{xor}OzoyMA8+LCwoMC07"
location="${server.config.dir}/resources/collective/rootKeys.jks" />
|
5 |
由于这是很简单的 XML,基本上可以将其直接粘贴到 server.xml 的内容,因此可使用 Notepad 来执行此操作。 |
显示一个打开了 myController server.xml 文件的 Notepad 编辑器,然后复制的消息会粘贴到 server.xml 文件中结束标记 </server> 之前。 |
6 |
除了将其粘贴到其中,还需要指定管理名称。因此,我将使用 admin,同时使用 adminpwd 作为密码。 |
在编辑器中,设置用户名和密码:<quickStartSecurity userName="admin" userPassword="adminpwd" />
|
7 |
一旦配置服务器,即可将其启动。 |
显示在 wlp/bin 处打开的命令窗口,运行 server start myController,会显示消息:启动服务器 myController
|
8 |
既然集合体控制器正在运行,即可创建一个服务器以加入集合体。我将创建一个名为 myMember 的服务器,并将此服务器加入集合体。可以使用 collective join 命令来执行此操作。
此外,需要指定集合体控制器侦听 HTTPS 端口所用的主机和端口、管理用户名称和密码以及密钥库密码。此密码可与创建集合体控制器时使用的密码相同,也可不同。 |
显示在 wlp/bin 处打开的命令窗口,运行 server
create myMember,会显示消息:已创建服务器 myMember。
然后,运行 collective join myMember --host=localhost --port=9443
--user=admin --password=adminpwd --keystorePassword=demoPassword。 |
9 |
由于这是基于 SSL 连接到集合体控制器,将提示我们是否信任 SSL。我们识别到此处提供的证书来自集合体控制器。我们将接受证书,在后台中,集合体控制器将建立一些 SSL 证书,针对此特定成员,这些证书将返回并置于文件系统中。 |
显示 collective
join 命令生成的消息。消息显示 Issuer
DN 为 controllerRoot。在消息 Do
you want to accept the above certificate chain? (y/n) 后输入 y 以接受证书。 |
10 |
复制配置,正如我们针对控制器所执行的操作一样,并更新成员的配置文件。 要点: 所生成配置具有创建视频后添加至产品的 hostAuthInfo 元素。通过下列两者中的任何一种方式完成 hostAuthInfo 元素:
|
显示有关所生成的有关密钥库引用和信任库引用的消息,标记以下消息进行复制:<featureManager>
<feature>collectiveMember-1.0</feature>
</featureManager>
<!-- Define the host name for use by the collective.
If the host name needs to be changed, the server should be
removed from the collective and re-joined or re-replicated. -->
<variable name="defaultHostName" value="memberHostname" />
<!-- Remote host authentication configuration -->
<hostAuthInfo rpcUser="admin_user_id" rpcUserPassword="admin_user_password" />
<!-- Connection to the collective controller -->
<collectiveMember controllerHost="localhost"
controllerPort="9443" />
<!-- clientAuthenticationSupported set to enable bidirectional trust -->
<ssl id="defaultSSLConfig"
keyStoreRef="defaultKeyStore"
trustStoreRef="defaultTrustStore"
clientAuthenticationSupported="true" />
<!-- inbound (HTTPS) keystore -->
<keyStore id="defaultKeyStore" password="yourPassword"
location="${server.config.dir}/resources/security/key.jks" />
<!-- inbound (HTTPS) truststore -->
<keyStore id="defaultTrustStore" password="yourPassword"
location="${server.config.dir}/resources/security/trust.jks" />
<!-- server identity keystore -->
<keyStore id="serverIdentity" password="yourPassword"
location="${server.config.dir}/resources/collective/serverIdentity.jks" />
<!-- collective truststore -->
<keyStore id="collectiveTrust" password="yourPassword"
location="${server.config.dir}/resources/collective/collectiveTrust.jks" />
|
11 |
我们还可使用 Notepad 执行此操作。 |
显示命令以打开 Notepad 编辑器 notepad
usr/servers/myMember/server.xml,显示打开了 myMember server.xml 文件的 Notepad 编辑器,然后复制的消息会粘贴到 server.xml 文件中结束标记 </server> 之前。 |
12 |
更新后,可启动成员服务器,且成员服务器将开始将其信息发布到控制器。 就是这样。现在具有了一个很基本的集合体。
要添加更多成员,仅需针对希望创建的任何服务器重复连接操作。一切就这么轻松。已添加成员,集合体增长。
|
显示在 wlp/bin 处打开的命令窗口,运行 server start myMember,会显示消息:正在启动服务器 myMember
已启动服务器 myMember
|