[openstack-dev] stored userdata
Steven Hardy
shardy at redhat.com
Fri Mar 7 14:01:20 UTC 2014
On Fri, Mar 07, 2014 at 05:05:46AM +0000, Hiroyuki Eguchi wrote:
> I'm envisioning a stored userdata feature.
> < https://blueprints.launchpad.net/nova/+spec/stored-userdata >
>
> Currently, OpenStack allow user to execute script or send configuration file
> when creating a instance by using --user-data /path/to/filename option.
>
> But,In order to use this option, All users must input userdata every time.
> So we need to store the userdata in database so that users can manage userdata more easily.
>
> I'm planning to develop these Nova-APIs.
> - nova userdata-create
> - nova userdata-update
> - nova userdata-delete
> - nova userdata-show
> - nova userdata-list
>
> Users can specify a userdata_name managed by Nova DB or /path/to/filename in --user-data option.
>
> - nova boot --user-data <userdata_name or /path/to/filename> ...
>
>
> If you have any comments or suggestion, please let me know.
> And please let me know if there's any discussion about this.
Have you considered instead using a heat template to specify the userdata?
Arguably this could provide a simpler and more flexible interface, because
the userdata can be eaily version controlled, for example via git.
https://github.com/openstack/heat-templates/blob/master/hot/F20/WordPress_Native.yaml#L81
Also I'd like to know more about the use-case requiring update of userdata
- my understanding is that it it cannot be updated, which makes sense
considering the most likely consumer of the userdata is cloud-init, which
is a run-once tool.
Heat works around this by providing access to resource Metadata (this is in
addition to the metadata key/value pairs made available via the nova
metadata API), which can be defined in the template separately from the
user_data and changes can be polled for (e.g via the heat-cfntools cfn-hup
agent, or the tripleo os-collect-config tool).
We use this method to enable configuration changes to an existing instance
(either an OS::Nova::Server or AWS::EC2::Instance heat resource), so it
would be interesting understand if Heat may satisfy your use-case (and if
not, why).
Thanks,
Steve
More information about the OpenStack-dev
mailing list