-
-
-
-
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!
Instance roles
In Citrix Application Delivery Management (ADM), there might be a scenario where you have to configure multiple Citrix ADC instances for a single application, but also where each ADC instance requires a different configuration to be deployed on them. An example of such a case is the default Microsoft Skype for Business StyleBook.
StyleBooks currently support the ability to create a configuration pack and apply the same configuration on multiple Citrix ADC instances. Such a scenario where the configuration is identical on all ADC instances, can be referred to as a symmetric configuration.
Now, with the “instance roles” feature of StyleBooks, you can create an asymmetrical configuration, that is, a configuration pack that can be applied on multiple ADC instances, but with different configurations on different ADC instances.
When a StyleBook with instance roles feature is used to create a configuration pack, each ADC instance in a configuration pack can be assigned a different role. This role determines the configuration objects of the configuration pack that the ADC instance will receive.
Points to note:
- The set of instance roles in a StyleBook are defined while creating the StyleBook.
- The roles are assigned to a specific ADC instance when creating or updating the configuration pack.
Target-roles section
A new section in a StyleBook called “target-roles” is introduced, where all the roles supported by the StyleBook are declared.
This section is typically placed after the “import-StyleBooks” section of a StyleBook, and before the parameters section.
In the following StyleBook example, two roles are defined in within the “target-roles” section - A and B.
target-roles:
-
name: A
name: B
min-targets: 2
max-targets: 5
<!--NeedCopy-->
You can see that role B also defines two optional sub-properties, min-targets and max-targets.
Though these two sub-properties are optional, min-targets specify the minimum mandatory number of ADC instances that should be assigned this role when creating a configuration pack from this StyleBook, and max-targets specify the maximum number of ADC instances that can be assigned this role when creating a configuration pack from this StyleBook.
If these sub-properties are not specified, then there is no limit on the number of ADC instances that can be configured for that role. If min-targets = 0, the configuration associated with that role is optional and if min-targets = 1, then that configuration is mandatory and at least one ADC instance needs to be configured for that role.
Role “default”
In addition to explicitly defined roles, there is an implicit role that all StyleBooks have, and that role is called as a default role. This role can be used like any other role in a StyleBook. When creating a configuration pack, if an ADC instance is not assigned with a specific role, the instance gets implicitly assigned to the “default” role. The instance will now receive any configuration objects generated by components that have the “default” role.
Components with roles
After the roles that a StyleBook can support (including the role “default”) are defined, the roles can be used in the components section of a StyleBook. If you want a component to be deployed only on ADC instances that play a certain role, then you can specify the roles attribute as part of the component, as illustrated in the following example of a component:
-
name: C1
type: ns::lbvserver
roles:
- A
properties:
name: lb1
servicetype: HTTP
ipv46: 1.1.1.1
port: 80
<!--NeedCopy-->
In the above example, the component generates an “lbvserver” that will be deployed on instances playing the role A. Note that the roles attribute of a component is a list, and a component can be assigned multiple roles. These roles would have been declared in the “target-roles” section of the StyleBook.
Note: If a component in a StyleBook doesn’t specify a role attribute, then configuration objects generated by the component are created on all Citrix ADC instances regardless of their role. You can use this feature effectively to create configuration objects that can be applied to all instances of a configuration pack.
Let’s assume that there is a StyleBook with two roles defined - A and B, and which contains four components.
- Component C1 has the roles A and B
- Component C2 has the role B
- Component C3 doesn’t have any roles defined
- Component C4 has the role “default”
The components section of this StyleBook is reproduced below:
components:
-
name: C1
type: ns::lbvserver
roles:
- A
- B
properties:
name: lb1
servicetype: HTTP
ipv46: 1.1.1.1
port: 80
-
name: C2
type: ns::lbvserver
roles:
- B
properties:
name: lb2
servicetype: HTTP
ipv46: 12.12.12.12
port: 80
-
name: C3
type: ns::lbvserver
properties:
name: lb3
servicetype: HTTP
ipv46: 13.13.13.13
port: 80
-
name: C4
type: ns::lbvserver
roles:
- default
properties:
name: lb4
servicetype: HTTP
ipv46: 14.14.14.14
port: 80
<!--NeedCopy-->
Note that the component C3 doesn’t have a role defined, which means the component is deployed on all instances regardless of their role. On the other hand, component C4 has the role “default”, which means it is applied to any instance that doesn’t have an explicit role assigned to it.
Now, consider that you want to create a configuration pack using this StyleBook, and deploy it on five ADC instances. At this stage, you can assign the roles to the instances in the following manner:
- Role A is assigned to Instances T1, T2, T3 and T4
- Role B is assigned to Instances T2, T3 and T4
- Instance T5 is not assigned any role
The following image summarizes the role assignments, and shows the resulting configuration that each ADC instance will receive:
Note that component C3 is deployed on all instances regardless of role, since this component had no roles attribute.
You can also use the “Dry Run” feature when creating a configuration pack to view and verify the correct assignment of roles and the configuration objects that will be created on each ADC instance.
Build your StyleBook
The full content of the StyleBook “demo-target-roles” is provided below:
---
name: demo-target-roles
namespace: com.example.stylebooks
version: "1.2"
schema-version: "1.0"
import-stylebooks:
-
namespace: netscaler.nitro.config
prefix: ns
version: "10.5"
parameters:
-
name: appname
type: string
required: true
key: true
target-roles:
-
name: A
-
name: B
min-targets: 2
max-targets: 5
components:
-
name: C1
type: ns::lbvserver
roles:
- A
- B
properties:
name: lb1
servicetype: HTTP
ipv46: 1.1.1.1
port: 80
-
name: C2
type: ns::lbvserver
roles:
- B
properties:
name: lb2
servicetype: HTTP
ipv46: 12.12.12.12
port: 80
-
name: C3
type: ns::lbvserver
properties:
name: lb3
servicetype: HTTP
ipv46: 13.13.13.13
port: 80
-
name: C4
type: ns::lbvserver
roles:
- default
properties:
name: lb4
servicetype: HTTP
ipv46: 14.14.14.14
port: 80
<!--NeedCopy-->
The following image shows the objects created for a sample configuration pack:
Using APIs
When using the REST API, you can specify roles for each ADC instance when creating or updating the configuration pack as follows. In the “targets” block, specify the UUID of the specific Citrix ADC instance on which you want to deploy the individual components.
"targets": [
{
"id": "<ADC-UUID>",
"roles": ["A"]
},
]
<!--NeedCopy-->
A complete sample REST API is provided for your reference.
POST /<ADM-IP
>/stylebook/nitro/v1/config/stylebooks/com.example.stylebooks/1.2/demo-target-roles/configpacks
{
"configpack": {
"parameters": {
"appname": "app1"
},
"targets": [
{
"id": "f53c35c3-a6bc-4619-b4b4-ad7ab6a94ddb",
"roles": ["A"]
},
{
"id": "c08caa1c-1011-48aa-b8c7-9aed1cd38ed0",
"roles": ["A", "B"]
},
{
"id": "88ac90cb-a5cb-445b-8617-f83d0ef6174e",
"roles": ["A", "B"]
},
{
"id": "bf7b0f74-7a83-4856-86f4-dcc951d3141e",
"roles": ["A", "B"]
},
{
"id": "fa5d97ab-ca29-4adf-b451-06e7a234e3da",
"roles": ["default"]
}
]
}
}
<!--NeedCopy-->
Share
Share
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.