Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 536C9D791 for ; Wed, 22 Aug 2012 12:22:20 +0000 (UTC) Received: (qmail 94993 invoked by uid 500); 22 Aug 2012 12:22:20 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 94858 invoked by uid 500); 22 Aug 2012 12:22:19 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 94847 invoked by uid 99); 22 Aug 2012 12:22:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2012 12:22:19 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Murali.Reddy@citrix.com designates 203.166.19.134 as permitted sender) Received: from [203.166.19.134] (HELO SMTP.CITRIX.COM.AU) (203.166.19.134) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2012 12:22:12 +0000 X-IronPort-AV: E=Sophos;i="4.77,808,1336348800"; d="scan'208";a="12449332" Received: from banpmailmx01.citrite.net ([10.103.128.73]) by SYDPIPO01.CITRIX.COM.AU with ESMTP/TLS/RC4-MD5; 22 Aug 2012 12:21:48 +0000 Received: from BANPMAILBOX01.citrite.net ([10.103.128.72]) by BANPMAILMX01.citrite.net ([10.103.128.73]) with mapi; Wed, 22 Aug 2012 17:51:47 +0530 From: Murali Reddy To: "cloudstack-dev@incubator.apache.org" Date: Wed, 22 Aug 2012 17:52:28 +0530 Subject: Re: How to create a plugin in CS 3.0.2 Thread-Topic: How to create a plugin in CS 3.0.2 Thread-Index: Ac2AYLMwwzbyA3a4Ti6mX65zJOcOtA== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.3.120616 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 On 22/08/12 6:23 AM, "Jessica Tomechak" wrote: >> >> -----Original Message----- >> From: Murali Reddy [mailto:Murali.Reddy@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 > >Hieu, please confirm whether these are the documents you were referring to >in your note: > >http://docs.cloudstack.org/CloudStack_Documentation/Additional_CloudStack_ >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=3Dincubator-cloudstack.git >> >> On 17/08/12 3:45 PM, "Hieu Le" 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> >doc >> >s.cloudstack.org/CloudStack_Documentation/Allocator_Implementation_Guid >> >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: hieulq89@gmail.com >> > >> >> >> >