Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Remote deployment of dp file
Remote deployment of dp file [message #1797356] Tue, 30 October 2018 09:54 Go to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
Hello
I want to deploy .dp remotely but dont want to use manually steps like mtoolkit require .how i deployed using mqtt or something?
Re: Remote deployment of dp file [message #1797357 is a reply to message #1797356] Tue, 30 October 2018 09:56 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi,
from the cloud, you could use DEPLOY-V2 functionality: https://eclipse.github.io/kura/ref/mqtt-namespace.html#deploy-v2
It is directly integrated in Eclipse Kapua project

Best regards,
Matteo
Re: Remote deployment of dp file [message #1797378 is a reply to message #1797357] Tue, 30 October 2018 13:01 Go to previous messageGo to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
does it support for all kura versions?
Re: Remote deployment of dp file [message #1797384 is a reply to message #1797378] Tue, 30 October 2018 13:22 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
It should be supported since Kura 2.
Previously there was DEPLOY-V1 and the namespace is available in the shared document as well

Best regards,
Matteo
Re: Remote deployment of dp file [message #1797386 is a reply to message #1797384] Tue, 30 October 2018 13:33 Go to previous messageGo to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
Thank you .
does DEPLOY-V2 functionality supports in paho.mqtt library .?

[Updated on: Tue, 30 October 2018 13:36]

Report message to a moderator

Re: Remote deployment of dp file [message #1797389 is a reply to message #1797386] Tue, 30 October 2018 13:49 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
I'm sorry, what do you mean?
It's a different level of abstraction.
Could you detail a little bit your question?

Matteo
Re: Remote deployment of dp file [message #1797451 is a reply to message #1797389] Wed, 31 October 2018 06:48 Go to previous messageGo to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
hello
Can i used any external library for mqtt like paho.mqtt.client library for mqtt connection to handle request /response and one another questions is Deploy-v2 is an any bundle ?.need to install on kura ?.
Re: Remote deployment of dp file [message #1797453 is a reply to message #1797451] Wed, 31 October 2018 08:23 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi, it's still not clear to me.
But Kura has already integrated an mqtt client.
Don't know if you are willing to use it or another implementation.

Best regards,
Matteo
Re: Remote deployment of dp file [message #1797457 is a reply to message #1797453] Wed, 31 October 2018 08:49 Go to previous messageGo to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
I have to create own script for deploy the kura bundles through mqtt so any example available for it ?
Re: Remote deployment of dp file [message #1797458 is a reply to message #1797457] Wed, 31 October 2018 08:53 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
I would suggest to try Kapua and connect Kura to that instance.
With this setup you don't need any script, but just simply specify the dp that you want to install to the target device.

Matteo
Re: Remote deployment of dp file [message #1797459 is a reply to message #1797458] Wed, 31 October 2018 08:57 Go to previous messageGo to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
Thank you..
Re: Remote deployment of dp file [message #1797634 is a reply to message #1797384] Sat, 03 November 2018 07:29 Go to previous messageGo to next message
shubh wade is currently offline shubh wadeFriend
Messages: 28
Registered: July 2018
Junior Member
Hello
I have tried to used amit's mqtt applicationhttps://github.com/amitjoy/Kura-MQTT-Client-Utility .
publish topic :$EDC/rubyhall/testruby/DEPLOY-V2/EXEC/download
subscribe topic $EDC/rubyhall/CLIENT_3QU6ENQQJLPHQ5ENTS4GNJOMV0/DEPLOY-V2/REPLY/REQUEST_48UPV35VT2KVUSO459NU48KSQB
added this payload while publishing.
                           payload.addMetric("request.id",REQUEST_48UPV35VT2KVUSO459NU48KSQB);
				payload.addMetric("requester.client.id", CLIENT_3QU6ENQQJLPHQ5ENTS4GNJOMV0);
                            long jobid=12457256L;
                         payload.addMetric("dp.job.id",jobid);
				payload.addMetric("dp.name", "com.eclipse.kura.example.serial");
				payload.addMetric("dp.version"," 1.0.0.201810121816");
				payload.addMetric("dp.uri", "http://192.168.**.*:8080/dp/SerialExample.dp");
			    payload.addMetric("dp.download.protocol", "HTTP");


I have only receiving this message on kura log.i think cloud service should publish response on subscribe topic.
2018-11-03 12:41:37,191 [MQTT Call: testruby] INFO  o.e.k.c.c.CloudServiceImpl - Message arrived on topic: $EDC/rubyhall/testruby/DEPLOY-V2/EXEC/download


Can you please explain why this is happing ?

[Updated on: Mon, 05 November 2018 04:50]

Report message to a moderator

Re: Remote deployment of dp file [message #1807953 is a reply to message #1797634] Thu, 13 June 2019 07:10 Go to previous message
Miguel del Castillo is currently offline Miguel del CastilloFriend
Messages: 3
Registered: June 2019
Junior Member
Hi, I don't know if you still interested in the solution. I have not yet, but I am working on it.

I have the same issue, but for a different reason.

I am mostly at the same point but I am getting a response from Kura telling me that the request is bad.

Here my mqtt message. I am doing manually to understand and the it will be used from node-red.

{"metrics":
{
"request.id":"123456789",
"requester.client.id":"MQTT_FX_Client",
"dp.job.id":1234,
"dp.uri":"http://10.6.18.238:1880/hola",
"dp.name":"heater",
"dp.version":"1.0.0",
"dp.download.protocol":"HTTP",
"dp.install":true
}
}

My uri is referencing an API REST implemented on Kura. I have tested that the file downloads when the api is called and that the file still working as dp.

If I achieve it, I will tell you.

(Sorry for my english, feel free to correct me, PLEASE)


Edit:

I can't find information about this issue:

Here is the log output.


2019-06-13T14:25:14,982 [pool-33-thread-2] INFO  o.e.k.c.d.CloudDeploymentHandlerV2 - Malformed download request!
2019-06-13T14:25:14,984 [pool-33-thread-2] WARN  o.e.k.KuraException - Could not load Exception Messages Bundle for Locale en_US
2019-06-13T14:25:14,985 [pool-33-thread-2] WARN  o.e.k.KuraException - Could not load Exception Messages Bundle for Locale en_US
2019-06-13T14:25:14,985 [pool-33-thread-2] WARN  o.e.k.KuraException - Could not load Exception Messages Bundle for Locale en_US
org.eclipse.kura.KuraException: Generic Error - BAD_REQUEST: {1}
        at org.eclipse.kura.core.deployment.CloudDeploymentHandlerV2.doExecDownload(CloudDeploymentHandlerV2.java:489) ~[org.eclipse.kura.core.deployment_1.1.400.jar:?]
        at org.eclipse.kura.core.deployment.CloudDeploymentHandlerV2.doExec(CloudDeploymentHandlerV2.java:372) ~[org.eclipse.kura.core.deployment_1.1.400.jar:?]
        at org.eclipse.kura.core.cloud.MessageHandlerCallable.call(MessageHandlerCallable.java:139) [org.eclipse.kura.core.cloud_1.1.300.jar:?]
        at org.eclipse.kura.core.cloud.MessageHandlerCallable.call(MessageHandlerCallable.java:1) [org.eclipse.kura.core.cloud_1.1.300.jar:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) [?:?]
        at java.lang.Thread.run(Thread.java:844) [?:?]

[Updated on: Thu, 13 June 2019 13:48]

Report message to a moderator

Previous Topic:KuraPayload body
Next Topic:[kura 4.1.0] REPLY topic problem
Goto Forum:
  


Current Time: Fri May 03 20:59:08 GMT 2024

Powered by FUDForum. Page generated in 0.03524 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top