Juju highavailability

Hi Team,

I am trying to deploy a juju model using juju high availability. When i try juju ha, i am getting below error.

±--------------±--------±---------------------±-----±----------±----------+ root@server1:~# juju enable-ha -n 7 --to server1, server2 ERROR empty placement directive passed to enable-ha

I don’t understand the error message. I am trying to build an application using juju; that model has three containers. For high availability I am using lxc clustering for controller ha, trying juju ha, but facing this error. Please guide me on this.

Welcome! Thank you for the question.

If I’m understanding you correctly, you have a cloud with machines called server1 and server2, and you want Juju to place six additional controllers in lxd containers on those machines. Is that correct?

If that’s the case, I believe that you want to format your placement directives as lxd:<server name>. As it is, you’re telling Juju to put a controller on a machine called server1, put another controller on a machine called server2, and then allocate new machines for the remaining four controllers.

Hi PEngale,

Thanks for your reply. I am trying to deploy an application using Juju localhost cloud. My server 1 has 4 lxd container, one juju controller container to manage my juju model(my applicaiton ). My application the juju model has three charms - proxy, sql and application containers. And my application using token authentication for client connections.

I would like to create a cluster for redundancy. How can I achieve it? I though of LXC clustering but what will happen if the juju controller on the node fails? I can’t access my application.

So, I thought of doing Juju HA. But it looks like to complicated.

Is there a way usin my application charms without Juju I can create a cluster ?

If you want to add controller ha to your existing setup, I believe that you can do:

juju enable-ha -n 3 --to lxd:server1,lxd:server1,lxd:server2

That said, there isn’t a whole lot of benefit to adding more Juju controllers than you have physical machines. If something happens to one of the physical machines, you’ll lose all the containers on that machine.

In your setup, it would probably make more sense to focus on making backups of your workloads. That way, if something goes wrong, you can recreate your environment, restore your workloads from backup, and get back into production quickly.

Hi @pengale,

Thanks for your reply, I tried as you suggested but no luck. I am getting placement directive error as before. root@test1:/etc/default# juju enable-ha -n 3 --to lxd:192.168.64.5 ERROR unsupported enable-ha placement directive “lxd:192.168.64.5”

I also have onre more question, I am deploying an server-client application using juju localhost cloud in a VM. The model creates three lxc containers, haproxy,application and db containers. My client access by servers using authentication tokens. I would like to have a highavailability incase in my VM goes down. As per the documents, they guide me to go with LXC clustering and juju HA. But setting up both clusters is little complication in my prod env. So I planned to deploy the manifest in two machines and copy the content of my db from one server to another server. But you know copying db wont help me much.

So decided to create a seperate DB server and points my applications to use the DB. But as the DB they provide is a charm operator, how can. i make a tar file using that db and configure it manually ?

Please provide me your suggestions.