Creating a Resource Template

You can create a resource template from the GUI or by using the CLI.

GUI

Procedure

  1. Navigate to a resource templates list. Choose a starting point.
    Starting Point Procedure
    Shared Objects
    1. Click Shared Objects > Resource Templates.
    2. Click New.
    Hosts
    1. Click Infrastructure > Hosts > hostName > Resource Instances.
    2. Click New.

      You can use the Type and Scope to filter the list of resource templates.

    3. In the New Resource Instances window click new resource template.
    Nodes
    1. Click Infrastructure > Nodes > nodeName > Resource Instances.
    2. Click New.

      You can use the Type and Scope to filter the list of resource templates.

    3. In the New Resource Instances window click new resource template.
    Application
    1. Click Application > appName > Resource Templates.
    2. Click Resource Template link.
    3. Click New.

      Resource template created from the Application tab will have a scope to the application

    Dashboard
    1. Select Dashboards > Welcome Page.
    2. Click New Resource Template
  2. In the Add Resource Template dialog, select a resource type from the Type drop-down list.
    The dialog redraws with type-specific fields.
    Note: Ensure there is no resource template with the same name at the specified scope level.
  3. Use the slide bar to select a scope for the resource template.

    • When the slide bar is above Global, the resource template is created at global level to share across environments and applications.
    • When the slide bar is above Environment the resource template is created for a selected environment.
    • When the slide bar is above Application, the resource template is created for a selected application.
      Note: Select an environment to filter the list of applications in an environment.
  4. Edit the template configuration fields.
    The name of the resource template must not contain the colon (:) or ampersand (&) characters.
    Note: Ensure there is no resource template with the same name at the specified scope level.
  5. Click Save.

CLI

Procedure

  • You can either manually specify the scope of a resource template or import while creating an application.
    • Manual

      In the data file, specify the type of the resource template in the xsi:type attribute. The resource templates can be nested under Enterprise, or Environment, or Application to create them in the corresponding scope:

      <amxdata_base:Enterprise
      
      				<ResourceTemplate xsi:type="amxdata:JdbcResourceTemplate"  name="appJDBC1"
      						...
      				</ResourceTemplate>
      										
      									<Environment xsi:type="amxdata:Environment" name="DevEnvironment" >
      										...
      									<ResourceTemplate xsi:type="amxdata:JdbcResourceTemplate"  name="appJDBC1"
      										...
      									</ResourceTemplate>
      													
      												<Application xsi:type="amxdata:Application" name="nestedTestApp" resourceTemplatesScope="Application">
      												...		
      												<ResourceTemplate xsi:type="amxdata:JdbcResourceTemplate"  name="appJDBC1"
      												...
      												</ResourceTemplate>
      												</Application>
      
      									</Environment>
      </amxdata_base:Enterprise>

      In the AMXAdminTask element, set the action attribute to add and the objectSelector attribute to ResourceTemplate or Environment/ResoureceTemplate or Environment/Applicaiton/ResoureceTemplate:

      <AMXAdminTask action="add" 
      objectSelector="ResourceTemplate|Environment/ResourceTemplate|Environment/ Application/ResourceTemplate"/>

      See AMX AdminTask for more information.

    • Import

      When you create an application, it can import the resource templates from the DAA file.

      • Set the attribute ImportResourceTemplateNames="true"to import all resource templates from the application template.

      • To import select resource templates from the application template, specify each resource template separately in <ImportResourceTemplateName>
      • You can specify a scope to the resource template in resourceTemplatesScope. If no scope is mentioned, default scope is global.
      <Application xsi:type="amxdata:Application" name="app" importResourceTemplates="true"
      		resourceTemplatesScope="Global/Environment/Application">
      
        <ApplicationTemplate xsi:type="amxdata_reference:ApplicationTemplate_reference" 
          name="appTemplate"/>
      
      		<ImportResourceTemplateName>Httpclient_RT</ImportResourceTemplateNames>
      		<ImportResourceTemplateName>JDBC_RT</ImportResourceTemplateNames>
      
      </Application>			

      In the AMXAdminTask element, set the action attribute to add and the objectSelector attribute to ResourceTemplate|Environment/ResourceTemplate|Environment/Application/ResourceTemplate