To model a Microsoft Azure environment, log in with an Azure cloud project and specify the Azure-specific information in a blueprint.
About this task
You cannot use SSH keys to secure images on Azure. Only user name and password security
is supported.
Beginning with version 6.2.1.1, you can use Windows and Linux images on
Azure.
Procedure
- Create the blueprint. See Creating files with the blueprint designer.
- Add virtual images from the palette to the blueprint. The images in the palette are a subset of the images in the Azure Virtual Machines
Marketplace and custom images that you registered with the cloud discovery service. If you add
custom images, you must select images that are part of a single resource group.
Beginning in
version 6.2.1.1, you can specify a custom name for the virtual machine disk with the
os_disk_name property. If you do not specify this property and a disk already
exists with the name of the virtual image, or if you specify the name of an existing disk, the
engine creates a disk with a different name.
Similarly, beginning in version 6.2.1.1, you can
specify whether to keep or delete the virtual disk when you delete the environment by setting the
preserve_os_disk property. For example, the following code names the storage
disk
TempStorageDisk and deletes it when the environment is
deleted:
linux_image_A:
type: OS::Nova::Server
properties:
name: "My image A"
image: "MyImage123"
metadata:
azure_properties:
resource_group: { get_param: resource_group }
storage_account: { get_param: storage_account }
preserve_os_disk: false
os_disk_name: "TempStorageDisk"
To
delete disks from your storage account manually, open the Azure web portal, open your
storage account, click Blobs, click vhds,
click a virtual disk, and then click Delete.
The palette shows
resources from the currently connected account, which is shown in the upper-right corner
of the page. For more information on working with the blueprint designer, see Editing blueprint diagrams and Editing blueprint source code.
- Add other Azure resources, such as networks, from the palette to the blueprint. Blueprints can contain only custom images, networks, and storage accounts from the same
resource group. You can determine which resource group contains these resources through the Azure
web portal or command-line client.
- Optional: Specify how to install the IBM® UrbanCode™ Deploy agent. In version 6.2.1, the engine always uses the cloud-init package.
Therefore, in version 6.2.1, only images that have the cloud-init package
preinstalled are supported. In version 6.2.1.1 and later, you can use the
use_cloudinit property to specify how to install the agent:
- Apply a security group to each image. The security group determines which ports are open on the
images, so you must use a security group that has the appropriate ports open for agent
communication. See Firewall and communication configuration.
- If the image requires a floating IP address, at the bottom right of the image, click
the IP address icon.
- Optional: Set the default resource group and storage account in the blueprint parameters, as in
the following example code:
resource_group:
type: string
description: 'The Azure resource group'
default: 'MyStorageGroup'
storage_account:
type: string
description: 'The Azure storage account'
'MyStorageAccount'
- Create a configuration file and externalize properties to the file. See Editing configuration files.
- In the configuration file, ensure that the core OpenStack types are mapped to Azure
types. The configuration file must have mapping similar to the following
code:
resource_registry:
OS::Nova::Server : IBM::Azure::Server
OS::Neutron::Port : IBM::Azure::NetworkInterface
OS::Neutron::FloatingIP : IBM::Azure::PublicIP
What to do next
Add the components of your application to the blueprint. See Deploying components with blueprints.