Migrate configuration pack of a StyleBook to another StyleBook
Migrate configuration pack
To migrate a configuration pack created using example-lb StyleBook to example-lb-mon StyleBook
-
In NetScaler ADM, navigate to Applications \> Configurations. The Configurations page displays all the configuration packs that are present in the system.
-
Scroll down to find the example-lb configuration pack that you would have created earlier, and click Migrate Configpack.
-
The Choose target StyleBook for migration page opens that lists all StyleBooks that available in NetScaler ADM. Scroll down to find the example-lb-mon StyleBook and click Select StyleBook. You can also search for the StyleBook by typing example-lb-mon.
If you migrate from one StyleBook to another, all parameters in the two StyleBooks might not have the same structure. If the parameter structure is similar, the previous values are automatically retained in the parameter fields. A few of the parameters in the new StyleBook may be new, or there might be a change in their structure. In such a case, you must manually fill in in the values for the StyleBook parameters. For example, the following image shows the parameters of the example-lb StyleBook.
The following image shows the parameters after migrating the configuration pack to example-lb-mon StyleBook.
In this case, you can see that the StyleBooks retain the older values for the basic load balancer configuration. But, you must manually type the values for the monitor parameters. -
Type in values for the new parameters used for creating monitors on the instance.
-
Under Target Instances, click and select the IP address of the NetScaler instance where you want to run the configuration. Note that you can deploy the configuration on more than one NetScaler, by specifying as many target instances as needed.
-
Click Dry Run. The Objects page displays the objects that would be newly created, modified, or removed from the NetScaler instance(s).
-
Click Create to create or update the configuration of the selected instances. The configuration pack is created if the target instances are new. Else, the existing configurations deployed on the instances are updated.NoteYou can also click the refresh icon to add recently discovered NetScaler instances. So these instances are instantly available in the list of instances in this window. The refresh icon is currently available only on NetScaler ADM.
Build your StyleBooks
name: example-lb
namespace: examples.stylebooks
version: "1.0"
display-name: Basic Load Balancer App
description: This is an example StyleBook that creates a load balancer application
schema-version: "1.0"
import-stylebooks:
-
namespace: com.citrix.adc.stylebooks
prefix: stlb
version: "1.0"
parameters-default-sources:
- stlb::lb
components:
-
name: lb-comp
type: stlb::lb
description: Uses the default lb StyleBook to build the typical lb configuration objects
properties-default-sources:
- $parameters
name: example-lb-mon
namespace: examples.stylebooks
version: "1.0"
description: This is an example StyleBook that creates a load balancer application with monitors
display-name: Basic Load Balancer App with Monitors
schema-version: "1.0"
import-stylebooks:
-
namespace: netscaler.nitro.config
prefix: ns
version: "10.5"
-
namespace: com.citrix.adc.stylebooks
prefix: stlb
version: "1.0"
-
namespace: com.citrix.adc.commontypes
prefix: cmtypes
version: "1.0"
parameters-default-sources:
- stlb::lb
parameters:
-
name: monitors
label: "List of Monitors"
description: "List of Monitors to monitor Application Servers"
type: cmtypes::monitor[]
substitutions:
mon-name(appname, monname): $appname + "-mon-" + $monname
components:
-
name: lb-comp
type: stlb::lb
description: Uses the default lb StyleBook to build the typical lb configuration objects
properties-default-sources:
- $parameters
-
name: monitors-comp
type: cmtypes::monitor
condition: $parameters.monitors
repeat: $parameters.monitors
repeat-item: mon
repeat-index: ndx
description: Builds a list of NetScaler monitor objects and binds them to the servicegroup of this LB config
properties-default-sources:
- $mon
properties:
monitorname: $substitutions.mon-name($parameters.lb-appname, $mon.monitorname)
components:
-
name: monitor-svcg-binding-comp
condition: $parameters.svc-servers
type: ns::servicegroup_lbmonitor_binding
properties:
servicegroupname: $components.lb-comp.outputs.servicegroup.properties.servicegroupname
monitor_name: $parent.properties.monitorname