##// END OF EJS Templates
fleshing out the Upgrade doc, and modified the references to Cheeseshop in the Install doc
H Waldo G -
r2806:008d9c6f beta
parent child Browse files
Show More
@@ -1,129 +1,129 b''
1 1 .. _installation:
2 2
3 3 ============
4 4 Installation
5 5 ============
6 6
7 7 ``RhodeCode`` is written entirely in Python. Before posting any issues make
8 8 sure, your not missing any system libraries and using right version of
9 9 libraries required by RhodeCode. There's also restriction in terms of mercurial
10 10 clients. Minimal version of hg client known working fine with RhodeCode is
11 11 **1.6**. If you're using older client, please upgrade.
12 12
13 13
14 Installing RhodeCode from Cheese Shop
15 -------------------------------------
14 Installing RhodeCode from PyPI (aka "Cheeseshop")
15 -------------------------------------------------
16 16
17 17 Rhodecode requires python version 2.5 or higher.
18 18
19 19 The easiest way to install ``rhodecode`` is to run::
20 20
21 21 easy_install rhodecode
22 22
23 23 Or::
24 24
25 25 pip install rhodecode
26 26
27 27 If you prefer to install RhodeCode manually simply grab latest release from
28 28 http://pypi.python.org/pypi/RhodeCode, decompress the archive and run::
29 29
30 30 python setup.py install
31 31
32 32 Step by step installation example for Windows
33 33 ---------------------------------------------
34 34
35 35 :ref:`installation_win`
36 36
37 37
38 38 Step by step installation example for Linux
39 39 -------------------------------------------
40 40
41 41
42 42 For installing RhodeCode i highly recommend using separate virtualenv_. This
43 43 way many required by RhodeCode libraries will remain sandboxed from your main
44 44 python and making things less problematic when doing system python updates.
45 45
46 46 - Assuming you have installed virtualenv_ create a new virtual environment
47 47 using virtualenv command::
48 48
49 49 virtualenv --no-site-packages /opt/rhodecode-venv
50 50
51 51
52 52 .. note:: Using ``--no-site-packages`` when generating your
53 53 virtualenv is **very important**. This flag provides the necessary
54 54 isolation for running the set of packages required by
55 55 RhodeCode. If you do not specify ``--no-site-packages``,
56 56 it's possible that RhodeCode will not install properly into
57 57 the virtualenv, or, even if it does, may not run properly,
58 58 depending on the packages you've already got installed into your
59 59 Python's "main" site-packages dir.
60 60
61 61
62 62 - this will install new virtualenv_ into `/opt/rhodecode-venv`.
63 63 - Activate the virtualenv_ by running::
64 64
65 65 source /opt/rhodecode-venv/bin/activate
66 66
67 67 .. note:: If you're using UNIX, *do not* use ``sudo`` to run the
68 68 ``virtualenv`` script. It's perfectly acceptable (and desirable)
69 69 to create a virtualenv as a normal user.
70 70
71 71 - Make a folder for rhodecode data files, and configuration somewhere on the
72 72 filesystem. For example::
73 73
74 74 mkdir /opt/rhodecode
75 75
76 76
77 77 - Go into the created directory run this command to install rhodecode::
78 78
79 79 easy_install rhodecode
80 80
81 81 or::
82 82
83 83 pip install rhodecode
84 84
85 85 - This will install rhodecode together with pylons and all other required
86 86 python libraries into activated virtualenv
87 87
88 88 Requirements for Celery (optional)
89 89 ----------------------------------
90 90
91 91 In order to gain maximum performance
92 92 there are some third-party you must install. When RhodeCode is used
93 93 together with celery you have to install some kind of message broker,
94 94 recommended one is rabbitmq_ to make the async tasks work.
95 95
96 96 Of course RhodeCode works in sync mode also and then you do not have to install
97 97 any third party applications. However, using Celery_ will give you a large
98 98 speed improvement when using many big repositories. If you plan to use
99 99 RhodeCode for say 7 to 10 repositories, RhodeCode will perform perfectly well
100 100 without celery running.
101 101
102 102 If you make the decision to run RhodeCode with celery make sure you run
103 103 celeryd using paster and message broker together with the application.
104 104
105 105 .. note::
106 106 Installing message broker and using celery is optional, RhodeCode will
107 107 work perfectly fine without them.
108 108
109 109
110 110 **Message Broker**
111 111
112 112 - preferred is `RabbitMq <http://www.rabbitmq.com/>`_
113 113 - A possible alternative is `Redis <http://code.google.com/p/redis/>`_
114 114
115 115 For installation instructions you can visit:
116 116 http://ask.github.com/celery/getting-started/index.html.
117 117 This is a very nice tutorial on how to start using celery_ with rabbitmq_
118 118
119 119
120 120 You can now proceed to :ref:`setup`
121 121 -----------------------------------
122 122
123 123
124 124
125 125 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
126 126 .. _python: http://www.python.org/
127 127 .. _mercurial: http://mercurial.selenic.com/
128 128 .. _celery: http://celeryproject.org/
129 .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file
129 .. _rabbitmq: http://www.rabbitmq.com/
@@ -1,58 +1,99 b''
1 1 .. _upgrade:
2 2
3 3 =======
4 4 Upgrade
5 5 =======
6 6
7 Upgrading from Cheese Shop
8 --------------------------
7 Upgrading from PyPI (aka "Cheeseshop")
8 ---------------------------------------
9 9
10 10 .. note::
11 Firstly, it is recommended that you **always** perform a database backup
12 before doing an upgrade.
11 Firstly, it is recommended that you **always** perform a database and
12 configuration backup before doing an upgrade.
13
14 (These directions will use '{version}' to note that this is the version of
15 Rhodecode that these files were used with. If backing up your RhodeCode
16 instance from version 1.3.6 to 1.4.0, the ``production.ini`` file would be
17 backed up to ``production.ini.1-3-6``.)
18
19
20 If using a sqlite database, stop the Rhodecode process/daemon/service, and
21 then make a copy of the database file::
22
23 service rhodecode stop
24 cp rhodecode.db rhodecode.db.{version}
25
13 26
14 The easiest way to upgrade ``rhodecode`` is to run::
27 Back up your configuration file::
28
29 cp production.ini production.ini.{version}
30
31
32 Ensure that you are using the Python Virtual Environment that you'd originally
33 installed Rhodecode in::
34
35 pip freeze
36
37 will list all packages installed in the current environment. If Rhodecode
38 isn't listed, change virtual environments to your venv location::
39
40 source /opt/rhodecode-venv/bin/activate
41
42
43 Once you have verified the environment you can upgrade ``Rhodecode`` with::
15 44
16 45 easy_install -U rhodecode
17 46
18 47 Or::
19 48
20 49 pip install --upgrade rhodecode
21 50
22 51
23 Then make sure you run the following command from the installation directory::
52 Then run the following command from the installation directory::
24 53
25 54 paster make-config RhodeCode production.ini
26 55
27 56 This will display any changes made by the new version of RhodeCode to your
28 current configuration. It will try to perform an automerge. It's always better
29 to make a backup of your configuration file before hand and re check the
30 content after the automerge.
57 current configuration. It will try to perform an automerge. It's recommended
58 that you re-check the content after the automerge.
31 59
32 60 .. note::
33 61 Please always make sure your .ini files are up to date. Often errors are
34 62 caused by missing params added in new versions.
35 63
36 64
37 65 It is also recommended that you rebuild the whoosh index after upgrading since
38 66 the new whoosh version could introduce some incompatible index changes. Please
39 67 Read the changelog to see if there were any changes to whoosh.
40 68
41 69
42 70 The final step is to upgrade the database. To do this simply run::
43 71
44 paster upgrade-db production.ini
72 paster upgrade-db production.ini
45 73
46 74 This will upgrade the schema and update some of the defaults in the database,
47 75 and will always recheck the settings of the application, if there are no new
48 76 options that need to be set.
49 77
78 You may find it helpful to clear out your log file so that new errors are
79 readily apparent::
80
81 echo > rhodecode.log
82
83 Once that is complete, you may now start your upgraded Rhodecode Instance::
84
85 service rhodecode start
86
87 Or::
88
89 paster serve /var/www/rhodecode/production.ini
90
50 91 .. note::
51 92 If you're using Celery, make sure you restart all instances of it after
52 93 upgrade.
53 94
54 95 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
55 96 .. _python: http://www.python.org/
56 97 .. _mercurial: http://mercurial.selenic.com/
57 98 .. _celery: http://celeryproject.org/
58 .. _rabbitmq: http://www.rabbitmq.com/ No newline at end of file
99 .. _rabbitmq: http://www.rabbitmq.com/
General Comments 0
You need to be logged in to leave comments. Login now