上述错误表明“生成部署 ServiceID API 密钥”的前置请求步骤之一可能未成功。你知道这一步是否完成了吗?如果没有,您可以按照以下步骤尝试卸载并重新安装。
生成部署 ServiceID API Key:
export serviceIDName='service-deploy'
export serviceApiKeyName='service-deploy-api-key'
bx pr login -a https://localhost:8443 --skip-ssl-validation -u <admin_user> -p <admin_password> -c id-mycluster-account
bx pr target -n services
bx pr iam service-id-create ${serviceIDName} -d 'Service ID for service-deploy'
bx pr iam service-policy-create ${serviceIDName} -r Administrator,ClusterAdministrator --service-name ''
bx pr iam service-api-key-create ${serviceApiKeyName} ${serviceIDName} -d 'Api key for service-deploy'
使用您从 Helm Chart 安装的 deployApiKey 值中的 service-api-key-create 命令收到的 API 密钥。
在 iaas 日志中可以看到 API 密钥被成功用于注册 ICP
[2018-07-11T06:28:50.258Z] INFO: orpheus-api-common/110 on cam-iaas: Successfully created or retrieved an existing Service ID. (script=init-platform-security)
[2018-07-11T06:28:50.285Z] INFO: orpheus-api-common/110 on cam-iaas: Successfully retrieved API Keys. (script=init-platform-security)
[2018-07-11T06:28:50.366Z] INFO: orpheus-api-common/110 on cam-iaas: Successfully created or retrieved an existing API Key. (script=init-platform-security)
[2018-07-11T06:28:50.366Z] INFO: orpheus-api-common/110 on cam-iaas: Successfully created or retrieved an existing CAM API Key. (script=init-platform-security)
[2018-07-11T06:28:50.453Z] INFO: orpheus-api-common/110 on cam-iaas: Successfully retrieved IAM Access token. (script=init-platform-security)
[2018-07-11T06:28:50.454Z] INFO: orpheus-api-common/110 on cam-iaas: Successfully generated an IAM Access token using CAM API Key. (script=init-platform-security)
最初的 db 错误是预期的,因为 iaas 等待 mongodb 容器准备好,在 iaas 日志的更下方,我确实看到以下内容很好:
[2018-07-11T06:18:43.153Z] INFO: orpheus-api-common/70 on cam-iaas: Successfully connected to db (script=connection-helper)