##// END OF EJS Templates
docs: add documentation for setup with puppet...
Robert Rauch -
r5494:57caeb60 stable
parent child Browse files
Show More
@@ -0,0 +1,175 b''
1 .. _installation_puppet:
2
3 ===================================
4 Installation and setup using Puppet
5 ===================================
6
7 The whole installation and setup process of Kallithea can be simplified by
8 using Puppet and the `rauch/kallithea
9 <https://forge.puppetlabs.com/rauch/kallithea>`_ Puppet module. This is
10 especially useful for getting started quickly, without having to deal with all
11 the Python specialities.
12
13 .. note:: The following instructions assume you are not familiar with Puppet at
14 all. If this is not the case, you should probably skip directly to the
15 `Kallithea Puppet module documentation
16 <https://forge.puppetlabs.com/rauch/kallithea#puppet-kallithea>`_.
17
18
19 Installing Puppet
20 -----------------
21
22 This installation variant requires a Unix/Linux type server with Puppet 3.0+
23 installed. Many major distributions have Puppet in their standard repositories.
24 Thus, you will probably be ready to go by running, e.g. ``apt-get install
25 puppet`` or ``yum install puppet``, depending on your distro's favoured package
26 manager. Afterwards, check the Puppet version by running ``puppet --version``
27 and ensure you have at least 3.0.
28
29 If your distribution does not provide Puppet packages or you need a
30 newer version, please see the `Puppet Reference Manual
31 <https://docs.puppetlabs.com/puppet/4.2/reference/install_linux.html>`_ for
32 instructions on how to install Puppet on your target platform.
33
34
35 Installing the Puppet module
36 ----------------------------
37
38 To install the latest version of the Kallithea Puppet module from the Puppet
39 Forge, run the following as ``root``:
40
41 .. code-block:: bash
42
43 puppet module install rauch/kallithea
44
45 This will install both the Kallithea Puppet module and its dependency modules.
46
47 .. warning:: Be aware that Puppet can do all kinds of things to your systems.
48 Third-party modules (like the ``kallithea`` module) may run
49 arbitrary commands on your system (most of the time as the
50 ``root`` user), so do not apply them on production machines if
51 you don't know what you are doing. Instead, use a test system
52 (e.g. a virtual machine) for evaluation purposes.
53
54
55 Applying the module
56 -------------------
57
58 To trigger the actual installation process, we have to *apply* the
59 ``kallithea`` Puppet class, which is provided by the module we have just
60 installed, to our system. For this, create a file named e.g. ``kallithea.pp``,
61 a *Puppet manifest*, with the following content:
62
63 .. _simple_manifest:
64 .. code-block:: puppet
65
66 class { 'kallithea':
67 seed_db => true,
68 manage_git => true,
69 }
70
71 To apply the manifest, simply run the following (preferably as root):
72
73 .. code-block:: bash
74
75 puppet apply kallithea.pp
76
77 This will basically run through the usual Kallithea :ref:`installation` and
78 :ref:`setup` steps, as documented. Consult the module documentation for details
79 on `what the module affects
80 <https://forge.puppetlabs.com/rauch/kallithea#what-kallithea-affects>`_. You
81 can also do a *dry run* by adding the ``--noop`` option to the command.
82
83
84 Using parameters for customizing the setup process
85 --------------------------------------------------
86
87 The ``kallithea`` Puppet class provides a number of `parameters
88 <https://forge.puppetlabs.com/rauch/kallithea#class-kallithea>`_ for
89 customizing the setup process. You have seen the usage of the ``seed_db``
90 parameter in the :ref:`example above <simple_manifest>`, but there are more.
91 For example, you can specify the installation directory, the name of the user
92 under which Kallithea gets installed, the initial admin password, etc.
93 Notably, you can provide arbitrary modifications to Kallitheas configuration
94 file by means of the ``config_hash`` parameter.
95
96 Parameters, which have not been set explicitly, will be set to default values,
97 which are defined inside the ``kallithea`` Puppet module. For example, if you
98 just stick to the defaults as in the :ref:`example above <simple_manifest>`,
99 you will end up with a Kallithea instance, which
100
101 - is installed in ``/srv/kallithea``, owned by the user ``kallithea``
102 - uses the Kallithea default configuration
103 - uses the admin user ``admin`` with password ``adminpw``
104 - is started automatically and enabled on boot
105
106 As of Kallithea 0.3.0, this in particular means that Kallithea will use an
107 SQLite database and listen on ``http://localhost:5000``.
108
109 See also the `full parameters list
110 <https://forge.puppetlabs.com/rauch/kallithea#class-kallithea>`_ for more
111 information.
112
113
114 Making your Kallithea instance publicly available
115 -------------------------------------------------
116
117 If you followed the instructions above, the Kallithea instance will be
118 listening on ``http://localhost:5000`` and therefore not publicly available.
119 There are several ways to change this.
120
121 The direct way
122 ^^^^^^^^^^^^^^
123
124 The simplest setup is to instruct Kallithea to listen on another IP address
125 and/or port by using the ``config_hash`` parameter of the Kallithea Puppet
126 class. For example, assume we want to listen on all interfaces on port 80:
127
128 .. code-block:: puppet
129
130 class { 'kallithea':
131 seed_db => true,
132 config_hash => {
133 "server:main" => {
134 'host' => '0.0.0.0',
135 'port' => '80',
136 }
137 }
138 }
139
140 Using Apache as reverse proxy
141 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142
143 In a more advanced setup, you might instead want use a full-blown web server
144 like Apache HTTP Server as the public web server, configured such that requests
145 are internally forwarded to the local Kallithea instance (a so called *reverse
146 proxy setup*). This can be easily done with Puppet as well:
147
148 First, install the `puppetlabs/apache
149 <https://forge.puppetlabs.com/puppetlabs/apache>`_ Puppet module as above by running the following as root:
150
151 .. code-block:: bash
152
153 puppet module install puppetlabs/apache
154
155 Then, append the following to your manifest:
156
157 .. code-block:: puppet
158
159 include apache
160
161 apache::vhost { 'kallithea.example.com':
162 docroot => '/var/www/html',
163 manage_docroot => false,
164 port => 80,
165 proxy_preserve_host => true,
166 proxy_pass => [
167 {
168 path => '/',
169 url => 'http://localhost:5000/',
170 },
171 ],
172 }
173
174 Applying the resulting manifest will install the Apache web server and setup a
175 virtual host acting as a reverse proxy for your local Kallithea instance.
@@ -37,6 +37,13 b' developers -- you can do the same.'
37 Please visit https://docs.kallithea-scm.org/en/latest/installation.html for
37 Please visit https://docs.kallithea-scm.org/en/latest/installation.html for
38 more details.
38 more details.
39
39
40 There is also an experimental `Puppet module`_ for installing and setting up
41 Kallithea. Currently, only basic functionality is provided, but it is still
42 enough to get up and running quickly, especially for people without Python
43 background. See
44 https://docs.kallithea-scm.org/en/latest/installation_puppet.html for further
45 information.
46
40
47
41 Source code
48 Source code
42 -----------
49 -----------
@@ -238,3 +245,4 b' repository, and have a look at the hooks'
238 .. _Celery: http://celeryproject.org/
245 .. _Celery: http://celeryproject.org/
239 .. _vcs: http://pypi.python.org/pypi/vcs
246 .. _vcs: http://pypi.python.org/pypi/vcs
240 .. _Software Freedom Conservancy: http://sfconservancy.org/
247 .. _Software Freedom Conservancy: http://sfconservancy.org/
248 .. _Puppet module: https://forge.puppetlabs.com/rauch/kallithea
@@ -22,6 +22,7 b' Kallithea Documentation'
22 installation_win_old
22 installation_win_old
23 installation_iis
23 installation_iis
24 setup
24 setup
25 installation_puppet
25
26
26 **Usage**
27 **Usage**
27
28
General Comments 0
You need to be logged in to leave comments. Login now