Import and synchronize StyleBooks from GitHub repository
Consider a scenario where you are using CI/CD processes for your development. Or, a scenario where you are managing all the application source code and deployment objects in GitHub.
In the GitHub repository, you might have created several StyleBooks for deploying the Citrix ADC configurations and managing these StyleBooks. These StyleBooks are also required in Citrix Applications and Delivery Management (ADM). Now, you can directly import these StyleBooks into Citrix ADM. You don’t need to manually copy them from GitHub and then upload them into Citrix ADM or manually synchronize the files in both ADM and GitHub. You can also import and synchronize configuration packs from GitHub.
You can now define a repository in Citrix ADM that represents a GitHub repository. Provide the GitHub repository URL and your user name and or API token created in GitHub. That means, only authorized users who have a valid account in GitHub can import and sync StyleBooks.
After creating the repository, you can sync Citrix ADM with your GitHub repository. Citrix ADM connects to GitHub and imports StyleBooks found in that repository. ADM then validates the StyleBooks and adds them to the list of StyleBooks in Citrix ADM. StyleBooks are not added to Citrix ADM if they fail validation. Correct the errors and commit updated versions into your GitHub repository. Later you can try importing them or syncing them again into Citrix ADM.
StyleBooks files can be imported and synchronized from any branch of a GitHub repository.
You can import and synchronize StyleBooks that have dependent StyleBooks associated with them too.
The synchronization of StyleBooks from a GitHub repository must be initiated manually from the Citrix ADM GUI or API. That is, currently, importing and syncing of StyleBooks does not happen automatically based on GitHub commit activity.
Import StyleBooks and configuration packs from a GitHub repository
Before you begin, ensure you have a valid account in GitHub.
You can import StyleBook files to ADM from any folder in the GitHub repository. To import configuration packs, create a folder with the name
configpacks in the root directory of the GitHub repository. And, keep all the configuration packs in this folder.
The configuration pack file that you want to import must be in the JSON format. Also, the configuration file contents must follow the exported configuration format. The files associated with the configuration pack must be in the
Do the following steps to import StyleBooks and configuration packs from a GitHub repository:
- Optional, add a repository if you haven’t added.
- Select the repository in the Repositories page.
- Click Sync.
Add a repository
In Citrix ADM, navigate to Applications > Configuration > Repositories.
Click Add. In the Add Repository window, enter the following parameters:
Name - Type the name of the repository. This name can be the same as the repository name in GitHub or a different one.
Repository URL - Type the GitHub repository URL.
You can specify a GitHub enterprise URL. It helps you import or synchronize StyleBooks and configuration packs from GitHub enterprise accounts.
User Name - Type the user name that you use to access the GitHub account or enterprise account.
API Token - This token is used to access your GitHub repository. For information on how to create API tokens for your GitHub repository, see the GitHub documentation for creating personal access tokens.
The repository is created in Citrix ADM.
The following are the additional options for your repositories:
Edit. You can edit the repository URL, user name, and API token.
Delete. You can delete the repository along with all the StyleBooks present in Citrix ADM that were imported previously from that GitHub repository.
You cannot delete a repository from Citrix ADM if it has any StyleBooks that have ConfigPacks associated with them. First, delete all the configuration packs of these StyleBooks. You can later remove the repository from Citrix ADM to clean up the StyleBooks from that repository.
Reset. You can remove all StyleBooks in Citrix ADM synced from that repository without actually deleting the repository entry from Citrix ADM.
List files. You can see a list of all StyleBooks present in Citrix ADM that originates from the GitHub repository.