npm package: @itentialopensource/versa-create-post-staging-template
Description: Versa Create Post Staging Template
Author: Itential Artifacts
Latest version: 0.0.8-2023.1.0

<!-- This is a comment in md (Markdown) format, it will not be visible to the end user -->

<!-- Update the below line with your Pre-Built name -->
# Versa Create Post Staging Template

<!-- Leave TOC intact unless you've added or removed headers -->
## Table of Contents

* [Overview](#overview)
* [Requirements](#requirements)
* [Features](#features)
* [How to Install](#how-to-install)
* [How to Run](#how-to-run)
* [Additional Information](#additional-information)

## Overview

This pre-built is used to create a post staging template in Versa Director.
<!-- Write a few sentences about the Pre-Built and explain the use case(s) -->
<!-- Avoid using the word Artifact. Please use Pre-Built, Pre-Built Transformation or Pre-Built Automation -->
<!-- Ex.: The Migration Wizard enables IAP users to conveniently move their automation use cases between different IAP environments -->
<!-- (e.g. from Dev to Pre-Production or from Lab to Production). -->

<!-- Workflow(s) Image Placeholder - TO BE ADDED DIRECTLY TO GitLab -->
<!-- REPLACE COMMENT BELOW WITH IMAGE OF YOUR MAIN WORKFLOW -->
<!--

-->
<!-- REPLACE COMMENT ABOVE WITH IMAGE OF YOUR MAIN WORKFLOW -->

<!-- ADD ESTIMATED RUN TIME HERE -->
<!-- e.g. Estimated Run Time: 34 min. -->
<table><tr><td>
  <img src="./images/workflow.png" alt="workflow" width="900px">
</td></tr></table> 

_Estimated Run Time_: 1 minute

## Requirements

This Pre-Built requires the following:

<!-- Unordered list highlighting the requirements of the Pre-Built -->
<!-- EXAMPLE -->
<!-- * cisco ios device -->
<!-- * Ansible or NSO (with F5 NED) * -->
* Itential Automation Platform
  * `^2023.1`
* A running instance of the Itential OpenSource Versa Director adapter, which can be installed from [here](https://gitlab.com/itentialopensource/adapters/controller-orchestrator/adapter-versa_director).

## Features

The main benefits and features of the Pre-Built are outlined below.

Every Itential Pre-built is designed to optimize network performance and configuration by focusing on reliability, flexibility and coordination of network changes with applications and IT processes. As the network evolves, Pre-builts allow customers to focus on effective management and compliance to minimize risks of disruption and outage that can negatively impact quality of service.

<!-- Unordered list highlighting the most exciting features of the Pre-Built -->
<!-- EXAMPLE -->
<!-- * Automatically checks for device type -->
<!-- * Displays dry-run to user (asking for confirmation) prior to pushing config to the device -->
<!-- * Verifies downloaded file integrity (using md5), will try to download again if failed -->


## How to Install

To install the Pre-Built:
<table><tr><td>
  <img src="./images/install.png" alt="install" width="800px">
</td></tr></table> 

* Verify you are running a supported version of the Itential Automation Platform (IAP) as listed above in the [Requirements](#requirements) section in order to install the Pre-Built.
* The Pre-Built can be installed from within App-Admin_Essential. Simply search for the name of your desired Pre-Built and click the install button (as shown below).

<!-- REPLACE BELOW WITH IMAGE OF YOUR PUBLISHED PRE-BUILT -->
<!--
<table><tr><td>
  <img src="./images/install.png" alt="install" width="600px">
</td></tr></table>
-->
<!-- REPLACE ABOVE WITH IMAGE OF YOUR PUBLISHED PRE-BUILT -->

<!-- OPTIONAL - Explain if external components are required outside of IAP -->
<!-- Ex.: The Ansible roles required for this Pre-Built can be found in the repository located at https://gitlab.com/itentialopensource/pre-built-automations/hello-world -->

## How to Run

Use the following to run the Pre-Built:


The pre-built can be run as a standalone or as part of a parent job. 
- To run it as a standalone job, run the respective job from Operations Manager with the necessary JSON form. 
- The workflow or the job can also be used as part of another parent job.

The description of the formdata needed by the prebuilt is given below:
The required values to be passed on are:

<table><tr><td>
  <img src="./images/initialForm.png" alt="initialForm" width="500px">
</td></tr></table> 

**Versa Adapter ID:** The adapter of Versa installed on IAP.

<table><tr><td>
  <img src="./images/phase1-1-form.png" alt="phaseForm1" width="400px">
</td></tr></table> 

**Name:** Name of the post-staging template.\
**Organization:** The organization to be attached to the template.\
**Device type:** To choose the type of device and solution tier.

<table><tr><td>
  <img src="./images/phase1-2-form.png" alt="phaseForm1" width="400px">
</td></tr></table> 

**Redundant pair:** Select this option to enable automatic PostStaging Template creation for a redundant pair of device in the same site. When enabled, appropriate information for the redundant device will need to be provided.\
**Analytics cluster:** Select the analytics clusters that will be used to send availability and usage metrics from the CPEs.

<table><tr><td>
  <img src="./images/phase2-1-form.png" alt="phaseForm2" width="800px">
</td></tr></table> 

**Controller Name:** Select all the controllers to which the device will establish control tunnels to.\
**Security services:** Select appropriate security services to be enabled for the device from the selection available. Appropriate configuration constructs will be enabled based on selection.\
**WAN Interfaces:** Provide the information about WAN interface(s) to be used for the CPE. Interface number, Network name, IP address type, VLAN etc. will be required to be provided from the below options. Some of the values can be "variable-ized".

<table><tr><td>
  <img src="./images/phase2-2-form.png" alt="phaseForm2" width="800px">
</td></tr></table> 

**LTE Interfaces:** Provide the information about LTE interface(s) to be used for the CPE.\ 
Redundant Pair WAN Interfaces: Provide information about the WAN interface for the redundant device. Enabled automatically if Redundant pair option was selected in previous form.\
**LAN Interfaces:** Provide the information about LAN interface(s) to be used for the CPE. Interface number, Network name, IP address type, VLAN, DHCP server/relay etc. will be required to be provided from the below options. Some of the values can be "variable-ized"
<table><tr><td>
  <img src="./images/phase2-3-form.png" alt="phaseForm2" width="800px">
</td></tr></table> 

**Wifi Interfaces:** Provide the information about WiFi interface(s) to be used for the CPE.

<table><tr><td>
  <img src="./images/phase3-form.png" alt="phaseForm3" width="500px">
</td></tr></table> 

**Static routes:** Provide details of Static routes to be created. Select appropriate Routing instance, the prefix and next hop information.\
**BGP:** Provide details of BGP neighbors to be configured for the CPE. eBGP is setup by default if the iBPG option is not selected. Separate BGP configurations can be created per Network by selecting appropriate network from the dropdown, and selecting Local ASN, Remote ASN, Neighbor IP Address and if BFP is to be enabled for that neighbor. Some of these values can be "variable-ized" in the template.\
**OSPF:** Provide details of OSPF routing per Network. Select the Network from the drop down and provide the Area number and select BFD if needed.

<table><tr><td>
  <img src="./images/phase4-form.png" alt="phaseForm4" width="600px">
</td></tr></table> 

**Split tunnels:** Split tunnels provide direct paths between LAN and WAN segments without using SDWAN overlay tunnels. DIA option on a split tunnel provides direct internet access over split tunnel by performing source NAT on internet bound traffic from LAN routing instance. GW option provides central DIA on hub sites by advertising default route to all spoke sites to attract internet bound traffic from spokes to the hub site. When both DIA and GW options are not selected, split tunnel routes traffic between MPLS l3vpn and SDWAN device natively on underlay network.\
**Load balance split tunnels?** If enabled, sessions will be balanced between all the WAN interfaces selected for split tunnel. If not selected, the WAN interfaces will be used in the order of priority listed, with the top used by default for all Internet bound traffic and followed by the next one as fallback.\
**Site to site tunnels:** IPSec site to site tunnels to be created from the CPE to another CPE.
<table><tr><td>
  <img src="./images/phase5-form.png" alt="phaseForm5" width="800px">
</td></tr></table> 

**Inbound NAT:** DNAT rules to be created for services hosted on the LAN network to be available from the WAN network.

## Versa instance

The above created template can be verified on the versa instance by logging in using the credentials provided.\
After logging in, select the workflows tab, choose 'Template' and then 'Templates' from the left pane to view all the templates created.

<table><tr><td>
  <img src="./images/Post-staging-templateList-versa.png" alt="Post-staging-templateList-versa" width="800px">
</td></tr></table> 

Click on the template created to verify all the varibles such as controllers, device type, organization etc.,
<table><tr><td>
  <img src="./images/Post-staging-template-versa.png" alt="Post-staging-template-versa" width="800px">
</td></tr></table> 

## Additional Information

Please use your Itential Customer Success account if you need support when using this Pre-Built.