Method to upload services (JAR file) to the Apps in Kony Fabric using mfcli.jar?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

As per question, would like to know if it is possible to upload, download or manage the services deployed on the App in Kony Fabric without using mfconsole. The intention is to create a CI flow to deploy those custom services (in JAR format).

However, so far i only found this document (http://docs.kony.com/konylibrary/konyfabric/kony_fabric_user_guide/Default.htm#CI_MobileFabric.htm ) where it use a compiled .zip or folder to import and export as a whole application with metadata and JSON, not on service level.

**Update:

I have drilled into mfcli.jar file, i find that there are 2 commands inside: ImportServiceCommand.class and ExportServiceCommand.class. Can anyone guide me the method to use these 2 commands?

**Update 2:

Okay, i think i have found the sample through mfcli.jar help. However, i get TimeOut error when trying to export-service.

command:

#java -jar mfcli.jar export-service -u <user> -p <encrypted_password> -au http://<fabric ip>:8080 -cu http://<fabric ip>:8080 -f "/path/to/service.zip" -s service -v 1.0

output:

Exporting service [service], version [1.0] and storing to ["/path/to/service.zip"]...

ERROR: HTTP GET on http://<fabric ip>:8080/workspace/100000002/api/v1/ws/100000002/service/versions?name=service failed for fetch the versions of service. Details - Read timed out

**Update 3:

Found out that TimeOut error is due to network issue, i didnt get TimeOut after change to intranet machine.

I have another question in my head, is it possible to link the service to an App without mfconsole? Because i find that the imported service is not link to any App in default. Any configuration can be made so the imported service will linked to an App automatically?

**Update 4:

Just realised even service level of deployment using mfcli.jar is bundled together with metadata file. Can anyone propose solutions to import service, JAR file only without metadata? Then link the imported service to existing App?

Appreciate any help and feedback.

Hi,

I've worked with mfcli.jar quite a bit myself. The feature to import/export integration services on their own is fairly new, and -as far as I know- there's no supported programmatic way to link a service with an app. But it does sound like a reasonable requirement. You should open a support ticket and request this additional feature for the mfcli.jar.

If you are in a hurry and/or desperate, you can try hitting the underlying API the Fabric Console uses. But you have to keep in mind that consuming the raw Fabric API is not supported. If the endpoint or the authentication are modified in any way, it will break your CI flow.

Hi,

Thank for the reply. Currently we have decided to use App import and export as a whole for now. In the same time, we are interested with the method by using the underlying API of Fabric Console. Are there any documents and guidance can be provided so that we can do POC on it?

Appreciate your help and feedback.