Dhananjay Rajmane
Dhananjay Rajmane

Reputation: 23

How to inject file for instace(Linux) , Which is in Running state

In Openstack, I launced image and afetr launching image I want to inject a file for that instace. Is it possible in openstack ? If yes then how ?

Upvotes: 1

Views: 281

Answers (1)

Saverio Proto
Saverio Proto

Reputation: 1145

Yes it possible using cloud init.

Cloud init already injects some files for you, for example it manages the ssh config so that you can login with your keypair after boot.

Look at this example in the section Writing out arbitrary files: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#yaml-examples

You have to create the yaml file based on this example and add it to user data when launching the instance in openstack.

Upvotes: 0

Related Questions