Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for virtualbox? #3

Open
bsanders opened this issue Apr 19, 2016 · 1 comment
Open

Example for virtualbox? #3

bsanders opened this issue Apr 19, 2016 · 1 comment

Comments

@bsanders
Copy link

I see there's some initial virtualbox support... is there any example for it?

@jcftang
Copy link
Owner

jcftang commented May 28, 2016

It looks like it may be a bit broken/non-functional, I had merged that in to keep track of contributions from various people.

To use it you do something like this....

#!/usr/bin/env python
# example strider file

from strider import Strider
from strider.virt.virtualbox import VBOX
from strider.provisioners.shell import Shell
import time
import os
from vboxapi import VirtualBoxManager

mgr = VirtualBoxManager("WEBSERVICE",
        {'url':'myIP', 'user':'myServerLogin', 'password':'myPassthere'}
        )

instance = VBOX(
        name = "%s-strider-test" % os.environ["USER"],
        virtualbox_manager = mgr,
        instance_type = "foo"
        )

provisioner = Shell(
        commands = [
            "echo command",
            ]
        )

pre_bake = Shell(
        commands = [
            "sync"
            ]
        )

post_bake = Shell(
        commands = [
            "echo 'post bake steps!'"
            ]

        )

strider = Strider(provisioner=provisioner, pre_bake=pre_bake, post_bake=post_bake).cli(instance)

However I'm not familar with the vboxapi, I don't what virtualbox_manager and instance_type type should be. It might be worth rewriting the virtualbox module with http://pythonhosted.org/pyvbox/ in mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants