New Question

Any alternatives to multipart/mixed?

asked 2016-02-08 18:02:56 +0300

aburluka gravatar image

Can you please clarify me current status of multipart/mixed support in cloudbase-init? There is no implementation of it in sources. What is an current alternative to it if I would like to change user settings and execute scripts at the same time? Thank you and looking forward to your help.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-02-13 14:44:55 +0300

alexpilotti gravatar image

updated 2016-02-14 14:39:22 +0300

Hi, cloudbase-init has multi-part MIME support, mostly for Heat templates support.

Do you have a particular example scenario that you'd like to run?


the admin user and main keypair are passed through metadata (just pass a keypair to nova boot).

The rest can be possibly best accomplished by using a PowerShell script as userdata, for example:

net user foo secretpassword1 /add
net user bar secretpassowrd2 /add  

Invoke-WebRequest -UseBasicParsing -OutFile c:\local\path\bar.txt
edit flag offensive delete link more


Hello! Thanks for help, my wish scenario currently consists of: 1) setting users, passwords, ssh-keys 2) Execution of few commands 3) Writing some files (if it can be executed after that it would be wonderful)

aburluka gravatar imageaburluka ( 2016-02-13 14:50:02 +0300 )edit

Edit: added content in the main answer to preserve formatting

alexpilotti gravatar imagealexpilotti ( 2016-02-13 15:00:02 +0300 )edit

Thank you! Your solution is very elegant and fits me except few little obscurity. I would like to store passwords encrypted (cloud-init provides such functionality). And what about write_files analogue?

aburluka gravatar imageaburluka ( 2016-02-13 15:09:25 +0300 )edit

On Linux you can provided the hashed passwords that the OS can transparently add to /etc/shadow, this is not possible on Windows. The suggested way of handling passwords on OpenStack is to use "nova get-password", letting the guest generate the password and encrypt it via the keypair's public key.

alexpilotti gravatar imagealexpilotti ( 2016-02-14 14:34:16 +0300 )edit

Adding also an example for obtaining files in powershell

alexpilotti gravatar imagealexpilotti ( 2016-02-14 14:34:44 +0300 )edit

Your Answer


Add Answer

Question Tools

1 follower


Asked: 2016-02-08 18:02:56 +0300

Seen: 3,121 times

Last updated: Feb 14 '16