Editing a Resource Template
You can edit a resource template from the resource templates list in the GUI.
- Procedure
- Select .
- Select a resource template from the list.
You can use the Type and Scope to filter the list of resource templates.
- Click the
General tab and edit the
configuration fields as required.
Some resource templates have properties that accept passwords. Passwords can be specified as clear or
- Click one of the following action buttons. The action performed by a button applies only to the tab being edited.
Option Action Save Save changes to the database. Revert Discard changes and revert to the last saved state. Restore Default Restore default values for fields that have a default. If a field does not have a default, the value stays as is. The Save and Revert buttons are disabled.If there are resource instances that depend on the modified resource template and if there are applications that use those resource instances, the Apply changes in resource template to runtime dialog is displayed.
- Perform the following steps in the
Apply changes in resource template to runtime dialog box.
- In the
Reinstall Resource Instances section, select the resource instances that you want to reinstall. These are resource instances created from this resource template or other resource templates that depend on the modified resource template.
Tip: If the resource template is heavily used, select the resource instances in the Reinstall Resource Instances section (and not select the related applications in the Restart Applications section). Restart all the nodes where the related applications are running.
- In the
Restart Applications section, select the applications that you want to restart.
If applications have more than 1000 entities that need to be restarted, it is recommended that you restart all the related nodes instead of applications as it may take a long time to generate the huge number of tasks. The applications start using the new resource instance.
If an application have more than 1000 entities, the application cannot be selected in Restart Applications section and the following warning message is displayed:
Warning: Since a large number of entities needs to be restarted due to resource instance reinstallation nodes will be restarted immediately after resources instances have been reinstalled
- In the
Restrict Nodes section, select the nodes where you want the resource instances reinstalled and the applications restarted.
If an application has more than 1000 entities, the following warning is displayed:
Warning: all selected Nodes will be restarted immediately after Resource Instances have been re-installed
- Click Save.
- In the
Reinstall Resource Instances section, select the resource instances that you want to reinstall. These are resource instances created from this resource template or other resource templates that depend on the modified resource template.
CLI
- Procedure
- In the data file, specify the type of the resource template in the
xsi:type
attribute.<ResourceTemplate xsi:type="amxdata:JdbcResourceTemplate" name="JdbcResource" description="This is a new Jdbc Resource" maxConnections="10"> <Direct xsi:type="amxdata:Direct" dbUrl="jdbc:hsqldb:hsql://localhost:1234/jdbcRtDb" jdbcDriver="org.hsqldb.jdbcDriver" isTransactional="false" loginTimeOut="60000"/> <InlineCredentials username="a" password="a"/> </ResourceTemplate>
- In the
AMXAdminTask element, set the
action attribute to
edit and the
objectSelector attribute
ResourceTemplate|Environment/ResourceTemplate|Environment/Application/ResourceTemplate/>.
<AMXAdminTask action="edit" objectSelector="ResourceTemplate|Environment/ResourceTemplate|
Environment/Application/ResourceTemplate"> - If the total number of entities in an application is more than 1000, specify:
options="handle-dependencies"
The related nodes are restarted automatically; applications are not restarted.