StyleBook configuration

Import custom StyleBooks

After you have built your StyleBook, you have to import it to Citrix ADM to use it. Citrix ADM allows you to import a single StyleBook in YAML form or multiple StyleBook YAML files as a bundle in a .zip, .tgz, or .gz form. The Citrix ADM system validates your StyleBooks on import. The StyleBook is now ready to be used for creating configurations.

Citrix ADM also has a built-in YAML editor that you can use to compose the StyleBook YAML contents. The YAML editor allows you to validate your YAML constructs from the Citrix ADM GUI itself. You do not need to use a separate tool for these validation checks. The content is validated against YAML standards and any deviation is highlighted. You can then correct the content and attempt to import the StyleBook into Citrix ADM. The built-in YAML editor provides two advantages while writing your own StyleBook.

  • Color coded. The editor displays the StyleBook content parsed as per YAML guidelines, and the color coding helps you to differentiate easily between the keys and the values defined in the YAML content.
  • YAML validation. The content is validated for any YAML errors as you type in and any deviation is immediately highlighted. This validation allows you to write text that conforms to YAML guidelines even before you import the StyleBook in Citrix ADM.


Currently, the editor validates the content according to YAML guidelines. It does not validate for code correctness and typographical errors.

Use HTML formatting tags in the StyleBook description and header

In the StyleBook definition, you can include a header field and use HTML formatting tags for the text. You can also include images as part of the header and it will be rendered at the top of the configuration form. This feature allows you to add infographics for the StyleBook users that helps in understanding the StyleBook configuration. If you use images in the header, ensure to use base64 encoded image format in the <img> tag.

name: app-stylebook-with-HTML-tags
namespace: com.examples.stylebooks
version: "1.0"
display-name: "Example App StyleBook"
header: 'This <b> StyleBook </b> defines all the app configuration for <i>Load Balanced Application </i>. The following image describes the target deployment for the app <img id="b64img" src="data:image/png;base64,…" />'

To import your StyleBook

  1. In Citrix ADM, navigate to Applications > Configuration > StyleBooks, and then click Import New StyleBook.

  2. Click one of the following options to import a StyleBook.

    • File - select the required file or the bundle of files from your local storage.


      In this example, import the lb-vserver.yml StyleBook that you had created in StyleBook to Create a Load Balancing Virtual Server.

      Import a StyleBook file

    • Bundle - Citrix ADM allows you to import multiple StyleBooks in YAML format. You can import more than one YAML StyleBook files that are compressed in a zip (.zip) format or tarball (.tgz, .gz) format.

      Import a StyleBook bundle

      You can now include icons to each StyleBook in the bundle. To do so, upload the icons and the icon_mapping.json file to the resources folder. If the icon file name and StyleBook name are matching, the icons are automatically mapped to the StyleBooks. Otherwise, map StyleBooks and icons in the icon_mapping.json file as follows:

       <StyleBook file name> : <icon file name>

      The following is an example StyleBook bundle:

      StyleBook bundle with icons

      The resources folder contains the required icons.

      Icons in the resources folder

      In this example, sharepoint.yaml and skype.yaml files are automatically mapped to sharepoint.jpeg and skype.png respectively.

      To map exchange.yaml to exch.png, specify the following in the icon_mapping.json file:

    • Raw - Compose the content of your StyleBook in the YAML editor.

      You can validate the StyleBook contents to check the StyleBook grammar errors. To validate StyleBook contents, click Validate Contents.


      While composing StyleBook, make sure to know the following concepts:

      • NITRO API
      • YAML

      For more information about how to write your own StyleBooks, see How to Create Your Own StyleBooks.

      Author a StyleBook using Citrix ADM YAML editor

    • Sync Repository - This option lists the repositories added to Citrix ADM. Select the repository that you want to synchronize with Citrix ADM.

      Sync repositories in Citrix ADM


    You can also copy and paste the content from a StyleBook YAML file to the YAML editor.

  3. Optional, select an icon to a StyleBook.

    In Applications > Configuration > StyleBooks, the imported StyleBook appears with this icon.

    Import StyleBook with an icon

  4. Click Create.

    Citrix ADM now validates your StyleBook for all syntactic and semantic errors according to the StyleBook grammar. Your StyleBook is not imported into Citrix ADM if there are any errors.

    If there are no errors the StyleBook is successfully imported and listed on the StyleBooks page. You can identify the StyleBook by the display name that you had defined in the header section of the StyleBook.

    Example StyleBook


    If you are importing a bundle of files, Citrix ADM decompresses the zipped folder and validates all the StyleBooks. The bundle is not imported even if one StyleBook file fails the validation test.

    For more information on StyleBook grammar and syntax of the different constructs and attributes, see StyleBook Grammar.

  5. Click the Create Configuration link to create configurations from this StyleBook.

    The StyleBook opens as a user interface page on which you can enter the values for all the parameters defined in this StyleBook.

  6. Specify the required values for the parameters.

    In the following example,

    1. Specify the application name and load balancer IP address mandatory fields.

    2. Select the LoadBalancing Algorithm from the list. By default, ROUNDROBIN is selected.

      Example configuration deployment

  7. Under Target Instances, select the IP address of the Citrix ADC instance where you want to deploy the configuration.

    You can also deploy the configuration on more than one Citrix ADC, by specifying as many target instances as needed.

  8. If you want to test at the Citrix ADC (NITRO) configuration objects before you deploy the configuration, click Dry Run.

    If the configuration is valid, the configuration objects are created based on the specified values.

    In this example, the StyleBook creates only one object of type lbvserver. This load-balancing server was the only component defined in this basic example StyleBook.

    Later, click Create to deploy the configuration on the selected Citrix ADC instances.

After you deploy the configuration successfully, a new configuration pack appears in the Configurations page.


You can also click the refresh icon to add recently discovered Citrix ADC instances in Citrix ADM to the available list of instances in this window.

A new configuration pack

Import custom StyleBooks