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.
- Configure the images for use with the blueprint designer. See Configuring private SoftLayer images.
- On the SoftLayer web portal, create an object storage account.
- Connect to SoftLayer. See Connecting to the SoftLayer cloud.
- Connect the blueprint design server to the server. See Connecting the blueprint design server to the server.
- Log in to the blueprint designer.
-
At the top of the page, select the cloud project and region to use.
-
Create the blueprint.
See Creating files.
-
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 diagram and Editing blueprint source code.
-
Specify how to install the UrbanCodeâ„¢ Deploy agent:
- By default, public images use the SoftLayer storage account to install the UrbanCode Deploy agent. A script in the storage account installs the UrbanCode Deploy agent when you provision an image.
- By default, private (custom) images use the
cloud-init
package to install the 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**
-
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**
-
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
andmysql_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**
-
Create a configuration file, and externalize properties to the file.
-
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 : HCL::SoftLayer::Server
```
Add the components of your application to the blueprint. See Deploying components with blueprints.