如何让 juju 1.11 在私有 OpenStack 云上引导?

如何让 juju 1.11 在私有 OpenStack 云上引导?

我有一个可运行的私有 OpenStack 安装,并正在尝试使用 juju。如下所示:

dave@dave-D945GTP:~$ juju version
1.11.2-raring-amd64

dave@dave-D945GTP:~$ juju sync-tools
listing the source bucket
found 6 tools
found 6 recent tools (version 1.10.0)
listing target bucket
found 0 tools in target; 6 tools to be copied
copying tools/juju-1.10.0-precise-amd64.tgz, download 2205kB, uploading
copying tools/juju-1.10.0-precise-i386.tgz, download 2306kB, uploading
copying tools/juju-1.10.0-quantal-amd64.tgz, download 2209kB, uploading
copying tools/juju-1.10.0-quantal-i386.tgz, download 2311kB, uploading
copying tools/juju-1.10.0-raring-amd64.tgz, download 2208kB, uploading
copying tools/juju-1.10.0-raring-i386.tgz, download 2312kB, uploading
copied 6 tools

到目前为止,一切似乎都很好。但是,它无法引导:

dave@dave-D945GTP:~$ juju -v bootstrap
2013-07-11 09:34:17 INFO juju provider.go:117 environs/openstack: opening environment "openstack"
2013-07-11 09:34:17 INFO juju provider.go:467 environs/openstack: bootstrapping environment "openstack"
2013-07-11 09:34:27 INFO juju tools.go:25 environs: reading tools with major version 1
2013-07-11 09:34:27 INFO juju tools.go:52 environs: filtering tools by series: precise
2013-07-11 09:34:27 INFO juju tools.go:75 environs: picked newest version: 1.10.0
2013-07-11 09:34:28 ERROR juju supercommand.go:234 command failed: cannot start bootstrap instance: no "precise" images in RegionOne with arches [amd64 i386]
error: cannot start bootstrap instance: no "precise" images in RegionOne with arches [amd64 i386]

成功创建了一个名为“juju-cece0b9817a68cba4780784bf0663e45”的 swift 容器,其中包含一个工具“目录”(包含通过 juju sync-tools 获得的六个文件)和一个 bootstrap-verify 文件。

我的 .juju/environments.yaml 如下:

default: openstack

environments:
  ## https://juju.ubuntu.com/get-started/openstack/
  openstack:
    type: openstack
    # Specifies whether the use of a floating IP address is required to give the nodes
    # a public IP address. Some installations assign public IP addresses by default without
    # requiring a floating IP address.
    use-floating-ip: true
    admin-secret: sekret
    default-series: precise
    # Globally unique swift bucket name
    control-bucket: juju-cece0b9817a68cba4780784bf0663e45
    # Usually set via the env variable OS_AUTH_URL, but can be specified here
    auth-url: http://10.103.8.1:5000/v2.0/
    # override if your workstation is running a different series to which you are deploying
    # The following are used for userpass authentication (the default)
    auth-mode: userpass
    # Usually set via the env variable OS_USERNAME, but can be specified here
    username: admin
    # Usually set via the env variable OS_PASSWORD, but can be specified here
    password: sekret
    # Usually set via the env variable OS_TENANT_NAME, but can be specified here
    tenant-name: admin
    # Usually set via the env variable OS_REGION_NAME, but can be specified here
    region: RegionOne

读了一些资料后,我确定我显然需要上传“精确”图像并运行 juju image-metadata。我创建了元数据,如下所示...

dave@dave-D945GTP:~/.juju$ juju image-metadata -a amd64 -e http://10.103.8.1:5000/v2.0 -i d7e2ea12-cb50-4687-b5e1-d90f0656164a -n openstack -r RegionOne -s precise

...并将生成的文件移动到 juju-cece0b9817a68cba4780784bf0663e45 容器中的“streams/v1”。

juju bootstrap -v 产生了完全相同的结果。

根据我在(可能不相关的)错误报告中发现的一些内容,我还尝试将 openstack-index.json 和 openstack-imagemetadata.json 分别复制到 index.json 和 imagemetadata.json。

再次,juju bootstrap -v 产生了完全相同的结果。

有什么建议么?

答案1

您需要创建第二个存储桶,名为 juju-dist,用于上传图像数据文件。然后添加

public-bucket-url: <URL TO JUJU-DIST BUCKET>

到您的 environment.yaml 文件中。这应该可以解决“无法找到精确图像”错误。

相关内容