# HG changeset patch # User Mads Kiilerich # Date 2015-10-08 23:21:58 # Node ID 55ccfc66479d966ca2efbf521999f0865ec6da33 # Parent aa1891074dd66c27b5eff2c67db89e82d013479d cache: make instance_id = * the default and deprecate it Auto assigning instance_id's works perfectly fine now when the clean-up issue has been resolved. diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -280,12 +280,6 @@ issue_prefix = # #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -## instance-id prefix -## a prefix key for this instance used for cache invalidation when running -## multiple instances of kallithea, make sure it's globally unique for -## all running kallithea instances. Leave empty if you don't use it -instance_id = - ## alternative return HTTP header for failed authentication. Default HTTP ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with ## handling that. Set this variable to 403 to return HTTPForbidden diff --git a/docs/setup.rst b/docs/setup.rst --- a/docs/setup.rst +++ b/docs/setup.rst @@ -746,11 +746,6 @@ Or if using a dispatcher WSGI script wit When running apache as root, please make sure it doesn't run Kallithea as root, for examply by adding: ``user=www-data group=www-data`` to the configuration. -.. note:: - If running Kallithea in multiprocess mode, - make sure you set ``instance_id = *`` in the configuration so each process - gets it's own cache invalidation key. - Example WSGI dispatch script: .. code-block:: python diff --git a/docs/usage/performance.rst b/docs/usage/performance.rst --- a/docs/usage/performance.rst +++ b/docs/usage/performance.rst @@ -38,7 +38,6 @@ Follow these few steps to improve perfor scaled horizontally on one (recommended) or multiple machines. In order to scale horizontally you need to do the following: - - Each instance needs its own .ini file and unique ``instance_id`` set. - Each instance's ``data`` storage needs to be configured to be stored on a shared disk storage, preferably together with repositories. This ``data`` dir contains template caches, sessions, whoosh index and is used for diff --git a/kallithea/bin/template.ini.mako b/kallithea/bin/template.ini.mako --- a/kallithea/bin/template.ini.mako +++ b/kallithea/bin/template.ini.mako @@ -278,12 +278,6 @@ issue_prefix = # #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -<%text>## instance-id prefix -<%text>## a prefix key for this instance used for cache invalidation when running -<%text>## multiple instances of kallithea, make sure it's globally unique for -<%text>## all running kallithea instances. Leave empty if you don't use it -instance_id = - <%text>## alternative return HTTP header for failed authentication. Default HTTP <%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with <%text>## handling that. Set this variable to 403 to return HTTPForbidden diff --git a/kallithea/config/deployment.ini_tmpl b/kallithea/config/deployment.ini_tmpl --- a/kallithea/config/deployment.ini_tmpl +++ b/kallithea/config/deployment.ini_tmpl @@ -274,12 +274,6 @@ issue_prefix = # #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -## instance-id prefix -## a prefix key for this instance used for cache invalidation when running -## multiple instances of kallithea, make sure it's globally unique for -## all running kallithea instances. Leave empty if you don't use it -instance_id = - ## alternative return HTTP header for failed authentication. Default HTTP ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with ## handling that. Set this variable to 403 to return HTTPForbidden diff --git a/kallithea/config/environment.py b/kallithea/config/environment.py --- a/kallithea/config/environment.py +++ b/kallithea/config/environment.py @@ -118,7 +118,7 @@ def load_environment(global_conf, app_co config['base_path'] = repos_path set_app_settings(config) - instance_id = kallithea.CONFIG.get('instance_id') + instance_id = kallithea.CONFIG.get('instance_id', '*') if instance_id == '*': instance_id = '%s-%s' % (platform.uname()[1], os.getpid()) kallithea.CONFIG['instance_id'] = instance_id diff --git a/kallithea/tests/test.ini b/kallithea/tests/test.ini --- a/kallithea/tests/test.ini +++ b/kallithea/tests/test.ini @@ -280,12 +280,6 @@ issue_prefix = # #issue_server_link_wiki = https://wiki.example.com/{id} #issue_prefix_wiki = WIKI- -## instance-id prefix -## a prefix key for this instance used for cache invalidation when running -## multiple instances of kallithea, make sure it's globally unique for -## all running kallithea instances. Leave empty if you don't use it -instance_id = - ## alternative return HTTP header for failed authentication. Default HTTP ## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with ## handling that. Set this variable to 403 to return HTTPForbidden