create instance from an instance?

asked 2016-09-28 06:07:34 -0600

sendu gravatar image

Let's say a user uses some unknown method of creating an instance (nova compute node), and they have ssh'd to it. (Presumably they must have created an ssh key and network etc. for this to work)

Now on this openstack instance they will run my software. I want my software to launch new instances that my software can ssh to. No user or external access to these instances is required.

What's the best way for my software to achieve this?

  1. Do I need the user to set up all the usual authentication environment variables manually?
  2. Is there any way to know that I'm running on an openstack node?
  3. How do I find out the server id of the instance I'm running on, and the network it is attached to?
  4. Will I have to create my own keypair for use with the instances I will create?

I'm using the gophercloud API in Golang, but any advice on the proper way to go about this would be appreciated.

edit retag flag offensive close merge delete