<div dir="ltr">It does seem like Juju operating the LXD provider, but spanning multiple machines would be an answer. I do believe that LXD itself is introducing clustering into their API in the 18.04 cycle. Which would probably need some updates on the Juju side to handle their targeted provisioning (create a container for maas-postgresql on the 3rd machine in the LXD cluster).<div>But that might get you out of manual provisioning of a bunch of machines and VMs to target everything.</div><div>We're certainly not at a point where you could just-do-that today.</div><div>I can also see that it took a few attempts to get there (the last machine is #40 :)</div><div>John</div><div>=:-></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 5:17 PM, James Beedy <span dir="ltr"><<a href="mailto:jamesbeedy@gmail.com" target="_blank">jamesbeedy@gmail.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">Dmitrii,<div><br></div><div>Thanks for the response.</div><div><br></div><div>When taking into account the overhead to get MAAS deployed as charms, it definitely makes the LXD provider method you have described seem very appealing. Some issues I've experienced trying to get MAAS HA deployed are such that it seems like just a ton of infrastructure is needed to get MAAS HA standing using the manual provider deploying the MAAS charms. You have to provision/maintain the manual Juju controller cluster underneath MAAS, just to have MAAS .... ugh</div><div><br></div><div>I found not only the sheer quantity of servers needed to get this working quite unnerving, but also the manual ops I had to undergo to get it all standing #snowflakes #custom.</div><div><br></div><div>I iterated on this a few times to see if I could come up with something more manageable, and this is where I landed (brace yourself) [0]</div><div><br></div><div>What's going on there?</div><div><br></div><div>I created a model in JAAS, manually added 3 physical hosts across different racks, then bootstrapped 4 virtual machines on each physical host (1 vm for each postgresql, maas-region, maas-rack [1], juju-controller (juju controllers for maas provider, to be checked into maas)) on each host.</div><div><br></div><div>I then also added my vms to my JAAS model so I could deploy the charms to them (just postgresql and ubuntu at the time - the MAAS stuff got manually installed and configured after the machiens had ubuntu deployed to them in the model).</div><div><br></div><div>(ASIDE: I'm seeing I could probably do this one better by combining my region and rack controller to the same vm, and colocating the postgresql charm with the region+rack on the same vm, giving me ha of all components using single vm on each host.)</div><div><br></div><div>I know there are probably a plethora of issues with what I've done here, but it solved a few primary issues that seemed to outweigh the misuse.</div><div><br></div><div>The issues were:</div><div><br></div><div>1) Too many machines needed to get MAAS HA</div><div>2) Chicken or egg?</div><div>3) Snowflakes!!!</div><div>4) No clear path to support MAAS HA</div><div><br></div><div>My idea behind this was such that by using JAAS I am solving the chicken or the egg issue, and reducing the machines/infra needed to get MAAS HA.</div><div>Deploying the MAAS infra with Juju eliminates the snowflake/lack of tracking and chips at the "No clear path to support MAAS HA".</div><div><br></div><div>Thanks,</div><div><br></div><div>James</div><div><br></div><div>[0] <a href="http://paste.ubuntu.com/25891429/" target="_blank">http://paste.ubuntu.com/<wbr>25891429/</a></div><div>[1] <a href="http://paste.ubuntu.com/26058033/" target="_blank">http://paste.ubuntu.com/<wbr>26058033/</a></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 12:09 AM, Dmitrii Shcherbakov <span dir="ltr"><<a href="mailto:dmitrii.shcherbakov@canonical.com" target="_blank">dmitrii.shcherbakov@<wbr>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 James,<div><br></div><div>This is an interesting approach, thanks for taking a shot at solving this problem!</div><div><br></div><div>I thought of doing something similar a few months ago. The problematic aspect here is the assumption of having a provider/substrate already present for MAAS to be deployed - this is the chicken or the egg type of problem.</div><div><br></div><div>If you would like to take the MAAS charm route, manual provider could be used with Juju to do that with pre-created hosts (which may be containers/VMs/hosts all in a single model with this provider, regardless of how they were deployed). There would be hosts for a Juju controller(s) and MAAS region/rack controllers in the end.</div><div><br></div><div>If you put both Juju controller and MAAS into containers, it gives you some flexibility. If you are careful, you can even migrate those containers. Running MAAS in an unprivileged container should be perfectly possible <a href="https://github.com/CanonicalLtd/maas-docs/issues/700" target="_blank">https://github.com/CanonicalLt<wbr>d/maas-docs/issues/700</a> - I am not sure that the instructions that require a privileged container with loop devices passed to it are relevant anymore.</div><div><br></div><div>An alternative is to use the lxd provider (which can connect to a remote daemon, not only localhost) but this is only one daemon per provider. For HA purposes you would need several LXDs on different hosts and for this provider to support network spaces because you may have MAAS hosts located in different layer 2 networks with different subnets used. Cross-model relations could be used to have a model per LXD provider but I am not sure this is the best approach - units would be on different models with no shared unit-level leadership.</div><div><br></div><div><a href="https://github.com/juju/juju/tree/develop/provider/lxd" target="_blank">https://github.com/juju/juju/t<wbr>ree/develop/provider/lxd</a><br></div><div><br></div><div>With the new LXD clustering work it might be possible overcome this limitation as well. I would assume LXD clustering to work on a per-rack basis due to latency constraints while with MAAS in a data center you would surely place different region controllers and rack controllers on different racks (availability zones).</div><div><br></div><div><a href="https://insights.ubuntu.com/2017/10/23/lxd-weekly-status-20-authentication-conferences-more/" target="_blank">https://insights.ubuntu.com/20<wbr>17/10/23/lxd-weekly-status-20-<wbr>authentication-conferences-mor<wbr>e/</a><br></div><div>"Distributed database for LXD clustering"</div><div><br></div><div>If, by the time of LXD clustering release, there was support for availability zones it would have solved the problem with a single control plane for a Juju provider in the absence of MAAS.</div><div><br></div><div>An alternative to the above is just usage of bootstrap automation to set up MAAS and then usage of Juju with charms for the rest of what you need.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-3851530251168194215m_3563336638393808959gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Best Regards,<div>Dmitrii Shcherbakov</div><div><br></div><div><div style="color:rgb(136,136,136);font-size:12.8px"><span style="color:rgb(68,68,68);font-size:12.8px">Field Software Engineer</span><br style="color:rgb(68,68,68);font-size:12.8px"><span style="font-size:12.8px">IRC (freenode): Dmitrii-Sh</span><br></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div class="m_-3851530251168194215h5">On Sun, Nov 26, 2017 at 4:14 AM, James Beedy <span dir="ltr"><<a href="mailto:jamesbeedy@gmail.com" target="_blank">jamesbeedy@gmail.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 class="m_-3851530251168194215h5"><div dir="ltr">Hello all,<div><br></div><div>I've got an HA maas setup at the datacenter, I had some trouble getting the full HA bits super solid in the past, and thought it appropriate to try charming up the new 2.3 MAAS snaps to see if I could make my life a bit easier going forward.</div><div><br></div><div>I just took a quick first swipe at this, so please excuse the lack of any tests.</div><div><br></div><div>I'm hoping I can kill 2 birds with 1 stone here by a) possibly getting some feedback from @cory_fu on how I'm using the new Endpoints stuff landing soon in reactive (and disseminate that feedback so others will be in the know too), and b) possibly someone from @MAAS team might give me a nod if the steps I've taken here look to be moving in the right direction?</div><div><br></div><div># Interface and layer</div><div>interface-maas: <a href="https://github.com/jamesbeedy/interface-maas" target="_blank">https://github<wbr>.com/jamesbeedy/interface-maas</a></div><div>layer-maas: <a href="https://github.com/jamesbeedy/layer-maas" target="_blank">https://github.com<wbr>/jamesbeedy/layer-maas</a></div><div><br></div><div># MAAS charm</div><div>charmstore: <a href="https://jujucharms.com/u/jamesbeedy/maas/8" target="_blank">https://jujucharms<wbr>.com/u/jamesbeedy/maas/8</a></div><div><br></div><div># Sample bundle</div><div>sample bundle: <a href="http://paste.ubuntu.com/26046016/" target="_blank">http://paste.ubuntu.com/260460<wbr>16/</a> - (only for reference, this won't actually deploy)<br></div><div><br></div><div># juju status</div><div>`juju status`: <a href="http://paste.ubuntu.com/26045880/" target="_blank">http://paste.ubuntu.c<wbr>om/26045880/</a></div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>James</div><div><br></div></div>
<br></div></div><span class="m_-3851530251168194215HOEnZb"><font color="#888888">--<br>
Juju mailing list<br>
<a href="mailto:Juju@lists.ubuntu.com" target="_blank">Juju@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/juju</a><br>
<br></font></span></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>--<br>
Juju mailing list<br>
<a href="mailto:Juju@lists.ubuntu.com">Juju@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/juju</a><br>
<br></blockquote></div><br></div>