When performing provisioning to a Webserver, it is necessary to bounce the webserver instance at stage 1100 to have the new certificate take effect. These are some of the macros that can be used to assist in determining the instance name to bounce so it can be passed as an argument to a bounce script.
Macros can be used in SSH Injection Workflow. It is easiest in naming the application objects the same as the service that needs to be restarted or storing the name of the service in the Description field of the object. Either way works, so that the service name can be retrieved by the macro and passed to the apachectl command or service bounce script by the SSH Injection Workflow.
The TPP application object support tab contains the attribute’s whose values can be retrieved with macros.
This table outlines some of the useful macro commands that can be used to retrieve the attribute values with SSH injection workflow
Application Object Attribute
Example Expanded Macro Output
|DN of Application||"$SelfDN$"||\VED\Policy\Servers\Ubuntu10\MyPEMapplication|
|Certificate File location||$Config[$SelfDN$,"Certificate File"]$||/tmp/MYPEM.cer|
|Private Key File location||$Policy[$SelfDN$,"Private Key File"]$||/tmp/MYPEM.priv|
|Application Name||$CN[$Config[$SelfDN$,Owner Object]$]$||MyPEMapplication|
The service bounce script arguments can vary. They may be called from the Stage 1100 SSH injection workflow. This is an example use of a macro in a SSH injection command using the application description as an argument to the apachectl-bounce-script.
$Config returns attribute values assigned directly to an object whereas $Policy returns the effective value whether set locally or by policy. $Policy is the more expensive operation of the two, so $Config should be used where values are only set on the object.