-1

私たちが持っているいくつかのChefレシピの統合/機能テストを実行するために、kitchen-openstackを使用してツールテストキッチンを機能させようとしています。

しかし、私はそれを機能させることができません:(私は次の内容の.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]

kitchen create default-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">

キッチンリストを実行すると、次のようになります。

Instance           Driver     Provisioner  Last Action
default-centos-65  Openstack  ChefSolo     <Not Created>

私は何を間違っていますか?設定方法の手順や例を共有できますか?

OpenStack の同じプロジェクトで作成された VM からこれを実行しています。

4

2 に答える 2

1

問題が見つかりました。以下も指定する必要があります。

  • サーバー名:<VMName to create>
  • ネットワーク参照:<the name of the network where the VM will be created>
  • public_key_path:/home/<some local user>/.ssh/id_rsa.pub
  • private_key_path:/home/<some local user>/.ssh/id_rsa
  • ユーザー名:<user to login into the VM that will be created>

public_key_pathとprivate_key_pathは、仮想マシンを作成するautorized_keyに関連付ける必要があります。

これらの最後の 3 つの SSH 値は、Kitchen が作成された仮想マシンに接続して、そこに Chef レシピを適用できるようにするために必要です。

于 2014-05-07T19:44:16.887 に答える