Ask Your Question
0

Is there a way to inject files into VM through heat ?

asked 2014-09-15 12:02:03 -0500

prat gravatar image

Is is possible to inject files into a vm instance through heat. I am looking for a heat equivalent of "--file" command of nova boot.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-10-24 01:48:52 -0500

kinsu gravatar image

Hi tried this but failed with No content found in the "files" section for get_file

2014-10-23 15:57:35.216 40973 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/heat/engine/parser.py", line 373, in validate 2014-10-23 15:57:35.216 40973 TRACE heat.engine.parser result = res.validate()

do i need a specific file format? or specific path?

edit flag offensive delete link more
0

answered 2014-09-15 12:09:09 -0500

larsks gravatar image

According to the documentation for OS::Nova::Server, you can use the personality property:

personality : Map

A map of files to create/overwrite on the server upon boot. Keys are file names and values are the file contents.

This is exactly equivalent to the nova cli --files option.

You can also create files via a cloud-init user-data script passed in using the user_data property.

edit flag offensive delete link more

Comments

Hi, I tried personality: Map, but what exactly is happening is, it is just copying the name of the file in the temp file.

for ex : personality: {"/etc/passwd": /root/passwd}

it will just copy the text "/root/passwd" into file "openstack/content/0000". it's not copying the content of original file

prat gravatar imageprat ( 2014-09-15 13:00:51 -0500 )edit

Please tell me, if I am doing anything wrong or what is the correct to way to execute it.

prat gravatar imageprat ( 2014-09-15 13:01:21 -0500 )edit

If you are launching with the heat cli then you can use the get_file function to include the contents of a local file when you create the stack, so you can try:

personality: {"/etc/passwd": {get_file: "/root/passwd"}}
Steve Baker gravatar imageSteve Baker ( 2014-09-18 22:23:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-15 12:02:03 -0500

Seen: 6,170 times

Last updated: Sep 15 '14