<div dir="ltr">Yes thanks for doing the work to share this menn0. It is much appreciated. <div><br></div><div>I also needed to change the following in squid-deb-proxy (even though I added a bunch of domains to <font face="monospace">/etc/squid-deb-proxy/mirror-dstdomain.acl.d/10-default</font>):  <div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px">--- a/squid-deb-proxy/squid-deb-proxy.conf</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px">+++ b/squid-deb-proxy/squid-deb-proxy.conf</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px">@@ -80,12 +80,12 @@ http_access deny blockedpkgs</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> # allow access only to official archive mirrors</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> # uncomment the third and fouth line to permit any unlisted domain</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> #http_access deny !to_archive_mirrors</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px">-http_access allow !to_archive_mirrors</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px">+http_access allow all #!to_archive_mirrors</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> </span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> # don't cache domains not listed in the mirrors file</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> # uncomment the third and fourth line to cache any unlisted domains</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> #cache deny !to_archive_mirrors</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px">-cache allow !to_archive_mirrors</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px">+cache allow all</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> </span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> # allow access from our network and localhost</span></font></div><div><font face="monospace"><span style="font-size:12.1875px;line-height:18.2812px"> http_access allow allowed_networks</span></font></div><div><br></div></div><div>And update some firewall rules aside from the ones shipped with squid (tcp only is prolly fine here):</div><div><div><font face="monospace">diff --git a/ufw/user.rules b/ufw/user.rules</font></div><div><font face="monospace">index 121b5b5..4cca3b0 100644</font></div><div><font face="monospace">--- a/ufw/user.rules</font></div><div><font face="monospace">+++ b/ufw/user.rules</font></div><div><font face="monospace">@@ -47,6 +47,10 @@</font></div><div><font face="monospace"> ### tuple ### allow tcp 2048,3128,3130,3401,4827 <a href="http://0.0.0.0/0">0.0.0.0/0</a> any <a href="http://0.0.0.0/0">0.0.0.0/0</a> Squid - in</font></div><div><font face="monospace"> -A ufw-user-input -p tcp -m multiport --dports 2048,3128,3130,3401,4827 -j ACCEPT -m comment --comment 'dapp_Squid'</font></div><div><font face="monospace"> </font></div><div><font face="monospace">+### tuple ### allow any 8000 <a href="http://0.0.0.0/0">0.0.0.0/0</a> any <a href="http://0.0.0.0/0">0.0.0.0/0</a> in</font></div><div><font face="monospace">+-A ufw-user-input -p tcp --dport 8000 -j ACCEPT</font></div><div><font face="monospace">+-A ufw-user-input -p udp --dport 8000 -j ACCEPT</font></div><div><font face="monospace">+</font></div><div><font face="monospace"> ### END RULES ###</font></div><div><font face="monospace"> </font></div><div><font face="monospace"> ### LOGGING ###</font></div><div><font face="monospace">diff --git a/ufw/user6.rules b/ufw/user6.rules</font></div><div><font face="monospace">index 2c1aac4..d48de60 100644</font></div><div><font face="monospace">--- a/ufw/user6.rules</font></div><div><font face="monospace">+++ b/ufw/user6.rules</font></div><div><font face="monospace">@@ -47,6 +47,10 @@</font></div><div><font face="monospace"> ### tuple ### allow tcp 2048,3128,3130,3401,4827 ::/0 any ::/0 Squid - in</font></div><div><font face="monospace"> -A ufw6-user-input -p tcp -m multiport --dports 2048,3128,3130,3401,4827 -j ACCEPT -m comment --comment 'dapp_Squid'</font></div><div><font face="monospace"> </font></div><div><font face="monospace">+### tuple ### allow any 8000 ::/0 any ::/0 in</font></div><div><font face="monospace">+-A ufw6-user-input -p tcp --dport 8000 -j ACCEPT</font></div><div><font face="monospace">+-A ufw6-user-input -p udp --dport 8000 -j ACCEPT</font></div></div><div><br></div><div><span style="line-height:21px;font-size:x-small">I've also added the config items to clouds.yaml and they work there. I'll update the wiki later this or next week.</span><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 15, 2016 at 2:27 PM Casey Marshall <<a href="mailto:casey.marshall@canonical.com">casey.marshall@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Menno,<div>This is great and thanks for sharing!</div><div><br></div><div>In case anyone else runs into this.. charms that install from PPAs will fail with this squid-deb-proxy setup. You'll need to allow archive mirrors for this to work. See <a href="https://1337.tips/ubuntu-cache-packages-using-squid-deb-proxy/" target="_blank">https://1337.tips/ubuntu-cache-packages-using-squid-deb-proxy/</a> for an example.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 15, 2016 at 9:31 AM, Rafael Gonzalez <span dir="ltr"><<a href="mailto:rafael.gonzalez@canonical.com" target="_blank">rafael.gonzalez@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Menno, <div><br></div><div>Thanks for putting this together, great tips.  I recently ran into an issue which others could see as well.</div><div><br></div><div>One may need to adjust the following for large bundle deployments on LXD.  A bundle deployment fails with errors about "Too many files open."  This will increase number of max open files:<br></div><div><br></div><div><span style="color:rgb(51,51,51);font-family:"Source Sans Pro",sans-serif;font-size:15px;line-height:17px;white-space:pre-wrap;background-color:rgb(255,255,255)">  echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p  </span><br></div><div><span style="color:rgb(51,51,51);font-family:"Source Sans Pro",sans-serif;font-size:15px;line-height:17px;white-space:pre-wrap;background-color:rgb(226,237,255)"><br></span></div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Rafael O. Gonzalez<br></div>Canonical, Solutions Architect<br></div><a href="mailto:rgonza@canonical.com" target="_blank">rgonza@canonical.com</a></div><div dir="ltr"><a href="tel:1-646-481-7232" value="+16464817232" target="_blank">1-646-481-7232</a><br><br><br></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div>On Sun, Aug 14, 2016 at 8:07 PM, Menno Smits <span dir="ltr"><<a href="mailto:menno.smits@canonical.com" target="_blank">menno.smits@canonical.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>I've put together a few tips on the wiki for speeding up bootstrap and provisioning times when using the Juju lxd provider. I find these techniques helpful when checking my work or investigating bugs - situations where you end up bootstrapping and deploying many times.</div><div><br></div><a href="https://github.com/juju/juju/wiki/Faster-LXD" target="_blank">https://github.com/juju/juju/wiki/Faster-LXD</a><div><br></div><div>If you have your own techniques, or improvements to what I'm doing, please update the article.</div><span><font color="#888888"><div><br></div><div>- Menno</div><div><br></div><div><br><div><br></div><div><br><div><br></div><div><br></div></div></div></font></span></div>
<br></div></div><span>--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br></span></blockquote></div><br></div>
<br>--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
<br></blockquote></div><br></div>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</blockquote></div>