Version Upgrade support for Fabric Apps and Services using MFCLI
Overview
A Quantum Fabric application stored in the workspace comprises shared and non-shared services. Fabric supports versioning for integration services, orchestration services, and object services. Versioning is the process of assigning unique version numbers to unique states of software. Within a given version number category (major, minor), these numbers are generally assigned in increasing order and correspond to new developments in the software.
From Quantum Fabric V9 SP3, MFCLI now the supports Version Upgrade. This feature helps you to update Fabric apps and services version.
MFCLI is enhanced with the app-upgrade
and service-upgrade
commands. Using these, you can upgrade a version of an app zip or a service zip to higher versions as required. These commands are applicable only to those services which support versioning.
NOTE: For more information on how to version a Fabric API, refer to Quantum Fabric API Versioning
For more information on how to version a Fabric App, refer to Quantum Fabric Application Versioning
Prerequisites
- Fabric Command Line Utility
v9.3.0.0
The app-upgrade
command generates upgraded app zip to the nearest major or minor version. All relevant services in the zip will also be upgraded to their nearest major or minor version.
When you upgrade a Fabric app, a new version of the app.zip is created in your local system. The new version is applied to the app and the linked services in it. You can specify a major or minor version for upgrading the selected app version.
Use Case: A Fabric app is implemented with several services according to a business requirement. Now, you want to upgrade the version of the app and all the associated services to a higher major or minor version. You can achieve this scenario by using the app-upgrade command.
The following table details a sample app with services, and the result of the app-upgrade command.
Sample Fabric App has services with versions | App-upgrade to a Major Version |
---|---|
App v3.0
|
App v4.0
|
App-upgrade to a Minor Version | |
App v3.1
|
Use the following command to upgrade the app.zip. An output app.zip file with the new version (upgrade app zip from the previous version of the app) is created.
For Cloud environment,
java -jar mfcli.jar app-upgrade -u <user> -p <password> -t <account id> -clurl <cloud url> -r <output-directory> -a <app name> -v <app version> -ut <major/minor> -to <timeout in mins>
For on-premise installation, java -jar mfcli.jar app-upgrade -u <user> -p <password> -au <Identity URL> -cu <Console URL> -r <output-directory> -a <app name> -v <app version> -ut <major/minor> -to <timeout in mins>
-
-t, --account: 9 digit id of the Kony Cloud account (visible in top right corner in Console) for e.g. 100054321. Not relevant for an on-premise installation.
-
* -a, --app: Name of the app which needs to be upgraded
-
-clurl, --cloud-url: URL of cloud instance Default: <empty string>
-
-cu, --console: URL of Kony Fabric Console (without context path), relevant for on-premise installation only. For e.g. http://10.10.24.78:8081
-
-r, --directory: Name of the directory to export to or import from. For e.g. C:\\src\\Sample. Either -f or -r has to be specified.
-
-f, --file: Name of the file to export or import. For e.g. C:\\tmp\\Sample.zip. Either -f or -r has to be specified.
-
-au, --identity: URL of Kony Fabric Identity Services (without context path), relevant for on-premise installation only. For e.g. http://10.10.24.79:8080
-
--mfa: If specified, multi-factor authentication is enabled. The secret key for multi-factor authentication required for generating one time password (OTP) needs to be specified in the properties file. Default: false
-
-p, --password: Password for the Kony user. This could be plain text or, encrypted using 'encrypt' command. This is mandatory.
-
-to, --timeout: Timeout for the export of the resource in minutes
-
* -ut, --upgrade-type: Type of upgrade, can be either 'major' or 'minor'
-
-ut major
generates an upgraded zip to the nearest major version. All services in zip will be upgraded to their nearest major version -
-ut minor
generates an upgraded zip to the nearest minor version. All services in zip will be upgraded to their nearest minor version
-
-
-u, --user: Kony user required for authentication, for e.g. abc@kony.com. This is mandatory.
-
* -v, --version: Version of the app which needs to be upgraded
NOTE: If the multiple versions of the same app are existing in the same account, the app-upgrade will assign the next available major or minor version.
For example, Fabric app has versions v3.0, v4.0, and v5.0 configured in the same account, and when you try to update any of these versions to a major upgrade, the app is upgraded to the next higher version. In this case, App v6.0.
If the same app has a Fabric service with versions v1.0, v2.0, and v3.0 in the same account, and when you try to use the app-upgrade command for a major upgrade, the service is upgraded to the next higher version. In this case, the Service v4.0.
The service-upgrade
command generates upgraded service zip to the nearest major or minor version. Relevant services in zip will be upgraded to their nearest major or minor version.
When you upgrade a Fabric service version, a new version of the service.zip is created in your local system. You can specify a major or minor version for upgrading the selected service version.
Use Case: Few Fabric services are implemented in a Fabric app. Now, you want to upgrade a specific service to a higher major or minor version. You can achieve this scenario by using the service-upgrade command.
For example, the following table details a sample service zip version, and the result of the service-upgrade command.
Sample Fabric Service Version | Service-upgrade to a Major Version |
---|---|
Service v1.1 |
Service v2.0 |
Service-upgrade to a Minor Version | |
Service v1.2 |
Use the following command to upgrade the service.zip. An output zip file with new version (upgrade service zip from the previous version of the service) is created.
For Cloud environment,
java -jar mfcli.jar service-upgrade -u <user> -p <password> -t <account id> -clurl <cloud url> -r <output-directory> -s <service name> -v <service version> -ut <major/minor> -to <timeout in mins>
For on-premise environment,
java -jar mfcli.jar service-upgrade -u <user> -p <password> -au <Identity URL> -cu <Console URL> -r <output-directory> -s <service name> -v <service version> -ut <major/minor> -to <timeout in mins>
-
-t, --account: 9 digit id of the Kony Cloud account (visible in top right corner in Console) for e.g. 100054321. Not relevant for an on-premise installation.
-
* -a, --app: Name of the app which needs to be upgraded
-
-clurl, --cloud-url: URL of cloud instance Default: <empty string>
-
-cu, --console: URL of Kony Fabric Console (without context path), relevant for on-premise installation only. For e.g. http://10.10.24.78:8081
-
-r, --directory: Name of the directory to export to or import from. For e.g. C:\\src\\Sample. Either -f or -r has to be specified.
-
-f, --file: Name of the file to export or import. For e.g. C:\\tmp\\Sample.zip. Either -f or -r has to be specified.
-
-au, --identity: URL of Kony Fabric Identity Services (without context path), relevant for on-premise installation only. For e.g. http://10.10.24.79:8080
-
--mfa: If specified, multi-factor authentication is enabled. The secret key for multi-factor authentication required for generating one time password (OTP) needs to be specified in the properties file. Default: false
-
-p, --password: Password for the Kony user. This could be plain text or, encrypted using 'encrypt' command. This is mandatory.
- * -s, --service: Name of the service which needs to be upgraded
-
-to, --timeout: Timeout for the export of the resource in minutes
-
* -ut, --upgrade-type: Type of upgrade, can be either 'major' or 'minor'
-
-ut major
generates an upgraded zip to the nearest major version. All services in zip will be upgraded to their nearest major version -
-ut minor
generates an upgraded zip to the nearest minor version. All services in zip will be upgraded to their nearest minor version
-
-
-u, --user: Kony user required for authentication, for e.g. abc@kony.com. This is mandatory.
-
* -v, --version: Version of the app which needs to be upgraded
NOTE: If the Fabric service has versions v1.0, v2.0, and v3.0 configured in the same account, and when you try to update any of these versions to a major upgrade, the service is upgraded to the next available higher version. In this case, the Service v4.0.