|
1 | 1 | # Integration testing
|
2 | 2 |
|
3 |
| -## Setup a test netscaler |
| 3 | +## Provisioning |
4 | 4 |
|
5 |
| -The following commands achieve a minimal NetScaler setup for testing purposes. |
| 5 | +In the following process we assume that the NetScaler _Host ID_ (first MAC address), the _NSIP_ are set in the following variables: |
6 | 6 |
|
| 7 | + $HostId = "000c296641f6" |
7 | 8 | $Nsip = "172.16.124.11"
|
| 9 | + $DefaultGw = "172.16.124.1" |
| 10 | + |
| 11 | +### Download & License |
| 12 | + |
| 13 | +1. Go to https://www.citrix.com/lp/try/netscaler-vpx-platinum.html to generate a license. |
| 14 | +1. Go to https://www.citrix.com/content/citrix/en_us/account/toolbox/manage-licenses/allocate.html to activate the license with the NetScaler _Host ID_. |
| 15 | +1. Download the license file and save it as license.lic |
| 16 | +1. Download the VPX package for your target hypervisor |
| 17 | + |
| 18 | +### VMWare Fusion |
| 19 | + |
| 20 | +The following setup instructions assume MacOSX with VMWare Fusion, but it can easily be |
| 21 | +adjusted to your own environment. |
| 22 | + |
| 23 | +1. Download _NetScaler VPX Express_ from https://www.citrix.com/downloads/netscaler-adc/ (a |
| 24 | +log in is required, just create a Citrix account) |
| 25 | +1. Unzip the downloaded file: |
| 26 | + unzip -x NSVPX-ESX-11.0-69.12_nc.zip -d NSVPX-ESX-11.0-69.12_nc |
| 27 | +1. Import either with the VMWare GUI or, if you have OVF tools installed with: |
| 28 | + ovftool --hideEula NSVPX-ESX-11.0-69.12_nc/NSVPX-ESX-11.0-69.12_nc.ovf ~/Documents/Virtual\ Machines.localized/ |
| 29 | + vmrun start ~/Documents/Virtual\ Machines.localized/NSVPX-ESX-11.0-69.12_nc.vmwarevm |
| 30 | +1. NetScaler should start and after a few seconds you will see the CLI setup wizard. |
| 31 | +Enter the IP address you will use to communicate with NetScaler, netmask and default |
| 32 | +gateway (ensure the proper VMWare network is configured for the VM). |
| 33 | +1. After a few seconds, check that you have access: |
| 34 | + Connect-NetScaler -Hostname <insert IP address here> -Credential (Get-Credential -UserName nsroot) |
| 35 | + Get-NSIPResource |
| 36 | + |
| 37 | +### Hyper-V |
| 38 | + |
| 39 | +You can use the [New-NSHyperVInstance.ps1](https://github.com/dbroeglin/NetScaler/blob/exp/hyper-auto-provision/Contrib/New-NSHyperVInstance.ps1) to automatically setup a test instance with a single network inteface connected to the `Labnet` virtual switch: |
| 40 | + |
| 41 | + New-NSHyperVInstance.ps1 -Verbose -Package C:\temp\NSVPX-HyperV-11.1-50.10_nc.zip ` |
| 42 | + -VMName NSVPX-11-1 ` |
| 43 | + -SwitchName Labnet ` |
| 44 | + -MacAddress $HostId ` |
| 45 | + -NSIP $Nsip -DefaultGateway $DefaultGateway ` |
| 46 | + -Path C:\temp\NSVPX-11-1 ` |
| 47 | + |
| 48 | +### Other hypervisors |
| 49 | + |
| 50 | +TODO |
| 51 | + |
| 52 | +## Setup a test NetScaler |
| 53 | + |
| 54 | +The following commands achieve a minimal NetScaler setup for testing purposes. |
| 55 | + |
8 | 56 | $Snip = "172.16.124.111"
|
9 | 57 | $DnsIp = "172.16.124.1"
|
10 | 58 | $SubnetMask = "255.255.255.0"
|
11 | 59 |
|
12 |
| - |
13 | 60 | $SecurePassword = ConvertTo-SecureString "nsroot" -AsPlainText -Force
|
14 | 61 | $Credential = New-Object System.Management.Automation.PSCredential ("nsroot", $SecurePassword)
|
15 |
| - Connect-Netscaler -Hostname $Nsip -Credential $Credential |
| 62 | + Connect-NetScaler -Hostname $Nsip -Credential $Credential |
16 | 63 | Add-NSIPResource -Type SNIP -IPAddress $Snip -SubnetMask $SubnetMask
|
17 | 64 | Set-NSHostname -Hostname ns-test -Force
|
18 | 65 | Add-NSDnsNameServer -IPAddress $DnsIp
|
19 | 66 | Set-NSTimeZone -TimeZone "GMT+01:00-CET-Europe/Paris" -Force
|
20 | 67 | Save-NSConfig
|
| 68 | + |
| 69 | + # To retrieve the host ID if you did not set it during provisioning: |
21 | 70 | (Get-NSHardware).host
|
22 | 71 |
|
23 |
| - # Get a license with the _Host ID_ |
| 72 | + Install-NSLicense -Path $HOME/Downloads/my_downloaded_license.lic -Session $Session |
| 73 | + Restart-NetScaler -Force -Wait |
| 74 | + |
24 | 75 |
|
25 |
| - Install-NSLicense -Path /Users/dom/Downloads/my_downloaded_license.lic -Session $Session |
26 |
| - Restart-NetScaler -Force -Wait |
|
0 commit comments