0

尝试打开 CAM 控制台 ( https://CAM_IP_address:30000 ) 的 url 被重定向到 ICP 控制台(这是正常行为),但如果我以管理员身份登录,我得到的是 ICP 控制台而不是 CAM 控制台。查看 pod 状态,您会注意到 cam-iaas pod 处于运行状态。在 cam-iaas 日志中将看到以下错误:****

[2018-07-03T15:08:37.447Z]  INFO: orpheus-api-common/70 on cam-iaas: Registering as an oauth client with ICP (script=init-platform-security)
[2018-07-03T15:08:37.733Z]  INFO: orpheus-api-common/70 on cam-iaas: Successfully registered as an oAuth Client with ICP. (script=init-platform-security)
[2018-07-03T15:08:37.734Z]  INFO: orpheus-api-common/70 on cam-iaas: Onboarding CAM Service into ICP (script=init-platform-security)
[2018-07-03T15:08:37.786Z] ERROR: orpheus-api-common/70 on cam-iaas: Failed to get IAM access token. Result: [object Object] (script=init-platform-security)
4

1 回答 1

0

上述错误表明“生成部署 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)
于 2018-07-13T09:56:51.393 回答