This wiki provides documentation regarding the design, capabilities and usage of the Saltstack Extension for APP-C. Saltstack is a an open-source config management tool that can be used in VNF management framework that allows provide an almost cli like set of tools in a structured form. Here Saltstack Server is called as salt master and clients are called as salt minions which run as agents in the client machine, Salt uses YAML config files, organized into templates or packages called states. In the target VNF it is necessary to have a) an SSH server, b) salt minions and dependencies and d) any necessary software that is specific to the VNF to run its functions. Many actions such as configure, restart, health check can be executed on the VNF by constructing a salt-states (set of sls files) that is executed by an Saltstack server on the VNF via SSH.
The Saltstack Extension for APP-C allows management of VNFs that support Saltstack through the following two additions :
- An APP-C Saltstack adapter : The Saltstack adapter is an OSGI bundle in the APP-C Karaf container that interacts with the Saltstack Server . It is essentially a set of SSH calls that performs two actions, submit job request for a salt-states to be executed, and get the results of the execution (in synchronous mode).
- Saltstack Directed Graph : The Saltstack Directed graph is generic DG that can be used to invoke salt-states via Saltstack (and hence any APP-C action, VNF actions map to salt-states) corresponding to an LCM action.
Details of each of these two aspects are listed below :
1. Saltstack Directed Graph (DG):
Field | Value |
---|---|
module | APPC |
rpc | saltstack-adapter-1.0 |
version | 1.0.0 |
method Execute |
The inputs that the saltstack DG expects in DG context memory are listed below.
Table 1: Input Parameters to the Saltstack Directed Graph | |||
---|---|---|---|
Variable Name | Description | Type | Comments |
User | Saltstack server's SSH UserName. | Mandatory | Should be provided by App-C |
Password | Saltstack server's SSH Password. | Mandatory | Should be provided by App-C |
HostName | Saltstack server's host name IP address. to post the request for execution and retrieve results (in synchronous mode) | Mandatory | Should be provided by App-C |
Port | Saltstack server's port to make SSH connection to. | Optional | Should be provided by App-C |
withRetry | Specify 'true' if you wanna connect to server with retry. | Optional | |
SlsName | Name of the SLS file (if SlsExec is true) | Mandatory | To be provided to App-C during Run-Time |
Timeout | Time Saltstack Server should wait before terminating session. Set large timeout if your SLS file will take large time to finish executing (in sec) | Optional | To be provided to App-C during Run-Time |
NodeList | Set name of VNFC (in salstack context minions) you want to execute the SLS file onto. If not specified, then this exec will be onto all VNFs managed by saltstack server. | Optional | To be provided to App-C during Run-Time |
EnvParameters | A JSON dictionary (stringified) listing the parameters to be passed to the Saltstack playbook | Optional | A JSON dictionary which should list key value pairs to be passed to the Salstack command to run SLS. These values would correspond to instance specific parameters that a playbook may need to execute an action. |
FileParameters | A JSON dictionary (stringified) listing file names and files to be created for Saltstack playbook | Optional | A JSON dictionary where keys are filenames and values are contents of files. The Saltstack Server will utilize this feature to generate files with keys as filenames and values as content. This attribute can be used to generate files that a SSL file may require as part of execution |