I really liked the post “Rapid deployments with IBM
SmartCloud Provisioning” that explains
how simple and fast it is to deploy instances using SmartCloud Provisioning.
But if is also important to have a flexible way for passing parameters during the deployment in order to configure and/or customize the deployed instances.
It is inspired to the Amazon EC2 instance metadata and here you can find an interesting article on it: http://alestic.com/2009/06/ec2-user-data-scripts
The “user_data” field is a free text field so for example it can contain:
- comma separated values for simple configurations
- multi-part MIME format for complex configurations, where each part, identified by a proper content-type, is related to a specific customization.
The launched instance can easily retrieve the user data field invoking the predefined URL http://169.254.169.254/latest/user-data and processes it according the needs.
An interesting scenario is the capability of passing directly one or more scripts to be invoked at deployment time to have a really dynamic configuration. In this way, a new image can be configured/customized at deployment time.
If you want to have more information on user-data capabilities and examples take a look at the Ubuntu cloud-init component described here https://help.ubuntu.com/community/CloudInit
For further information about IBM SmartCloud Provisioning and Image Construction and Composition Tool see IBM SmartCloud Provisioning Information Center.