I want to use Salt Stack to manage cloud servers that will be automatically created by another application. I can't use salt-cloud to create the new servers and boot strap them because another application that I don't have control over will be automatically creating and deleting them.
What I can do is build the image that the application will use when it creates and deletes new cloud server instances.
What I'm looking for is a way for a newly created minion to boot strap itself to the salt master without the salt-master knowing anything about it before it's created.
The issue I have is that I need a way to pre-seed the keys so that the new minions can get be accepted automatically.
I was trying to use salt-api to do this by having a script run at boot which would connect to the salt-master and generate a new key for itself. The new minions could use pre-seeded keys so that it connects automatically to the master.
But I'm having issue trying to figure out how to call salt-key from the salt-api in order to generate a new key each time a minion is created.