<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17465">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">doc/manuals: Write proper content for Ansible Setup section<br><br>Change-Id: Iffd3beefa50dd5f18908b4c3f7e4deb169feca62<br>---<br>M doc/manuals/chapters/ansible.adoc<br>1 file changed, 52 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/65/17465/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/doc/manuals/chapters/ansible.adoc b/doc/manuals/chapters/ansible.adoc</span><br><span>index b672528..4c80723 100644</span><br><span>--- a/doc/manuals/chapters/ansible.adoc</span><br><span>+++ b/doc/manuals/chapters/ansible.adoc</span><br><span>@@ -1,6 +1,56 @@</span><br><span> [[ansible]]</span><br><span> == Ansible Setup</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-Available in osmocom's osmo-ci.git subdirectory 'ansible/', see there 'gsm-tester/README.md'.</span><br><span style="color: hsl(120, 100%, 40%);">+Since the set of steps to set up a full {app-name} environment can be quite long</span><br><span style="color: hsl(120, 100%, 40%);">+and tedious, nowadays the Osmocom RnD and Production {app-name} setups are</span><br><span style="color: hsl(120, 100%, 40%);">+installed and maintained using Ansible scripts. The set of ansible scripts is</span><br><span style="color: hsl(120, 100%, 40%);">+available  in Osmocom's git repository</span><br><span style="color: hsl(120, 100%, 40%);">+link:https://git.osmocom.org/osmo-ci/[osmo-ci.git] under 'ansible' subdirectory,</span><br><span style="color: hsl(120, 100%, 40%);">+with the rest of ansible scripts to set jenkins slaves, etc.</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-//TODO: Explain more where to find, how to build, how to use.</span><br><span style="color: hsl(120, 100%, 40%);">+Since these set of scripts is mainly aimed at Osmocom's own setup, and debian is</span><br><span style="color: hsl(120, 100%, 40%);">+used there, so far only debian hosts are supported officially, though patches to</span><br><span style="color: hsl(120, 100%, 40%);">+support other distributions are welcome.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+In there, the 'setup-gsm-tester.yml' file is responsible of doing all required</span><br><span style="color: hsl(120, 100%, 40%);">+steps to set up a host to become either a <<install_main_unit,Main Unit>> or a a</span><br><span style="color: hsl(120, 100%, 40%);">+<<install_slave_unit,Slave Unit>>. The ansible file can be run as follows:</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+$ ansible-playbook -i hosts setup-gsm-tester.yml</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+You will need root-alike access in the remote host in order to let ansible</span><br><span style="color: hsl(120, 100%, 40%);">+install everything {app-name}, however, no root-specific user is required as</span><br><span style="color: hsl(120, 100%, 40%);">+long as your remote user has sudo access on that host. If that's your case, add</span><br><span style="color: hsl(120, 100%, 40%);">+the following parameters to 'ansible-playbook':</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+$ ansible-playbook -i hosts -b -K -u your_remote_user setup-gsm-tester.yml</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The 'setup-gsm-tester.yml' file is mostly an aggregator of tasks. Most</span><br><span style="color: hsl(120, 100%, 40%);">+{app-name} related tasks can be found under subdirectory 'roles/gsm-tester-*'.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Since different (for instance Production vs RnD) can have different</span><br><span style="color: hsl(120, 100%, 40%);">+characteristics, some per-host variables can be found under directory</span><br><span style="color: hsl(120, 100%, 40%);">+host_vars/, specifying for instance the number of expected modems attached to</span><br><span style="color: hsl(120, 100%, 40%);">+the Main Unit, the DHCP server static leasing for devices, etc.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The different tasks usually have tags to differentiate which kind of {app-name}</span><br><span style="color: hsl(120, 100%, 40%);">+host they are required by. They are also set to differentiate sets of tasks</span><br><span style="color: hsl(120, 100%, 40%);">+required if a specific feature is being used in the host (for instance, willing</span><br><span style="color: hsl(120, 100%, 40%);">+to manage modems with ofono). This allows playing with the '-t' and</span><br><span style="color: hsl(120, 100%, 40%);">+'--skip-tags' when running 'ansible-playbooks' in order to run specific set of</span><br><span style="color: hsl(120, 100%, 40%);">+tasks on each host.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+For instance, to run tasks required to set up a Slave Unit, one can run:</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+$ ansible-playbook -i hosts setup-gsm-tester.yml -t osmo-gsm-tester-proc</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+To run all modem-related tasks:</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+$ ansible-playbook -i hosts setup-gsm-tester.yml -t modem</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Don't forget to read all README.md files available in different subdirectories</span><br><span style="color: hsl(120, 100%, 40%);">+to find out more detailed information on how to run the scripts.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17465">change 17465</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17465"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-tester </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Iffd3beefa50dd5f18908b4c3f7e4deb169feca62 </div>
<div style="display:none"> Gerrit-Change-Number: 17465 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>