1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
============
Installation
============
Sloecode is a combination of several component parts. The full Sloecode system
includes:
* A WSGI web-application.
* A python-twisted application.
* A client-side Bazaar plugin.
You may choose to install these components from source, or use the provided
binary packages. Installing from source is generally not recommended, since
there is currently no way to manage database schema upgrades when running from
source.
From PPA
-----------
1) Add the sloecode developers PPA to your sources list:
.. code-block:: sh
> sudo add-apt-repository ppa:sloecode/sloecode-stable
.. note::
This will install the stable package PPA. If you're feeling brave, you may
wish to try the daily PPA instead. Please be aware that the packages in
the daily PPA *will* break from time to time, and therefore are not
suitable for production environments. To add the daily PPA, use
``ppa:sloecode`` instead of ``ppa:sloecode-stable``.
2) On the server, install the ``sloecode`` package. The sloecode package depends
on a database-backend. Currently MySQL and sqlite3 are supported. If
you want to use MysQL, you must have it installed before you install the
``sloecode`` package.
3) On the server, inspect the generated apache site configuration file in
``/etc/apache2/sites-available/sloecode``, and then enable the site in your
apache2 configuration:
.. code-block:: sh
> a2ensite sloecode
Then reload your apache server:
.. code-block:: sh
> /etc/init.d/apache2 reload
You should now be able to navigate to the web-interface. The default username
and password is admin/admin. Make sure you change this after logging in!
.. note::
By default, sloecode is set to be served from the root URL of your
particular server. Apache 2 comes pre-configured with a "default" site
that serves ``/var/www/`` as the root of your server. This means that you
either need to move the sloecode site to be served somewhere else, or move
the default site, or disable the default site altogether.
4) On the client machine(s), install the 'bzr-sloecode' package.
5) On the client machine(s), set the environment variable ``SLOECODE_SERVER`` to
the hostname or IP address of the sloecode server. Adding the following line
to your ``~/.bashrc`` or ``/etc/bashrc`` will do the trick:
.. code-block:: sh
> export SLOECODE_SERVER=192.168.1.1
From source
-----------
Installing and running sloecode from source requires a lot of work. You will
need to install all dependencies, and manage schema upgrades manually. It is
not for the faint of heart! These instructions are aimed at people who may want
to help develop sloecode:
1) You need Bazaar installed - sloecode is hosted on launchpad. To get the
latest sloecode sources, run the following:
.. code-block:: sh
> bzr branch lp:sloecode
2) You should now have a directory called 'sloecode' that contains the latest
trunk code. Both the web-app and the twisted python app read the
``development.ini`` file for configuration details. Database setup
information is in ``database.ini``.
3) You need to specify which database backend you want to use in the
``database.ini`` file. Once you have done this, create the database schema by
running:
.. code-block:: sh
> paster setup-app development.ini
4) You may now run the WSGI web application by running:
.. code-block:: sh
> make run
To run the python-twisted smart server, run:
.. code-block:: sh
> make smartserver
Documentation
=============
Sloecode uses sphinx for its documentation. Please install sphinx either
via pip or easy_install or from your package management system.
To use sphinx to build the documentation
from source use the following command from the root directory of the project
.. code-block:: sh
> python setup.py build_sphinx
The resulting html files will be in docs/build/html
|