<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 4, 2019 at 11:14 AM Dennis Kliban <<a href="mailto:dkliban@redhat.com">dkliban@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 4, 2019 at 11:11 AM Mike DePaulo <<a href="mailto:mikedep333@redhat.com" target="_blank">mikedep333@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><b>Why?</b><div>pulp_rpm, and likely other plugins in the future, have C dependencies. They are often difficult to satisfy on Ubuntu's LTS releases that Travis provides. Since we are developing containers and a Kubernetes operator anyway, we decided to migrate plugin-template's Travis CI scripts to using them. These containers are currently based on Fedora 30, but will likely later be based on CentOS 7.7 or 8.0, which contain python 3.6.</div><div>This is task <a href="https://pulp.plan.io/issues/5004" target="_blank">#5004</a>.</div><div><br></div><div><b>Overview:</b></div><div>1. During install.sh, the container image named like "pulp_file" is built according to pulpcore/containers/</div><div>2. During install.sh, k3s, the lightweight kubernetes implementation, is installed & configured on the Travis Ubuntu VM, which already has docker.</div><div>3. During install.sh, pulp-operator is deployed (up.sh), which in turn deploys the postgres database, redis, and the pulp_* image you built. It spins the single image up 4 separate containers (services/processes): pulp-api, pulp-content, pulp-resource-manager, and pulp-worker .</div><div>4. During script.sh, we install some commonly needed testing tools into the pulp-api container by prefixing the install command with $CMD_PREFIX . So long as this container never gets restarted, they will remain installed in it. These tools are not available to the other containers.</div><div>5. We use $CMD_PREFIX to run the unit tests</div><div>6. From the Travis Ubuntu VM, we run pulp-smash functional tests, build docs, or use bindings, etc.</div><div>7. Note that many other pieces of the puzzle were modified, including pulp-smash, to make this integration all work.</div><div><br></div><div><b>Changes you may need to make:</b></div><div>(in addition to the usual plugin-template commands):</div><div>1. Ensure that in template_config.yml, "plugin_name" is set to a value like "pulp_file" rather than "file"</div><div>2. If you write out ~/.netrc , the pulp application password has been changed from "admin" to "password" (which other pulp test / development code uses.)</div><div></div></div></blockquote><div><br></div><div>You only need to make this change if you are continuing to use ansible-pulp to deploy pulp on Travis. Otherwise, the containers built using the latest Travis config will have the right password.<br></div></div></div></blockquote><div><br></div><div>Actually, I encountered this during pulp_file's docs tests, which did not use ansible-pulp. Its <a href="https://github.com/pulp/pulp_file/tree/master/docs/_scripts">docs/_scripts/</a> shell scripts (which get embedded in the docs) are tested via httpie (`http`), and therefore used the .netrc.</div><div>I suppose you could use ansible-pulp in your manually-written .travis/{pre,post}*.sh scripts to install pulp on the Travis VM (which is the container host), but I do not recommend it. The templated .travis/*.sh scripts would still always deploy it in containers also. And I set things like PYTHONPATH so you don't need to call ansible-pulp for that specific reason.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>3. git rm .travis/{playbook,postgres,mariadb}.yml</div></div></blockquote></div></div></blockquote><div> </div><div>4. Append to PYTHONPATH (do not override it, your plugin's dir is in it. It is set in .travis/script.sh).</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div><b>Planned improvements include:</b></div><div>1. Speeding up in the image build, largely through 3.</div><div>2. Publishing images to <a href="http://quay.io/" target="_blank">quay.io</a>. <a href="https://pulp.plan.io/issues/5062" target="_blank">#5062</a></div><div>3. Only building your pulp_* image from scratch if you have a required PR for pulpcore or pulpcore-plugin (or pulp-certguard.) Otherwise, your image will be layered on top of the "pulpcore" image. <a href="https://pulp.plan.io/issues/5062" target="_blank">#5062</a></div><div>4. re-introducing python 3.6 testing alongside 3.7 (Fedora 30 is Python 3.7 based)</div><div>5. re-introducing codecov</div><div>6. (possible / long-term): Improving how testing packages are installed. <a href="https://pulp.plan.io/issues/5404" target="_blank">#5404 </a></div><div><br></div><div><b>Feedback wanted on:</b></div><div>1. Any confusing/unclear output.</div><div>2. Any reliability issues.</div><br class="gmail-m_-3686415933180778359gmail-m_4076753851565042964gmail-Apple-interchange-newline"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-3686415933180778359gmail-m_4076753851565042964gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:capitalize"><span>Mike</span> <span>DePaulo</span><span style="text-transform:uppercase;color:rgb(170,170,170);margin:0px"></span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px 0px 4px;text-transform:capitalize">He / Him / His</p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px;text-transform:capitalize"><span>Service Reliability Engineer, Pulp</span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px 0px 4px;font-size:12px"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat<span></span></a></p><div style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:medium;margin-bottom:4px"></div><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px;font-size:12px"><span>IM: <span>mikedep333</span></span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px"><span>GPG: 51745404</span></p><div style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:medium;margin-top:12px"><table border="0"><tbody><tr><td width="100px"><a href="https://www.redhat.com/" target="_blank"><img src="https://marketing-outfit-prod-images.s3-us-west-2.amazonaws.com/f5445ae0c9ddafd5b2f1836854d7416a/Logo-RedHat-Email.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:capitalize"><span>Mike</span> <span>DePaulo</span><span style="text-transform:uppercase;color:rgb(170,170,170);margin:0px"></span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px 0px 4px;text-transform:capitalize">He / Him / His</p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px;text-transform:capitalize"><span>Service Reliability Engineer, Pulp</span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px 0px 4px;font-size:12px"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat<span></span></a></p><div style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:medium;margin-bottom:4px"></div><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px;font-size:12px"><span>IM: <span>mikedep333</span></span></p><p style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px"><span>GPG: 51745404</span></p><div style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:medium;margin-top:12px"><table border="0"><tbody><tr><td width="100px"><a href="https://www.redhat.com/" target="_blank"><img src="https://marketing-outfit-prod-images.s3-us-west-2.amazonaws.com/f5445ae0c9ddafd5b2f1836854d7416a/Logo-RedHat-Email.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div>