Forum OpenACS Forum Summaries: OpenACS on Docker

Collapse
Posted by Iuri Sampaio on
Hi there,

Browsing Docker's official repository (i.e. https://hub.docker.com), I've seen the at popular frameworks such as Drupal, Worpress and etc, have built their containers and, I decided to create my own Docker OpenACS container.

For those PHP frameworks, the work has been sort of half way completed, since their script start whether from a php-fpm or php-apache containers.

1. https://hub.docker.com/_/wordpress
2. https://hub.docker.com/_/drupal

Based on that, the best way would be to start whether from a NGINX or PostgreSQL container (i.e. https://hub.docker.com/_/nginx or https://hub.docker.com/_/postgres ).

From there, I'm going to install Naviserver and OpenACS on top of it.
@Gustaf, have you thought about having a Naviserver-docker container?

If anyone is interested or has been working on this subject, please let me know. Your ideas and approaches are very welcome.

Best wishes,
I

Collapse
2: Re: OpenACS on Docker (response to 1)
Posted by Iuri Sampaio on
@Gustaf,
I'll be using your scripts, which currently are available at https://github.com/gustafn/install-ns

rsrsrs :)

Best wishes,
I

Collapse
3: Re: OpenACS on Docker (response to 2)
Posted by Iuri Sampaio on
So far, I shall thank Kenneth Wyrick for finding a ]Project-Open[ installation on Docker.

That means, Frank has been working on having PO-OACS on Docker, in a Centos based system.
Now, it'd be just a matter of reviewing his scripts and changing it to work on Debian/Ubuntu Docker installation.

Thank you Kenneth! It saved me some hours (and headaches), elaborating a whole lot of code.

Best wishes,
I

Collapse
4: Re: OpenACS on Docker (response to 3)
Posted by Iuri Sampaio on
Sorry, I forgot to paste link to the ]PO['s docker scripts
https://sourceforge.net/projects/project-open/files/project-open/V5.0/
Collapse
5: Re: OpenACS on Docker (response to 1)
Posted by Malte Sussdorff on
Hi Iuri,

did you make any progress? I looked at the docker container frank provided for OpenACS and was ... mildly disappointed by the lack of understanding what a container is and how it is supposed to be run (e.g. one container, one process running in the foreground).

Therefore I started off with building a base naviserver container and removing the (necessary?) postgresql installation after compiling naviserver. From that I was going to connect it using docker-compose to the database and then have a specific container either for OpenACS or ]project-open[ or customer code which connects the two (and does the automatic pull from the git repository). Goal is to eventually utilize Kubernetes with Ingress to have more than one container run the naviserver off the same custom code.

Long story short, as I am still at the start of said journey, any update where you are at?

Best wishes
Malte

Collapse
6: Re: OpenACS on Docker (response to 5)
Posted by vivian Aguilar on
Hello Malte and Iuri.. It's been a long time but feels like yesterday!! :) ... Glad to hear that you guys are little active on this almost dead community :) ..

I was searching in google openacs container just for curiosity and end up with your post.. we are starting to research about devops, ci/cd and docker.. and eventually would like to make some test with openacs .. but I have to said that I like your approach Malte.. Keep us posted.. I am curious jeje..

I will keep you posted on the roadmap we eventually take..

best regards
Vivian

Collapse
7: Re: OpenACS on Docker (response to 5)
Posted by Dave Bauer on
I just saw Vivian's response and I agree. Docker-compose seems to be the way to go. Very curious how this goes, although I don't do much OpenACS development anymore. If you are going to provide ongoing OpenACS support, I think Docker is a great way to manage it.
Collapse
8: Re: OpenACS on Docker (response to 5)
Posted by Malte Sussdorff on
Quick update:

You should be able to get a naviserver image from https://hub.docker.com/repository/docker/sussdorff/naviserver

In case you wonder, here is the OpenACS Dockerfile (I do need to setup gitub to link the hub.docker.com to the Dockerfile... but well...).

As I mainly work with ]project-open[, my current config files are specific to it, but the yist of the idea is:

1) Two Replicas of Naviserver (still have to identify what are the best resource requirements and if I even need two replicas as Naviserver is multithreaded to begin with, on the other hand works nice with rolling updates, oh well...)

2) Put the OpenACS / ]project-open[ code into the Naviserver dockerfile and then "release" a naviserver package (e.g. sussdorff/naviserver:openacs. This is what the OpenACS dockerfile currently does.)

3) Run the database on a specific node which is a little bit beefier than the naviserver ones. Eventually I can go into postgres primary .... but why make live hard now.

I am already at the point where "docker-compose up" nicely starts up OpenACS and will deploy to my docker swarm soon.

Let me know if you are interested in any of this.

Collapse
9: Re: OpenACS on Docker (response to 5)
Posted by Frank Bergmann on
Hi Guys,

mildly disappointed

I just saw this thread today. The goal of this docker container was to provide an easy one-step installer for relative noobs, and I think it serves it's purpose. It's just a kind of lightweight VM.

I guess what Malte wants is a scalable installation.

I'm sympathetic with that thought, but I understand that scaling OpenACS/]project-open[ instances really depends on the database rather than the NaviServer CPU load.

But to my knowledge databases don't scale on massive parallel shared nothing architectures without sacrificing consistency.

So my though is be move towards AWS or Google Cloud with their managed PostgreSQL services. I believe Brian showed me some impressive performance figures. Then just use Kubernetes or similar to spawn a few NaviServers behind an IP based load balancer. That shouldn't be too difficult...

Cheers
Frank

Collapse
10: Re: OpenACS on Docker (response to 9)
Posted by Gustaf Neumann on
OpenACS really depends on the database rather than the NaviServer CPU load.
it really depends. NaviServer is especially good on scaling over multiple cores, and since the availability of cores increases continuously, this is usually not a bottleneck. If one is running a server where 80k user log-in per day, and one has to serve ~9k concurrent users (as we had in peek-corona times), then the CPU load is substantial.

But to my knowledge databases don't scale on massive parallel shared nothing architectures without sacrificing consistency.
This is in general true (especially for massive scalability) and is a consequence of the CAP theorem. There is a constant progress for high availability pg, load balancing (see e.g. [1]) but this helps mostly for improving availability (as always, it depends on the load pattern: it is much easier to scale with many readers than with many writers). But don't expect e.g. a pgpool-II installation to be any faster for smaller user numbers compared to a configuration where pg and nsd run on the same machine with high bandwidth communication.

For large scale applications we see currently rather bottlenecks with huge content repositories, containing double- and triple-digit TB on files that must be highly available, especially when no shared disk fail-over or block-device replication are available. In case there is interest, i've done some work on integrating MongoDB for such purposes, which scales horizontally.

Concerning the Docker image: from my point of view, it is most useful for quick tryout scenarios and for easy standard deployments. I would not expect it solve scalability issues right now. When using pg e.g. in the AWS cloud, i would not expect it to scale better. When using multiple nsds connecting to the same OpenACS instance, be aware that out-of-the box, there will be no cache consistency. Running multiple e.g. po instances all with one nsd against one pg isntallation (what pg call "cluster"), this will work easily.

[1] https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling