Use Imgr blueprint files to perform tasks using the Imgr plug-in.
Before you can deploy a blueprint or onboard a server, you must supply contextual information such as resource types, locations, sites, and resource pools. In this section, we provide sample blueprints for providing the contextual information required. You can also include all contextual information in one blueprint. Once you have supplied this information in a blueprint, you can onboard a server and make configurations to the server. Blueprints are provided in this section for making configuration changes to servers such as creating a compute resource and updating a BIOS hyperthreading setting.
Create a resource type
The following is a sample blueprint to create a resource type using the Imgr plug-in. The blueprint is written in a YAML format.
tosca_definitions_version: cloudify_dsl_1_3
description: >
Deploys a Resource Type object
imports:
- http://fileserver-svc/data/.artifacts/types/types-6.3.0.yaml
- plugin:dell-imgr-plugin
inputs:
archive_url_prefix:
type:
description: prefix used to load blueprints from
default: http://filesvr:8080/blueprints
name:
type: string
description: Resource Type name
description:
type: string
description: Resource Type description
vendor:
type: string
description: Vendor
model:
type: string
description: Model
version:
type: string
description: Version
rkind:
type: string
description: Resource Type kind
rclass:
type: string
description: Resource Type Class
node_templates:
resource_type:
type: dell.nodes.imgr.resource.type
properties:
name: { get_input: name }
description: { get_input: description }
vendor: { get_input: vendor }
model: { get_input: model }
version: { get_input: version }
rkind: { get_input: rkind }
rclass: { get_input: rclass }
outputs:
capabilities:
rt_id:
description: This resource type id
value: { get_attribute: [ resource_type, rt_id ] }
Create a location
The following is a sample blueprint to create a location using the Imgr plug-in. The blueprint is written in a YAML format.
tosca_definitions_version: cloudify_dsl_1_3
description: >
Deploys a Location
imports:
- http://fileserver-svc/data/.artifacts/types/types-6.3.0.yaml
- plugin:dell-imgr-plugin
inputs:
name:
type: string
description: Location name
description:
type: string
description: Location description
global_location_id:
type: string
description: Global Location Id
coordinates:
type: string
description: Coordinates
address:
type: string
description: Address
node_templates:
location:
type: dell.nodes.imgr.location
properties:
name: { get_input: name }
description: { get_input: description }
global_location_id: { get_input: global_location_id }
coordinates: { get_input: coordinates }
address: { get_input: address }
outputs:
capabilities:
location_id:
description: This is location id
value: { get_attribute: [ location, location_id ] }
Create a BMC site
The following is a sample blueprint for creating a BMC site using the Imgr plug-in. The blueprint is written in a YAML format.
tosca_definitions_version: cloudify_dsl_1_3
description: >
Deploys a BMC Site Resource
imports:
- http://fileserver-svc/data/.artifacts/types/types-6.3.0.yaml
- plugin:dell-imgr-plugin
inputs:
# Base Resource attributes
imgr_svc_url:
type: string
description: Infra Mgr Svc URL
default: <URL:PORT>
bmp_did:
type: string
description: BMP deployment id
default: bmp_api_default
name:
type: string
description: name
description:
type: string
description: description
coordinates:
type: string
description: Coordinates
address:
type: string
description: Address
location_did:
type: string
description: Location Deployment Id
# Site specific attributes
bmp_attributes:
type: dell.types.imgr.bmp.siteAttrs
description: BMP Attributes
node_templates:
bmp:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: bmp_did }
location:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: location_did }
site:
type: dell.nodes.imgr.bmp.site
properties:
imgr_api:
url: { get_input: imgr_svc_url }
bmp_api: { get_capability: [ { get_input: bmp_did }, bmp_config ]}
name: { get_input: name }
description: { get_input: description }
coordinates: { get_input: coordinates }
address: { get_input: address }
location_id: { get_capability: [ { get_input: location_did }, location_id ] }
bmp_attributes: { get_input: bmp_attributes }
relationships:
- type: dell.relationships.depends_on_shared_resource
target: location
outputs:
site_id:
description: This sitename
value: { get_attribute: [ site, site_id ] }
capabilities:
site_id:
description: This site id
value: { get_attribute: [ site, site_id ] }
bmp_did:
description: This bmp did
value: { get_input: bmp_did }
Create a resource pool
The following is a sample blueprint to create a resource pool using the Imgr plug-in. The blueprint is written in a YAML format.
tosca_definitions_version: cloudify_dsl_1_3
description: >
Deploys a Resource Pool
imports:
- http://fileserver-svc/data/.artifacts/types/types-6.3.0.yaml
- plugin:dell-imgr-plugin
inputs:
imgr_svc_url:
type: string
description: Infra Mgr Svc URL
default: <URL:PORT>
site_did:
type: string
description: Site deployment Id
name:
type: string
description: Resource Pool name
description:
type: string
description: Resource Pool description
default_rp:
type: boolean
description: Default RP
default: false
node_templates:
site:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: site_did }
rp:
type: dell.nodes.imgr.resource.pool
properties:
imgr_api:
url: { get_input: imgr_svc_url }
site_id: { get_capability: [ { get_input: site_did }, site_id ] }
name: { get_input: name }
default_rp: { get_input: default_rp }
relationships:
- type: dell.relationships.depends_on_shared_resource
target: site
outputs:
rp_id:
description: This resource pool id
value: { get_attribute: [ rp, rp_id ] }
capabilities:
rp_id:
description: This resource pool id
value: { get_attribute: [ rp, rp_id ] }
Create a compute resource
The following is a sample blueprint to create a compute resource using the Imgr plug-in. The blueprint is written in a YAML format.
tosca_definitions_version: cloudify_dsl_1_3
description: >
Deploys a Compute controlled by DTIAS BMC.
imports:
- http://fileserver-svc/data/.artifacts/types/types-6.3.0.yaml
- plugin:dell-imgr-plugin
inputs:
# Base Resource attributes
imgr_svc_url:
type: string
description: Infra Mgr Svc URL
default: <URL:PORT>
name:
type: string
description: Compute name
description:
type: string
description: Compute description
resource_type_did:
type: string
description: Resource Type Deployment Id
resource_pool_did:
type: string
description: Resource Pool Deployment Id
global_asset_id:
type: string
description: Global Asset Id
public:
type: string
description: Is it public or not
astate:
type: string
description: Admin state
opstate:
type: string
description: Operational state
ustate:
type: string
description: Usage state
labels:
description: Labels
default: []
# Compute specific attributes
resource_attributes:
description: Resource Attributes
site_did:
type: string
description: BMP Site Deployment Id
node_templates:
bmp:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_capability: [ { get_input: site_did }, bmp_did ] }
rt:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: resource_type_did }
rp:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: resource_pool_did }
site:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: site_did }
compute:
type: dell.nodes.imgr.bmo.resource.Compute
properties:
imgr_api:
url: { get_input: imgr_svc_url }
bmp_api: { get_capability: [ get_capability: [ { get_input: site_did }, bmp_did ], bmp_config ]}
# Base Resource
name: { get_input: name }
description: { get_input: description }
resource_type_id: { get_capability: [ { get_input: resource_type_did }, rt_id ] }
rp_id: { get_capability: [ { get_input: resource_pool_did }, rp_id ] }
site_id: { get_capability: [ { get_input: site_did }, site_id ] }
global_asset_id: { get_input: global_asset_id }
public: { get_input: public }
astate: { get_input: astate }
opstate: { get_input: opstate }
ustate: { get_input: ustate }
labels: { get_input: labels }
# Compute Attributes
resource_attributes: { get_input: resource_attributes }
relationships:
- type: dell.relationships.depends_on_shared_resource
target: rt
- type: dell.relationships.depends_on_shared_resource
target: rp
outputs:
rclass:
description: Resource Class
value: COMPUTE
capabilities:
Invoke a change to the BIOS hyperthreading setting
The following is a sample blueprint to invoke a change to the BIOS hyperthreading setting on a compute resource, using the Imgr plug-in. The blueprint is written in a YAML format.
tosca_definitions_version: cloudify_dsl_1_3
description: >
Deploys a Compute controlled by DTIAS BMP.
imports:
- http://fileserver-svc/data/.artifacts/types/types-6.3.0.yaml
- plugin:dell-imgr-plugin
inputs:
# Base Resource attributes
imgr_svc_url:
type: string
description: Infra Mgr Svc URL
default: <URL:PORT>
name:
type: string
description: Compute name
description:
type: string
description: Compute description
resource_type_did:
type: string
description: Resource Type Deployment Id
resource_pool_did:
type: string
description: Resource Pool Deployment Id
global_asset_id:
type: string
description: Global Asset Id
public:
type: string
description: Is it public or not
astate:
type: string
description: Admin state
opstate:
type: string
description: Operational state
ustate:
type: string
description: Usage state
labels:
description: Labels
default: []
# Compute specific attributes
resource_attributes:
description: Resource Attributes
site_did:
type: string
description: BMP Site Deployment Id
node_templates:
bmp:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_capability: [ { get_input: site_did }, bmp_did ] }
rt:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: resource_type_did }
rp:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: resource_pool_did }
site:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: site_did }
compute:
type: dell.nodes.imgr.bmp.resource.Compute
properties:
imgr_api:
url: { get_input: imgr_svc_url }
bmp_api: { get_capability: [ get_capability: [ { get_input: site_did }, bmp_did ], bmp_config ]}
# Base Resource
name: { get_input: name }
description: { get_input: description }
resource_type_id: { get_capability: [ { get_input: resource_type_did }, rt_id ] }
rp_id: { get_capability: [ { get_input: resource_pool_did }, rp_id ] }
site_id: { get_capability: [ { get_input: site_did }, site_id ] }
global_asset_id: { get_input: global_asset_id }
public: { get_input: public }
astate: { get_input: astate }
opstate: { get_input: opstate }
ustate: { get_input: ustate }
labels: { get_input: labels }
# Compute Attributes
resource_attributes: { get_input: resource_attributes }
relationships:
- type: dell.relationships.depends_on_shared_resource
target: rt
- type: dell.relationships.depends_on_shared_resource
target: rp
outputs:
rclass:
description: Resource Class
value: COMPUTE
capabilities:
The following is a sample input golden configuration file for BIOS hyperthreading settings. The golden configuration file is in a JSON format.
{
"astate": "UNLOCKED",
"description": "",
"global_asset_id": "server12",
"imgr_svc_url": "<URL:PORT>",
"labels": [
{
"ccp_resourcepool_id": "rp_dp"
},
{
"ccp_deployment_type": "Resource"
}
],
"name": "server1",
"opstate": "ENABLED",
"public": "TRUE",
"resource_attributes": {
"compute_config": {
"bmo_server_spec": {
"bios": {
"attributes": {
"logicalProc": "Enabled"
}
}
}
},
"location": "gc",
"lom": {
"bmc_cred_secret_name": "compute_mgmt_server",
"bmc_endpoint": "https://10.239.60.12"
}
},
"resource_pool_did": "rp_dp",
"resource_type_did": "rt_compute_dp",
"site_did": "gc-site",
"ustate": "IDLE"
}