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