You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Satoshi Kobayashi <sa...@stratosphere.co.jp> on 2012/11/13 04:40:39 UTC

About the development approach of KVM Agent on master

Hi all,

I have some questions/issues about the development approach of KVM Agent.

1. Is there any document written about it?
I could not find it in cwiki.apache.org. Or is it in other places?

2. How should it be developed (in future)?
I looked at the source code of KVM Agent. It can not be launched from Maven.
(I found that just executing is not enough because KVM Agent requires
some configurations and scripts)
It seems to require packaging, whenever change is added to the code.
I think that it is probably inefficient.

A task required to develop from Maven which I think is the following.
- Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
- Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
- Skip some checks in the development environment (for example,
agent.properties)
- Add configurations and scripts to be used to the path (or from args)
- Add a tool to cleanup a KVM host (optional?)

Do you have any ideas?

Regards,
Satoshi

Re: About the development approach of KVM Agent on master

Posted by Marcus Sorensen <sh...@gmail.com>.
I'm not sure on the packaging. I've just been used to rolling the RPMs
since I began with a hardware test environment, thus I needed to distribute
the software to three separate servers and am just used to a ./waf rpm.
Haven't really switched over to doing much with Maven, It's pretty quick on
SSD.

Honestly I figured everyone else had a better way, I suppose the DevCloud
stuff works for non KVM specific code. But really this VM dev environment
has worked out really well.

On Mon, Nov 12, 2012 at 9:59 PM, Satoshi Kobayashi <
satoshi-k@stratosphere.co.jp> wrote:

> Hi Marcus,
>
> Thank you for the information!
> I see. Packaging is required now.
> I am the same environment as you.
>
> 2012/11/13 Marcus Sorensen <sh...@gmail.com>:
> > Yeah, that would be good. Currently I have a virtual machine on my
> desktop
> > that is a full blown cloudstack install.  Agent, mgt server,
> > primary/secondary storage. It works well for me, I can develop on it and
> > launch nested VMs with decent performance. It takes about two minutes to
> > build and package. Not the most efficient, but I do like being able to
> run
> > a real environment and develop against it.
> > On Nov 12, 2012 8:41 PM, "Satoshi Kobayashi" <
> satoshi-k@stratosphere.co.jp>
> > wrote:
> >
> >> Hi all,
> >>
> >> I have some questions/issues about the development approach of KVM
> Agent.
> >>
> >> 1. Is there any document written about it?
> >> I could not find it in cwiki.apache.org. Or is it in other places?
> >>
> >> 2. How should it be developed (in future)?
> >> I looked at the source code of KVM Agent. It can not be launched from
> >> Maven.
> >> (I found that just executing is not enough because KVM Agent requires
> >> some configurations and scripts)
> >> It seems to require packaging, whenever change is added to the code.
> >> I think that it is probably inefficient.
> >>
> >> A task required to develop from Maven which I think is the following.
> >> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
> >> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
> >> - Skip some checks in the development environment (for example,
> >> agent.properties)
> >> - Add configurations and scripts to be used to the path (or from args)
> >> - Add a tool to cleanup a KVM host (optional?)
> >>
> >> Do you have any ideas?
> >>
> >> Regards,
> >> Satoshi
> >>
>
>
>
> --
> Satoshi Kobayashi <sa...@stratosphere.co.jp>
>

Re: About the development approach of KVM Agent on master

Posted by Satoshi Kobayashi <sa...@stratosphere.co.jp>.
Hi Marcus,

Thank you for the information!
I see. Packaging is required now.
I am the same environment as you.

2012/11/13 Marcus Sorensen <sh...@gmail.com>:
> Yeah, that would be good. Currently I have a virtual machine on my desktop
> that is a full blown cloudstack install.  Agent, mgt server,
> primary/secondary storage. It works well for me, I can develop on it and
> launch nested VMs with decent performance. It takes about two minutes to
> build and package. Not the most efficient, but I do like being able to run
> a real environment and develop against it.
> On Nov 12, 2012 8:41 PM, "Satoshi Kobayashi" <sa...@stratosphere.co.jp>
> wrote:
>
>> Hi all,
>>
>> I have some questions/issues about the development approach of KVM Agent.
>>
>> 1. Is there any document written about it?
>> I could not find it in cwiki.apache.org. Or is it in other places?
>>
>> 2. How should it be developed (in future)?
>> I looked at the source code of KVM Agent. It can not be launched from
>> Maven.
>> (I found that just executing is not enough because KVM Agent requires
>> some configurations and scripts)
>> It seems to require packaging, whenever change is added to the code.
>> I think that it is probably inefficient.
>>
>> A task required to develop from Maven which I think is the following.
>> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
>> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
>> - Skip some checks in the development environment (for example,
>> agent.properties)
>> - Add configurations and scripts to be used to the path (or from args)
>> - Add a tool to cleanup a KVM host (optional?)
>>
>> Do you have any ideas?
>>
>> Regards,
>> Satoshi
>>



-- 
Satoshi Kobayashi <sa...@stratosphere.co.jp>

Re: About the development approach of KVM Agent on master

Posted by Marcus Sorensen <sh...@gmail.com>.
Yeah, that would be good. Currently I have a virtual machine on my desktop
that is a full blown cloudstack install.  Agent, mgt server,
primary/secondary storage. It works well for me, I can develop on it and
launch nested VMs with decent performance. It takes about two minutes to
build and package. Not the most efficient, but I do like being able to run
a real environment and develop against it.
On Nov 12, 2012 8:41 PM, "Satoshi Kobayashi" <sa...@stratosphere.co.jp>
wrote:

> Hi all,
>
> I have some questions/issues about the development approach of KVM Agent.
>
> 1. Is there any document written about it?
> I could not find it in cwiki.apache.org. Or is it in other places?
>
> 2. How should it be developed (in future)?
> I looked at the source code of KVM Agent. It can not be launched from
> Maven.
> (I found that just executing is not enough because KVM Agent requires
> some configurations and scripts)
> It seems to require packaging, whenever change is added to the code.
> I think that it is probably inefficient.
>
> A task required to develop from Maven which I think is the following.
> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
> - Skip some checks in the development environment (for example,
> agent.properties)
> - Add configurations and scripts to be used to the path (or from args)
> - Add a tool to cleanup a KVM host (optional?)
>
> Do you have any ideas?
>
> Regards,
> Satoshi
>

Re: About the development approach of KVM Agent on master

Posted by Wido den Hollander <wi...@widodh.nl>.

On 11/15/2012 02:37 AM, Satoshi Kobayashi wrote:
> Hi Wido,
>
> 2012/11/14 Wido den Hollander <wi...@widodh.nl>:
>> Hi,
>>
>> I'm in a vary luxurious, I have a rack full of hardware at my disposal to
>> test CloudStack and Ceph.
>
> It is luxurious!
>

Indeed. (I see I made a typo, meant luxurious position)

>>
>> My way of developing is:
>> * Make changes
>> * Build a new Agent / KVM JAR
>> * scp it to the hypervisor
>> * Restart the Agent
>> * See if it works!
>>
>> That is mainly the way I do my KVM development and testing.
>
> Are sure. It is not necessary to switch by RPM/DEB since it is enough
> by JAR. I did not notice it.
>

No, you don't have to build new RPM or DEB files, just replacing the 
correct JAR file is enough.

Wido

>>
>> Wido
>>
>>
>> On 11/13/2012 04:40 AM, Satoshi Kobayashi wrote:
>>>
>>> Hi all,
>>>
>>> I have some questions/issues about the development approach of KVM Agent.
>>>
>>> 1. Is there any document written about it?
>>> I could not find it in cwiki.apache.org. Or is it in other places?
>>>
>>> 2. How should it be developed (in future)?
>>> I looked at the source code of KVM Agent. It can not be launched from
>>> Maven.
>>> (I found that just executing is not enough because KVM Agent requires
>>> some configurations and scripts)
>>> It seems to require packaging, whenever change is added to the code.
>>> I think that it is probably inefficient.
>>>
>>> A task required to develop from Maven which I think is the following.
>>> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
>>> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
>>> - Skip some checks in the development environment (for example,
>>> agent.properties)
>>> - Add configurations and scripts to be used to the path (or from args)
>>> - Add a tool to cleanup a KVM host (optional?)
>>>
>>> Do you have any ideas?
>>>
>>> Regards,
>>> Satoshi
>>>
>>

Re: About the development approach of KVM Agent on master

Posted by Satoshi Kobayashi <sa...@stratosphere.co.jp>.
Hi Wido,

2012/11/14 Wido den Hollander <wi...@widodh.nl>:
> Hi,
>
> I'm in a vary luxurious, I have a rack full of hardware at my disposal to
> test CloudStack and Ceph.

It is luxurious!

>
> My way of developing is:
> * Make changes
> * Build a new Agent / KVM JAR
> * scp it to the hypervisor
> * Restart the Agent
> * See if it works!
>
> That is mainly the way I do my KVM development and testing.

Are sure. It is not necessary to switch by RPM/DEB since it is enough
by JAR. I did not notice it.

>
> Wido
>
>
> On 11/13/2012 04:40 AM, Satoshi Kobayashi wrote:
>>
>> Hi all,
>>
>> I have some questions/issues about the development approach of KVM Agent.
>>
>> 1. Is there any document written about it?
>> I could not find it in cwiki.apache.org. Or is it in other places?
>>
>> 2. How should it be developed (in future)?
>> I looked at the source code of KVM Agent. It can not be launched from
>> Maven.
>> (I found that just executing is not enough because KVM Agent requires
>> some configurations and scripts)
>> It seems to require packaging, whenever change is added to the code.
>> I think that it is probably inefficient.
>>
>> A task required to develop from Maven which I think is the following.
>> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
>> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
>> - Skip some checks in the development environment (for example,
>> agent.properties)
>> - Add configurations and scripts to be used to the path (or from args)
>> - Add a tool to cleanup a KVM host (optional?)
>>
>> Do you have any ideas?
>>
>> Regards,
>> Satoshi
>>
>

RE: About the development approach of KVM Agent on master

Posted by Mice Xia <mi...@tcloudcomputing.com>.
I'm running a similar dev Env as Wido did for KVM

A dedicated CentOS 6.3 server for KVM

* Make changes, build
* scp the cloud-plugin-hypervisor-kvm.jar and other modified jar (like cloud-api.jar) to the KVM server and restart cloud-agent
* if you want to debug cloud-agent remotely (like in eclipse), add following line to the JSVC start method in cloud-agent.sh, 
 -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787

Hope this helps

Regards
Mice

-----Original Message-----
From: Wido den Hollander [mailto:wido@widodh.nl] 
Sent: Wednesday, November 14, 2012 9:07 PM
To: cloudstack-dev@incubator.apache.org
Subject: Re: About the development approach of KVM Agent on master

Hi,

I'm in a vary luxurious, I have a rack full of hardware at my disposal 
to test CloudStack and Ceph.

My way of developing is:
* Make changes
* Build a new Agent / KVM JAR
* scp it to the hypervisor
* Restart the Agent
* See if it works!

That is mainly the way I do my KVM development and testing.

Wido

On 11/13/2012 04:40 AM, Satoshi Kobayashi wrote:
> Hi all,
>
> I have some questions/issues about the development approach of KVM Agent.
>
> 1. Is there any document written about it?
> I could not find it in cwiki.apache.org. Or is it in other places?
>
> 2. How should it be developed (in future)?
> I looked at the source code of KVM Agent. It can not be launched from Maven.
> (I found that just executing is not enough because KVM Agent requires
> some configurations and scripts)
> It seems to require packaging, whenever change is added to the code.
> I think that it is probably inefficient.
>
> A task required to develop from Maven which I think is the following.
> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
> - Skip some checks in the development environment (for example,
> agent.properties)
> - Add configurations and scripts to be used to the path (or from args)
> - Add a tool to cleanup a KVM host (optional?)
>
> Do you have any ideas?
>
> Regards,
> Satoshi
>

Re: About the development approach of KVM Agent on master

Posted by Wido den Hollander <wi...@widodh.nl>.
Hi,

I'm in a vary luxurious, I have a rack full of hardware at my disposal 
to test CloudStack and Ceph.

My way of developing is:
* Make changes
* Build a new Agent / KVM JAR
* scp it to the hypervisor
* Restart the Agent
* See if it works!

That is mainly the way I do my KVM development and testing.

Wido

On 11/13/2012 04:40 AM, Satoshi Kobayashi wrote:
> Hi all,
>
> I have some questions/issues about the development approach of KVM Agent.
>
> 1. Is there any document written about it?
> I could not find it in cwiki.apache.org. Or is it in other places?
>
> 2. How should it be developed (in future)?
> I looked at the source code of KVM Agent. It can not be launched from Maven.
> (I found that just executing is not enough because KVM Agent requires
> some configurations and scripts)
> It seems to require packaging, whenever change is added to the code.
> I think that it is probably inefficient.
>
> A task required to develop from Maven which I think is the following.
> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
> - Skip some checks in the development environment (for example,
> agent.properties)
> - Add configurations and scripts to be used to the path (or from args)
> - Add a tool to cleanup a KVM host (optional?)
>
> Do you have any ideas?
>
> Regards,
> Satoshi
>

Re: About the development approach of KVM Agent on master

Posted by Satoshi Kobayashi <sa...@stratosphere.co.jp>.
2012/11/17 Edison Su <Ed...@citrix.com>:
>
>
>> -----Original Message-----
>> From: Satoshi Kobayashi [mailto:satoshi-k@stratosphere.co.jp]
>> Sent: Monday, November 12, 2012 7:41 PM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: About the development approach of KVM Agent on master
>>
>> Hi all,
>>
>> I have some questions/issues about the development approach of KVM
>> Agent.
>>
>> 1. Is there any document written about it?
>> I could not find it in cwiki.apache.org. Or is it in other places?
>>
>> 2. How should it be developed (in future)?
>> I looked at the source code of KVM Agent. It can not be launched from
>> Maven.
>> (I found that just executing is not enough because KVM Agent requires some
>> configurations and scripts) It seems to require packaging, whenever change
>> is added to the code.
>> I think that it is probably inefficient.
>
> Kvm artifacts are packaged into plugins/hypervisors/kvm/target/kvm-agent.zip, scp kvm-agent.zip to kvm host, unzip, and execute run.sh, will start the kvm agent.
> Note:
>     Run.sh needs to be fixed, as the classpath is incorrect.
>     Need to modify conf/agent.properties, add guid, zone/pod/cluster, public{private/guest}.network.device etc.
>     Need to create zone/pod/kvm cluster before start run.sh, otherwise, kvm agent can't be added into mgt server.

I did not know that approach. nice.

>
>>
>> A task required to develop from Maven which I think is the following.
>> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
>> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")
>
> +1
>
>> - Skip some checks in the development environment (for example,
>> agent.properties)
>> - Add configurations and scripts to be used to the path (or from args)
>
>
> +1
>
>> - Add a tool to cleanup a KVM host (optional?)
>>
>> Do you have any ideas?
>
> I am thinking about running kvm agent as a http server(maybe put agent code into a jetty server), mgt server talking to kvm agent through http instead of tcp.
> Kvm agent code will be a dummy http server, always mgt server start the talk to agent.
> You can easily using mvn jetty:run to start the agent http server.
> Easy for test, you can send a command to kvm agent through wget/curl/browser etc.
>
> How do you think?

That is fantastic! I want "Management Server simulator" for debugging
of Agent. It is any http client or browser if Agent is your
architecture.

>
>>
>> Regards,
>> Satoshi

RE: About the development approach of KVM Agent on master

Posted by Edison Su <Ed...@citrix.com>.

> -----Original Message-----
> From: Satoshi Kobayashi [mailto:satoshi-k@stratosphere.co.jp]
> Sent: Monday, November 12, 2012 7:41 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: About the development approach of KVM Agent on master
> 
> Hi all,
> 
> I have some questions/issues about the development approach of KVM
> Agent.
> 
> 1. Is there any document written about it?
> I could not find it in cwiki.apache.org. Or is it in other places?
> 
> 2. How should it be developed (in future)?
> I looked at the source code of KVM Agent. It can not be launched from
> Maven.
> (I found that just executing is not enough because KVM Agent requires some
> configurations and scripts) It seems to require packaging, whenever change
> is added to the code.
> I think that it is probably inefficient.

Kvm artifacts are packaged into plugins/hypervisors/kvm/target/kvm-agent.zip, scp kvm-agent.zip to kvm host, unzip, and execute run.sh, will start the kvm agent.
Note:
    Run.sh needs to be fixed, as the classpath is incorrect.
    Need to modify conf/agent.properties, add guid, zone/pod/cluster, public{private/guest}.network.device etc.
    Need to create zone/pod/kvm cluster before start run.sh, otherwise, kvm agent can't be added into mgt server.

> 
> A task required to develop from Maven which I think is the following.
> - Add a configuration of maven-exec-plugin for KVM Agent to pom.xml.
> - Add a configuration for m2e plugin of Eclipse (like "mvn jetty:run")

+1

> - Skip some checks in the development environment (for example,
> agent.properties)
> - Add configurations and scripts to be used to the path (or from args)


+1

> - Add a tool to cleanup a KVM host (optional?)
> 
> Do you have any ideas?

I am thinking about running kvm agent as a http server(maybe put agent code into a jetty server), mgt server talking to kvm agent through http instead of tcp.
Kvm agent code will be a dummy http server, always mgt server start the talk to agent.
You can easily using mvn jetty:run to start the agent http server.
Easy for test, you can send a command to kvm agent through wget/curl/browser etc.

How do you think?

> 
> Regards,
> Satoshi