<div dir="ltr">(Sorry for cross posting)<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 21, 2013 at 3:59 PM, Tim Moody <span dir="ltr"><<a href="mailto:tim@timmoody.com" target="_blank">tim@timmoody.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:12pt;font-family:Calibri">
<div>The weekly XSCE call (Thur 2PM) was lightly attended last week because many
were on their way to SF. But we did spend some time on the question of
moving to ansible as an installation mechanism and the means and timing of doing
so. The consensus on the call was that we should make the move, but that
it should be gradual rather than sudden enlightenment.</div>
<div> </div>
<div>It turns out that because the directory structures of xs-config
(<a href="http://github.com/XSCE/xsce" target="_blank">github.com/XSCE/xsce</a>) and dxs (activitycentral/dxs ) are substantially
different (everything in plugins.d in the former and in roles in the latter)
there are no collisions in directory names, so dxs could just be copied into
xs-config. So the process discussed is simply to combine both repos into
xsce and then obsolete directories in plugins.d as confidence builds that the
ansible playbook for a given feature works.</div>
<div> </div></div></div></div></blockquote><div><br></div><div>It sounds doable. But not sure how the transition will be. This is one possible work breakdown in 3 phases:</div><div><br></div><div><br></div><div>Phase 1. A per service approach<br>
</div><div><br></div><div>I imagine we can substitute for example `named yes` in file xs-setup [1] for something like `ansible-playbook -i ansible_hosts named.yml --connection=local`.</div><div><br></div><div>```</div><div>
<div>num_ifaces=`ls /sys/class/net | wc | gawk '{print $1}'` </div><div>if [[ $num_ifaces > 2 ]]; then </div><div>- named yes </div>
<div>+ ansible-playbook -i ansible_hosts named.yml --connection=local<br></div><div> squid yes </div><div> gateway yes </div>
<div> dhcpd yes </div><div> xs-setup-network </div><div> touch /.olpcxs-net-configured </div>
<div>fi </div></div><div>```</div><div>And the same for xs-setup.conf.<br></div><div><br></div><div><br></div><div>Phase 2. xs-setup delegates entire sections to a playbook</div><div><br></div><div>Instead of per service playbooks we'll have a playbook for every section:<br>
</div><div><br></div><div>- gathering facts about network including interactive questions</div><div>- installing core services</div><div>- installation of additional services</div><div>- wrapping up</div><div><br></div><div>
For example, for core services:</div><div><br></div><div>```</div><div><div>- num_ifaces=`ls /sys/class/net | wc | gawk '{print $1}'` </div><div>- if [[ $num_ifaces > 2 ]]; then </div>
<div>- ansible-playbook -i ansible_hosts named.yml --connection=local<br></div><div>- squid yes </div><div>- gateway yes </div>
<div>- dhcpd yes </div><div>- xs-setup-network </div><div>- touch /.olpcxs-net-configured </div>
<div>- fi </div></div><div>+ ansible-playbook -i ansible_hosts core_services.yml --connection=local<br></div><div>```</div><div><br></div><div><br></div><div>Phase 3. xs-setup is just an ansible launcher</div><div><br></div>
<div>```</div><div>#!/bin/bash</div><div># xs-setup</div><div>ansible-playbook -i ansible_hosts xs.yml --connection=local<br></div><div><EOF></div><div>```</div><div><br></div><div><br></div><div>The main problem I see is how to share consistently information between xs-setup and ansible worlds.</div>
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div dir="ltr">
<div style="font-size:12pt;font-family:Calibri">
<div>For those on the call, does this summarize what was said? For those
not on the call, does this sound like a viable plan?</div><span class=""><font color="#888888">
<div> </div>
<div style="font-size:12pt;font-family:Calibri">Tim</div></font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Miguel González<br>Activity Central: <a href="http://www.activitycentral.com" target="_blank">http://www.activitycentral.com</a><br></div>
</div></div>