Create a StyleBook to upload SSL certificate and certificate key files to NetScaler ADM
StyleBook configuration
parameters:
-
name: name
type: string
required: true
-
name: ip
type: ipaddress
required: true
-
name: lb-alg
type: string
allowed-values:
- ROUNDROBIN
- LEASTCONNECTION
default: ROUNDROBIN
-
name: certificate
label: "SSL Certificate File"
description: "The file name of the SSL certificate file"
type: certfile
-
name: key
label: "SSL Certificate Key File"
description: "The file name of the server certificate's private key file"
type: keyfile
-
"ns" is the prefix that refers to the built-in namespace netscaler.nitro.config and version 10.5 that you had specified in the import-stylebooks section.
-
"lbvserver" is a built-in StyleBook in this namespace. It corresponds to the NetScaler NITRO load balancing virtual server resource of the same name.
components:
-
name: my-lbvserver-comp
type: ns::lbvserver
properties:
name: $parameters.name
servicetype: SSL
ipv46: $parameters.ip
port: 443
lbmethod: $parameters.lb-alg
-
name: lbvserver-certificate-comp
type: stlb::vserver-certs-binds
description: Binds lbvserver with server certificate
properties:
vserver-name: $components.my-lbvserver-comp.properties.name
certificates:
-
cert-name: $parameters.name + "-lb-cert"
cert-file: $parameters.certificate
ssl-inform: PEM
key-name: $parameters.name + "-key"
key-file: $parameters.key
Creating configurations to upload SSL files
To create a configuration for uploading files
-
In NetScaler ADM, navigate to Applications > Configuration > StyleBooks. The StyleBooks page displays all the StyleBooks that are available in your NetScaler ADM.
-
Scroll down and select Load Balancing Virtual Server (SSL) or type Load Balancing Virtual Server (SSL) in the search field and press the Enter key.
-
Click Create Configuration link in the StyleBook panel.The StyleBook parameters appear as a user-interface page that allows you to enter the values for all the parameters defined in this StyleBook.
-
Enter the name of the load balancer and the virtual IP address in the basic load balancer settings section.
-
In SSL Certificates Settings section, select the respective files from your local storage folder. Alternatively, you can select the files present on the NetScaler ADM itself.
-
Select the target NetScaler instance on which the configuration needs to be created, and click Create.
-
HTTP/SSL LoadBalancing StyleBook (lb)
-
HTTP/SSL LoadBalancing (with Monitors) StyleBook (lb-mon)
-
HTTP/SSL Content Switched Application with Monitors (cs-lb-mon)
-
Sample Application StyleBook using CS, LB and SSL features (sample-cs-app)
Build your StyleBook
name: lb-vserver-ssl
description: "This stylebook defines a load balancing virtual server configuration."
display-name: "Load Balancing Virtual Server (SSL)"
namespace: com.example.ssl.stylebooks
schema-version: "1.0"
version: "0.1"
import-stylebooks:
-
namespace: netscaler.nitro.config
prefix: ns
version: "10.5"
-
namespace: com.citrix.adc.stylebooks
prefix: stlb
version: "1.0"
parameters:
-
name: name
type: string
required: true
-
name: ip
type: ipaddress
required: true
-
name: lb-alg
type: string
allowed-values:
- ROUNDROBIN
- LEASTCONNECTION
default: ROUNDROBIN
-
name: certificate
label: "SSL Certificate File"
description: "The file name of the SSL certificate file"
type: certfile
-
name: key
label: "SSL Certificate Key File"
description: "The file name of the server certificate's private key file"
type: keyfile
components:
-
name: my-lbvserver-comp
type: ns::lbvserver
properties:
name: $parameters.name
servicetype: SSL
ipv46: $parameters.ip
port: 443
lbmethod: $parameters.lb-alg
-
name: lbvserver-certificate-comp
type: stlb::vserver-certs-binds
description: Binds lbvserver with server certificate
properties:
vserver-name: $ components.my-lbvserver-comp.properties.name
certificates:
-
cert-name: $parameters.name + "-lb-cert"
cert-file: $parameters.certificate
ssl-inform: PEM
key-name: $parameters.name + "-key"
key-file: $parameters.key
Using the NetScaler ADM API to create a configuration pack
Viewing the objects defined on the NetScaler instance