Deploy Modes
Freeform Deploy Modes
In typical Data Center Blueprints, you can set the Deploy Mode of systems in Freeform. The available options are:
-
Deploy
-
Ready
-
Drain
-
Undeploy
However, in Freeform, you can define the configuration rendered when a system is in each mode.
You can use the Deploy Mode to conditionally render different configurations, such as whether to render routing protocol sessions or to indicate how particular route maps would render on a device. For example, if the device was set to “Drain” it would have specific Jinja to generate a configuration that removed the dynamic routing protocols.
The Deploy Mode of a system is exposed to the user in the Device Context, referenced in Config Templates as Jinja variables:
The Deploy Mode of neighboring systems are also available.
Changing the Deploy Mode of a system has no effect on the rendered configuration if it has not been referenced by the Config Template assigned to the system.
An example of how this could be accomplished in a Jinja Config Template is as follows:
{% if deploy_mode in ['deploy', 'drain'] %} {% include 'protocols.jinja' %} {% include 'policy_options.jinja' %} {% endif %}
In this example, both the protocols.jinja
and
policy_options.jinja
become active when a given node is in either the
‘deploy’ or ‘drain’ state. The behavior can be modified to suite individual needs.