<HTML>
<HEAD>
<TITLE>Re: [Openstack] How to re-create a stack with devstack</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Or use the new devstack v2 ;)<BR>
<BR>
On 1/29/12 9:40 PM, "Deepak Garg" <<a href="deepakgarg.iitg@gmail.com">deepakgarg.iitg@gmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
I use Devstack for development purposes and the environment settings are critical for me. So, once my Devstack setup is done,<BR>
I usually take a snapshot and hence whenever anything gets screwed up, I simply fire the snapshot. Also I keep my source code files<BR>
on a mounted drive (nfs share exported from my laptop) so that -->  a.  the snapshot doesn't affect it<BR>
                                                                                        b.  I can use eclipse + pydev with the source code being on my laptop.<BR>
                                                                                       <BR>
 However, I found it be a good exercise to restart the services manually after the VM reboots.<BR>
<BR>
Hope it helps,<BR>
Deepak<BR>
<BR>
<BR>
<BR>
On Sat, Jan 28, 2012 at 3:04 PM, Vishvananda Ishaya <<a href="vishvananda@gmail.com">vishvananda@gmail.com</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Someone has already done this.  The last message in the thread mentioned it, but perhaps you missed it:<BR>
<BR>
<a href="https://blueprints.launchpad.net/devstack/+spec/upstart">https://blueprints.launchpad.net/devstack/+spec/upstart</a><BR>
<BR>
Vish<BR>
<BR>
On Jan 27, 2012, at 11:34 PM, nandakumar raghavan wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi Vish,<BR>
<BR>
Thanks. I just have a weird thought. Based on the stack.sh logs I understand that when I run stack.sh second time it simply spawns all the services. <BR>
Ex: I saw the below in stack.sh log<BR>
<BR>
' screen -S stack -p n-net -X stuff 'cd /opt/stack/nova && /opt/stack/nova/bin/nova-network<BR>
+ screen_it n-sch 'cd /opt/stack/nova && /opt/stack/nova/bin/nova-scheduler'<BR>
<BR>
Can I write my own upstart script that will start all the services when the system is booting instead of running stack.sh manually, might be a script which init can execute while booting? Will that be ok for connecting to the dashboard again?<BR>
<BR>
Thanks,<BR>
NandaKumar Raghavan <BR>
<BR>
On Fri, Jan 27, 2012 at 12:15 PM, Vishvananda Ishaya <<a href="vishvananda@gmail.com">vishvananda@gmail.com</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>That is correct.  Devstack is primarily for development.  It isn't really designed to be a production ready system.<BR>
<BR>
Vish<BR>
<BR>
On Jan 26, 2012, at 10:18 PM, nandakumar raghavan wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi,<BR>
<BR>
I have similar query. I had installed open stack using devstack on a freshly installed stand-alone machine(not vm). For the first time once the stack.sh is completed I was able to connect to the dashboard and all the services are up and running. Once I rebooted the box, all my settings are gone and I am not able to connect the dashboard as none of the services were running. I had to run stack.sh again and I was able to connect to the dashboard. Whether installing open stack using devstack is not persistent across reboots? Running stack.sh again is the only solution or is there any other way I can do ?<BR>
<BR>
Thanks in advance.<BR>
<BR>
Regards,<BR>
NandaKumar Raghavan<BR>
<BR>
On Fri, Jan 27, 2012 at 5:13 AM, Naveed Massjouni <<a href="naveedm9@gmail.com">naveedm9@gmail.com</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Awesome authors indeed! Thanks.<BR>
-Naveed<BR>
<BR>
On Thu, Jan 26, 2012 at 6:31 PM, Vishvananda Ishaya<BR>
<<a href="vishvananda@gmail.com">vishvananda@gmail.com</a>> wrote:<BR>
> looks like the awesome authors of devstack are now handling this for you:<BR>
><BR>
> <a href="https://github.com/openstack-dev/devstack/blob/master/stack.sh#L931">https://github.com/openstack-dev/devstack/blob/master/stack.sh#L931</a><BR>
><BR>
> So the instances are destroyed on the second run.<BR>
><BR>
> Vish<BR>
><BR>
> On Jan 26, 2012, at 3:14 PM, Naveed Massjouni wrote:<BR>
><BR>
> That's easy enough, thanks. Sometimes I forget to delete all my<BR>
> instances before blowing away screen and running ./stack.sh. Just<BR>
> curious, what happens to all those vm's? Am I building up an army of<BR>
> zombie vm's that are taking up resources? Or do they disappear into<BR>
> the ether?<BR>
> -Naveed<BR>
><BR>
> On Thu, Jan 26, 2012 at 5:53 PM, Vishvananda Ishaya<BR>
> <<a href="vishvananda@gmail.com">vishvananda@gmail.com</a>> wrote:<BR>
><BR>
> There is another thread on this, but the quick answer is;<BR>
><BR>
> killall screen<BR>
><BR>
> ./stack.sh<BR>
><BR>
><BR>
> You should generally make sure that you have terminated all instances and<BR>
> deleted all volumes in advance or you could run into issues.  It is always<BR>
> safer to start from a clean vm, but the above should work in most cases<BR>
><BR>
><BR>
> If you would also like to grab new code:<BR>
><BR>
> killall screen<BR>
><BR>
> cd devstack<BR>
><BR>
> git pull<BR>
><BR>
> RECLONE=yes ./stack.sh<BR>
><BR>
><BR>
> Vish<BR>
><BR>
><BR>
> On Jan 26, 2012, at 12:58 PM, Naveed Massjouni wrote:<BR>
><BR>
><BR>
> I would like to know the proper way to blow away a stack and create a<BR>
><BR>
> fresh stack with devstack. Currently, I hit ctrl-c and ctrl-d a bunch<BR>
><BR>
> of times to close all the windows in the screen session. Then I run<BR>
><BR>
> ./stack.sh again. Is this the best way? Is this documented somewhere?<BR>
><BR>
> Thanks,<BR>
><BR>
> Naveed<BR>
><BR>
><BR>
> _______________________________________________<BR>
><BR>
> Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a> <<a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/%7Eopenstack</a>> <BR>
><BR>
> Post to     : <a href="openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><BR>
><BR>
> Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a> <<a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/%7Eopenstack</a>> <BR>
><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> <<a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/%7Eopenstack</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> <<a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/%7Eopenstack</a>> <BR>
More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><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>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>