> > -----Original Message----- > From: Murali Reddy [mailto:murali.re...@citrix.com] > Sent: Wednesday, August 22, 2012 5:22 AM > To: cloudstack-dev@incubator.apache.org > Subject: Re: How to create a plugin in CS 3.0.2 > > On 22/08/12 6:23 AM, "Jessica Tomechak" <jessica.tomec...@gmail.com> > wrote: > > >> > >> -----Original Message----- > >> From: Murali Reddy [mailto:murali.re...@citrix.com] > >> Sent: Friday, August 17, 2012 3:38 AM > >> To: cloudstack-dev@incubator.apache.org > >> Subject: Re: How to create a plugin in CS 3.0.2 > >> > >> > >> 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. > > > > > >Murali, > >Does this mean we need to update or replace the Allocator > >Implementation Guide and/or the Adapter Framework guide for CloudStack > >4.0? Both can be seen at the link below. > > Jessica, > > My comment was only about the changes that will be available in 4.0 from > source code perspective, where its easy to discover integration points and > develop one. However, allocators implementation guide is okay but adapter > framework guide is pretty old and does not reflect all the integration > points that will be available in 4.0. This needs an update. Should I open a > doc bug with the details on whats required? > > > Thanks, > Murali >
Yes, Murali, please do! And since it always bears repeating, here's how: https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Documentation+Contributors+Overview#CloudStackDocumentationContributorsOverview-FilingaDocBug Jessica T. CloudStack Tech Pubs > > > >Hieu, please confirm whether these are the documents you were referring > >to in your note: > > > >http://docs.cloudstack.org/CloudStack_Documentation/Additional_CloudSta > >ck_ > >Documentation > > > >Jessica T. > >CloudStack Tech Pubs > > > > > >> 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" <hieul...@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_G > >> >uid > >> >e>) 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: hieul...@gmail.com > >> > > >> > >> > >> > > > > >