WFA can not only be used to automate tasks related to Storage controllers or servers but just about any task that requires manual effort, even the WFA related tasks.
Here is an example of how to share the contents on one WFA with multiple WFA instances. This is a manual task of periodically getting the dar from the primary WFA server and importing the dar file on every WFA server. Can this be automated using a workflow trigger. Of course. Let’s see how
The workflow design is very simple.
- A Master/Primary WFA (WFA_master) server exports all its contents in a dar file.
- WFA_master has the list of Secondary WFA Servers (WFA_sec)and their credentials.
- Workflow executes and imports the content dar in all the secondary WFA servers.
Attaching the workflow dar, Data Source Type script dar and A JSON data file which does this.
On Primary WFA Server:
Prerequisites:
- You need PowerShell 3.0 on the Primary WFA server. The Command code and DataSource Type script uses Posh cmdlets which are only available from PoSH3.0 and above. WFA is fully supported on PoSH3.0. Windows Server 2012 by default has PoSH3.0, Windows Server 2008 can be upgraded. Windows server 2003 it will NOT work.
- Minimum WFA version on all WFA servers should be WFA2.2
Steps:
- Import the attached DAR files into your primary WFA Server. It adds the follwoing to your WFA server:
- Copy the file wfa.json at folder location C:\temp. This is your Data file having the details of the secondary WFA servers.
- Now open file C:\temp\wfa.json in some editor like Notepad++. It’s a JSON file with keys: hostname, ipv4address and https_port. Every entry in this JSON file is secondary WFA server Hostname, ipv4Address and Https port (default 443). Modify the entries according to your setup. It’s very simple.
- Create a Data Source of type "WFA Data Source". Put any dummy values for IP, Hostname and ports etc. The Data acquisition script doesn't make use of any of those. The script gets its data from c:\temp\wfa.json file and puts them in WFA Database. This code is also an example of how to acquire data from a JSON file.
- Add credentials of a WFA admin/architect user into your master WFA with the following:
Match: Exact
Type: Other
Name/IP: localhost
Username:<username of a WFA admin/architect role>.
Password:<user password>
- Add credentials of all the secondary WFA servers into Master WFA server.
Match: Exact
Type: Other
Name/IP: <Secondary WFA Server IP>
Username:<username of a WFA admin/architect role>.
Password:<user password>
All set!!
Workflow Execution:
- Now execute the workflow "Workflow to Sync contents of Master WFA to All secondary WFA servers".
- You can open to see the comamnd code and workflow details. "Workflow to Sync contents of Master WFA to All secondary WFA servers". Modify it, play with it as you wish.
sinhaa
WFA
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.