Openstack compute resource flow

I'm trying to get a handle on how to provision standard cloud images on
OpenStack using Foreman. I keep getting VM's I cannot access because
Foreman has configured the instance with it's own SSH key, making it
impossible for me to ssh in using my own key. How can I specify additional
SSH key(s) to use (preferably a keypair that's already registered in
OpenStack)?

Surely there must be something I'm missing?

Thanks,
Bryce

> I'm trying to get a handle on how to provision standard cloud images on
> OpenStack using Foreman. I keep getting VM's I cannot access because
> Foreman has configured the instance with it's own SSH key, making it
> impossible for me to ssh in using my own key. How can I specify additional
> SSH key(s) to use (preferably a keypair that's already registered in
> OpenStack)?

You can use cloud-init to set some additional keys. An example I wrote
for Red Hat-based OS's. I need to come back and make this more
generic eventually…

https://github.com/stbenjam/community-templates/blob/userdata-cc/kickstart/userdata.erb

Anyway, you can do something like this in the cloud init:

ssh_authorized_keys:

  • <%= @host.params['sshkey'] %>

And then use a Foreman parameter to set the SSH key.

··· On Wed, Feb 11, 2015 at 06:03:47PM -0700, Bryce L Nordgren wrote:

Surely there must be something I’m missing?

Thanks,
Bryce

Thanks much! Your example is exactly what I needed, and I can now get into
my Fedora 21 box. Now I'm off to try and figure out how to set up an
iPython notebook server using puppet classes + foreman.

··· On Wed, Feb 11, 2015 at 6:21 PM, Stephen Benjamin wrote:

On Wed, Feb 11, 2015 at 06:03:47PM -0700, Bryce L Nordgren wrote:

I’m trying to get a handle on how to provision standard cloud images on
OpenStack using Foreman. I keep getting VM’s I cannot access because
Foreman has configured the instance with it’s own SSH key, making it
impossible for me to ssh in using my own key. How can I specify
additional
SSH key(s) to use (preferably a keypair that’s already registered in
OpenStack)?

You can use cloud-init to set some additional keys. An example I wrote
for Red Hat-based OS’s. I need to come back and make this more
generic eventually…

https://github.com/stbenjam/community-templates/blob/userdata-cc/kickstart/userdata.erb

Anyway, you can do something like this in the cloud init:

ssh_authorized_keys:

  • <%= @host.params[‘sshkey’] %>

And then use a Foreman parameter to set the SSH key.

Surely there must be something I’m missing?

Thanks,
Bryce


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.