Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Howto execute one global script when VM creation/boot in OpenStack

Hi,

I need to execute one global script when VM creation/boot in OpenStack. Example: openstack server create myserver ... Then that the OpenStack instance execute one script that is the same for all this OpenStack instance.

I do not mean to use "--user-data", because this is for apply one custom (and local) script.

How do I do this?

Regards, Cesar Jorge

Howto execute one global script when VM creation/boot in OpenStack

Hi,

I need to execute one global script when VM creation/boot in OpenStack. Example: openstack server create myserver ... Then that the OpenStack instance execute one script that is the same for all this OpenStack instance.

I do not mean to use "--user-data", because this is for apply one custom (and local) script.

How do I do this?

One example of this is the following:

I have one OpenStack enviroment. With many tenants, many VM by tenant, multiple projects.

Then, for all VMs for this OpenStack enviuronment, when I create/boot one other VM (from one image without personalizations, without sensible information), then always need do the same tasks, example: curl -o /path/generalcert.cert http://myprivateurl/generalcert.cer echo "Welcome private banner" > /etc/motd etc.....

For to do these tasks: - I can use --user-data "myprovisionscript.sh". But, all people working in the same OpenStack environment, need to use same script, and known it, and maintain. - I need (configuring of any form the OpenStack Server), that this common script run transparently for all users when any user create/boot any instance, without specify --user-data, only using "openstack server create myserver ...".

I read a bit that exist "meta-data", "vendor-data", etc. I do not know if it is possible to use this to add a script that always runs when create/boot one VM.

Regards, Cesar Jorge

Howto execute one global script when VM creation/boot in OpenStack

Hi,

I need to execute one global script when VM creation/boot in OpenStack. Example: openstack server create myserver ... Then that the OpenStack instance execute one script that is the same for all this OpenStack instance.

I do not mean to use "--user-data", because this is for apply one custom (and local) script.

How do I do this?

One example of this is the following:

I have one OpenStack enviroment. With many tenants, many VM by tenant, multiple projects.

Then, for all VMs for this OpenStack enviuronment, when I create/boot one other VM (from one image without personalizations, without sensible information), then always need do the same tasks, example: curl -o /path/generalcert.cert http://myprivateurl/generalcert.cer echo "Welcome private banner" > /etc/motd etc.....

For to do these tasks: - I can use --user-data "myprovisionscript.sh". But, all people working in the same OpenStack environment, need to use same script, and known it, and maintain. maintain for all. - I need (configuring of any form the OpenStack Server), that this common script run transparently for all users when any user create/boot any instance, without specify --user-data, only using "openstack server create myserver ..."....". In this way, that these common tasks are maintained by the OpenStack administrator.

I read a bit that exist "meta-data", "vendor-data", etc. I do not know if it is possible to use this to add a script that always runs when create/boot one VM.

Regards, Cesar Jorge