Import and Export Supervisor configuration
Author: Desislava Gerenska
Currently, the process of activating a Supervisor involves a large number of settings spread across multiple steps. These settings often require various network details such as Supervisor Management Network, Workload Network, and Load Balancer configurations.
Many fields need to be completed before the entire activation process can be finished.
Typically, users store the values of these fields in spreadsheets or documents. However, transferring these values from documents to the user interface (UI) can be both time-consuming and error-prone. This becomes especially frustrating when deploying a second Supervisor with a similar or identical configuration.
The release of vSphere 8.0 U2 introduces significant enhancements to the Supervisor activation workflow.
In earlier versions, the Supervisor configuration required manual entry at every step of the activation workflow, resulting in significant time and effort expenses.
Now, with the new release, the configuration for a Supervisor can be saved and exported as a JSON file once the activation wizard is completed. This JSON file can then be imported when initiating a new Supervisor activation, streamlining the setup process.
Additionally, the configuration settings of an existing operational Supervisor can also be exported, preserved, and imported for future use.
Exporting a configured Supervisor's settings offers several advantages:
- Preserving Configurations: All previous configurations can be saved, making it simple to replicate them for future use.
- Efficient Troubleshooting: In the event of a failed activation, adjustments to the configuration can be swiftly made, and the process restarted. This allows for quick troubleshooting, as modifications can be directly applied to the JSON file before importing.
- Streamlined Administration: These configurations can be shared among administrators, facilitating the setup of other Supervisors with similar settings.
- Consistent Format: The exported configurations adhere to a standardized format, which is applicable to various supported deployment types. This includes VDS and NSX network stacks, NSX, HA Proxy Load Balancers, and more. This format is used by both vSphere and Service Installer for VMware Tanzu.
Export the configuration during the Supervisor activation workflow
The current configuration of the Supervisor can be preserved at the end of the activation workflow by selecting the “Export configuration” option:
Upon completing the workflow by clicking the "Finish" button, the configuration will be exported. It will be saved in a zip file named "wcp-config.zip" and stored locally on the disk in the browser’s default download folder. Within the zip file, you will find:
- A JSON file containing the Supervisor configuration named "wcp-config.json"
- A valid JSON schema file named "wcp-config-schema.json"
The "wcp-config.json" file contains the preserved configuration for the Supervisor. Each setting has a corresponding name and place within the JSON file.
This JSON file adheres to a hierarchical data structure. It utilizes the same field names as the sample input file used by the . A JSON file exported via the Service Installer can subsequently be imported into the Supervisor activation workflow within the vSphere Client.
It's important to note that settings irrelevant to the current Supervisor configuration are not included in the export. All available settings are comprehensively detailed in the JSON schema file.
Below is an illustrative example of the JSON file that is generated during the activation of Supervisor, configured with AVI load balancer and VDS network settings:
The second file included in the exported zip file is the JSON schema file. This file serves as a reference point. It comprehensively outlines all exportable settings for the Supervisor, encompassing their type, location within the JSON file, and whether they are required. The schema file serves as a foundation for generating a sample configuration JSON file, which can then be manually populated and imported into a fresh activation workflow.
Importantly, during the import of a configuration, the JSON schema file should not be uploaded. The vSphere Client dynamically generates a JSON schema at runtime based on the supported Supervisor configuration in the vSphere Client. This mechanism also includes validations of the imported settings, ensuring their accuracy and maintaining consistency.
Export the configuration from an existing Supervisor
The configuration of an existing Supervisor can also be exported and persisted. A new "Export Config" action has been introduced at the top of the supervisors' grid within Workload Management. This action facilitates the export of the chosen supervisor's configuration in the same manner as it occurs during the Supervisor activation workflow. This results in the generation of a "wcp-config.zip" file, which is then downloaded locally.
This feature is useful in scenarios where troubleshooting a supervisor requires deactivation and subsequent reactivation. It effectively reduces the time and effort involved in manually inputting all the settings during the subsequent activation. Furthermore, it facilitates the easy replication of configurations and enables straightforward sharing among administrators.
Import the configuration from a JSON file into Supervisor activation workflow
To import the Supervisor configuration into the activation workflow, simply click the "Import Config" button at the top of the wizard.
The info message in the dialog box explains that certain imported settings are specific to particular environments and are not applicable in the current context.
Additionally, sensitive information such as passwords for the load balancer cannot be exported. Consequently, fields containing this kind of information within the user interface will not be automatically populated and will require manual input.
Before the upload, the vSphere Client conducts a verification process on the file. Errors might be displayed if the uploaded file is found to be invalid or corrupted JSON. Similarly, errors will appear if the JSON file lacks the spec version or if the spec version exceeds what is currently supported by the client.
If the uploaded file successfully passes validation, the configuration is imported, and a confirmation message is displayed.
The message highlights any missing values in the imported configuration, specifically focusing on fields that are marked as required but remain unspecified (empty) in the JSON file. In such cases, the message provides descriptions of the absent fields and indicates where within the UI they can be filled in.
Furthermore, the user interface conducts validations on the imported configuration and, if any incompatible settings are detected, a warning message is presented to the user.
When warnings are issued, the configuration is still imported, and the relevant settings are automatically pre-selected or populated within the inputs in the corresponding workflow pages.
In cases where all the imported settings are both applicable and relevant, the entire Supervisor activation workflow can be completed by simply clicking the "Next" button. This streamlined process significantly reduces the need for manual input and saves valuable time and effort.
The export and import functionality of the supervisor configuration offers benefits beyond automatic population of settings. It allows for the preservation of the current supervisor configuration and facilitates easy sharing among administrators.
Clone the configuration from an existing Supervisor
In addition to the "Export Config" action, there is also a "Clone Config" option available.
The "Clone Config" action retrieves the Supervisor configuration from the chosen supervisor. Unlike the "Export Config" action, it doesn't involve exporting these settings into a separate file. Instead, it immediately imports them into the initiation of a new activation workflow. This avoids the need for manual exporting and importing of files. Essentially, the "Clone Config" action achieves the same outcome as "Export Config", but without the creation and retention of the settings in a JSON file.