Changeset - c354d1a7537f
[Not reviewed]
default
0 3 0
Mads Kiilerich - 5 years ago 2020-08-24 15:02:16
mads@kiilerich.com
Grafted from: b2eca7f061f5
docs: give "File system location" overview

Also make some other adjustments for consistency.
3 files changed with 45 insertions and 14 deletions:
0 comments (0 inline, 0 general)
docs/installation.rst
Show inline comments
 
@@ -80,8 +80,10 @@ main Python installation and other appli
 
problematic when upgrading the system or Kallithea.
 
An additional benefit of virtualenv is that it doesn't require root privileges.
 

	
 
- Assuming you have installed virtualenv, create a new virtual environment
 
  for example, in `/srv/kallithea/venv`, using the venv command::
 
- Don't install as root - install as a dedicated user like ``kallithea``.
 

	
 
- Create a new virtual environment, for example in ``/srv/kallithea/venv``,
 
  specifying the right Python binary::
 

	
 
    python3 -m venv /srv/kallithea/venv
 

	
 
@@ -92,16 +94,10 @@ An additional benefit of virtualenv is t
 
    . /srv/kallithea/venv/bin/activate
 
    pip install --upgrade pip setuptools
 

	
 
.. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it
 
   will "activate" a shell that terminates immediately. It is also perfectly
 
   acceptable (and desirable) to create a virtualenv as a normal user.
 
.. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it
 
   will "activate" a shell that terminates immediately.
 

	
 
- Make a folder for Kallithea data files, and configuration somewhere on the
 
  filesystem. For example::
 

	
 
    mkdir /srv/kallithea
 

	
 
- Go into the created directory and run this command to install Kallithea::
 
- Install Kallithea in the activated virtualenv::
 

	
 
    pip install --upgrade kallithea
 

	
docs/overview.rst
Show inline comments
 
@@ -48,6 +48,40 @@ See the subsequent sections, the separat
 
:ref:`setup` for details on these steps.
 

	
 

	
 
File system location
 
--------------------
 

	
 
Kallithea can be installed in many different ways. The main parts are:
 

	
 
- A location for the Kallithea software and its dependencies. This includes
 
  the Python code, template files, and front-end code. After installation, this
 
  will be read-only (except when upgrading).
 

	
 
- A location for the ``.ini`` configuration file that tells the Kallithea
 
  instance which database to use (and thus also the repository location).
 
  After installation, this will be read-only (except when upgrading).
 

	
 
- A location for various data files and caches for the Kallithea instance. This
 
  is by default in a ``data`` directory next to the ``.ini`` file. This will
 
  have to be writable by the running Kallithea service.
 

	
 
- A database. The ``.ini`` file specifies which database to use. The database
 
  will be a separate service and live elsewhere in the filesystem if using
 
  PostgreSQL or MariaDB/MySQL. If using SQLite, it will by default live next to
 
  the ``.ini`` file, as ``kallithea.db``.
 

	
 
- A location for the repositories that are hosted by this Kallithea instance.
 
  This will have to be writable by the running Kallithea service. The path to
 
  this location will be configured in the database.
 

	
 
For simple setups, it is fine to just use something like a ``kallithea`` user
 
with home in ``/home/kallithea`` and place everything there.
 

	
 
For experiments, it might be convenient to run everything as yourself and work
 
inside a clone of Kallithea, with the ``.ini`` and SQLite database in the root
 
of the clone.
 

	
 

	
 
Python environment
 
------------------
 

	
docs/setup.rst
Show inline comments
 
@@ -5,8 +5,8 @@ Setup
 
=====
 

	
 

	
 
Setting up Kallithea
 
--------------------
 
Setting up a Kallithea instance
 
-------------------------------
 

	
 
Some further details to the steps mentioned in the overview.
 

	
 
@@ -18,7 +18,8 @@ configuration file is a ``.ini`` file th
 
for Kallithea, e.g. configuration of how to use database, web server, email,
 
and logging.
 

	
 
Run the following command to create the file ``my.ini`` in the current
 
Change to the desired directory (such as ``/srv/kallithea``) as the right user
 
and run the following command to create the file ``my.ini`` in the current
 
directory::
 

	
 
    kallithea-cli config-create my.ini http_server=waitress
0 comments (0 inline, 0 general)