Score:0

openstack create and set user in an instance

nf flag

Im searching for a way to make my openstack create/set a instance with specific user that have specific password

for example i want to provision an instance that will have specific user ( lets say bobi ) who will have password ( lets say bobi123 ).

and when instance is finishing setting up, and it is running i can log from console with a user bobi and pass bobi123

is this possible?

Score:0
cn flag

Here is a script you could use to set default passwords and enable SSH password authentication.

#cloud-config
chpasswd:
 list: |
   root:stackops
   ubuntu:stackops
 expire: False
ssh_pwauth: True
Score:0
us flag

What you're looking for is cloud-init. During instance creation your user-data is injected by the openstack metadata service (neutron) with all your required users, passwords, etc. You need to make sure that your base image has the cloud-init services enabled so they'll start during boot and can contact the metadata service.

Philip Scot avatar
nf flag
i will check that and i will write you back with some updates after i test this :)
Philip Scot avatar
nf flag
ok, so there is no way to make a user and passowrd to that user from Horison :/ I manage to make it work with user_data file with both methods ( cloud init and detachable drive (there is a property in server create command) ) And basically i need to create a new site with fields for username and password which need to be translated to file and than script should run server create command with this file :/ also retreive password does not retreive the password you enter :/ O and better crypt the password with some tool because you can see it from metadata or mounting the CD Drive :D
us flag
You can also provide the user-data in Horizon when creating an instance.
Philip Scot avatar
nf flag
True. But the user need to write a _script_ him self on the creation of the instance :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.