incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murali Reddy <Murali.Re...@citrix.com>
Subject Re: How to create a plugin in CS 3.0.2
Date Fri, 17 Aug 2012 10:37:59 GMT

Are you using ASF repo or other git repo? If you are not particular on
3.0.2 Please use master branch on ASF repo [1].

Code has been re-structured to make plug-in development easier. You can
take example of random host allocator at 'plugins/host-allocators/random'
to create your own plugin. Add the target for your plug-in in the
'build/build-cloud-plugins.xml' under build-host-allocators target. Edit
the components.xml and you are all set to go, no need to copy the jar, ant
deploy-server will do it for you.

[1] https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git

On 17/08/12 3:45 PM, "Hieu Le" <hieulq89@gmail.com> wrote:

>Hi,
>
>I'd like to ask what if I write a plugin to implement new algorithm in
>scheduling host for deploy VMs. I have read an adapter developer guide in
>CS 2.2 docs and Allocator Implementation Guide (ref:
>docs.cloudstack.org/CloudStack_Documenta...Implementation_Guide<http://doc
>s.cloudstack.org/CloudStack_Documentation/Allocator_Implementation_Guide>)
>but it seem to be a little bit confuse to add new plugins
>
>The steps I do:
>- Write new plugin (Implements HostAllocator and my algorithm)
>- Package to jar file with command: jar cf output.jar
>MyImplementation.java
>- Copy jar file to /usr/share/java/
>- Edit components.xml and replace FirstFitAllocator adapter with my new
>allocate algorithm.
>- Restart server with service cloud-management restart
>
>When I restart server, it failed and the logs tell that it cannot locate
>my
>own adapter (jar file).
>
>Please help me solve this problem. Did my package process correct ? How to
>make cloud server locate my new class in classpath.
>
>Thank you so so much !
>
>-- 
>..:: Hieu LE ::..
>
>Class: Information System - Course 52
>School of Information and Communication Technology
>Hanoi University of Technology
>
>High Performance Computing Center
>Cloud Computing Group
>Gmail: hieulq89@gmail.com
>



Mime
View raw message