Skip to content

Commit

Permalink
Deployed 2dca23e with MkDocs version: 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bienko committed Dec 2, 2024
1 parent 488d3ca commit 8a755a1
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 31 deletions.
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.
78 changes: 48 additions & 30 deletions source-matching-post-processing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,28 +451,47 @@ <h2 id="ii-content-source-matching"><strong>ii. Content source matching</strong>
</ol>
<hr />
<ol start="3">
<li>Open the <code>install_pgsql-single-task.yml</code> Ansible Playbook, which is included within the <code>ansible-wca-demo-kit</code> directory. The full location of the Playbook, as well as the contents, are available in the code block below.<div class="highlight"><pre><span></span><code>=== &quot;~/Documents/ansible-wca-demo-kit/install and configure PostgreSQL and PGAdmin container/install_pgsql-single-task.yml&quot;

``` yaml linenums=&quot;1&quot;
---
- name: Configure Database servers
hosts: databases
become: true

tasks:
# TASK 1
# - name: Install postgresql-server

# TASK 2
# Ansible Lightspeed used an easy-to-understand natural language prompt and suggested the correct, more complex PostgreSQL CLI command to initiate the database.
# Ansible Lightspeed used best practices and kept the task idempotent by including creates: /var/lib/pgsql/data/postgresql.conf in the suggestion.
# - name: Run postgresql setup command

# TASK 3
# Ansible Lightspeed used natural language prompt and added state: started and enabled: true module arguments based on Start and enable... in the Ansible task description.
# - name: Start and enable postgresql service
```
</code></pre></div>
<li>
<p>Open the <code>install_pgsql-single-task.yml</code> Ansible Playbook, which is included within the <code>ansible-wca-demo-kit</code> directory. The full location of the Playbook, as well as the contents, are available in the code block below.</p>
<div class="tabbed-set tabbed-alternate" data-tabs="1:1"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">~/Documents/ansible-wca-demo-kit/install and configure PostgreSQL and PGAdmin container/install_pgsql-single-task.yml</label></div>
<div class="tabbed-content">
<div class="tabbed-block"></div>
</div>
</div>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-0-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-0-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-0-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-0-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-0-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-0-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-0-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-0-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-0-10">10</a></span>
<span class="normal"><a href="#__codelineno-0-11">11</a></span>
<span class="normal"><a href="#__codelineno-0-12">12</a></span>
<span class="normal"><a href="#__codelineno-0-13">13</a></span>
<span class="normal"><a href="#__codelineno-0-14">14</a></span>
<span class="normal"><a href="#__codelineno-0-15">15</a></span>
<span class="normal"><a href="#__codelineno-0-16">16</a></span>
<span class="normal"><a href="#__codelineno-0-17">17</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nn">---</span><span class="w"></span>
<a id="__codelineno-0-2" name="__codelineno-0-2"></a><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Configure Database servers</span><span class="w"></span>
<a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">databases</span><span class="w"></span>
<a id="__codelineno-0-4" name="__codelineno-0-4"></a><span class="nt">become</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"></span>
<a id="__codelineno-0-5" name="__codelineno-0-5"></a>
<a id="__codelineno-0-6" name="__codelineno-0-6"></a><span class="nt">tasks</span><span class="p">:</span><span class="w"></span>
<a id="__codelineno-0-7" name="__codelineno-0-7"></a><span class="w"> </span><span class="c1"># TASK 1</span><span class="w"></span>
<a id="__codelineno-0-8" name="__codelineno-0-8"></a><span class="w"> </span><span class="c1"># - name: Install postgresql-server</span><span class="w"></span>
<a id="__codelineno-0-9" name="__codelineno-0-9"></a>
<a id="__codelineno-0-10" name="__codelineno-0-10"></a><span class="w"> </span><span class="c1"># TASK 2</span><span class="w"></span>
<a id="__codelineno-0-11" name="__codelineno-0-11"></a><span class="w"> </span><span class="c1"># Ansible Lightspeed used an easy-to-understand natural language prompt and suggested the correct, more complex PostgreSQL CLI command to initiate the database.</span><span class="w"></span>
<a id="__codelineno-0-12" name="__codelineno-0-12"></a><span class="w"> </span><span class="c1"># Ansible Lightspeed used best practices and kept the task idempotent by including creates: /var/lib/pgsql/data/postgresql.conf in the suggestion.</span><span class="w"></span>
<a id="__codelineno-0-13" name="__codelineno-0-13"></a><span class="w"> </span><span class="c1"># - name: Run postgresql setup command</span><span class="w"></span>
<a id="__codelineno-0-14" name="__codelineno-0-14"></a>
<a id="__codelineno-0-15" name="__codelineno-0-15"></a><span class="w"> </span><span class="c1"># TASK 3</span><span class="w"></span>
<a id="__codelineno-0-16" name="__codelineno-0-16"></a><span class="w"> </span><span class="c1"># Ansible Lightspeed used natural language prompt and added state: started and enabled: true module arguments based on Start and enable... in the Ansible task description.</span><span class="w"></span>
<a id="__codelineno-0-17" name="__codelineno-0-17"></a><span class="w"> </span><span class="c1"># - name: Start and enable postgresql service</span><span class="w"></span>
</code></pre></div></td></tr></table></div>
</li>
</ol>
<hr />
Expand All @@ -498,10 +517,9 @@ <h2 id="ii-content-source-matching"><strong>ii. Content source matching</strong>
<ol start="5">
<li>
<p>The three most likely content sources used in training the WCA model— which produced the AI-generated code recommendations —are listed within the <code>Ansible</code> <strong>tab</strong><sup>[A]</sup>. Recall from earlier that these code attribution suggestions are created using a <strong>k-NN</strong> algorithm that searches <strong>Ansible Galaxy</strong> repositories for the nearest related content to the AI-generated code suggestions.</p>
<p>Clicking the arrow icon to the left of each <strong>attribution</strong><sup>[B]</sup> will expand further details about the source. Information about the <code>URL</code>, <code>Path</code>, <code>Data Source</code>, <code>License</code>, and <code>Score</code> are displayed (where available) under each listing. Red Hat-certified and maintained collections, as well as contributors to open source projects on Ansible Galaxy, are the primary sources for Ansible Lightspeed model training and are the content sources you are most likely to see matched to AI-generated code recommendations.</p>
<p><br/>
<a class="glightbox" href="../_attachments/contentmatching5.png" data-type="image" data-width="auto" data-height="auto" data-desc-position="bottom"><img alt="" loading="lazy" src="../_attachments/contentmatching5.png" width="600" /></a></p>
<p><br/>
Clicking the arrow icon to the left of each <strong>attribution</strong><sup>[B]</sup> will expand further details about the source. Information about the <code>URL</code>, <code>Path</code>, <code>Data Source</code>, <code>License</code>, and <code>Score</code> are displayed (where available) under each listing. Red Hat-certified and maintained collections, as well as contributors to open source projects on Ansible Galaxy, are the primary sources for Ansible Lightspeed model training and are the content sources you are most likely to see matched to AI-generated code recommendations.</p>
</li>
</ol>
<hr />
Expand Down Expand Up @@ -566,7 +584,7 @@ <h2 id="iii-post-processing-capabilities"><strong>iii. Post-processing capabilit
<a class="glightbox" href="../_attachments/troubleshooting-2.png" data-type="image" data-width="auto" data-height="auto" data-desc-position="bottom"><img alt="" loading="lazy" src="../_attachments/troubleshooting-2.png" width="600" /></a></p>
<p><a class="glightbox" href="../_attachments/troubleshooting-3.png" data-type="image" data-width="auto" data-height="auto" data-desc-position="bottom"><img alt="" loading="lazy" src="../_attachments/troubleshooting-3.png" width="600" /></a></p>
</details>
<div class="tabbed-set tabbed-alternate" data-tabs="1:1"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">demo_provision_ec2_instance.yml</label></div>
<div class="tabbed-set tabbed-alternate" data-tabs="2:1"><input checked="checked" id="__tabbed_2_1" name="__tabbed_2" type="radio" /><div class="tabbed-labels"><label for="__tabbed_2_1">demo_provision_ec2_instance.yml</label></div>
<div class="tabbed-content">
<div class="tabbed-block"></div>
</div>
Expand Down Expand Up @@ -618,11 +636,11 @@ <h2 id="iii-post-processing-capabilities"><strong>iii. Post-processing capabilit
<span class="normal"><a href="#__codelineno-2-45">45</a></span>
<span class="normal"><a href="#__codelineno-2-46">46</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1"></a><span class="nn">---</span><span class="w"></span>
<a id="__codelineno-2-2" name="__codelineno-2-2"></a><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">EC2 Cloud Operations</span><span class="w"></span>
<a id="__codelineno-2-3" name="__codelineno-2-3"></a><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">localhost</span><span class="w"></span>
<a id="__codelineno-2-4" name="__codelineno-2-4"></a><span class="nt">connection</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">local</span><span class="w"></span>
<a id="__codelineno-2-5" name="__codelineno-2-5"></a><span class="nt">gather_facts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span><span class="w"></span>
<a id="__codelineno-2-3" name="__codelineno-2-3"></a><span class="w"> </span><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">localhost</span><span class="w"></span>
<a id="__codelineno-2-4" name="__codelineno-2-4"></a><span class="w"> </span><span class="nt">connection</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">local</span><span class="w"></span>
<a id="__codelineno-2-5" name="__codelineno-2-5"></a><span class="w"> </span><span class="nt">gather_facts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span><span class="w"></span>
<a id="__codelineno-2-6" name="__codelineno-2-6"></a>
<a id="__codelineno-2-7" name="__codelineno-2-7"></a><span class="nt">module_defaults</span><span class="p">:</span><span class="w"></span>
<a id="__codelineno-2-7" name="__codelineno-2-7"></a><span class="w"> </span><span class="nt">module_defaults</span><span class="p">:</span><span class="w"></span>
<a id="__codelineno-2-8" name="__codelineno-2-8"></a><span class="w"> </span><span class="nt">group/aws</span><span class="p">:</span><span class="w"></span>
<a id="__codelineno-2-9" name="__codelineno-2-9"></a><span class="w"> </span><span class="nt">region</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">us-east-1</span><span class="w"></span>
<a id="__codelineno-2-10" name="__codelineno-2-10"></a>
Expand All @@ -635,7 +653,7 @@ <h2 id="iii-post-processing-capabilities"><strong>iii. Post-processing capabilit
<a id="__codelineno-2-17" name="__codelineno-2-17"></a><span class="c1"># function: lightspeed-demo</span><span class="w"></span>
<a id="__codelineno-2-18" name="__codelineno-2-18"></a><span class="c1"># security_group: secgroup-lightspeed</span><span class="w"></span>
<a id="__codelineno-2-19" name="__codelineno-2-19"></a>
<a id="__codelineno-2-20" name="__codelineno-2-20"></a><span class="nt">tasks</span><span class="p">:</span><span class="w"></span>
<a id="__codelineno-2-20" name="__codelineno-2-20"></a><span class="w"> </span><span class="nt">tasks</span><span class="p">:</span><span class="w"></span>
<a id="__codelineno-2-21" name="__codelineno-2-21"></a><span class="w"> </span><span class="c1"># TASK 1</span><span class="w"></span>
<a id="__codelineno-2-22" name="__codelineno-2-22"></a><span class="w"> </span><span class="c1"># # 1a. Uncomment task description below and generate a task suggestion.</span><span class="w"></span>
<a id="__codelineno-2-23" name="__codelineno-2-23"></a><span class="w"> </span><span class="c1"># # Note - Best practices: The suggestion used the Fully Qualified Collection name.</span><span class="w"></span>
Expand Down

0 comments on commit 8a755a1

Please sign in to comment.