A - 在同一站点部署两个 PSC 6.0 设备:
部署第一个 PSC 6.0 设备。
部署另一个 PSC 6.0 设备,将其加入同一站点下的第一个 PSC。
B - 在第一个 PSC 节点上执行以下操作: - 从 Download VMware Platform Services Controller 6.0 下载 PSC HA 脚本。
- 将内容解压缩到第一个 PSC 上的 /ha。
注意: -
- (可选)如果要以独占方式使用您的 CA 而不使用 VCMA,请执行以下步骤创建证书。 否则,请继续到步骤 5。
- 将 /usr/lib/vmware-vmca/share/config/certool.cfg 文件的副本保存到 /ha 文件夹。
- 编辑位于 /ha 的 certool.cfg 副本,并根据需要编辑值,确保 Name 和 Hostname 的值设置为正确的 Load Balanced FQDN。
例如:
#
# Template file for a CSR request
#
# Country is needed and has to be 2 characters
Country = US
Name = psc-vcsa-ha-vip.domain.com
Organization = AcmeOrg
OrgUnit = AcmeOrg Engineering
State = California
Locality = Palo Alto
IPAddress = 127.0.0.1
Email = [email protected]
Hostname = psc-vcsa-ha-vip.domain.com
- 运行此命令,使用上面编辑的 certool.cfg 生成证书签名请求 (CSR) 和私钥对:
/usr/lib/vmware-vmca/bin/certool --initcsr --privkey=/ha/psc-ha.privkey --pubkey=/ha/psc-ha.pubkey --csrfile=/ha/psc-ha.csr --config=/ha/certool.cfg
例如:
/usr/lib/vmware-vmca/bin/certool --initcsr --privkey=/ha/psc-ha.privkey --pubkey=/ha/psc-ha.pubkey --csrfile=/ha/psc-ha.csr --config=/ha/certool.cfg
This is deprecated. Use gencsr instead.
Using config file : /ha/certool.cfg
Status : Success
- 向您的 CA 提供 CSR 文件并获取证书文件。 有关获取 Microsoft CA 的详细信息,请参见 Obtaining vSphere certificates from a Microsoft Certificate Authority (2112014)。
- 将证书保存到 /ha/custom_lb.crt。
- 将 psc-ha.privkey 重命名为 custom_lb.key。
- 将根 CA 证书另存为 custom_root.crt。
- 在第一个 PSC 节点上运行此命令:
python gen-lb-cert.py --primary-node --lb-fqdn= load_balanced_fqdn
注意: load_balanced_fqdn 是负载平衡地址的 FQDN。 生成的 lb.p12 文件的密码是 changeme。
例如:
python gen-lb-cert.py --primary-node --lb-fqdn=psc-vcsa-ha-vip.domain.com
Initialization complete
executing certTool command
executing certTool command
Using config file : /usr/lib/vmware-vmca/share/config/certool.cfg
Status : Success
Executing openssl command
Loading 'screen' into random state - done
Executing openssl command
writing RSA key
Executing StopService --all
INFO:root:Service: vmware-license, Action: stop
INFO:root:Service: vmwareServiceControlAgent, Action: stop
INFO:root:Service: VMwareComponentManager, Action: stop
INFO:root:Service: rhttpproxy, Action: stop
INFO:root:Service: VMwareSTS, Action: stop
INFO:root:Service: VMwareIdentityMgmtService, Action: stop
INFO:root:Service: VMWareCertificateService, Action: stop
INFO:root:Service: VMWareDirectoryService, Action: stop
INFO:root:Service: VMWareAfdService, Action: stop
INFO:root:Service: vmware-cis-config, Action: stop
Executing StartService --all
INFO:root:Service: vmware-cis-config, Action: start
INFO:root:Service: VMWareAfdService, Action: start
INFO:root:Service: rhttpproxy, Action: start
INFO:root:Service: VMWareDirectoryService, Action: start
INFO:root:Service: VMWareCertificateService, Action: start
INFO:root:Service: VMwareIdentityMgmtService, Action: start
INFO:root:Service: VMwareSTS, Action: start
INFO:root:Service: VMwareComponentManager, Action: start
INFO:root:Service: vmware-license, Action: start
INFO:root:Service: vmwareServiceControlAgent, Action: start
只有在执行步骤 4 的情况下才适用步骤 6 和 7,否则请继续执行步骤 8。
- (可选)如果您执行了步骤 4 且不使用 VMCA 颁发的证书,请放弃步骤 5 中 gen-lb-cert.py 命令生成的 lb.crt、lb.key. lb.p12 和 root.crt 以及步骤 4 中生成的证书。 将您的自定义 CA 证书文件分别重命名为 lb.crt、lb.key. root.crt。 创建 PKCS12 lb.p12 文件。
- del /ha/lb.crt /ha/lb.key /ha/lb.p12 /ha/root.crt
- mv /ha/custom_lb.crt /ha/lb.crt
- mv /ha/custom_lb.key /ha/lb.key
- mv /ha/custom_root.crt /ha/root.crt
- openssl pkcs12 -export -in /ha/lb.crt -inkey /ha/lb.key -certfile /ha/root.crt -name rui -passout pass:changeme -out /ha/lb.p12
- (可选)如果您执行了步骤 4 且不使用 VMCA 颁发的证书,则导入步骤 4 中颁发证书的根 CA 和中间 CA 颁发的证书。
如果您的环境包含一个或多个中间 CA,则使用此命令将整个链发布到 VMware Endpoint 证书存储 (VECS):
/usr/lib/vmware-vmafd/bin/dir-cli trustedcert publish --chain --cert path_to_CA_Chain
如果您的环境只包含一个根 CA,请使用此命令将此根发布到 VECS:
/usr/lib/vmware-vmafd/bin/dir-cli trustedcert publish --cert path_to_CA_Root
- 将 /etc/vmware-sso/keys 复制到 /ha/keys。
mkdir /ha/keys
cp /etc/vmware-sso/keys/* /ha/keys
C - 在另一个 PSC 节点上执行以下操作:
- 将第一个 PSC 上的/ha文件夹的内容复制到另一个 PSC 上的/ha文件夹。
注意:(确保同时直接复制步骤 8 中的密钥)。
- 在另一个 PSC 节点上运行此命令:
python gen-lb-cert.py --secondary-node --lb-fqdn=load_balanced_fqdn --lb-cert-folder=/ha --sso-serversign-folder=/ha/keys
注意: 其中,load_balanced_fqdn 是负载平衡地址的 FQDN。
例如:
python gen-lb-cert.py --secondary-node --lb-fqdn=psc-vcsa-ha-vip.domain.com --lb-cert-folder=/ha --sso-serversign-folder=/ha/keys
Initialization complete
Please make sure that you have copied the contents from HA folder in Node 1 into the HA folder in the local node
Please Make that you have copied the ssoserverSign.* files and ssoServerRoot.crt file from node 1
Press enter to continue.
Executing StopService --all
INFO:root:Service: vmware-license, Action: stop
INFO:root:Service: vmwareServiceControlAgent, Action: stop
INFO:root:Service: VMwareComponentManager, Action: stop
INFO:root:Service: rhttpproxy, Action: stop
INFO:root:Service: VMwareSTS, Action: stop
INFO:root:Service: VMwareIdentityMgmtService, Action: stop
INFO:root:Service: VMWareCertificateService, Action: stop
INFO:root:Service: VMWareDirectoryService, Action: stop
INFO:root:Service: VMWareAfdService, Action: stop
INFO:root:Service: vmware-cis-config, Action: stop
Executing StartService --all
INFO:root:Service: vmware-cis-config, Action: start
INFO:root:Service: VMWareAfdService, Action: start
INFO:root:Service: rhttpproxy, Action: start
INFO:root:Service: VMWareDirectoryService, Action: start
INFO:root:Service: VMWareCertificateService, Action: start
INFO:root:Service: VMwareIdentityMgmtService, Action: start
INFO:root:Service: VMwareSTS, Action: start
INFO:root:Service: VMwareComponentManager, Action: start
INFO:root:Service: vmware-license, Action: start
INFO:root:Service: vmwareServiceControlAgent, Action: start
D - 配置兼容负载平衡器,以便与 vSphere 6.0 Platform Services Controller High Availability 结合使用
在此阶段,运行最终的 PSC HA 脚本前,请完成所需负载平衡器的配置。
对于已知的兼容负载平衡器,请参见 vCenter Single Sign-On and Platform Services Controller High Availability Compatibility Matrix (2112736)。
对于 F5 BIG-IP 负载平衡器,请参见 Configuring F5 BIG-IP Load Balancer for use with vSphere Platform Services Controller (PSC) 6.0 (2098006)。
对于 Citix Netscaler 负载平衡器,请参见 Configuring Citrix NetScaler Load Balancer for use with vSphere Platform Services Controller (PSC) 6.0 (2116281)。
E - 在第一个 PSC 节点上执行以下操作:
- 运行此命令,使用 load_balanced_fqdn 更新端点 URL:
python lstoolHA.py --hostname=psc_1_fqdn --lb-fqdn=load_balanced_fqdn --lb-cert-folder=/ha [email protected]
注意: 其中,psc_1_fqdn 是第一个 PSC 节点的 FQDN。 其中,load_balanced_fqdn 是负载平衡地址的 FQDN。 命令提示您提供 [email protected] 密码。
例如:
python lstoolHA.py --hostname=psc-vcsa-1.domain.com --lb-fqdn=psc-vcsa-ha-vip.domain.com --lb-cert-folder=/ha [email protected]
Password:
2015-03-16 10:05:06,665 INFO com.vmware.identity.token.impl.SamlTokenImpl - SAML token for SubjectNameId [[email protected], Format=http://schemas.xmlsoap.org/claims/UPN] successfully parsed from Element
2015-03-16 10:05:06,713 INFO com.vmware.vim.sso.client.impl.SecurityTokenServiceImpl - Successfully acquired token for user: [email protected]
2015-03-16 10:05:07,305 WARN com.vmware.vim.vmomi.client.http.impl.HttpConfigurationCompilerBase$ConnectionMonitorThreadBase - Shutting down the connection monitor.
注意:
- 成功完成时,命令以上述条目结尾。
- 上述日志摘录仅为示例。日期、时间和环境变量可能会因环境而有所不同。
- 要验证端点已正确更新,请使用第一个 PSC 节点的 FQDN 项运行这些命令:
- 通过运行以下命令,获取 sitename:
python /usr/lib/vmidentity/tools/scripts/lstool.py get-site-id --url https://psc_1_fqdn/lookupservice/sdk 2> /dev/null
- 使用步骤 a 中的输出 sitename,运行这些命令验证已使用负载平衡 FQDN 更新端点:
python /usr/lib/vmidentity/tools/scripts/lstool.py list --url http://localhost/lookupservice/sdk --site sitename --type cs.license | grep "URL:"
python /usr/lib/vmidentity/tools/scripts/lstool.py list --url http://localhost/lookupservice/sdk --site sitename --type cs.identity | grep "URL:"
F - 安装 vCenter Server 6.0 或将 vCenter Server 5.5 更新为 6.0继续安装 vCenter Server 6.0 或升级 vCenter Server 5.5 系统。 要求提供目标 Platform Services Controller 详细信息时,请提供上述定义的
load_balanced_fqdn。 有关详细信息,请参见
VMware vCenter Server 6.0 Deployment Guide。