<HTML>
<HEAD>
<TITLE>Re: [Openstack] Proposal for new devstack (v2?)</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I think this can be done, sure.<BR>
<BR>
Its basically abstracting away how actually execute commands (ie going throw fabric instead of the shell...).<BR>
<BR>
Which I think can be accomplished.<BR>
<BR>
On 1/17/12 11:18 AM, "Jesse Andrews" <<a href="anotherjesse@gmail.com">anotherjesse@gmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I think a goal would be to have easy fabric integration.<BR>
<BR>
Right now our fabric scripts for devstack look like:<BR>
<BR>
<BR>
@task<BR>
@parallel<BR>
def stop():<BR>
    """Kill devstack and all VMs running"""<BR>
    run("killall -9 screen || true")<BR>
    run("screen -wipe || true")<BR>
    # note we can probably remove this once devstack supports removing instances<BR>
    # which anthony is working on<BR>
    sudo("rm -rf /etc/libvirt/qemu/inst*")<BR>
    sudo("virsh list | grep inst | awk '{print $1}' | xargs -n1 virsh<BR>
destroy; true")<BR>
<BR>
<BR>
@task<BR>
def reserve_ips():<BR>
    """Remove IPs from nova's fixed ip pool for use by hosts<BR>
<BR>
    This is needed for both the compute hosts and the VPN instances"""<BR>
<BR>
    if env.host == config.master:<BR>
        with cd('%s/nova' % config.dest):<BR>
            for n in xrange(2, 10):<BR>
                ip = "10.4.128.%s" % n<BR>
                run("bin/nova-manage fixed reserve %s" % ip)<BR>
            # reserve VPN client IPs too<BR>
            for n in xrange(240, 254):<BR>
                ip = "10.4.143.%s" % n<BR>
                run("bin/nova-manage fixed reserve %s" % ip)<BR>
<BR>
@task<BR>
@parallel<BR>
def users():<BR>
    """ensure our users exist"""<BR>
    if env.host == config.master:<BR>
        for name, password in config.users.iteritems():<BR>
            # add_user(username, password)<BR>
            with cd(config.dest + '/keystone'):<BR>
                if not name in run("bin/keystone-manage tenant list"):<BR>
                    run("bin/keystone-manage tenant add %s" % name)<BR>
                    run("bin/keystone-manage user add %s %s" % (name, password))<BR>
                    run("bin/keystone-manage credentials add %s EC2 %s<BR>
%s %s" % (name, name, password, name))<BR>
                    run("bin/keystone-manage role grant sysadmin %s<BR>
%s" % (name, name))<BR>
                    run("bin/keystone-manage role grant netadmin %s<BR>
%s" % (name, name))<BR>
                    run("bin/keystone-manage role grant Member %s %s"<BR>
% (name, name))<BR>
<BR>
On Tue, Jan 17, 2012 at 11:01 AM, Joshua Harlow <<a href="harlowja@yahoo-inc.com">harlowja@yahoo-inc.com</a>> wrote:<BR>
> Thx,<BR>
><BR>
> Yes we haven’t been 100% doing the style stuff yet (which is ok I think for<BR>
> now).<BR>
><BR>
> My idea for not using an underlying fabric was just to keep it as simple as<BR>
> possible (but not to simple). Not always an easy choice :-)<BR>
><BR>
><BR>
> On 1/17/12 10:56 AM, "Andy Smith" <<a href="andyster@gmail.com">andyster@gmail.com</a>> wrote:<BR>
><BR>
> Looks cool :)<BR>
><BR>
> I've been trying to plant the seed of switching devstack to python (heavily<BR>
> utilizing fabric and cuisine) in my team's head for a while now.<BR>
><BR>
> We are heavily dependent on devstack for our development and testing<BR>
> workflows so it would be a pretty big decision for us to switch tools, and<BR>
> we'd be doing very active development on whatever new tool we switched to.<BR>
><BR>
> The general flow and goals of the tool seem appropriate, and it looks like<BR>
> it could be a good starting place for work in this direction.<BR>
><BR>
> The style of the code is pretty far from most of the common openstack style<BR>
> guides, but that's pretty easily solvable, as are the other small things to<BR>
> get the project looking more openstack-y.<BR>
><BR>
> I'd still be interested in using fabric and cuisine as the underlying layer<BR>
> because of having a well-tested, built-in way of dealing with remote servers<BR>
> allows for some more versatility.<BR>
><BR>
> --andy<BR>
><BR>
> On Tue, Jan 17, 2012 at 10:20 AM, Joshua Harlow <<a href="harlowja@yahoo-inc.com">harlowja@yahoo-inc.com</a>><BR>
> wrote:<BR>
><BR>
> Hi all,<BR>
><BR>
> I would just like to propose a new devstack (v2?) that we have been starting<BR>
> to work on that uses python throughout as well as has componentized installs<BR>
> (for glance, nova...) and a nice object oriented design and the like<BR>
> (including having a json format for defining package and pip dependencies<BR>
> that allows simple comments so people can know what the pkgs are). We are<BR>
> currently trying to get equivalence going for ubuntu (and at the same time<BR>
> rhel6.x) and I would like it if we could get peoples initial thoughts on<BR>
> this.<BR>
><BR>
> I know the current devstack shell script is starting to explode (LOC wise)<BR>
> and it seems like it is a good time to stop that from exploding by creating<BR>
> something a little more flexible (and maintainable imho).<BR>
><BR>
> Please check it out @ <a href="https://github.com/yahoo/Openstack-Devstack2">https://github.com/yahoo/Openstack-Devstack2</a><BR>
><BR>
> Comments welcome!<BR>
><BR>
> We are working on getting as much equivalence as we can (while still<BR>
> maintaining a “clean” design).<BR>
><BR>
> Thx,<BR>
><BR>
> Josh<BR>
><BR>
> _______________________________________________<BR>
> Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
> Post to     : <a href="openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><BR>
> Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
> More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><BR>
><BR>
><BR>
><BR>
><BR>
> _______________________________________________<BR>
> Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
> Post to     : <a href="openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><BR>
> Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
> More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><BR>
><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>