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.

  1. Create the blueprint.
  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 Terraform blueprint diagram and Editing blueprint source code.
  3. Specify how to install the IBM® UrbanCode® Deploy agent:
    • 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.
    • By default, private (custom) images use the cloud-init package to install the IBM UrbanCode Deploy agent.
    • To use the storage account to install the agent on a private image, 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:
          softlayer_properties:
            storage_account: { get_param: storage_account }
            storage_datacenter: { get_param: storage_datacenter }
            use_cloudinit: false
  4. If you host your engine in a private SoftLayer network and provision images to that private network, set the storage_private_url to true, as shown in the following code:
    image_A:
      type: OS::Nova::Server
      properties:
        name: "My image A"
        image: "MyImage123"
      metadata:
        softlayer_properties:
          storage_private_url: true
  5. 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
  6. Create a configuration file, and externalize properties to the file.
  7. 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
    

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