Modeling environments for SoftLayer

To model a SoftLayer® environment, log in with a SoftLayer cloud project and specify the information that is specific to SoftLayer in a blueprint.

Before you begin

About this task

In version 6.2.1.1 and later, you can use the use_cloudinit property to specify how to install the agent. By default, public SoftLayer images use a storage account to install the IBM UrbanCode Deploy agent because public SoftLayer images do not include the cloud-init package.

Procedure

  1. Create the blueprint. See Creating files with the blueprint designer.
  2. Add resources from the palette to the blueprint, such as virtual images. The palette shows resources from the currently connected cloud, 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.
  3. Optional: In the blueprint source code, in the metadata property for the resource, specify any virtual image tags. To parametrize the data, you can specify a list of values. You can also specify a series of comma-separated strings. For example, to specify the parameterized tags blue and mysql_database, the code looks like the following example:
    resources:
      myImageType:
        type: OS::Nova::Server
        properties:
          name: myImageType
          image: myImageName
          flavor: {get_param: flavor}
          key_name: {get_param: key_name}
        metadata:
          tags: ['blue', 'mysql_database']
    If you do not plan to reuse the tags as parameters, the code looks like the following example:
    resources:
      myImageType:
        type: OS::Nova::Server
        properties:
          name: myImageType
          image: myImageName
          flavor: {get_param: flavor}
          key_name: {get_param: key_name}
        metadata:
          tags: blue, mysql_database
  4. 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 private images that have the cloud-init package preinstalled are supported, because you cannot install the cloud-init package on public images. In version 6.2.1.1 and later, you can use the use_cloudinit property to specify how to install the agent:
    • In version 6.2.1.1 and later, by default, public images use the SoftLayer storage account to install the IBM UrbanCode Deploy agent. A script in the storage account installs the IBM UrbanCode Deploy agent when you provision an image.
    • In version 6.2.1.1 and later, by default, private (custom) images use the cloud-init package to install the IBM UrbanCode Deploy agent.
    • To specify whether to use the storage account or the cloud-init package, set the use_cloudinit property. For example, to use the storage account, set the use_cloudinit property to false, as shown in the following code:
      image_A:
        type: OS::Nova::Server
        properties:
          name: "My image A"
          image: "MyImage123"
        metadata:
          ec2_properties:
            storage_account: { get_param: storage_account }
            storage_datacenter: { get_param: storage_datacenter }
            use_cloudinit: false
  5. Create a configuration file, and externalize properties to the file. See Editing configuration files.
  6. In the configuration file, ensure that the core OpenStack types are mapped to SoftLayer types. The configuration file must have mapping that is similar to this code:
    resource_registry:
      OS::Nova::Server : IBM::SoftLayer::Server

What to do next

Add the components of your application to the blueprint. See Deploying components with blueprints.


Feedback