Skip to content

Repository files navigation

Stories in ReadyBuild status

POSHOrigin_NetScaler

POSHOrigin_NetScaler is a set of PowerShell 5 based DSC resources for managing Citrix NetScaler load balancer objects via DSC.

Resources

  • LBServer Manages a load balancer server instance
  • LBVirtualServer Manages a load balancer virtual server instance

LBServer

Created, modifies, or deletes a load balancer server instance

Parameters

NameTypeRequiredDescription
NamestringTrueThe name of the instance
EnsurestringFalseDenotes if resource should exist or not exist
NetScalerFQDNstringTrueThe FQDN of the NetScaler appliance to connect to
CredentialpscredentialTrueCredential with rights on NetScaler to manager load balancer server instances
IPAddressstringTrueThe IP address of the server instance
CommentsstringFalseComments associated with the server instance
TrafficDomainIdintFalseIdentifies the traffic domain in which you want to configure the server instance
StatestringFalseState of the server instance. Valid values are 'ENABLED', 'DISABLED'

LBVirtualServer

Created, modifies, or deletes a load balancer server instance

Parameters

NameTypeRequiredDescription
NamestringTrueThe name of the instance
EnsurestringFalseDenotes if resource should exist or not exist
NetScalerFQDNstringTrueThe FQDN of the NetScaler appliance to connect to
CredentialpscredentialTrueCredential with rights on NetScaler to manager load balancer server instances
IPAddressstringTrueThe IP address of the server instance
PortintFalsePort number for the virtual server
ServiceTypestringFalseProtocol used by the virtual server
LBMethodstringFalseLoad balancing method used by the virtual server
CommentsstringFalseComments associated with the server instance
StatestringFalseState of the virtual server instance. Valid values are 'ENABLED', 'DISABLED'

Versions

1.1.0

  • Initial release

Examples

LBServer

This example shows how to use the LBServer resource within the context of a POSHOrigin configuration file.

resource 'POSHOrigin_NetScaler:LBServer''serverxyz'@{
Ensure='Present'NetScalerFQDN='mynetscaler.mydomain.com'IPAddress='192.168.100.100'Comments='This is a comment'TrafficDomainId=1State='ENABLED'Credential=Get-POSHOriginSecret'pscredential'@{
username='administrator'password='K33p1t53cr3tK33p1t5@f3'
}
}

This example show how to use the LBServer resource within a traditional DSC configuration file.

ConfigurationExample_LBServer {
param(
[string[]]$NodeName='localhost',
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[string]$IPAddress,
[Parameter(Mandatory)]
[string]$NetScalerFQDN,
[Parameter(Mandatory)]
[pscredential]$Credential,
[string]$Comments,
[int]$TrafficDomainId,
[string]$State
)
Import-DscResource-Name LBServer -ModuleName POSHOrigin_NetScaler
Node $NodeName {
LBServer "Create$Name" {
Ensure ='Present'
Name =$Name
IPAddress =$IPAddress
NetScalerFQDN =$NetScalerFQDN
Credential =$Credential
Comments =$Comments
TrafficDomainId =$TrafficDomainId
State =$State
}
}
}

LBVirtualServer

This example shows how to use the LBVirtualServer resource within the context of a POSHOrigin configuration file.

resource 'POSHOrigin_NetScaler:LBServer''lbserverxyz'@{
Ensure='Present'NetScalerFQDN='mynetscaler.mydomain.com'Comments='This is a comment'IPAddress='192.168.100.101'Port=80ServiceType='HTTP'LBMethod='ROUNDROBIN'State='ENABLED'Credential=Get-POSHOriginSecret'pscredential'@{
username='administrator'password='K33p1t53cr3tK33p1t5@f3'
}
}

This example show how to use the LBVirtualServer resource within a traditional DSC configuration file.

ConfigurationExample_LBVirtualServer {
param(
[string[]]$NodeName='localhost',
[Parameter(Mandatory)]
[string]$Name,
[Parameter(Mandatory)]
[string]$IPAddress,
[Parameter(Mandatory)]
[string]$NetScalerFQDN,
[Parameter(Mandatory)]
[pscredential]$Credential,
[int]$Port,
[string]$ServiceType,
[string]$LBMethod,
[string]$Comments,
[string]$State
)
Import-DscResource-Name LBVirtualServer -ModuleName POSHOrigin_NetScaler
Node $NodeName {
LBVirtualServer "Create$Name" {
Ensure ='Present'
Name =$Name
IPAddress =$IPAddress
NetScalerFQDN =$NetScalerFQDN
Credential =$Credential
Port =$Port
ServiceType =$ServiceType
LBMethod =$LBMethod
Comments =$Comments
State =$State
}
}
}

About

DSC resources to manage Citrix NetScaler with POSHOrigin

Resources

Contributing

Stars

5 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages