[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting-up the Debian Cloud Image Finder (DCIF ?) in production

On 2019-12-25 12:22:13, Thomas Goirand wrote:
> Hi,
> I've done some work on the initial packaging of our image finder. This
> was trivial work, but more is needed.

None the less thank you for this.

> Currently, the site at http://image-finder.debian.net/ runs on a single
> OpenStack instance. Inside the instance, there 2 docker containers
> running, one for postgress, one for the Flask application. What I would
> like to do, is transform this into:
> - One Octavia load-balancer using a VRRP floating IP [1]
> - One postgress cluster, maybe with one master and one slave
> - On the same postgress machines, setup the Flask application that
> connects to this postgress cluster
> With an anti-affinity on the instances, they would run on different
> physical compute nodes, so this achieve full HA. Octavia can do the SSL
> endpoint. (I'm not sure how we could reproduce this with DSA machines,
> but that's at least my current plan...)

I always adhere to the idea of 'design for failure', thus I'd agree that
setting up HA is the way forward. In containers/k8s world this should be not
that big problem.

> I would setup all of this either using Ansible or Puppet. My choice will
> depend on what the team prefers, I don't really have a preference. As
> the DSA team prefers puppet, this probably should be our choice, so we
> prepare for migrating to some DSA machines later. Please voice your
> opinion here.

I personally prefer Puppet for many technical reasons (mostly).

> If we're to use MariaDB/Galera + puppet, then I can
> package absolutely all, including the puppet modules for deploying the
> image-finder.
> With my first try, I could see that the application looks like working
> under libapache-mod-wsgi-py3. I have some errors connecting to the DB,
> and then it fails, but this was to be expected.
> Now my current problem is:
> 1/ I never did postgressql clustering (I'm more a MariaDB/Galera guy).
> How does one do it? Is it possible to do master-master connection?

Last time I checked it wasn't possible. The best option available was master
and hot stand-by,
Tho it was couple of years ago, so maybe something changed specially when AWS
and Google offer psql in full HA. I'd hope that they contributed some Galera
like solution back to the community but I didn't notice any announcements or
anything related, so it maybe just my hope.

> Since
> the app is using SQLAlchemy, would it be possible to use MariaDB/Galera
> instead of postgress?

I didn't look really deep into the code but I think it should be possible. I
don't think I noticed any psql specific pieces of code or features which would
prevent us from migrating finder to Maria or MySQL.

> 2/ The Flask application is looking at its environment to get the DSN
> connection URL, we need a configuration file instead.
> 3/ I have no idea how to feed this application with real data from our
> generated Salsa images. How do I do that?

I think we need couple of different datasources where Salsa is going to be one
of them. I can see that AWS is already queried for the available images, I'd
think we should do the same for other public clouds as well.

I'm not expecting that users will search for raw images, upload them to the
cloud and then use.

|_|0|_|                                                  |
|_|_|0|                  "Panta rei"                     |
|0|0|0|             -------- kuLa --------               |

gpg --keyserver pgp.mit.edu --recv-keys 0x686930DD58C338B3
3DF1  A4DF  C732  4688  38BC  F121  6869  30DD  58C3  38B3

Attachment: signature.asc
Description: PGP signature

Reply to: