<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Awesomation in Practice]]></title><description><![CDATA[Putting the Awesome into Awesomation]]></description><link>https://blog.andy.mc.it/</link><image><url>https://blog.andy.mc.it/favicon.png</url><title>Awesomation in Practice</title><link>https://blog.andy.mc.it/</link></image><generator>Ghost 5.38</generator><lastBuildDate>Fri, 20 Mar 2026 05:52:35 GMT</lastBuildDate><atom:link href="https://blog.andy.mc.it/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Creating a new OpenStack-Ansible role Pt. 2 - Spreading your wings.]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>In <a href="https://blog.andy.mc.it/osa-role-pt1/">part 1</a> I talked about the files that are required in the base of your new role repository. I&apos;ll go into information on setting up the required directories that are not specific to Ansible itself.</p>
<h4 id="docdirectory">/doc directory</h4>
<p>This directory contains all the files required to build the</p>]]></description><link>https://blog.andy.mc.it/osa-role-pt2/</link><guid isPermaLink="false">60536c924faa77440e864ade</guid><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Thu, 26 Jul 2018 14:33:38 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2018/07/bat.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2018/07/bat.jpg" alt="Creating a new OpenStack-Ansible role Pt. 2 - Spreading your wings."><p>In <a href="https://blog.andy.mc.it/osa-role-pt1/">part 1</a> I talked about the files that are required in the base of your new role repository. I&apos;ll go into information on setting up the required directories that are not specific to Ansible itself.</p>
<h4 id="docdirectory">/doc directory</h4>
<p>This directory contains all the files required to build the <em>Sphinx</em> documentation. In terms of a base there isn&apos;t too much - so depending on the role you can fill in more details.</p>
<p><strong>Makefile</strong> - This is the <a href="https://github.com/mapnik/sphinx-docs/blob/master/Makefile?ref=awesomation-in-practice"><em>Sphinx</em> Makefile</a>. You can copy it over from the Sphinx repo and or another OSA role.</p>
<p><strong>requirements.txt</strong> - The pip requirements for building the docs, I&apos;d recommend just copying this from an existing role. The OpenStack requirements project handles automatic requirements updates, so once your new role is official it will receive updates to the requirements file automatically.</p>
<p><strong>source/conf.py</strong> - The documentation configuration file, a sample can be <a href="https://github.com/mapnik/sphinx-docs/blob/master/conf.py?ref=awesomation-in-practice">seen here</a>. It&apos;s easier to copy this from an existing role - although the file is quite well commented so take a look inside. There is a reference to the role name that you should fix up.</p>
<p><strong>source/index.rst</strong> - The index file. This is specified inside your <em><strong>conf.py</strong></em>, but if you copied it over the default is <em><strong>index</strong></em>. This file defines the initial index when going to the role documentation. You can put a placeholder in there, but writing your docs whilst creating the role is super important! Take a look at some other roles for examples on how to structure that.</p>
<h4 id="examplesdirectory">/examples directory</h4>
<p>One standard that exists across the majority of roles in OSA is the examples directory with an example playbook. This can be pretty simple, and isn&apos;t technically required. Additionally, make sure to include any files you do create in the examples directory into your <em><strong>doc/source/index.rst</strong></em> file. This is a good way to document what a playbook should look like to include the new role.</p>
<h4 id="metadirectory">/meta directory</h4>
<p>This is an Ansible directory, but the setup of this is more scaffolding, and is done in a pretty common way in OSA. These are pretty standard, so copy over the <em><strong>meta/main.yml</strong></em> and <em><strong>meta/openstack-ansible.yml</strong></em> from an existing mature role. The fields are pretty self explanatory in both, but you will probably want to change the supported <em><strong>platforms:</strong></em>, <em><strong>categories:</strong></em> at a minimum, inside <em><strong>meta/main.yml</strong></em>, as well as any descriptions. The <em><strong>meta/openstack-ansible.yml</strong></em> file is used to define maturity and role creation time, so adjust those fields to fit. There is documentation around that process <a href="https://docs.openstack.org/openstack-ansible/latest/contributor/testing.html?ref=awesomation-in-practice#role-development-maturity">here</a>, so you can pick the right status, and understand that process.</p>
<h4 id="releasenotesdirectory">/releasenotes directory</h4>
<p>Release notes are another arrow in the documentation quiver (yes even I cringed after that sentence). The release notes use the <a href="https://docs.openstack.org/reno/latest/?ref=awesomation-in-practice"><em><strong>reno</strong></em> tool</a> to allow projects to create release notes to track changes that would be important to operators and deployers - alerting them of changes, new features, upgrade concerns and deprecations (amongst others).</p>
<p>There are 2 sub directories, the <em><strong>notes</strong></em> directory, you can more or less ignore this for now, although creating the directory is useful. This directory contains the individual release notes that you would add as you add features.</p>
<p>The <em><strong>source</strong></em> directory contains the configuration bits for the release notes. Inside there are several files that are required:</p>
<ul>
<li><em><strong>conf.py</strong></em> - this is another <em><strong>Sphinx</strong></em> conf.py file - I&apos;d recommend copying this over from an existing project, but again this is quite well commented.</li>
<li><em><strong>index.rst</strong></em> - the index file, you can again copy from an existing project, but make sure to adjust the included files removing any releases that don&apos;t exist - that would be all of them except unreleased at this point.</li>
<li><em><strong>unreleased.rst</strong></em> - the index file for current branches release notes. Copy this over, its a pretty minimal file though.</li>
<li><em><strong>_static/.placeholder</strong></em> &amp; <em><strong>_templates/.placeholder</strong></em> - These are placeholder files that are blank, you can <em><strong>touch</strong></em> these to create them.</li>
</ul>
<p>That&apos;s more or less it! We still need to cover testing and then create the role but now we should be pretty much ready to rumble, and start adding content to the documentation, and tasks/handlers/templates/default vars etc to the Ansible role itself!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Creating a new OpenStack-Ansible role Pt. 1 - Setting up base.]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>The number of new roles in <a href="https://docs.openstack.org/openstack-ansible/latest/?ref=awesomation-in-practice">OSA</a> has dropped over time, as roles are added and the number of new projects being created within the OpenStack ecosystem slows up. This has meant the need to create new roles has dropped quite a bit. That said, I&apos;ve been working</p>]]></description><link>https://blog.andy.mc.it/osa-role-pt1/</link><guid isPermaLink="false">60536c924faa77440e864add</guid><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Thu, 26 Jul 2018 14:33:27 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2018/07/turtle.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2018/07/turtle.jpg" alt="Creating a new OpenStack-Ansible role Pt. 1 - Setting up base."><p>The number of new roles in <a href="https://docs.openstack.org/openstack-ansible/latest/?ref=awesomation-in-practice">OSA</a> has dropped over time, as roles are added and the number of new projects being created within the OpenStack ecosystem slows up. This has meant the need to create new roles has dropped quite a bit. That said, I&apos;ve been working through the process to add a role for the <a href="https://wiki.openstack.org/wiki/Manila?ref=awesomation-in-practice">Manila</a> project. I&apos;ll walk through the process, starting with the first step, setting up the base repository.</p>
<h4 id="settingupyourrepository">Setting up your repository</h4>
<p>There are a few files in the base directory that are required for various reasons, and can easily be copied from the existing repositories that are up to date. I picked the <a href="https://github.com/openstack/openstack-ansible-os_cinder?ref=awesomation-in-practice">os_cinder</a> role, but it&apos;s a good idea to pick a role that is well maintained and use that as a base. Always keep in mind, the review process should help you catch anything you miss out - reviews are great, and while it doesn&apos;t mean you can be careless, it does mean that you&apos;re not alone!</p>
<h5 id="somebasefiles">Some base files</h5>
<p>There are a few files that are common to all repos and you can pretty much just copy and edit.</p>
<p><strong>.gitignore</strong> - this is common list of files that can easily be ignored by git, for example the testing repository that gets cloned during testing. You don&apos;t need to change anything there.</p>
<p><strong>.gitreview</strong> - this file handles the <em>git-review</em> location, change the <em>project</em> field to match your new role&apos;s path.</p>
<p><strong>CONTRIBUTING.rst</strong> - Contribution guidelines, this has a few references to the project in the title - other than that this is the same for each OSA role.</p>
<p><strong>LICENSE</strong> - All OpenStack projects use the <em>Apache 2.0</em> License, so this would be the same across all OSA roles.</p>
<p><strong>README.rst</strong> - The README file really just links to the documentation for the role. Given this will be a new role it won&apos;t exist yet - but documentation is super important (I&apos;ll be covering that later!), in this case I&apos;d edit the paths to match the new role, the links won&apos;t work at first but once your documentation is created it should.</p>
<p><strong>bindep.txt</strong> - This file handles the packages that will get installed during gating. As a start copy the existing bindep.txt from another project. <strong>NB</strong> This is not packages that are required by the role specifically, but more packages that are required for gating to work successfully, prior to Ansible running. If the package is required by the role itself, it should be installed as part of the role.</p>
<p><strong>setup.cfg setup.py</strong> - These handle the <a href="http://www.sphinx-doc.org/en/stable/index.html?ref=awesomation-in-practice"><em>sphinx</em></a> doc builds, as well as <a href="https://docs.openstack.org/pbr/latest/?ref=awesomation-in-practice"><em>pbr</em></a> and a few other things. You can copy these over directly. <strong>setup.cfg</strong> containers a few references to the role name, which should be changed.</p>
<p><strong>tox.ini</strong> - This file determines how testing is setup and run, and which scenarios exist. This is a bit trickier because you don&apos;t want to copy all the existing scenarios. I would remove any scenarios (listed inside [ ]) that call the <em>test-ansible-functional.sh</em> script, apart from the base <em>[functional]</em> job, as well as an <em>[upgrade]</em> job if it exists. This will remove any upgrade tests, as well as any additional scenarios (for example, the Keystone role carries a test to use Apache with uWSGI instead of the default NGINX with uWSGI), but won&apos;t remove any lint, pep8 or other generally good style tests. You can read more about <strong>tox</strong> <a href="https://tox.readthedocs.io/en/latest/?ref=awesomation-in-practice">here</a>.</p>
<p>That&apos;s it for the main files in the base repository.<br>
I&apos;ll cover over the next 4 main directories involved in a base repository in the <a href="https://blog.andy.mc.it/osa-role-pt2/">following post</a>.<br>
Namely:</p>
<ul>
<li><strong>doc directory</strong></li>
<li><strong>examples directory</strong></li>
<li><strong>meta directory</strong></li>
<li><strong>releasenotes directory</strong></li>
</ul>
<p>Aside from that, the only other non-ansible bits are the <strong>zuul.d</strong> and <strong>tests</strong> directories which we will discuss later.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Adjusting one line in a configuration file using Ansible]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Recently in <a href="https://github.com/ceph/ceph-ansible?ref=awesomation-in-practice">ceph-ansible</a> I&apos;ve been playing around with adding an entry to an existing line, in a configuration file that isn&apos;t managed by Ansible.</p>
<p>In general you would want to use the template module to manage a configuration file, which would mean you can completely control</p>]]></description><link>https://blog.andy.mc.it/adjusting-one-line-in-a-configuration-file-using-ansible/</link><guid isPermaLink="false">60536c924faa77440e864ada</guid><category><![CDATA[ceph-ansible]]></category><category><![CDATA[Ansible]]></category><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Mon, 19 Feb 2018 21:15:18 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2018/02/hyena_pup.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2018/02/hyena_pup.jpg" alt="Adjusting one line in a configuration file using Ansible"><p>Recently in <a href="https://github.com/ceph/ceph-ansible?ref=awesomation-in-practice">ceph-ansible</a> I&apos;ve been playing around with adding an entry to an existing line, in a configuration file that isn&apos;t managed by Ansible.</p>
<p>In general you would want to use the template module to manage a configuration file, which would mean you can completely control the contents of the file.</p>
<p>This isn&apos;t suitable for some configuration files, for example <code>/etc/ssh/sshd_config</code>, for which you don&apos;t want to carry a template file that can get out of date, and for which you generally don&apos;t want to make too many changes, and use the package defaults as set out by your distribution.</p>
<h5 id="asimpleexample">A simple example</h5>
<p>There are some easy options, for example the <code>PermitEmptyPasswords</code> setting in <code>/etc/ssh/sshd_config</code> can only have 1 value, and be specified once.</p>
<p>You could adjust this by doing the following:</p>
<pre><code>- name: Adjust PermitEmptyPasswords setting in /etc/ssh/sshd_config
  lineinfile:
    dest: /etc/ssh/sshd_config
    regexp: &quot;^PermitEmptyPasswords&quot;
    line: &quot;PermitEmptyPasswords no&quot;
</code></pre>
<p>This will look for a line starting with <code>PermitEmptyPasswords</code> and replace it with <code>PermitEmtpyPasswords no</code>.</p>
<p>Note that this would add a new line if <code>#PermitEmptyPasswords</code> existed as a line, since it&apos;s commented out and the line doesn&apos;t start with <code>PermitEmptyPasswords</code>.</p>
<p>We could adjust this to include looking for lines starting with a # by doing the following:</p>
<pre><code>- name: Adjust PermitEmptyPasswords setting in /etc/ssh/sshd_config
  lineinfile:
    dest: /etc/ssh/sshd_config
    regexp: &quot;^(#)?PermitEmptyPasswords&quot;
    line: &quot;PermitEmptyPasswords no&quot;
</code></pre>
<h5 id="usingregularexpressions">Using Regular Expressions</h5>
<p>At this point it gets a bit more complicated unless you are familiar with Regular Expressions! Ansible uses <a href="https://docs.python.org/2/library/re.html?ref=awesomation-in-practice">Python Regular Expresions</a> and you can find out more by clicking the link.</p>
<p>The above regular expression says the line will match if the it starts with (<code>^</code>) 0 or 1 repetitions (<code>?</code>) of the <code>#</code> character, followed by <code>PermitEmptyPasswords</code>. In other words, if it starts with a <code>#</code> followed by <code>PermitEmptyPasswords</code> or just <code>PermitEmptyPasswords</code> without a <code>#</code>.</p>
<p>If that regular expression is matched, replace the line with <code>PermitEmptyPasswords no</code>. If the regular expression isn&apos;t matched the entry will be added to the end of the file.</p>
<p>If the line is exactly the same as what you are trying to add (<code>PermitEmptyPasswords no</code>) then the line won&apos;t be added because the <code>lineinfile</code> Ansible module will see it as no change.</p>
<h5 id="howaboutmultipleentriesofthesamevalue">How about multiple entries of the same value?</h5>
<p>This is actually even easier! Since we don&apos;t care if other values of the setting have been specified, we can just ensure the line exists, for example:</p>
<pre><code>- name: Add HostKey value to /etc/ssh/sshd_config
  lineinfile:
    dest: /etc/ssh/sshd_config
    line: &quot;HostKey /path/to/my/host.key&quot;
</code></pre>
<p>This will add the line entry if it doesn&apos;t exist.</p>
<p>This has a downside, your /etc/ssh/sshd_config will have a weird ordering, and you could get options all over the show, that aren&apos;t easy to view. We can fix that though, using the <code>insertbefore</code> or <code>insertafter</code> setting.</p>
<pre><code>- name: Add HostKey value to /etc/ssh/sshd_config in order
  lineinfile:
    dest: /etc/ssh/sshd_config
    line: &quot;HostKey /path/to/my/host.key&quot;
    insertafter: &quot;^(#)?HostKey&quot;
</code></pre>
<p>You&apos;ll recognize the regular expression from the last section, in this case we are using it with the <code>insertafter</code> setting, which will mean our HostKey line is inserted into the file after the last entry that matches the regular expression. If the regular expression isn&apos;t matched it&apos;ll be added at the end of the file.</p>
<h5 id="howaboutasettingthattakesmultiplevalues">How about a setting that takes multiple values?</h5>
<p>This is a bit trickier, and the crux of the article. I was playing around with it, and it occurred to me that this isn&apos;t that straight forward, especially if you are just starting out.</p>
<p>If you have a setting that takes multiple values in one line, for example the <code>PRUNEPATHS</code> setting in /etc/updatedb.conf, which will contain a list of paths that are to be skipped when running <code>updatedb</code>. When we update this line we don&apos;t want to replace the whole line, but what we want to do is ensure a specific entry is there, and update the line to include the entry if not (but not remove any existing entries!).</p>
<p>This is a bit trickier but can be done in 2 ways, using either the <code>lineinfile</code> module as before, or the <code>replace</code> module.</p>
<pre><code>- name: add /var/lib/ceph to PRUNEPATHS in /etc/updatedb.conf
  replace:
    dest: /etc/updatedb.conf
    regexp: &apos;^(PRUNEPATHS(?!.*/var/lib/ceph).*)&quot;$&apos;
    replace: &apos;\1 /var/lib/ceph&quot;&apos;
</code></pre>
<p>The regular expression here is a bit more complex, but what it says is, look for a line that starts with(<code>^</code>) <code>PRUNEPATHS</code>, and isn&apos;t followed by (<code>?!</code>) any character (<code>.</code>) any number of times (<code>*</code>), followed by <code>/var/lib/ceph</code>, but is followed by any character (<code>.</code>) any number of times (<code>*</code>), followed by a <code>&quot;</code> character and the end of line (<code>$</code>).</p>
<p>This means if /var/lib/ceph exists in the <code>PRUNEPATHS</code> line we won&apos;t replace the line, but if <code>PRUNEPATHS</code> exists and doesn&apos;t have <code>/var/lib/ceph</code> in it, it will match and initiate the replace.</p>
<p>The replace line says to take the matched text (<code>\1</code>) and add <code>/var/lib/ceph&quot;</code> to it, and it&apos;s that simple!</p>
<h5 id="okgreatbutwhataretheparenthesisfor">Ok great, but what are the parenthesis for?</h5>
<p>So what are all the parenthesis <code>(</code> and <code>)</code> for, and is their placement important?</p>
<p>The parenthesis denote what will be matched - this is really important, in this example we don&apos;t want to match on the final <code>&quot;</code> otherwise we will end up with <code>/some/path&quot; /var/lib/ceph&quot;</code> at the end of the line, which would cause problems.</p>
<p>So that means the line starts with (<code>^</code>) and begins a match (<code>(</code>) of <code>PRUNEPATHS</code> that is <strong>NOT</strong> followed (<code>?!</code>) by another match (<code>(</code>) that consists of any character (<code>.</code>) any number of times (<code>*</code>), followed by <code>/var/lib/ceph</code>, which is the end of the match (<code>)</code>) for what can&apos;t follow <code>PRUNEPATHS</code>. The initial match, which started with <code>PRUNEPATHS</code> will match if any character (<code>.</code>) appears any number of times (<code>*</code>), which ends the text to be matched (<code>)</code>), and the line ends (<code>$</code>) with a <code>&quot;</code> character, which isn&apos;t included in the match.</p>
<p>We are using the parenthesis to manipulate what is and isn&apos;t matched by the regular expression.</p>
<p>If we use the lineinfile module to do that there is one extra thing we need to do, and that&apos;s enable <code>backrefs</code>, as follows:</p>
<pre><code>- name: add /var/lib/ceph to PRUNEPATHS in /etc/updatedb.conf using lineinfile
  lineinfile:
    dest: /etc/updatedb.conf
    regexp: &apos;^(PRUNEPATHS(?!.*/var/lib/ceph).*)&quot;$&apos;
    line: &apos;\1 /var/lib/ceph&quot;&apos;
    backrefs: true
</code></pre>
<h5 id="conclusion">Conclusion</h5>
<p>That&apos;s pretty much it! I personally like <code>replace</code>, since it has <code>backrefs</code> enabled by default, I think <code>lineinfile</code> is more useful for multiple entries, and ensuring a specific line exists, but if you know the line exists and you want to change it, <code>replace</code> works well!</p>
<p>Knowing your Regular Expressions is pretty much the only way to use <code>lineinfile</code> and <code>replace</code> to their full potential, but once you get the hang of reading them and understanding what is going on, it isn&apos;t so frightening. Hopefully that helped!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Restarting services in serial in Ansible]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>We&apos;ve been running <a href="https://github.com/ceph/ceph-ansible/pull/2287/?ref=awesomation-in-practice">into issues in the ceph-ansible project around restarting services in serial</a>, in a way that is consistent and doesn&apos;t do unnecessary restarts. This goes back further than the above linked PR, and it&apos;s a pretty tricky thing to do! I&apos;</p>]]></description><link>https://blog.andy.mc.it/restarting-services-in-serial-in-ansible/</link><guid isPermaLink="false">60536c924faa77440e864ad9</guid><category><![CDATA[ceph-ansible]]></category><category><![CDATA[Ansible]]></category><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Wed, 14 Feb 2018 15:17:46 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2018/02/white_ruffled_lemur.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2018/02/white_ruffled_lemur.jpg" alt="Restarting services in serial in Ansible"><p>We&apos;ve been running <a href="https://github.com/ceph/ceph-ansible/pull/2287/?ref=awesomation-in-practice">into issues in the ceph-ansible project around restarting services in serial</a>, in a way that is consistent and doesn&apos;t do unnecessary restarts. This goes back further than the above linked PR, and it&apos;s a pretty tricky thing to do! I&apos;ve come up with a solution, and I&apos;d like to run through the problem and changes with you.</p>
<h5 id="simpleservicerestarts">Simple service restarts</h5>
<p>In the simplest case, you would restart a service like this:</p>
<pre><code>- name: Some change happens to host
  debug:
    msg: &quot;Some change happens to host&quot;
  notify:
    - restart my service
</code></pre>
<p>And then the handler would look like this:</p>
<pre><code>- name: restart my service
  service:
    name: my_service
    state: restarted
</code></pre>
<p>This is fine for:</p>
<ul>
<li>One host</li>
<li>Many hosts running in serial</li>
<li>Many hosts where you don&apos;t care if <code>my_service</code> is restarted at the same time on all the hosts.</li>
</ul>
<h5 id="restartinginserial">Restarting in serial</h5>
<p>Ok so, we need to ensure <code>my_service</code> restarts in serial, and doesn&apos;t restart at the same time on every host, how can we do that? A pretty common, and simple way would be to do this with the handler instead:</p>
<pre><code>- name: restart my service
  service:
    name: my_service
    state: restarted
  with_items &quot;{{ ansible_play_batch }}&quot;
  run_once: True
  delegate_to: &quot;{{ item }}&quot;
</code></pre>
<p>This will take the first host that calls the handler, and use it to initiate a restart of <code>my_service</code> on each other host in the current play_batch. That would mean any hosts included in the play. If run in serial, it will only be the current host.</p>
<p>If you were to use <code>ansible_play_hosts</code> instead of <code>ansible_play_batch</code> it would ignore the state of serial and cause a restart on all hosts, so for this <code>ansible_play_batch</code> would make more sense.</p>
<p>This solves the key problem from before, and keeps the same benefits:</p>
<ul>
<li>We can run this without restarting <code>my_service</code> on all hosts at the same time.</li>
<li>This will still work in serial, and only restart the host in the current serial run.</li>
</ul>
<p>However, we still have one case that is causing us issues...</p>
<h5 id="whathappensifchangesdontallhappentoallhosts">What happens if changes don&apos;t all happen to all hosts?</h5>
<p>There are a few cases that can cause a situation where a change only happens to one of the hosts in the group:</p>
<ul>
<li>host_vars change on one specific host initiates the handler on only one host.</li>
<li>A host is in multiple groups, and the change has already happened on the host, as part of the original group&apos;s run, meaning it has already initiated the handler and had the service restarted.</li>
</ul>
<p>Essentially any situation where a change is not being applied to all hosts in the group, for whatever reason.</p>
<p>In this situation, the handler will be skipped on the hosts that have not initiated the change, but run_once will ensure that the handler runs at least once, so even if only the last host in the run has a change, that host will initiate a restart on ALL other hosts in the group - even though they do not need it, and haven&apos;t asked for it.</p>
<p>The reason is, we are relying on one host&apos;s call of the handler to mean that all hosts should be restarted. In a run where a change happens uniformly this is great. But that isn&apos;t always the case! We have no way to tell if a host has called the handler itself.</p>
<p>The <code>delegate_to</code> fix works fine for a lot of situations, as long as you can agree to the following assumptions:</p>
<ul>
<li>You don&apos;t care that services are restarted unnecessarily.</li>
<li>Changes will always happen to ALL hosts in a group.</li>
<li>There is no situation where a change will be initiated on hosts in separate groups, in different orders. E.g. the same change happens to groupA and groupB, but groupA gets run first. This causes a situation where hosts in both groups will get restarted on both occasions.</li>
</ul>
<p>Unfortunately, there is no fix for this in Ansible, ideally a serial mode on tasks would do the trick because then only hosts calling the handler would restart the service, and in serial. That doesn&apos;t exist though, <a href="https://github.com/ansible/ansible/issues/12170?ref=awesomation-in-practice">there is a long issue report about it on github.</a></p>
<p>So what can we do about it?</p>
<h6 id="howtosolvethis">How to solve this</h6>
<p>As I mentioned the problem with <code>delegate_to</code> is that we are using one host to determine the requirement of a restart on other hosts based only on it&apos;s own state. We have no idea what the state of the other hosts is, or whether they called the handler or not.</p>
<p>Fortunately, we can work around this - Ansible allows the <code>listen:</code> directive to cause a set of tasks to be run in order, when a handler is called. Using this we can set and then test the required state of the hosts themselves manually, by doing the following:</p>
<pre><code>- name: Set _restart_required var on before restart
  set_fact:
    _restart_required: True
  listen: &quot;restart my service&quot;

- name: Restart the service in serial if it needs it
  service:
    name: my_service
    state: restarted
  when: hostvars[item][&apos;_restart_required&apos;] | default(False)
  with_items: &quot;{{ ansible_play_batch }}&quot;
  delegate_to: &quot;{{ item }}&quot;
  run_once: True
  listen: &quot;restart my service&quot;

- name: Set _restart_required var off after restart
  set_fact:
    _restart_required: False
  listen: &quot;restart my service&quot;
</code></pre>
<p>This will execute the 3 tasks in order, starting with setting a fact to say it needs a restart, this will only be set if the host has called the handler and requires a restart. Next we restart <code>my_service</code> if the host has the fact set to True, implying it needs a restart. Finally, to ensure we don&apos;t restart services multiple times, we set the fact back to False so that if the host calls the handler again it will be set to True, and the service will restart.</p>
<h5 id="conclusion">Conclusion</h5>
<p>I personally believe this should be a capability in Ansible itself, which is something I&apos;d like to work on at some point!</p>
<p>I believe the above solution works well, and is about as good as I can think of since it will determine the restart based on whether the restart handler was called by the individual hosts.</p>
<p>If anybody knows a better and simpler way, please do let me know, would love to try it out.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[How to restart ceph-radosgw]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I&apos;ve been playing around with Ceph and Ceph RADOS Gateway recently. Mostly using the excellent <a href="http://github.com/ceph/ceph-ansible?ref=awesomation-in-practice">ceph-ansible</a> project.</p>
<p>I was trying to swap the ip address that was being used for the RadosGW service by setting the <em><strong>radosgw_address_block</strong></em> variable, and ran into a bug, for which I&</p>]]></description><link>https://blog.andy.mc.it/ceph-radosgw-service-restarting/</link><guid isPermaLink="false">60536c924faa77440e864ad7</guid><category><![CDATA[Ansible]]></category><category><![CDATA[ceph-ansible]]></category><category><![CDATA[ceph]]></category><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Wed, 20 Dec 2017 04:18:27 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2017/12/10628811_10152219798651021_6034123639073664328_o.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2017/12/10628811_10152219798651021_6034123639073664328_o.jpg" alt="How to restart ceph-radosgw"><p>I&apos;ve been playing around with Ceph and Ceph RADOS Gateway recently. Mostly using the excellent <a href="http://github.com/ceph/ceph-ansible?ref=awesomation-in-practice">ceph-ansible</a> project.</p>
<p>I was trying to swap the ip address that was being used for the RadosGW service by setting the <em><strong>radosgw_address_block</strong></em> variable, and ran into a bug, for which I&apos;ve put in a <a href="https://github.com/ceph/ceph-ansible/pull/2287?ref=awesomation-in-practice">Pull Request</a>. The bug meant that while the ceph.conf had been updated properly, the service hadn&apos;t been restarted, and so I began restarting the service manually.</p>
<p>This lead to a massive yak shaving exercise because I had the wrong service name, it will give you a confusing error message that makes it seem something has gone wrong that you can fix.</p>
<pre><code>root@rgw1:/# service ceph-radosgw@rgw1 status
&#x25CF; ceph-radosgw@rgw1.service - Ceph rados gateway
   Loaded: loaded (/lib/systemd/system/ceph-radosgw@.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/ceph-radosgw@.service.d
           &#x2514;&#x2500;ceph-radosgw-systemd-overrides.conf
   Active: inactive (dead)

Dec 20 04:03:11 rgw1 radosgw[8513]: 2017-12-20 04:03:11.233269 7f94c825ae80 -1 auth: unable to find a keyring on /var/lib/ceph/radosgw/ceph-rgw1/keyring: (2) No such file or directory
Dec 20 04:03:11 rgw1 radosgw[8513]: 2017-12-20 04:03:11.235727 7f94c825ae80 -1 monclient: authenticate NOTE: no keyring found; disabled cephx authentication
Dec 20 04:03:11 rgw1 radosgw[8513]: 2017-12-20 04:03:11.236865 7f94c825ae80 -1 Couldn&apos;t init storage provider (RADOS)
Dec 20 04:03:11 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Main process exited, code=exited, status=5/NOTINSTALLED
Dec 20 04:03:11 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Unit entered failed state.
Dec 20 04:03:11 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Failed with result &apos;exit-code&apos;.
Dec 20 04:03:11 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Service hold-off time over, scheduling restart.
Dec 20 04:03:11 rgw1 systemd[1]: Stopped Ceph rados gateway.
Dec 20 04:03:11 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Start request repeated too quickly.
Dec 20 04:03:11 rgw1 systemd[1]: Failed to start Ceph rados gateway.
</code></pre>
<p>At this point I found the keyring and linked it over to the /var/lib/ceph/radosgw/ceph-rgw1/keyring location. This results in another error.</p>
<pre><code>root@rgw1:/# service ceph-radosgw@rgw1 status
&#x25CF; ceph-radosgw@rgw1.service - Ceph rados gateway
   Loaded: loaded (/lib/systemd/system/ceph-radosgw@.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/ceph-radosgw@.service.d
           &#x2514;&#x2500;ceph-radosgw-systemd-overrides.conf
   Active: inactive (dead)

Dec 20 04:01:59 rgw1 systemd[1]: Stopped Ceph rados gateway.
Dec 20 04:01:59 rgw1 systemd[1]: Started Ceph rados gateway.
Dec 20 04:01:59 rgw1 radosgw[8404]: 2017-12-20 04:01:59.241222 7faf4c8aae80 -1 Couldn&apos;t init storage provider (RADOS)
Dec 20 04:01:59 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Main process exited, code=exited, status=5/NOTINSTALLED
Dec 20 04:01:59 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Unit entered failed state.
Dec 20 04:01:59 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Failed with result &apos;exit-code&apos;.
Dec 20 04:01:59 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Service hold-off time over, scheduling restart.
Dec 20 04:01:59 rgw1 systemd[1]: Stopped Ceph rados gateway.
Dec 20 04:01:59 rgw1 systemd[1]: ceph-radosgw@rgw1.service: Start request repeated too quickly.
Dec 20 04:01:59 rgw1 systemd[1]: Failed to start Ceph rados gateway.
</code></pre>
<p>This error <em><strong>Couldn&apos;t init storage provider (RADOS)</strong></em> is often due to permissions issues, so at that point I re-considered what I was doing and figured out the real issue.</p>
<p>TL;DR: When restarting ceph-radosgw use <em><strong>ceph-radosgw@rgw.hostname</strong></em> and NOT <em><strong>ceph-radosgw@hostname</strong></em>.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Testing Your Project with OpenStack-Ansible]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>A couple of weeks ago I <a href="https://blog.andy.mc.it/osa-dev-env/">wrote a blog</a> about using OpenStack-Ansible (OSA) as your development environment for OpenStack.</p>
<p>Adding this development path was a key goal for the OSA team, but there was another key goal that came about as a result of the development environment work, and that</p>]]></description><link>https://blog.andy.mc.it/testing-your-project-with-openstack-ansible/</link><guid isPermaLink="false">60536c924faa77440e864ad5</guid><category><![CDATA[OpenStack]]></category><category><![CDATA[OpenStack-Ansible]]></category><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Wed, 21 Jun 2017 11:08:16 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2017/06/1025301_10151621039366021_901635931_o.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2017/06/1025301_10151621039366021_901635931_o.jpg" alt="Testing Your Project with OpenStack-Ansible"><p>A couple of weeks ago I <a href="https://blog.andy.mc.it/osa-dev-env/">wrote a blog</a> about using OpenStack-Ansible (OSA) as your development environment for OpenStack.</p>
<p>Adding this development path was a key goal for the OSA team, but there was another key goal that came about as a result of the development environment work, and that was the ability to incorporate OSA&apos;s testing jobs into your project.</p>
<h5 id="whyuseosatotestyourproject">Why use OSA to test your project?</h5>
<p>The OpenStack-Ansible team uses source to build our pip packages. These packages deploy the various OpenStack services, making it an ideal way to test code changes and bug fixes. OSA utilizes containers to separate out components, meaning we can test scenarios on a single host that you would otherwise need multiple hosts for. Examples of this are:</p>
<ol>
<li>&quot;Zero down-time&quot; upgrade tests, which require redundant services.</li>
<li>Multi-region scenarios requiring multiple hosts with potentially segregated networking.</li>
</ol>
<p>OSA has the benefit of having certain tested scenarios, such as functional testing for the nova-lxd driver, that is currently not tested in Devstack:</p>
<ul>
<li>For Keystone, &quot;zero downtime&quot; upgrades are tested.</li>
<li>Multi-region Swift deployments utilizing containers.</li>
<li>Upgrade jobs for Nova, Swift, Glance, Cinder, Neutron (the aim is to transition these to &quot;zero downtime&quot; upgrade tests as we integrate the project specific upgrade paths).</li>
<li>Nova scenario for nova-lxd.</li>
</ul>
<h6 id="howtotestoneoffbugfixes">How to test one off bug-fixes</h6>
<p>If you want to use OSA to test a bug fix against the OSA gate, you can be done right now, without any additional configuration setup.</p>
<p>The developer mode structure change has meant that you can use the &quot;Depends-On:&quot; tag to test patches from upstream projects. For example, we ran into a <a href="https://bugs.launchpad.net/nova/+bug/1694666?ref=awesomation-in-practice">Nova bug</a> (that impacts a few deployment projects) and Artom from the Nova team is working on a fix. The Nova gate isn&apos;t failing on this issue, but the OSA gate is, we can use the &quot;Depends-On:&quot; tag and reference <a href="https://review.openstack.org/?ref=awesomation-in-practice#/c/469978/">the patch Artom is working on</a>. This will deploy Nova from the OSA role, and run the OSA functional tests, using the code included in Artom&apos;s patch. Here is the <a href="https://review.openstack.org/?ref=awesomation-in-practice#/c/469941/">Test Patch</a> to show you how the integration works in practice, and how you would test Artom&apos;s patch.</p>
<h6 id="whatiscurrentlybeingtested">What is currently being tested?</h6>
<p>At present we have 2 upstream projects using OSA&apos;s testing jobs for their project:</p>
<ul>
<li>The Ansible Runtime Analysis (<a href="https://github.com/openstack/ara?ref=awesomation-in-practice">ARA</a>) project - maintained by the excellent <a href="https://twitter.com/dmsimard?ref=awesomation-in-practice">dmsimard</a>, currently utilizes a base OSA test job to test ARA is working with a consumer.</li>
<li><a href="https://github.com/openstack/keystone?ref=awesomation-in-practice">Keystone</a> currently has an experimental job that was added just this week, that utilizes the &quot;zero-downtime&quot; upgrade job in OSA.</li>
</ul>
<h5 id="okthatsoundsgreathowdoidothis">Ok that sounds great, how do I do this?</h5>
<p>It does sound great, doesn&apos;t it?!</p>
<p>If you wanted to integrate an OSA test with your repository, for example a &quot;zero-downtime&quot; upgrade test, you could:</p>
<ul>
<li>Write a job that runs on a multi-node gate (including a Load-Balancer, such as HAProxy)</li>
<li>Ensure there is capability in Devstack to set up and run the multi-node test.</li>
<li>Add test configuration to OpenStack project-infra.</li>
<li>Fix Devstack to make sure it works.</li>
<li>Run the tests.</li>
</ul>
<p>Alternatively you could configure the OSA &quot;upgrade&quot; job to run on commit.</p>
<p>We&apos;ve updated (as of the 15th September 2017) the process this cycle, and put a bit of work into ensuring we&apos;re doing this in the most simple way. It turns out we weren&apos;t, and it&apos;s now very simple.</p>
<p>All you have to do is adjust project-config in the following way:</p>
<ul>
<li>Edit jenkins/jobs/projects.yaml to ensure the job is a valid job - this is only required if, for example,  you want a non-voting job (-nv) when one doesn&apos;t exist yet.</li>
<li>Adjust zuul/layout.yml to include the OSA job in your project&apos;s jobs.</li>
</ul>
<p>A great example is <a href="https://review.openstack.org/?ref=awesomation-in-practice#/c/482185/">this patch</a> to enable this for the nova-lxd project.</p>
<h5 id="whydoesopenstackansiblecareabouttestingotherprojects">Why does OpenStack-Ansible care about testing other projects?</h5>
<p>We&apos;re pretty proud of the work we&apos;ve done, and we think that we have a lot of value we can give back to the community.</p>
<p>However, nothing is perfect, and there are a lot of upstream projects and teams. This does make it hard to keep all the projects in a state that would be considered &quot;following best practices&quot;. That isn&apos;t to say we don&apos;t try!</p>
<p>By helping developers and projects to use OSA for testing and development, we hope that it will encourage developers and projects to integrate with OSA and as a result, we&apos;ll see features and fixes happen as the real project experts get more involved. Improving the quality of OSA deployments, and in turn helping the developers and projects who are using OSA.</p>
<p>We&apos;ve seen this with the Keystone team. We have worked closely with the Keystone team to get the OSA upgrade path for Keystone to mirror the intentions of the Keystone developers, and we hope that Keystone will now benefit from the test jobs we have setup for the upgrades. This is something we&apos;d like to reproduce.</p>
<p>We strongly believe that working with the community, as more than just a consumer, is the best way to improve the quality and standards of the community as a whole.</p>
<p>Help us, to help you, to help us!</p>
<p>As always, reach out to me or the team on #openstack-ansible on Freenode IRC, or on Twitter/mailing-lists etc.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Using OpenStack-Ansible as your OpenStack development environment]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>In this blog post I aim to discuss how you could go about using OpenStack-Ansible as a development environment for OpenStack. Since all OpenStack services are built from source within OpenStack-Ansible, this has been a consistently requested feature for quite some time.</p>
<p>At the recent OpenStack Summit in Boston, <a href="https://youtu.be/UUe96OmCCug?t=1250&amp;ref=awesomation-in-practice">I</a></p>]]></description><link>https://blog.andy.mc.it/osa-dev-env/</link><guid isPermaLink="false">60536c924faa77440e864ad4</guid><category><![CDATA[OpenStack-Ansible]]></category><category><![CDATA[OpenStack]]></category><category><![CDATA[Ansible]]></category><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Wed, 31 May 2017 17:48:00 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2017/05/1147758_10151613245071021_23060892_o.jpg" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2017/05/1147758_10151613245071021_23060892_o.jpg" alt="Using OpenStack-Ansible as your OpenStack development environment"><p>In this blog post I aim to discuss how you could go about using OpenStack-Ansible as a development environment for OpenStack. Since all OpenStack services are built from source within OpenStack-Ansible, this has been a consistently requested feature for quite some time.</p>
<p>At the recent OpenStack Summit in Boston, <a href="https://youtu.be/UUe96OmCCug?t=1250&amp;ref=awesomation-in-practice">I spoke a bit about the developer mode work</a> we&apos;ve been working on within the OpenStack-Ansible project.</p>
<p>To begin, we had a singular way to achieve this. But it was manual, and long-winded:</p>
<ol>
<li>Setup your own private git repository for your project or service.</li>
<li>Commit your changes to your private <em>git_repo</em>.</li>
<li>Adjust the repos specific <em>git_repo</em> variable (e.g. <em>nova_git_repo</em>: <a href="https://github.com/andymcc/nova?ref=awesomation-in-practice">https://github.com/andymcc/nova</a>)</li>
<li>Adjust the repos specific <em>git_install_branch</em> variable, if on a specific branch (e.g. <em>nova_git_install_branch: my_test_branch</em>)</li>
<li>Run the setup plays.</li>
</ol>
<p>This works, and is fine, but it&apos;s not particularly agile. It also means you have to continually commit and push to a remote location, re-run the install, rinse and repeat. Additionally, it was limited to projects with a &quot;*_git_repo&quot; variable already setup. For example, if you wanted to test a change you are writing to <em>python-memcached</em>, you would not be able to, since we installed this directly from PyPi (in developer mode).</p>
<h4 id="version1keystoneproofofconceptforlocaldevelopermode">Version 1: Keystone Proof of Concept for local developer mode.</h4>
<p>Before the summit, we had proposed a <a href="https://github.com/openstack/openstack-ansible-os_keystone/commit/c8631347e729f9a21ec4f94f1a001776645dde5e?ref=awesomation-in-practice">Proof of Concept</a> developer mode test for Keystone, which would allow you to clone the Keystone repository locally, write some code, and then push the changes from your local directory to the containers.</p>
<p>This worked fine, but had a few limitations.</p>
<ol>
<li>It works for Keystone only, and is not generic.</li>
<li>This still requires code to be committed. For example, you can write some patch locally, but if you don&apos;t do a &quot;git add&quot; and a &quot;git commit&quot; it won&apos;t be included in the build on the containers.</li>
<li>Only works with Keystone.</li>
</ol>
<p>Since then, we&apos;ve spent some time improving that and making it more generic as a whole, and we&apos;ve <a href="https://review.openstack.org/?ref=awesomation-in-practice#/c/467604/">finally got that merged and working</a>. So, without further ado!</p>
<p><em><strong>Drum roll</strong></em></p>
<h4 id="allnewdevelopermodeforopenstackansible">All NEW developer mode for OpenStack-Ansible</h4>
<p>The new approach is simpler and far more generic, and allows you to test local patches to any upstream repositories for projects that are installed via pip.</p>
<p>&quot;That sounds great, but how do I do that?&quot;, I hear you say! Well... I&apos;m glad you asked!</p>
<p>To use this, all you need to do is the following:</p>
<ol>
<li>Get yourself an Ubuntu 16.04 or CentOS 7 testing server (for example a suitable VM or Cloud Instance).</li>
<li>Select and use git to clone the role for which you want to test, for example nova would be the <em>openstack-ansible-os_nova</em> role, which you could get clone from &quot;<a href="https://github.com/openstack/openstack-ansible-os_nova?ref=awesomation-in-practice">https://github.com/openstack/openstack-ansible-os_nova</a>&quot;</li>
<li>Clone the upstream repository you want to test or develop on, into <em>~/git/openstack/</em>.</li>
<li>Make your changes and develop away.</li>
<li>Run the scenario using tox, or the <em>run_tests.sh</em> in the <em>openstack-ansible-os_nova</em> role directory.</li>
</ol>
<p>If the <em>~/git/openstack/</em> directory doesn&apos;t seem suitable for your purposes you can set the directory by setting the <em>development_repo_directory</em> variable inside the <em>os-rolename_overrides.yml</em> file inside the role repositories <em>tests</em> directory. For example, adding <em>development_repo_directory: /path/to/my/repo_dir</em> to the <em>openstack-ansible-os_nova\tests\os-nova_overrides.yml</em> file.</p>
<p><strong>Note:</strong> You need to do this before your first run, and ideally don&apos;t change it afterwards (unless you plan on doing a full run, which will delete and recreate containers).</p>
<p>This will work for any pip package that are installed, for example, if you want to develop on <em>libvirt-python</em>, ensure that you clone it as the <em>~/git/openstack/libvirt-python</em> directory, and develop there. This will also work with multiple packages, as long as they are all cloned into <em>~/git/openstack/</em>. This also means you can develop on Keystone with your Nova deployment, by cloning Keystone into the <em>~/git/openstack/-</em> directory.</p>
<p>It&apos;s also important to note, once you have a setup configured, for example you are testing Nova, you don&apos;t need to do a full re-deploy, you can just run the specific playbook for deploying nova, and skip redeploying all containers.</p>
<h4 id="howdoesitwork">How does it work?</h4>
<p>OpenStack-Ansible already has the functionality to install pip packages with constraints files. Using constraints files we can specify the location of a package as being file based, for example: <em>file:///my/path/keystone#egg=keystone</em>. This will ensure that if the constraints file is applied, and the Keystone package is installed, it will be installed from the file path specified instead of from an upstream git repository.</p>
<p>At this point, we loop through all the directories we find in the <em>development_repo_directory</em> directory, and generate a constraints file based on the directories we find. In this way, when you go to install any package that has a directory in <em>development_repo_directory</em> with the same name as the package, it will use the local file location as the location to install the package from.</p>
<p>This constraints file is then applied as the first constraints file (which will mean it takes precedence over any other constraints or options) when doing any pip installs and as a result, any packages listed in the constraints file will be installed from the file location.</p>
<p>The only other step is to mount the <em>development_repo_directory</em> into the containers at the same location. In other words, if it&apos;s <em>/opt/repos</em> on your host, it&apos;ll be <em>/opt/repo</em> in the containers - this is to ensure that services such as Nova (which will deploy compute onto localhost) use the same location as services in containers. The aim is that you don&apos;t have to log into the container.</p>
<h4 id="whatsnext">What&apos;s next?</h4>
<p>All the OpenStack-Ansible roles are now ready to go, with the exception of the Monasca role (which is currently being reworked).</p>
<p>We&apos;ll be adding some documentation to the official OpenStack-Ansible docs to explain how to use the developer mode.</p>
<p>But most importantly - give it a go! If you have any questions, or need feedback jump into the #openstack-ansible IRC channel on freenode, or reach out to andymccr (me) on Freenode and let me know your thoughts and feedback!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[OpenStack Summit Recap - Boston 2017 - OpenStack-Ansible]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><img src="https://blog.andy.mc.it/content/images/2017/05/OpenStack_Project_OpenStackAnsible_vertical.jpg" alt="OpenStack-Ansible logo" loading="lazy"></p>
<p>Boston is a wrap, and the OpenStack-Ansible (OSA) crew were there representing in force.</p>
<h3 id="openstackansibledeploymentsonshow">OpenStack-Ansible Deployments on Show</h3>
<br>
<h6 id="gekeynote">GE Keynote</h6>
<p>The week started off, as usual, with keynotes. In particular, GE <a href="https://www.youtube.com/watch?v=NlaEGESJIvc&amp;ref=awesomation-in-practice">gave an impressive keynote about their usage of OpenStack in production</a>. GE uses OpenStack-Ansible to deploy their production environment.</p>]]></description><link>https://blog.andy.mc.it/osa-boston-recap/</link><guid isPermaLink="false">60536c924faa77440e864ad1</guid><category><![CDATA[OpenStack]]></category><category><![CDATA[OpenStack-Ansible]]></category><category><![CDATA[Ansible]]></category><dc:creator><![CDATA[Andy McCrae]]></dc:creator><pubDate>Wed, 17 May 2017 10:51:00 GMT</pubDate><media:content url="https://blog.andy.mc.it/content/images/2017/05/Webp.net-resizeimage.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.andy.mc.it/content/images/2017/05/Webp.net-resizeimage.png" alt="OpenStack Summit Recap - Boston 2017 - OpenStack-Ansible"><p><img src="https://blog.andy.mc.it/content/images/2017/05/OpenStack_Project_OpenStackAnsible_vertical.jpg" alt="OpenStack Summit Recap - Boston 2017 - OpenStack-Ansible" loading="lazy"></p>
<p>Boston is a wrap, and the OpenStack-Ansible (OSA) crew were there representing in force.</p>
<h3 id="openstackansibledeploymentsonshow">OpenStack-Ansible Deployments on Show</h3>
<br>
<h6 id="gekeynote">GE Keynote</h6>
<p>The week started off, as usual, with keynotes. In particular, GE <a href="https://www.youtube.com/watch?v=NlaEGESJIvc&amp;ref=awesomation-in-practice">gave an impressive keynote about their usage of OpenStack in production</a>. GE uses OpenStack-Ansible to deploy their production environment. Including my (easily) favourite quote of the week in their slide deck:</p>
<p><img src="https://blog.andy.mc.it/content/images/2017/05/C_TurczXgAAyApY.jpg" alt="OpenStack Summit Recap - Boston 2017 - OpenStack-Ansible" loading="lazy"></p>
<h6 id="americanchemicalsocietycas">American Chemical Society (CAS)</h6>
<p>CAS gave a <a href="https://www.youtube.com/watch?v=ZlCoIIgLzYQ&amp;ref=awesomation-in-practice">&quot;war stories&quot; talk about getting to grips with OpenStack</a>. They had some issues relating to Networking, Compute, and storage which they run through in the talk. What I loved was that this was another story of an OpenStack-Ansible deployment in production. CAS showcased the flexibility that OSA provides, allowing deployers and operators to overcome issues in their deployments in a managed and repeatable way.</p>
<p>It was really great to see large scale deployments of OpenStack-Ansible, in production, with happy operators and deployers.<br>
<br></p>
<h3 id="openstackansibletalks">OpenStack-Ansible Talks</h3>
<p>There were several OpenStack-Ansible specific talks on show:</p>
<ul>
<li><a href="https://www.youtube.com/watch?v=QCmSHSaah3Y&amp;ref=awesomation-in-practice">Project Update - OpenStack-Ansible</a>
<ul>
<li>The project update for OSA had a full house. We had a lot of great feedback, including specific commendations for our documentation and security roles, which have been well received. Credit to the team, the hard work is definitely showing.</li>
</ul>
</li>
<li><a href="https://www.youtube.com/watch?v=UUe96OmCCug&amp;ref=awesomation-in-practice">Making OpenStack-Ansible work for you!</a>
<ul>
<li>This was my talk about helping deployers, developers, and new contributors get involved in OpenStack-Ansible. I had some really great and helpful feedback, which I&apos;ll be taking on board - look out for v2 at OpenStack days Germany on the 26th June in Munich.</li>
</ul>
</li>
<li><a href="https://www.youtube.com/watch?v=E67zaS_UZks&amp;ref=awesomation-in-practice">Securing OpenStack Clouds and Beyond with Ansible<br>
</a>
<ul>
<li>Major Hayden gave a talk about the openstack-ansible-security role, which can run against non-OSA hosts, but is maintained and curated by the team.</li>
</ul>
</li>
<li><a href="https://www.youtube.com/watch?v=m9A4cy0MWKw&amp;3Bfeature=youtu.be&amp;3Bt=1177&amp;ref=awesomation-in-practice">Using Ansible to automate the entire IT stack</a>
<ul>
<li>Ricardo gives a run down of various projects, including OpenStack-Ansible, as well as various options for managing your whole stack.</li>
</ul>
</li>
<li><a href="https://www.youtube.com/watch?v=HcKIBVOnVvo&amp;ref=awesomation-in-practice">Extending OpenStack-Ansible with Automated Operational Management</a>
<ul>
<li>William walks through using OSA, integrating OSA with Nagios, Logstash, and Kibana.</li>
</ul>
</li>
<li><a href="https://www.youtube.com/watch?v=UrZ_NeBb8EQ&amp;ref=awesomation-in-practice">The COA and why you should take it</a>
<ul>
<li>Amy chaired this panel about the Certified OpenStack Administrator exam. Proud to say that the COA exam is setup using OpenStack-Ansible!</li>
</ul>
</li>
<li><a href="https://www.youtube.com/watch?v=asIwUJZbESE&amp;ref=awesomation-in-practice">Maximizing Hardware- Server Simulator</a>
<ul>
<li>Kevin talks about using a &quot;multi-node-aio&quot; and testing OpenStack using OpenStack-Ansible.</li>
</ul>
</li>
<li><a href="https://www.youtube.com/watch?v=eajWhDOVjWo&amp;ref=awesomation-in-practice">Grow Your Community- Inspire an Impostor</a>
<ul>
<li>I personally can&apos;t get enough of Major&apos;s dulcet tones. This isn&apos;t an OSA related talk really, but I recommend it none-the-less!</li>
</ul>
</li>
</ul>
<h3 id="openstackansibleprojectonboarding">OpenStack-Ansible Project Onboarding</h3>
<p>This was the first summit where project-specific onboarding had been available, and it was a great opportunity to meet some interested contributors and help to get them involved! We were fortunate to have one of these slots, and I&apos;m glad we did - we had another full house, and we were able to cover a lot of topics and information all driven by what the people in the room wanted to learn about.</p>
<p><img src="https://blog.andy.mc.it/content/images/2017/05/C_eDXi6UMAILR08.jpg" alt="OpenStack Summit Recap - Boston 2017 - OpenStack-Ansible" loading="lazy"></p>
<p>You can <a href="https://etherpad.openstack.org/p/BOS-osa-onboarding?ref=awesomation-in-practice">view the etherpad</a> we used to get new contributors more familiar with etherpad and to document and paste links to various topics as we discussed them.</p>
<p>Directly after the session, <a href="https://review.openstack.org/?ref=awesomation-in-practice#/c/463774/">Chris made his first commit</a>. Which is a great way to showcase the usefulness of the onboarding session. Congratulations Chris!</p>
<h3 id="openstackansibleoperatorsfeedback">OpenStack-Ansible Operators Feedback</h3>
<p>Operators feedback is really important to us as a deployment project. We had another great turnout, and a lot of really useful feedback.</p>
<p>Some of the key themes:</p>
<ul>
<li>Offline installs, or installs via proxy hosts are hard.
<ul>
<li>Improvements to the documentation and process to achieve these scenarios was requested.</li>
</ul>
</li>
<li>Trusty -&gt; Xenial upgrades concerns.
<ul>
<li>We had already <a href="https://etherpad.openstack.org/p/osa-newton-xenial-upgrade?ref=awesomation-in-practice">started an etherpad</a> which covers this and can be added to. However, we will be looking into converting this into more official documentation.</li>
</ul>
</li>
<li>Leapfrog upgrades.</li>
<li>Role integration for upstream roles.
<ul>
<li>Better documentation is required here.</li>
</ul>
</li>
<li>Being able to utilize patch-sets from upstream patches.</li>
</ul>
<p>More details can be found <a href="https://etherpad.openstack.org/p/BOS-osa-ops-feedback?ref=awesomation-in-practice">on the session etherpad</a>.</p>
<h3 id="i18nchecksite">I18n check-site</h3>
<p>Working with the Horizon and I18n teams, a translations check-site is being setup utilizing OpenStack-Ansible to allow translators to run through translations throughout the cycle. This is a great showcase of the strength of the OpenStack community. A great deal of progress was made, and we&apos;re looking to have something up and running soon!</p>
<p><img src="https://blog.andy.mc.it/content/images/2017/05/Screen-Shot-2017-05-17-at-1.15.32-PM.png" alt="OpenStack Summit Recap - Boston 2017 - OpenStack-Ansible" loading="lazy"></p>
<h3 id="summary">Summary</h3>
<p>Another successful summit for OSA, with a lot of buzz and interest in the project. New contributors coming onboard and a lot of great hallway-track discussions. There are a few pointers and places that we can focus on, but overall a great deal of positive feedback - especially around our documentation, the hard work is paying off!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>