[Openstack] Proposal for new devstack (v2?)

Joshua Harlow harlowja at yahoo-inc.com
Tue Jan 17 23:00:52 UTC 2012


I think this can be done, sure.

Its basically abstracting away how actually execute commands (ie going throw fabric instead of the shell...).

Which I think can be accomplished.

On 1/17/12 11:18 AM, "Jesse Andrews" <anotherjesse at gmail.com> wrote:

I think a goal would be to have easy fabric integration.

Right now our fabric scripts for devstack look like:


@task
@parallel
def stop():
    """Kill devstack and all VMs running"""
    run("killall -9 screen || true")
    run("screen -wipe || true")
    # note we can probably remove this once devstack supports removing instances
    # which anthony is working on
    sudo("rm -rf /etc/libvirt/qemu/inst*")
    sudo("virsh list | grep inst | awk '{print $1}' | xargs -n1 virsh
destroy; true")


@task
def reserve_ips():
    """Remove IPs from nova's fixed ip pool for use by hosts

    This is needed for both the compute hosts and the VPN instances"""

    if env.host == config.master:
        with cd('%s/nova' % config.dest):
            for n in xrange(2, 10):
                ip = "10.4.128.%s" % n
                run("bin/nova-manage fixed reserve %s" % ip)
            # reserve VPN client IPs too
            for n in xrange(240, 254):
                ip = "10.4.143.%s" % n
                run("bin/nova-manage fixed reserve %s" % ip)

@task
@parallel
def users():
    """ensure our users exist"""
    if env.host == config.master:
        for name, password in config.users.iteritems():
            # add_user(username, password)
            with cd(config.dest + '/keystone'):
                if not name in run("bin/keystone-manage tenant list"):
                    run("bin/keystone-manage tenant add %s" % name)
                    run("bin/keystone-manage user add %s %s" % (name, password))
                    run("bin/keystone-manage credentials add %s EC2 %s
%s %s" % (name, name, password, name))
                    run("bin/keystone-manage role grant sysadmin %s
%s" % (name, name))
                    run("bin/keystone-manage role grant netadmin %s
%s" % (name, name))
                    run("bin/keystone-manage role grant Member %s %s"
% (name, name))

On Tue, Jan 17, 2012 at 11:01 AM, Joshua Harlow <harlowja at yahoo-inc.com> wrote:
> Thx,
>
> Yes we haven't been 100% doing the style stuff yet (which is ok I think for
> now).
>
> My idea for not using an underlying fabric was just to keep it as simple as
> possible (but not to simple). Not always an easy choice :-)
>
>
> On 1/17/12 10:56 AM, "Andy Smith" <andyster at gmail.com> wrote:
>
> Looks cool :)
>
> I've been trying to plant the seed of switching devstack to python (heavily
> utilizing fabric and cuisine) in my team's head for a while now.
>
> We are heavily dependent on devstack for our development and testing
> workflows so it would be a pretty big decision for us to switch tools, and
> we'd be doing very active development on whatever new tool we switched to.
>
> The general flow and goals of the tool seem appropriate, and it looks like
> it could be a good starting place for work in this direction.
>
> The style of the code is pretty far from most of the common openstack style
> guides, but that's pretty easily solvable, as are the other small things to
> get the project looking more openstack-y.
>
> I'd still be interested in using fabric and cuisine as the underlying layer
> because of having a well-tested, built-in way of dealing with remote servers
> allows for some more versatility.
>
> --andy
>
> On Tue, Jan 17, 2012 at 10:20 AM, Joshua Harlow <harlowja at yahoo-inc.com>
> wrote:
>
> Hi all,
>
> I would just like to propose a new devstack (v2?) that we have been starting
> to work on that uses python throughout as well as has componentized installs
> (for glance, nova...) and a nice object oriented design and the like
> (including having a json format for defining package and pip dependencies
> that allows simple comments so people can know what the pkgs are). We are
> currently trying to get equivalence going for ubuntu (and at the same time
> rhel6.x) and I would like it if we could get peoples initial thoughts on
> this.
>
> I know the current devstack shell script is starting to explode (LOC wise)
> and it seems like it is a good time to stop that from exploding by creating
> something a little more flexible (and maintainable imho).
>
> Please check it out @ https://github.com/yahoo/Openstack-Devstack2
>
> Comments welcome!
>
> We are working on getting as much equivalence as we can (while still
> maintaining a "clean" design).
>
> Thx,
>
> Josh
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120117/5861e236/attachment.html>


More information about the Openstack mailing list