<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 13, 2014 at 3:54 AM, Roger Luethi <span dir="ltr"><<a href="mailto:rl@patchworkscience.org" target="_blank">rl@patchworkscience.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For the training-guides scripts, this is a decision of some importance:<br>
do we write scripts that run as root (within the VMs, of course),<br>
or do we use sudo where necessary?<br>
<br>
The install guide uses different prompts ($, #) to indicate regular vs.<br>
root user [1]:<br>
<br>
---------------------------------------------------------<br>
Commands prefixed with the # prompt are to be executed by the root user.<br>
These examples can also be executed by using the sudo command, if<br>
available.<br>
<br>
Commands prefixed with the $ prompt can be executed by any user, including<br>
root.<br>
---------------------------------------------------------<br>
<br>
Obviously, our scripts cannot just change a prompt to switch users.<br>
Switching users adds some complexity (for instance, you lose much of<br>
your environment in a sudo call and need to rebuild it every time).<br>
The devstack scripts (although not intended for production) go to great<br>
lengths to run as a regular user and use sudo when necessary.<br>
<br></blockquote><div><br></div><div>I'll let a real trainer weigh in, but this approach seems sound to replicate.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


The training-guides infrastructure is also set up to use sudo rather than<br>
being root. This is going to be much harder to change once all the the<br>
scripts have been written, so if this is considered a bad decision, please<br>
let us know.<br>
<br>
Roger<br>
<br>
[1] <a href="http://docs.openstack.org/icehouse/install-guide/install/apt-debian/content/ch_preface.html" target="_blank">http://docs.openstack.org/icehouse/install-guide/install/apt-debian/content/ch_preface.html</a><br>


<br>
_______________________________________________<br>
Openstack-docs mailing list<br>
<a href="mailto:Openstack-docs@lists.openstack.org">Openstack-docs@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs</a><br>
</blockquote></div><br></div></div>