Packer + Openstack:即使提供了 DomainID 也被询问
Packer + Openstack: DomainID been asked even after providing it
我正在尝试将 Packer 与 Openstack 一起使用。我已经正确设置了我的环境变量,但在打包程序验证时仍然出现错误。
我的 json 加壳文件:
{
"builders":[{
"type": "openstack",
"region": "ap-au-1",
"ssh_username": "root",
"image_name": "kris-packer",
"source_image": "4ead4da5-efc8-48ce-bfa9-********",
"flavor": "2"
}]
}
我遇到以下错误:
./packer validate test.json
>>Template validation failed. Errors are shown below.
Errors validating build 'openstack'. 1 error(s) occurred:
* You must provide exactly one of DomainID or DomainName to authenticate by Username
根据文档,我在 运行ning 打包程序代码之前设置了以下环境变量:
OS_PROJECT_DOMAIN_ID=
OS_PROJECT_ID=
OS_USER_DOMAIN_ID=
OS_IDENTITY_API_VERSION=3
OS_PASSWORD=
OS_AUTH_URL=
OS_USERNAME=
我也尝试过使用 OS_XXXX_NAME 而不是 OS_XXXX_ID,但仍然出现上述错误。谁能指出可能出了什么问题?
注意:我能够成功地 运行 命令 openstack image list
并通过 CLI 执行其他操作。我遇到的唯一问题是在使用加壳器时。
来自打包机documentation:
OS_TENANT_NAME or OS_TENANT_ID must be used even with Identity v3,OS_PROJECT_NAME and OS_PROJECT_ID has no effect in Packer.
如果你这样做,我希望它能起作用 export OS_TENANT_NAME=$OS_PROJECT_NAME
我正在尝试将 Packer 与 Openstack 一起使用。我已经正确设置了我的环境变量,但在打包程序验证时仍然出现错误。
我的 json 加壳文件:
{
"builders":[{
"type": "openstack",
"region": "ap-au-1",
"ssh_username": "root",
"image_name": "kris-packer",
"source_image": "4ead4da5-efc8-48ce-bfa9-********",
"flavor": "2"
}]
}
我遇到以下错误:
./packer validate test.json
>>Template validation failed. Errors are shown below.
Errors validating build 'openstack'. 1 error(s) occurred:
* You must provide exactly one of DomainID or DomainName to authenticate by Username
根据文档,我在 运行ning 打包程序代码之前设置了以下环境变量:
OS_PROJECT_DOMAIN_ID=
OS_PROJECT_ID=
OS_USER_DOMAIN_ID=
OS_IDENTITY_API_VERSION=3
OS_PASSWORD=
OS_AUTH_URL=
OS_USERNAME=
我也尝试过使用 OS_XXXX_NAME 而不是 OS_XXXX_ID,但仍然出现上述错误。谁能指出可能出了什么问题?
注意:我能够成功地 运行 命令 openstack image list
并通过 CLI 执行其他操作。我遇到的唯一问题是在使用加壳器时。
来自打包机documentation:
OS_TENANT_NAME or OS_TENANT_ID must be used even with Identity v3,OS_PROJECT_NAME and OS_PROJECT_ID has no effect in Packer.
如果你这样做,我希望它能起作用 export OS_TENANT_NAME=$OS_PROJECT_NAME