Currently I consider this SDK very experimental, and do not recommend use in production deployments without thoroughly testing. The purpose of this module is mostly to demonstrate the API functionality of the FLEX platform, and actually contains very few actionable functions.
For now, clone this repo and import the module manually via:
Import-Module ./path/FLEX/flex.psm1Or, run the provided InstallFLEX.ps1 script.
Unblock-File .\InstallFLEX.ps1
.\InstallFLEX.ps1Which gives you a simple install menu.
------
1. C:\Users\user\Documents\PowerShell\Modules
2. C:\Program Files\PowerShell\Modules
3. c:\program files\powershell\7\Modules
4. C:\Program Files (x86)\WindowsPowerShell\Modules
5. C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
------
Select Install location:This module requires Powershell 4.x or above and was developed on PowerShell Core 7. After importing, you can connect to the Silk Flex Platform using a conventional PowerShell credential object to acquire an auth token.
$creds = get-credential
Connect-FLEX -server 54.102.19.180 -credentials $credsWhich will return an auth token for use, and store endpoint information into a global variable space.
access_token expiresIn expiresOn
------------ --------- ---------
QqBK6OWSDwYtT00RgL7sF3q1tMy3ODiChts5Husti1j 1209600 2020-10-20 00:19:35You can then use the functions in the module manifest to perform the desired operations.
# Gather all flex tasks:
Get-FLEXTask
# Show the FLEX networking configuration:
Get-FLEXClusterNetwork
# Create a new SDP using available cnodes and mnodes
New-FLEXClusterSDP -cnodes 2 -mnodeSize Small -name "MySDP"
# Add a CNode to an existing SDP:
Add-FLEXClusterSDPCNode -sdpName "MySDP" -count 1
# Use the bespoke REST handler for quick REST call modeling:
Invoke-FLEXRestCall -method GET -API v1 -endpoint 'pages/nodes'Specify -Verbose on any cmdlet to see the entire API process, including endoint declarations, and json API payloads. You can use this to help model API calls directly or troubleshoot.