-
-
-
-
Importing and synchronizing StyleBooks from GitHub repository
-
Simplified migration of Citrix ADC application configuration using StyleBooks
-
-
Use ADM log messages for managing and monitoring your infrastructure
-
-
Citrix ADC automation using Citrix ADM in Cisco ACI hybrid mode
-
Citrix ADC device package in Cisco ACI's cloud orchestrator mode
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Create a composite StyleBook
An important and powerful feature of StyleBooks is that they can be used as building blocks for other StyleBooks. A StyleBook can be imported into another StyleBook and it can be referred to as a type that is used by components of the second StyleBook similar to a Nitro built-in StyleBook.
For example, you can use the basic-lb-config StyleBook that you built in the previous section, to build another StyleBook called composite-example. To use the “basic-lb-config” StyleBook, you have to import it in the new StyleBook in the import-stylebooks section.
Build your StyleBook
The new StyleBook would look as follows:
name: composite-example
namespace: com.example.stylebooks
version: "0.1"
display-name: Load Balancing Virtual Server (HTTP/RoundRobin)
description: This StyleBook defines a RoundRobin load balancing configuration with a monitor.
schema-version: "1.0"
import-stylebooks:
-
namespace: netscaler.nitro.config
version: "10.5"
prefix: ns
-
namespace: com.example.stylebooks
version: "0.1"
prefix: stlb
parameters:
-
name: name
type: string
label: Application Name
description: Give a name to the application configuration.
required: true
-
name: ip
type: ipaddress
label: Application Virtual IP (VIP)
description: The Application VIP that clients access
required: true
-
name: svc-servers
type: ipaddress[]
label: Application Server IPs
description: The IP addresses of all the servers of this application
required: true
-
name: response-code
type: string[]
label: List of Response Codes
description: List of Response Codes - Provide a list of response codes in integer.
components:
-
name: basic-lb-comp
type: stlb::basic-lb-config
description: This component's type is another StyleBook that builds the NetScaler lbvserver, servicegroups and services configuration objects.
properties:
name: $parameters.name
ip: $parameters.ip
svc-servers: $parameters.svc-servers
-
name: monit-comp
type: ns::lbmonitor
description: This component is a basic Nitro type (a Builtin StyleBook) that builds the NetScaler monitor configuration object.
properties:
monitorname: $parameters.name + "-mon"
type: HTTP
respcode: $parameters.response-code
httprequest: "'GET /'"
lrtm: ENABLED
secure: "YES"
components:
-
name: monit-svcgrp-bind-comp
type: ns::servicegroup_lbmonitor_binding
properties:
servicegroupname: $components.basic-lb-comp.outputs.servicegroup-comp.properties.servicegroupname
monitor_name: $parent.properties.monitorname
<!--NeedCopy-->
In the import-stylebooks section, you import the basic-lb-config StyleBook by using its namespace and version, referred to with the prefix “stlb”.
In the components section, two components are defined. The first component is of type stlb::basic-lb-config, where “basic-lb-config” is the name of the StyleBook you created in StyleBook to create a basic load balancing configuration. The properties that are defined for this component correspond to the mandatory parameters declared in the basic-lb-config StyleBook. You can, however, use any parameter of the StyleBook (both required and optional.) Instead of re-building a lbvserver, a service group, and service and service group bindings, you import the StyleBook that does all of this as a component and use it to create these configuration objects in the new StyleBook.
StyleBook adds a second component “monit-comp” that uses the attributes of the Nitro resource “lbmonitor” (a built-in StyleBook) to create a monitor configuration object. It also has a sub-component “monit-svcgrp-bind-comp” to create the binding configuration object that binds the monitor to the servicegroup created in the first component. Because the servicegroup component created in the “basic-lb-config” StyleBook is exposed as an output, this StyleBook can access it using the expression $components.basic-lb-comp.outputs.servicegroup-comp. This is an example of how the outputs section can be used by the importing StyleBooks to have access to components in the imported StyleBooks that they would not have been able to access otherwise.
Next, copy and paste the StyleBook content to a text editor, and then save the file as composite-example.yaml. Ensure to validate the YAML content before you import the file in Citrix ADM. Then, import it to Citrix ADM and create one or several configurations by using this StyleBook.
Citrix recommends that you use the built-in YAML validator in StyleBooks to validate and import the YAML content.
Share
Share
In this article
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.