Upload
others
View
10
Download
0
Embed Size (px)
Citation preview
NetScaler Automa.on USING POWERSHELL TO TALK NITRO
2#CitrixSynergy-May24th,2017 #SYN325
Tweetaboutthissessionwithhashtags#syn325and#citrixsynergy
StockImageComp
3#CitrixSynergy-May24th,2017 #SYN325
§ 20 years of Technical Consulting
§ Solutions Architect at PepperByte § MSc Computer Science § Design | Implement | Troubleshooting
§ 5+ years of DevOps scripting fun § Automating Windows Server Deployments § Automating Citrix Deployments § Automating NetScaler Deployments
YourPresenter: EstherBarthel SoluConsArchitect
@virtuEs_IT hKp://nl.linkedin.com/in/ebarthel hKp://www.virtues.it
About Esther
Agenda
q Introduc>onq RESTfulAPIs&NITROq PowerShellNetScalerModule
q Automa>ngNetScalerConfigura>onsq BasicSystemSeKngsq LoadBalancingSeKngsq NetScalerGatewaySeKngs
q BonusSlidesq DeployingNetScalerVPXwithfixedIP-addressq CPXLoadBalancing
Introduc.on REST API & NITRO
6#CitrixSynergy-May24th,2017 #SYN325
REpresentaConalStateTransfer(REST):◦ Client-Server◦ Stateless◦ PlaSorm&language-independent◦ Standards-based(runsontopofHTTPprotocol)◦ Easilyusedinpresenceoffirewalls(port80or443)
NITRO(RESTfulserviceonNetScaler):◦ CommunicatewithNetScalerprogramma>cally◦ HumanreadableHTTP-basedinterac>on◦ NITROSDKsavailableformul>plelanguages(Java,Python,.NET,REST)
RESTful APIs
Introduction > Automation > Bonus
NITROWebService
ClientApplicaCon
RESTrequest
RESTresponse
7#CitrixSynergy-May24th,2017 #SYN325
AwaytointeractwithanAPIviaseriesofHTTPcalls
◦ VERB:HTTPMethod(GET,POST,PUT,DELETE,OPTIONS)◦ URI:resourceonwhichtheopera>onisperformed◦ HTTPVersion:usually"HTTP/1.1"◦ RequestHeader:containsmetadata(formaKng,etc.)◦ RequestBody:actualmessagecontent
RESTful APIs
Introduction > Automation > Bonus
<VERB> <URI> <HTTP Version>
<Request Header>
<Request Body>
8#CitrixSynergy-May24th,2017 #SYN325
AwaytointeractwithanAPIviaseriesofHTTPcalls
◦ HTTPMethod(GET,POST,PUT,DELETE)
NITRO
Introduction > Automation > Bonus
◦ URL:hbp(s)://<ns-ipaddress>/nitro/v1/config/nsfeature?acCon=enable
◦ AddabasicURLstemtousewithNITRO:◦ hbp://<NSIP>/nitro/v1/stat/ –>en>tyandsystemsta>s>cs◦ hbp://<NSIP>/nitro/v1/config/ –>configura>onopera>ons
◦ AddtheresourcetypetotheURL (andinsomecasesalsotheresourcename)
◦ SpecifyanacConfortheURL (bind,unset,enable,disable)
9#CitrixSynergy-May24th,2017 #SYN325
AwaytointeractwithanAPIviaseriesofHTTPcalls
◦ SpecifytheContent-TypeintheRequestHeader:
◦ Content-Type:applica>on/vnd.com.citrix.netscaler.nsfeature+json
◦ AddtheJSONpayloadtotheRequestBody:
NITRO
Introduction > Automation > Bonus
genericcontent-type:applicaCon/json (NetScaler10.1+)
10#CitrixSynergy-May24th,2017 #SYN325
AwaytointeractwithanAPIviaseriesofHTTPcalls
NITRO
Introduction > Automation > Bonus
11#CitrixSynergy-May24th,2017 #SYN325
NITRO API Documenta.on
Introduction > Automation > Bonus
12#CitrixSynergy-May24th,2017 #SYN325
Citrix Blog
Introduction > Automation > Bonus
source:hbps://github.com/san>agocardenas/netscaler-configura>on
13#CitrixSynergy-May24th,2017 #SYN325
WhatisincludedinthePowerShellModulefromtheCitrixBlog?
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
GlobalNetScalerFeatures NetScalerIPAddresses
Hostname Timezone
DNSNameServer LoadBalancing
Monitors Cer>ficates
LDAPAuthen>ca>on Gateway
POST
14#CitrixSynergy-May24th,2017 #SYN325
WhatisincludedinthePowerShellModulefromtheCitrixBlog?WhatisincludedinthePS-NITROPowerShellModule?
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
GlobalNetScalerFeatures NetScalerIPAddresses
Hostname Timezone
DNSNameServer LoadBalancing
Monitors Cer>ficates
LDAPAuthen>ca>on Gateway
FileUploads(.cert,.key,.txt,.lic) SystemBackup
NTPServers SystemUsers&Groups
Responder&Rewrite DNSNameRecords
ContentSwitching GlobalServerLoadBalancing
PUTGET
DELETEPOST
Automa.ng NetScaler Configura.ons
A BASIC EXAMPLE
16#CitrixSynergy-May24th,2017 #SYN325
GlobalNetScalerFeatures
NetScaler Automa.on w/ NITRO
Introduction > Automation > Bonus
17#CitrixSynergy-May24th,2017 #SYN325
GlobalNetScalerFeatures
NetScaler Automa.on w/ PowerShell Module
Introduction > Automation > Bonus
18#CitrixSynergy-May24th,2017 #SYN325
PowerShell in Ac.on
Introduction > Automation > Bonus
Automa.ng NetScaler Configura.ons
LOAD BALANCING
20#CitrixSynergy-May24th,2017 #SYN325
NetScalerLoadBalancing
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
21#CitrixSynergy-May24th,2017 #SYN325
NetScalerLoadBalancing–Rewrite&Responderpolicies
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
22#CitrixSynergy-May24th,2017 #SYN325
NetScalerLoadBalancing–Servers,Services&ServiceGroups
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
23#CitrixSynergy-May24th,2017 #SYN325
NetScalerLoadBalancing–Monitors&vServers
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
24#CitrixSynergy-May24th,2017 #SYN325
PowerShell in Ac.on
Introduction > Automation > Bonus
Automa.ng NetScaler Configura.ons
U S I N G INVOKE-RESTMETHOD C M D L E T
26#CitrixSynergy-May24th,2017 #SYN325
JSON Array & Hastable formaRng
Introduction > Automation > Bonus
27#CitrixSynergy-May24th,2017 #SYN325
JSON Array & Hastable formaRng
Introduction > Automation > Bonus
28#CitrixSynergy-May24th,2017 #SYN325
Convert-To Json cmdlet
Introduction > Automation > Bonus
29#CitrixSynergy-May24th,2017 #SYN325
Convert-To Json cmdlet - Depth parameter
Introduction > Automation > Bonus
30#CitrixSynergy-May24th,2017 #SYN325
GlobalNetScalerFeatures
NetScaler Automa.on w/ NITRO
Introduction > Automation > Bonus
31#CitrixSynergy-May24th,2017 #SYN325
NetScaler Automa.on w/ PowerShell & REST
Introduction > Automation > Bonus
Automa.ng NetScaler Configura.ons
NETSCALER GATEWAY
33#CitrixSynergy-May24th,2017 #SYN325
NetScalerGateway
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
34#CitrixSynergy-May24th,2017 #SYN325
NetScalerGateway
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
35#CitrixSynergy-May24th,2017 #SYN325
PowerShell in Ac.on
Introduction > Automation > Bonus
The Scripts WHERE TO GO NEXT?
37#CitrixSynergy-May24th,2017 #SYN325
UploadingthePowerShellModuleandScriptsaoerthepresentaCon
GitHub
Introduction > Automation > Bonus
SharingtheextendedPowerShellModuleanddemoScriptswiththeCommunity:
hKps://github.com/cogniConIT/PS-NITRO
Presentedby: EstherBarthel SoluConsArchitect
@virtuEs_IT hKp://nl.linkedin.com/in/ebarthel hKp://www.virtues.it
Bonus Slides AUTOMATE DEPLOYMENTS
40#CitrixSynergy-May24th,2017 #SYN325
CTX128236:HowToAuto-ProvisionNetScalerVPXonXenServer
Bonus: NetScaler VPX with fixed IP (Hypervisors)
Introduction > Automation > Bonus
source:hbp://www.virtues.it/2015/11/ps-import-ns-vpx-fixed-ip-on-xs/
41#CitrixSynergy-May24th,2017 #SYN325
CTX128250:HowToAuto-ProvisionNetScalerVPXonESXorESXiHost
Bonus: NetScaler VPX with fixed IP (Hypervisors)
Introduction > Automation > Bonus
source:hbp://www.virtues.it/2016/01/ps-import-ns-vpx-fixed-ip-esxi/
42#CitrixSynergy-May24th,2017 #SYN325
CitrixProductDocumentaCon:SDX11.1–NITROAPIDocumentaCon
Bonus: NetScaler VPX with fixed IP (NS SDX)
Introduction > Automation > Bonus
source:hbps://docs.citrix.com/en-us/sdx/11-1/nitro-api-doc/nitro-rest-api.html
43#CitrixSynergy-May24th,2017 #SYN325
CitrixProductDocumentaCon:
Bonus: NetScaler VPX with fixed IP (Hyper-V)
Introduction > Automation > Bonus
source:hbps://docs.citrix.com/en-us/netscaler/12/deploying-vpx/install-vpx-on-hyper-v.html
Bonus Slides CPX LOAD BALANCING
45#CitrixSynergy-May24th,2017 #SYN325
NetScalerCPXLoadBalancing
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
46#CitrixSynergy-May24th,2017 #SYN325
NetScalerCPXLoadBalancing–LBvServer
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
47#CitrixSynergy-May24th,2017 #SYN325
NetScalerCPXLoadBalancing–LBvServer
NetScaler Automa.on w/ PowerShell
Introduction > Automation > Bonus
48#CitrixSynergy-May24th,2017 #SYN325
PowerShell in Ac.on
Introduction > Automation > Bonus
49 ©2017Citrix
Beforeyouleave…
Pleaseratethissessioninthemobileapp
50 ©2016Citrix|Confiden>al
“Itwasanopportunitytobringtogetherlike-mindedpeople,network,sharestories,andhelpeachother.”–CUGCMember
Fortheusers,bytheusers
• 16,000+membersglobally• 60+localusergroupsandspecialinterestgroups(SIGs)• Knowledgesharing,expertdiscussion• Networkingatlocalmee>ngs,conferencesandtechnologyevents• Technicalwebinars,forumsandblogs• Opportuni>estoshare,learn,mentorandlead
FindusattheCommunityHubinSynergyPark!