Awesome! I'll try to play with Marvin and cloudmonkey to do prep for jclouds tests with the simulator this weekend. Thanks!
A. On Thu, Jul 4, 2013 at 8:19 AM, Prasanna Santhanam <t...@apache.org> wrote: > Andrew - Firstly, apologize for the delayed response. You caught me at > a bad time when I was attempting to fix the simulator which was broken > when you sent this email. It took longer than expected to fix and get > it back in shape. > > My comments are inline. > > On Mon, Jun 24, 2013 at 11:08:20AM -0700, Andrew Bayer wrote: > > Hey all - > > > > So, at David Nalley's suggestion, I'm trying to run jclouds' live tests > for > > ACS against a simulator instance, so that I can actually run the full > > battery of API tests (including global admin, advanced and basic > > networking, etc) without having to set up a ton of CloudStack instances. > In > > a perfect world, it'd be great if there was a standalone war that used h2 > > for the DB and had different flags to pass to it for different starting > > settings, but I'd be immensely happy to be able to get the following in > > place on startup (or an easy script to run to do this on top of the base > > setup): > > > Indeed, this is something David discussed with me and it's a great way > to run the live tests of jclouds. Right now the simulator jar is > packaged as a plugin. But there's a few spring related connections to > be made to get it to work with CloudStack installs. I'll figure out > how we can package (may be a simulator cloudstack rpm) so you can have > this running. > > The simulator itself only provides the ability to mock hypervisor > commands but the setup of the network model, zone type etc needs to be > done from the outside. This can be done with the help of marvin's json > configuration commands. It's just an API driver that can set things up > for you. There are samples in our code base under > setup/dev/advanced.cfg and setup/dev/basic.cfg. The tutorial on marvin > also has this information on how to generate your own style of > deployment. [1] > > [1] https://cwiki.apache.org/confluence/x/QQzMAQ > > > - A hardcoded API/secret key for admin, so that I don't have to go click > > through to create/get it, and can instead just use the same thing every > > time. > > The regular setup of the simulator can be followed by a couple of > cloudmonkey (ACS CLI) commands to achieve this. > > > > > - At least one available simulator template (best-case would be Ubuntu > > 10.04 or 12.04) that can be "booted up" out of the box - for whatever > > reason (I honestly can't tell, from the brief dive I did through the > code), > > all the builtin templates come up with isready=false in the listTemplates > > output, which makes jclouds think there are no templates, etc, etc... I > > thought this is because they're all in Allocated state, not Ready, but > even > > changing them to Ready in the DB didn't do the trick. > > The guest OS is something that doesn't matter to the simulator. > Whatever you ask for will be deployed. One limitation of the simulator > is that it keeps CloudStack 'happy' by telling it it's got whatever is > requested. So any negative scenarios will be harder to test without a > change in the simulator. > > The templates issue still exists but with cloudmonkey you can register > your template and it will come to ready state: > > cloudmonkey>> register template format=RAW hypervisor=Simulator > isfeatured=true ispublic=true name=tiny displaytext=tiny url= > http://test.url.com/test.rawostypeid=bb62589e-e3cd-11e2-ad39-ea6434daa8ba > zoneid=55318568-8d4b-412c-8c10-82f47651eb51 > > > > > > - A fake host for starting fake instances on - this may already be there, > > but I never got far enough to be sure. > > Which tutorial are you following to get through this? > Here's the right link: > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python#Marvin-TestingwithPython- > > > > > The above would at least get me able to run the most recent set of live > > tests I've been working on (testing the new CloudStack implementation of > > jclouds' cross-compute abstraction for image creation/destruction), but > in > > the longer term, I'd absolutely love to be able to run our whole suite > > against the simulator - obviously, it'd just be an approximation of the > > real thing, and I'd still try to find real existing ACS setups to finagle > > access to in order to run the tests against real, live setups, but > anything > > I can automate is a huge win for jclouds, and I imagine it'd be very > useful > > for libcloud, deltacloud, fog, etc as well! > > > > thanks - indeed it will be. I hope to hear more from your tests. > > -- > Prasanna., > > ------------------------ > Powered by BigRock.com > >