test-kitchen / kitchen-openstack

OpenStack Compute driver for Test-Kitchen
Other
56 stars 77 forks source link

Why is private_key_path required? #151

Closed cliles closed 7 years ago

cliles commented 8 years ago

From looking, I can't tell where public_key_path and private_key_path are even used. It looks like #136 removed the usage of them? They are still required options.

jjasghar commented 8 years ago

Public key path is extremely important: https://github.com/test-kitchen/kitchen-openstack#public_key_path :)

cliles commented 8 years ago

I understand it's important, but I am questioning where in the driver code these 2 are still used?

From what I can tell, #136 removed the last bits that tried to inject the public key, so public_key_path... what does it even still do in driver code? why is it a mandatory option? Since we rely on cloud-init/metadata service/user-data to inject public key, driver shouldn't need to know the pub key path anymore.

Shouldn't we also defer to transport to specify (or not) the private key location?

To mimc the kitchen-ec2 driver (useful for CI) we could drop these 2 required options and do something like the following.

---
driver:
  name: openstack
  .
  .
  <snip>
  key_name: 'openstack-ci-key'
  <snip>
  .
  .

transport:
  username: centos
  ssh_key: ~/.ssh/mykey
.
.

Doing this, ssh_key is totally optional, you could use ssh-agent to provide private key.

I am making the case to drop these options.

cliles commented 8 years ago

I've open #154 to fix this.