Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple instances (several websites) to Ubuntu (deb) packages #256

Open
Chealer opened this issue Aug 12, 2020 · 4 comments

Comments

@Chealer
Copy link

Chealer commented Aug 12, 2020

My organization is planning to host 2 CKAN instances on the same server. So far, the only server we have with several CKAN instances has CKAN installed from source, however we would prefer to use a managed CKAN for new servers.

Unfortunately, while CKAN itself does support running any number of instances from a single code copy (according to @wardi ), the Debian packages do not support hosting several CKAN instances. At least, that's what the maintainer's guide has been claiming for at least 7 years:

You should install CKAN from package if:
[...]
You only want to run one CKAN website per server

I have no idea what specific issues prevent that, but identifying them in this ticket would be great. An old mailing list post lists the elements to consider to host several CKAN instances on a single OS.

@rufuspollock
Copy link
Member

@Chealer we're running a major cluster of CKAN instances at Datopian and we are generally running on kubernetes now. Are you running on one traditional server or can you use kubernetes?

@Chealer
Copy link
Author

Chealer commented Aug 14, 2020

Thank you @rufuspollock our organization is aware of the existence of containers but has no experience with Kubernetes. We are running on a "traditional" virtualized server.

@amercader
Copy link
Member

amercader commented Aug 24, 2020

@Chealer Adding support for multiple instances to the debian packages adds significant complexity so that's why is not supported out the box. But the resulting install is set up in such a way that you could run other instances in the same server (basically by placing all installed folders inside a default one (eg /usr/lib/ckan/default, /var/lib/ckan/default, /etc/ckan/default).

In theory you could parametrize this folder in the build scripts to install a CKAN instance and handle configuration files like the supervisor ones properly, but at this point I'm not sure that would be more work than managing multiple source installs. A package install is essentially a source install with the convenience of some steps being done automatically but the end result is the same.

The points listed on the old mailing list post are the main ones to take into account when running multiple CKANs. Essentially they are separate applications in different virtualenvs, which can share resources like postgres, solr or redis as long as they have different ckan.site_id values (or use different Solr cores if they need different schemas). They will need different WSGI scripts (apache or gunicorn) which will serve them on different ports internally and then at the nginx level you route the different domains / subdomains to the relevant app.

But if as you say you are already hosting multiple source installs in a single server you are already doing all this, and IMO a package install would not add major benefits to it.

@Chealer
Copy link
Author

Chealer commented Aug 24, 2020

To clarify our situation, the server where we have several CKAN instances only hosts different instances of the same site, but AFAIK they are properly isolated, so yes, the problem is not feasibility, we were simply hoping for less management.

Thank you for your elaborate comment @amercader
I suppose "/var/usr/lib/ckan/default" should read "/var/lib/ckan/default".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants