linux_image_A:
type: OS::Nova::Server
properties:
name: "My image A"
image: "MyImage123"
metadata:
vmware_properties:
destination_folder: "/MyImageFolder/MyNewImages"
multipart:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: cloud_config}
subtype: cloud-config
cloud_config:
type: OS::Heat::CloudConfig
properties:
cloud_config:
users:
- default
- name: "user_ID"
lock-passwd: true
sudo: ALL=(ALL) NOPASSWD:ALL
ssh-authorized-keys:
- { get_param: key_name }
parameters:
key_name: "ssh-rsa s1AAB3Nza45yc2EA27AADAQADDABAQC jsmith@example.com"
linux_image_B:
type: OS::Nova::Server
properties:
user_data_format: SOFTWARE_CONFIG
user_data: {get_resource: multipart}
Ensure that the resource name of the OS::Heat::MultipartMime resource is specified in the user_data: {get_resource: multipart} property in the OS::Nova::Server resource.
cloud_config:
type: OS::Heat::CloudConfig
properties:
cloud_config:
users:
- default
- name: "user_ID"
lock-passwd: true
sudo: ALL=(ALL) NOPASSWD:ALL
ssh-authorized-keys:
- { get_param: key_name }
parameters:
key_name: "ssh-rsa s1AAB3Nza45yc2EA27AADAQADDABAQC jsmith@example.com"
linux_image_B_cloudinit_mime:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: ucd_agent_install_linux }
- config: {get_resource: cloud_config}
subtype: cloud-config
The OS::Heat::MultipartMime resource resembles the following code:
multipart:
type: OS::Heat::MultipartMime
properties:
parts:
- config: {get_resource: cloud_config}
subtype: cloud-config
- config: {get_resource: ucd_agent_install_linux }
$userAdd = "net user user_name password/add"
$adminGroupAdd = "net localgroup Administrators user_name/add"
Invoke-Expression "$userAdd"
Invoke-Expression "$adminGroupAdd"
You
can select another user name and password. The ucd_agent_install_win resource begins with the following
code: ucd_agent_install_win:
type: OS::Heat::SoftwareConfig
properties:
config:
str_replace:
template: |
#ps1_sysnative
$userAdd = "net user user_name password/add"
$adminGroupAdd = "net localgroup Administrators cloud-user/add"
Invoke-Expression "$userAdd"
Invoke-Expression "$adminGroupAdd"
The Windows_image_name resource begins with the following code:
Windows_image_name:
type: OS::Nova::Server
properties:
networks:
- port: { get_resource: Windows_image_port }
user_data_format: RAW
user_data: {get_resource: ucd_agent_install_win}
resource_registry:
OS::Nova::Server : IBM::VCenter::Server
OS::Neutron::Port : IBM::VCenter::Port
OS::Neutron::Net : IBM::VCenter::Network
Add the components of your application to the blueprint. See Deploying components with blueprints.