Chef infra 厨房openstack步骤/示例

Chef infra 厨房openstack步骤/示例,chef-infra,openstack,test-kitchen,Chef Infra,Openstack,Test Kitchen,我正在尝试使用kitchen openstack的工具test kitchen对我们的一些厨师食谱进行一些集成/功能测试 但我无法让它工作:( 我有一个.kitchen.yml,包含以下内容: driver: name: openstack openstack_username: test openstack_api_key: test openstack_auth_url: http://<openstackServerIp>:35357/v2.0/ requi

我正在尝试使用kitchen openstack的工具test kitchen对我们的一些厨师食谱进行一些集成/功能测试

但我无法让它工作:( 我有一个.kitchen.yml,包含以下内容:

driver:
  name: openstack
  openstack_username: test
  openstack_api_key: test
  openstack_auth_url: http://<openstackServerIp>:35357/v2.0/
  require_chef_omnibus: latest
  image_ref: CentOS-6.5-Template
  flavor_ref: cloud.tiny
  openstack_tenant: test

provisioner:
  name: chef_solo

platforms:
  - name: centos-6.5

suites:
  - name: default
    run_list:
      - recipe[myTestChef::default]
驱动程序:
名称:openstack
openstack_用户名:test
openstack_api_密钥:测试
openstack_auth_url:http://:35357/v2.0/
需要厨师长综合:最新
图像参考:CentOS-6.5-Template
味道参考:cloud.tiny
openstack_租户:测试
供应人:
姓名:厨师长
平台:
-名称:centos-6.5
套房:
-名称:默认值
运行列表:
-配方[myTestChef::默认值]
直到现在,当我创建默认的centos-65时,我收到的是:

Message: Expected([200, 204]) <=> Actual(400 Bad Request)
  response => #<Excon::Response:0x00000001eed698 @data={:body=>"{\"error\": {\"message\": \"get_version_v2() got an unexpected keyword argument 'auth'\", \"code\": 400, \"title\": \"Bad Request\"}}", :headers=>{"Vary"=>"X-Auth-Token", "Content-Type"=>"application/json", "Content-Length"=>"121", "Date"=>"Mon, 05 May 2014 18:02:15 GMT"}, :status=>400, :remote_ip=>"<openstackServerIp>", :local_port=>34592, :local_address=>"192.168.10.32"}, @body="{\"error\": {\"message\": \"get_version_v2() got an unexpected keyword argument 'auth'\", \"code\": 400, \"title\": \"Bad Request\"}}", @headers={"Vary"=>"X-Auth-Token", "Content-Type"=>"application/json", "Content-Length"=>"121", "Date"=>"Mon, 05 May 2014 18:02:15 GMT"}, @status=400, @remote_ip="<openstackServerIp>", @local_port=34592, @local_address="192.168.10.32">
消息:预期([200204])实际(400个错误请求)
response=>“{\”error\”:{\“message\”:“get\u version\u v2()得到一个意外的关键字参数'auth'”,“code\”:400,“title\:“Bad Request\”}>,:headers=>{“Vary”=>“X-auth-Token”,“Content Type”=>“application/json”,“Content Length”=>“121”,“Date”=>“Mon,05 May 2014 18:02:15 GMT}>,:status=>400,:remote\u ip=>,:local\u port=>34592,:local\u address=>192.168.10.32,@body=“{”error\”:{\“message\”:“get\u version\u v2()获得了一个意外的关键字参数'auth'”,“code\”:400,\“title\”:“Bad Request\”,@headers={“Vary”=>“X-auth-Token”,“Content Type”=>“application/json”,“Content Length”=>“121”,“Date”=>“Mon,2014年5月5日18:02:15 GMT”},@status=400,@remote_ip=“”,@local_port=34592,@local_address=“192.168.10.32”>
当我运行厨房列表时,我得到:

Instance           Driver     Provisioner  Last Action
default-centos-65  Openstack  ChefSolo     <Not Created>
实例驱动程序供应器的最后一个操作
default-centos-65 Openstack ChefSolo
我做错了什么?有人能分享一些如何设置的步骤或示例吗


我正在从OpenStack的同一项目中创建的VM运行此操作。

我发现了问题。我还必须指定:

  • 服务器名称:
  • 网络参考:
  • 公钥路径:
    /home/.ssh/id\u rsa.pub
  • 私钥路径:
    /home/.ssh/id\u rsa
  • 用户名:
公共密钥路径和私有密钥路径必须与将创建虚拟机的自动化密钥相关


最后3个SSH值是必需的,这样Kitchen就可以连接到创建的虚拟机中,从而可以在那里应用厨师食谱。

从OpenStack得到的错误:

“get\u version\u v2()得到一个意外的关键字参数'auth'\”

这是因为身份验证URL。我在使用libcloud连接到OpenStack API时遇到了相同的问题

我想说的是:

http://localhost:5000/v2.0/
解决方案:

http://localhost:5000/
http://localhost:5000/v2.0/tokens/

来源:

请在将来格式化您的代码对不起,我不知道如何使用这个关于格式的问题,我在这里是一个全新的发帖问题。