Deploying custom plug-in files and updates to configuration files
When you are ready to upload and deploy your custom Java™ plug-in code files and configuration updates to the IBM® IoT Connected Vehicle Insights Development Edition, use the DevOps Plug-in Deployment REST API.
About this task
By using the DevOps Plug-in Deployment REST API requests, you can deploy custom plug-ins and apply plug-in configuration updates to the following IBM IoT Connected Vehicle Insights server components:
| Customizable server component | Permitted
|
|---|---|
| The Vehicle Data Hub (VDH) component | vdh |
| The Agent system component | agent |
| The online Driver Behavior component | drbonline |
| The offline Driver Behavior component | drboffline |
Important notes
-
When you use the DevOps Plug-in Deployment REST API, you must specify the plug-in type for each operation request, or command that you submit. Ensure that you use the exact plugin_type value and case that is specified in the table.
-
Your custom plug-in code files must conform to Form-based File Upload in HTML - RFC 1867.
-
Custom plug-in file names must not exceed 255 characters and can contain any character from the POSIX portable filename character set, for example, “A-Z”, “a-z”, “0-9”, “-”, “_” and “.”
Procedure
You can upload and deploy custom plug-in files to the development edition of IBM IoT Connected Vehicle Insights by using the following HTTP REST API PUT request:
URL
https://[DEVOPS_HOST]/admin/v1/plugin/{plugin_type}
Method
PUT
Content Type
Multipart/form-data
Parameters
| Parameter | Description |
|---|---|
| [DEVOPS_HOST] | The public address of the DevOps server, as provided in your customer welcome pack. |
| {plugin_type} | The target IBM IoT Connected Vehicle Insights component that the custom plug-in is for. For the supported components and plug-in types, see the table in About this task. |
| {file_name} | The name of the plug-in code or configuration file that you would like to deploy. |
| tenant_id= | Tenant ID to deploy plug-in files. This can be used only with drbonline or drboffline plugin_type. |
Response message
Content Type: application/json
200 The request was successful.
400 The uploaded file name is invalid.
401 The specified user name or password was invalid.
404 An invalid plug-in type was specified.
409 The request was canceled because another process is already running.
500 A server error occurred while deploying the plug-in files to the specified component.
Example curl REST API request
- The following example provides a curl request for deploying the
MyPlugin.jarcustom plug-in file and an updated version of thegateway.propertiesconfiguration file to the VDH component of IBM IoT Connected Vehicle Insights:
$curl -X PUT -u <admin_user>:<admin_password> -F ‘file=@gateway.properties’ -F ‘file=@MyPlugin.jar’ https://[devops_host]/admin/v1/plugin/vdh
Next
-
Test the custom plug-ins that you deployed to your development edition of IBM IoT Connected Vehicle Insights.
-
To troubleshoot problems with plug-in deployment, see Retrieving plug-in deployment log files
-
To remove any of your deployed custom plug-in files, see Deleting a deployed plug-in file
-
When your plug-ins are successfully deployed and tested, to deploy them to production, contact IBM Support to raise a change request with the IBM Cloud team.