Open cstewart87 opened 9 years ago
I haven't used the vca-cli myself, but haven't found a subscription/instance id necessary.
Try starting with a known working yaml from the a walkthu and apply it to a cookbook: https://www.youtube.com/watch?v=5srDko69XJ0
git clone git@github.com:chef-cookbooks/httpd.git
cd httpd
cat <<EOF>.kitchen.vcair.yml
---
driver_config:
vcair_username: <%= ENV['VCAIR_USERNAME'] %>
vcair_password: <%= ENV['VCAIR_PASSWORD'] %>
vcair_api_host: <%= ENV['VCAIR_API_HOST'] %>
vcair_org: <%= ENV['VCAIR_ORG'] %>
provisioner:
name: chef_zero
require_chef_omnibus: latest
platforms:
- name: centos-6.4
driver_plugin: vcair
driver_config:
size: 2gb
image: centos-6-4-x64
vcair_ssh_password: <%= ENV['VCAIR_SSH_PASSWORD'] %>
suites:
#
# hello_world_test
#
- name: hello_world_test
run_list:
- recipe[hello_world_test]
EOF
$ KITCHEN_YAML=".kitchen.vcair.yml" kitchen converge hello-world-test-centos-64
-----> Starting Kitchen (v1.4.1)
-----> Creating <hello-world-test-centos-64>...
100/100 |**************************************************|
100/100 |**************************************************|
100/100 |**************************************************|
100/100 |**************************************************|
vCloud Air instance <vm-1a6066e7-ef3c-4953-9672-bc95c99f04b2> created.
(server ready)
(ssh ready)
Finished creating <hello-world-test-centos-64> (5m21.04s).
-----> Converging <hello-world-test-centos-64>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 3.2.4...
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
-----> Installing Chef Omnibus (always install latest version)
Downloading https://www.chef.io/chef/install.sh to file /tmp/install.sh
Trying curl...
Download complete.
Downloading Chef for el...
downloading https://www.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=el&pv=6&m=x86_64
to file /tmp/install.sh.1621/metadata.txt
trying curl...
url https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-12.4.1-1.el6.x86_64.rpm
md5 f09a9ae589bb9040232c600b008ef812
sha256 95150a4b3c3b2313bd206876e09e2fcf742f2fa4611951d52c79225becb32928
downloaded metadata file looks valid...
downloading https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-12.4.1-1.el6.x86_64.rpm
to file /tmp/install.sh.1621/chef-12.4.1-1.el6.x86_64.rpm
trying curl...
Comparing checksum with sha256sum...
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
You are installing an omnibus package without a version pin. If you are installing
on production servers via an automated process this is DANGEROUS and you will
be upgraded without warning on new releases, even to new major releases.
Letting the version float is only appropriate in desktop, test, development or
CI/CD environments.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Installing Chef
installing with rpm...
warning: /tmp/install.sh.1621/chef-12.4.1-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
Preparing... ########################################### [100%]
1:chef ########################################### [100%]
Thank you for installing Chef!
Transferring files to <hello-world-test-centos-64>
Starting Chef Client, version 12.4.1
Creating a new client identity for hello-world-test-centos-64 using the validator key.
[2015-08-03T11:29:10-05:00] WARN: Child with name 'dna.json' found in multiple directories: /tmp/kitchen/dna.json and /tmp/kitchen/dna.json
[2015-08-03T11:29:10-05:00] WARN: Child with name 'dna.json' found in multiple directories: /tmp/kitchen/dna.json and /tmp/kitchen/dna.json
resolving cookbooks for run list: ["hello_world_test"]
[2015-08-03T11:29:10-05:00] WARN: Child with name 'dna.json' found in multiple directories: /tmp/kitchen/dna.json and /tmp/kitchen/dna.json
Synchronizing Cookbooks:
- hello_world_test
- httpd
Compiling Cookbooks...
Converging 3 resources
Recipe: hello_world_test::default
### ommitting heaps of converged resources ###
Running handlers:
Running handlers complete
Chef Client finished, 63/106 resources updated in 17.943300364 seconds
Finished converging <hello-world-test-centos-64> (0m34.02s).
-----> Kitchen is finished. (6m57.85s)
I tried this simpler config and it also worked. Can you push a repo that I can use to replicate the issue?
---
driver_plugin: vcair
driver_config:
vcair_username: <%= ENV['VCAIR_USERNAMEX'] %>
vcair_password: <%= ENV['VCAIR_PASSWORDX'] %>
vcair_api_host: <%= ENV['VCAIR_API_HOSTX'] %>
vcair_org: <%= ENV['VCAIR_ORGX'] %>
vcair_ssh_password: <%= ENV['VCAIR_SSH_PASSWORDX'] %>
size: 2gb
provisioner:
name: chef_zero
require_chef_omnibus: latest
platforms:
- name: centos-6.4
suites:
- name: default
run_list:
- recipe[hello_world_test]
Do you know if the API host you're using is subscription based or on demand?
Subscription
I'm currently unable to create an instance using the kitchen-vcair driver.
.kitchen.yml:
Stacktrace:
I should also note that when using the vca-cli I have to pass in a subscription/instance id, but I don't see that option provided in the kitchen-vcair driver configs