Info: SSH Injection Workflow Macros for Bouncing Webserver Instances


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.

More Information

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
Application Description $Config[$SelfDN$,"Description"]$ MyPEMApplicationPort443
Certificate File location $Config[$SelfDN$,"Certificate File"]$  /tmp/MYPEM.cer
Private Key File location $Policy[$SelfDN$,"Private Key File"]$ /tmp/MYPEM.priv
Certificate Name $CN[$Config[$SelfDN$,Certificate]$]$ mycertificate.venafi.com
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.

/opt/apache/bin/apachectl-bounce-script $Config[$SelfDN$,"Description"]$

$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.









1 comment

Please sign in to leave a comment.