Changeset - b688a2a1b189
[Not reviewed]
stable
0 4 0
Mads Kiilerich (mads) - 6 years ago 2020-06-08 16:05:21
mads@kiilerich.com
Grafted from: c7a4831fa7f3
docs: clarify that MariaDB is supported, with slight preference for this more free option
4 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
docs/setup.rst
Show inline comments
 
@@ -15,25 +15,25 @@ following command to do so::
 

	
 
This will create the file ``my.ini`` in the current directory. This
 
configuration file contains the various settings for Kallithea, e.g.
 
proxy port, email settings, usage of static files, cache, Celery
 
settings, and logging. Extra settings can be specified like::
 

	
 
    kallithea-cli config-create my.ini host=8.8.8.8 "[handler_console]" formatter=color_formatter
 

	
 
Next, you need to create the databases used by Kallithea. It is recommended to
 
use PostgreSQL or SQLite (default). If you choose a database other than the
 
default, ensure you properly adjust the database URL in your ``my.ini``
 
configuration file to use this other database. Kallithea currently supports
 
PostgreSQL, SQLite and MySQL databases. Create the database by running
 
PostgreSQL, SQLite and MariaDB/MySQL databases. Create the database by running
 
the following command::
 

	
 
    kallithea-cli db-create -c my.ini
 

	
 
This will prompt you for a "root" path. This "root" path is the location where
 
Kallithea will store all of its repositories on the current machine. After
 
entering this "root" path ``db-create`` will also prompt you for a username
 
and password for the initial admin account which ``db-create`` sets
 
up for you.
 

	
 
The ``db-create`` values can also be given on the command line.
 
Example::
docs/upgrade.rst
Show inline comments
 
@@ -42,25 +42,25 @@ Make a copy of your Kallithea configurat
 
If you are using :ref:`rcextensions <customization>`, you should also
 
make a copy of the entire ``rcextensions`` directory.
 

	
 
Back up your database
 
^^^^^^^^^^^^^^^^^^^^^
 

	
 
If using SQLite, simply make a copy of the Kallithea database (``.db``)
 
file.
 

	
 
If using PostgreSQL, please consult the documentation for the ``pg_dump``
 
utility.
 

	
 
If using MySQL, please consult the documentation for the ``mysqldump``
 
If using MariaDB/MySQL, please consult the documentation for the ``mysqldump``
 
utility.
 

	
 
Look for ``sqlalchemy.url`` in your configuration file to determine
 
database type, settings, location, etc. If you were running Kallithea 0.3.x or
 
older, this was ``sqlalchemy.db1.url``.
 

	
 

	
 
3. Activate or recreate the Kallithea virtual environment (if any)
 
------------------------------------------------------------------
 

	
 
.. note::
 
    If you did not install Kallithea in a virtual environment, skip this step.
docs/usage/performance.rst
Show inline comments
 
@@ -31,25 +31,25 @@ questionable.
 
    documentation <https://beaker.readthedocs.io/en/latest/sessions.html#removing-expired-old-sessions>`_::
 

	
 
        find data/cache -type f -mtime +30 -print -exec rm {} \;
 

	
 

	
 
Database
 
--------
 

	
 
SQLite is a good option when having a small load on the system. But due to
 
locking issues with SQLite, it is not recommended to use it for larger
 
deployments.
 

	
 
Switching to MySQL or PostgreSQL will result in an immediate performance
 
Switching to PostgreSQL or MariaDB/MySQL will result in an immediate performance
 
increase. A tool like SQLAlchemyGrate_ can be used for migrating to another
 
database platform.
 

	
 

	
 
Horizontal scaling
 
------------------
 

	
 
Scaling horizontally means running several Kallithea instances and let them
 
share the load. That can give huge performance benefits when dealing with large
 
amounts of traffic (many users, CI servers, etc.). Kallithea can be scaled
 
horizontally on one (recommended) or multiple machines.
 

	
kallithea/lib/paster_commands/template.ini.mako
Show inline comments
 
@@ -454,24 +454,25 @@ logview.pylons.util = #eee
 

	
 
%if database_engine == 'sqlite':
 
<%text>##</%text> SQLITE [default]
 
sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
 

	
 
%elif database_engine == 'postgres':
 
<%text>##</%text> POSTGRESQL
 
sqlalchemy.url = postgresql://user:pass@localhost/kallithea
 

	
 
%elif database_engine == 'mysql':
 
<%text>##</%text> MySQL
 
sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
 
<%text>##</%text> Note: the mysql:// prefix should also be used for MariaDB
 

	
 
%endif
 
<%text>##</%text> see sqlalchemy docs for other backends
 

	
 
sqlalchemy.pool_recycle = 3600
 

	
 
<%text>##</%text>##############################
 
<%text>##</%text>   ALEMBIC CONFIGURATION    ##
 
<%text>##</%text>##############################
 

	
 
[alembic]
 
script_location = kallithea:alembic
0 comments (0 inline, 0 general)