Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Is there APIs to use openQRM and if so where is the doc?
yep, please see at :
There is also a sample plugin which can be used as a template for new plugins.
It explains how to use the API for openQRM (-plugins).
thanks + best,
Thanks for reply.
I am rather interested in calling openQRM and not otherway around. The way I understand about plugin is that openQRM will call plugin based on the extension it implements. I want to treat running openQRM as an entity by itself and then invoke its function from external app. e.g programmatically trigger instantiation of VE.
cool, you can do it either via the qrm-cli util or via a plugin.
Using the qrm-cli is the easy way while by creating an own plugin you will have more control and can e.g. access internal objects of the openQRM server.
I did some readup on JPF and then came back to http://www.openqrm.org/howtos/plugins-in-openqrm.html
Above page seems to describe plugins two ways: One as per JPF and another QRM's way. Is that correct? The page describe having shell script, etc dir, include dir etc.
I'm bit confused from the contents of the page. The page initially talkes about JPF, but then mixes it with shell scripts, installing plugins etc. which is not part of JPF.
the pluggability in openQRM is implemented by JPF.
The openQRM server provides extension points in which the
openQRM plugins can hook into e.g. the "qrm" boot-service
extension point for the managed nodes is configured in a
simple xml file as :
<extension plugin-id="com.qlusters.qrm.plugins.core" point-id="BootService" id="node-agents">
<parameter id="name" value="node-agents"/>
<parameter id="runlevel" value="35"/>
<parameter id="package" value="http://$QRM_SERVER_IP_ADDRESS/unsecure/qrm-data.tgz"/>
<parameter id="init" value="etc/init.d/qrm"/>
That means that each node associated with this "qrm" boot-service will
automatically download the boot-service package qrm-data.tgz from the openQRM server,
unzip it and run the init script etc/init.d/qrm (from inside the package)
at runlevel 3 and 5. This boot-service integrates and runs a script on the nodes.
Other extension points like menu- and webpage-integration may integrate webpages.
The server-services may run a script on the openQRM-server while the event-listener
extension could integrate a jar file and run a specific method from it.
All these extension points can be created/configured in a similar way through the
There are some conventions about the openQRM plugins e.g. the xml-files are in plugin-name/etc,
there needs to be a function file at plugin-name/include/plugin-name-functions which
at least needs to provide an install/uninstall and start/stop function for
the plugin installation.
-> the easiest way is you take the sample-plugin and change it to your needs.
Thanks. Appreciated very much.
Re-read openQRM and jpf pages and here is what I understand: openQRM leverages extension point/extension (i.e plugin) mechanism from JPF. openQRM has defined number of extension points e.g BootService, PageIntegration etc. The extension requirements are defined by openQRM e.g etc,include dir, *-functions, *.xml files. How/what to execute logic from/of extension is specified as "parameter"s .
If my understanding above is correct, then it can also be said that the plugin logic executes in a seperate process(e.g dhcpd) or within openQRM's own process space-in case of Java class e.g Network plugin( <extension plugin-id="com.qlusters.qrm.plugins.core" point-id="CLI" id="NetworkConfigurationLoadCLI">)
Am I on right track?
yep, more or less.
If the plugin contains a java part this is being executed in the same address space than the openQRM-server (e.g. the jar included in the vmware-plugin. In case the plugin starts an external script/utils/application this happens in a new/separated address space (e.g. dhcpd, tftpd, etc.)
Now coming back to original question of using/invoking openQRM from my app. Two approaches were suggested: 1)CLI qrm-cli - I can see how that would work (2) plug-in -I am not sure.
Some thoughts on plugin:
I want to keep life cycle of my app independent of openQRM and have the app access functions of openQRM e.g start VE or list all VEs. My apologies, but I fail to see how this could be done through plugin. I can probably create a plugin which receives commands from my app (through socket), but then how would the plugin invoke appropriate functions of the openQRM.
for pure java, extend the ServerService extension point to start listening on a socket.
or, better in this case, create a jsp and put it in java/webapp/unsecure. then, you can receive http commands (REST api).
to take actions on VEs, use com.qlusters.qrm.server.api.services.ApiServicesLocator.getInstance().getVirtualEnvironmentServices() to get the service class.
then use actions like create, delete, start
yep, you have both options, qrm-cli and/or plugin.
For the qrm-cli you could create a small server which executes the
qrm-cli commands according "your app". Receiving commands can be done
e.g. through sockets, pipes or files as you mentioned.
With a plugin you can do it in a similar way but you can also run internal
openQRM functions and access the openQRM-servers objects in the plugins
java-part. e.g. :
- create a new plugin
- let the build of the plugin create a new jar file
(it will be read/added automatically to the openQRM-server if in the
include dir of the plugin)
- in this java part, open and listen to a socket
- according to what is put on the socket exectue diffrent java methods
You may want to have a look at the demo-plugin, it is doing exactly that
but using (lazy) files for communication. It is running its own thread in the
openQRM-server which checks for new content in a specific file.
hope it helps, have a great day,
The plugin documentation link (for anybody else who looks here for it) is now http://www.openqrm.com/?q=node/77
i'm using a bpel process to call web services exposed in the wsdl of openqrm server. I'm trying to call the Api int CloudProvision(string $method_parameters) using as input the string containing parameters specified in the documentation site http://www.openqrm.com/drupal/userfiles/docs/openqrm-soap-api/openQRM-Cloud%20SOAP%20API/cloudsoap.html#methodCloudProvision. But when i do the call i see in the openqrm log "Wrong parameter count 14 ! Exiting." My method_parameters string is something like that "user,myuser,mypass,myclouduser,CentOS-x86_64-2.6.18-194.26.1.el5,centos_54_64bit,256,1,2000,1,1,KVM VM,0,"
I followed step by step the doc, i use openqrm 4.9.
in the last days i try to follow the example file that is contained in the source directory of openqrm 4.9,
the file clouduser-soap-example-client.php in which is specified the correct use of the api CloudProvision, following the file style come out this string "user,myuser,mypass,myclouduser,09-03-2012 15-00,09-03-2012 19-00,CentOS-x86_64-2.6.18-194.26.1.el5,centos_54_64bit,256,1,2000,1,1,KVM VM,0,,," Now the number of parameters is correct but naturally we have other issues "Cloud User myclouduser: Cloud Kernel Product () is not existing". Is there any advice? I did something wrong? I'm using the right version of documentation?
you are using the right version of the API. Just the CloudProvision was enhanced so the parameter number changed.
This is sadly not yet up2date in the API doc. We will care about it for the next release.
About the kernel-product issue:
For the API it is recommended to use the Cloud Selector. Did you created a kernel product ?
If yes then please use getproductdetails to fetch the kernel list from the Webservice.
many thanks and have a nice day,
Project Manager openQRM