Show More
@@ -1,15 +1,23 b'' | |||||
|
1 | include MANIFEST.in | |||
1 | include COPYING |
|
2 | include COPYING | |
2 | include README.rst |
|
3 | include development.ini | |
|
4 | include production.ini | |||
|
5 | ||||
3 | include rhodecode/config/deployment.ini_tmpl |
|
6 | include rhodecode/config/deployment.ini_tmpl | |
4 |
|
7 | |||
5 | include rhodecode_daemon |
|
8 | #init.d scripts | |
6 |
include rhodecode |
|
9 | include init.d/rhodecode-daemon | |
|
10 | include init.d/rhodecode-daemon2 | |||
7 |
|
11 | |||
|
12 | #celery config | |||
|
13 | include celeryconfig.py | |||
|
14 | ||||
|
15 | #images | |||
8 | recursive-include rhodecode/public/css * |
|
16 | recursive-include rhodecode/public/css * | |
9 | recursive-include rhodecode/public/images * |
|
17 | recursive-include rhodecode/public/images * | |
10 |
|
18 | #js | ||
11 | include rhodecode/public/js/yui2.js |
|
19 | include rhodecode/public/js/yui2.js | |
12 | include rhodecode/public/js/excanvas.min.js |
|
20 | include rhodecode/public/js/excanvas.min.js | |
13 | include rhodecode/public/js/yui.flot.js |
|
21 | include rhodecode/public/js/yui.flot.js | |
14 |
|
22 | #templates | ||
15 | recursive-include rhodecode/templates * No newline at end of file |
|
23 | recursive-include rhodecode/templates * |
@@ -46,22 +46,34 b' Fully customizable, with authentication,' | |||||
46 | Installation |
|
46 | Installation | |
47 | ------------- |
|
47 | ------------- | |
48 |
|
48 | |||
|
49 | quick setup | |||
|
50 | ||||
|
51 | - pip install -E rhodecode-venv http://bitbucket.org/marcinkuzminski/rhodecode/get/tip.zip | |||
|
52 | - activate virtualenv | |||
|
53 | - run `paster make-config RhodeCode production.ini` | |||
|
54 | - run `paster setup-app production.ini` | |||
|
55 | - run `paster runserver production.ini` | |||
|
56 | ||||
|
57 | You're ready to go. | |||
|
58 | ||||
|
59 | ||||
|
60 | MORE DETAILED INSTRUCTIONS | |||
|
61 | ||||
49 | - I highly recommend to install new virtualenv for rhodecode see |
|
62 | - I highly recommend to install new virtualenv for rhodecode see | |
50 | http://pypi.python.org/pypi/virtualenv |
|
63 | http://pypi.python.org/pypi/virtualenv for more details. | |
51 | - Create new virtualenv using `virtualenv --no-site-packages /var/www/rhodecode-venv` |
|
64 | - Create new virtualenv using `virtualenv --no-site-packages /var/www/rhodecode-venv` | |
52 | this will install new virtual env into /var/www/rhodecode-venv. |
|
65 | this will install new virtual env into /var/www/rhodecode-venv. | |
53 | Activate the virtualenv by running |
|
66 | Activate the virtualenv by running | |
54 | `source activate /var/www/rhodecode-venv/bin/activate` |
|
67 | `source activate /var/www/rhodecode-venv/bin/activate` | |
55 | - Make a folder for rhodecode somewhere on the filesystem for example /var/www/rhodecode |
|
68 | - Make a folder for rhodecode somewhere on the filesystem for example /var/www/rhodecode | |
56 |
- |
|
69 | - Run easy_install http://bitbucket.org/marcinkuzminski/rhodecode/get/tip.zip. | |
57 | into created directory. |
|
70 | - Run `paster make-config RhodeCode production.inii` in order to install | |
58 | - Run `python setup.py install` in order to install the application and all |
|
71 | the application config. You can play with the app settings later | |
59 | needed dependencies. Make sure that You're using activated virutalenv |
|
|||
60 | - Run `paster setup-app production.ini` it should create all needed tables |
|
72 | - Run `paster setup-app production.ini` it should create all needed tables | |
61 | and an admin account make sure You specify correct path to repositories. |
|
73 | and an admin account make sure You specify correct path to repositories. | |
62 | - Remember that the given path for mercurial repositories must be write |
|
74 | - Remember that the given path for mercurial repositories must be write | |
63 | accessible for the application |
|
75 | accessible for the application | |
64 |
- Run paster serve |
|
76 | - Run paster serve production.ini - or you can use sample init.d scripts. | |
65 | the app should be available at the 127.0.0.1:5000 |
|
77 | the app should be available at the 127.0.0.1:5000 | |
66 | - Use admin account you created to login. |
|
78 | - Use admin account you created to login. | |
67 | - Default permissions on each repository is read, and owner is admin. So remember |
|
79 | - Default permissions on each repository is read, and owner is admin. So remember |
1 | NO CONTENT: file renamed from init.d/rhodecode_daemon to init.d/rhodecode-daemon |
|
NO CONTENT: file renamed from init.d/rhodecode_daemon to init.d/rhodecode-daemon |
1 | NO CONTENT: file renamed from init.d/rhodecode_daemon2 to init.d/rhodecode-daemon2 |
|
NO CONTENT: file renamed from init.d/rhodecode_daemon2 to init.d/rhodecode-daemon2 |
@@ -35,12 +35,12 b' use_threadpool = true' | |||||
35 |
|
35 | |||
36 | use = egg:Paste#http |
|
36 | use = egg:Paste#http | |
37 | host = 127.0.0.1 |
|
37 | host = 127.0.0.1 | |
38 |
port = |
|
38 | port = 5000 | |
39 |
|
39 | |||
40 | [app:main] |
|
40 | [app:main] | |
41 | use = egg:rhodecode |
|
41 | use = egg:rhodecode | |
42 | full_stack = true |
|
42 | full_stack = true | |
43 |
static_files = |
|
43 | static_files = true | |
44 | lang=en |
|
44 | lang=en | |
45 | cache_dir = %(here)s/data |
|
45 | cache_dir = %(here)s/data | |
46 | app_instance_uuid = ${app_instance_uuid} |
|
46 | app_instance_uuid = ${app_instance_uuid} |
@@ -28,8 +28,6 b' from os.path import dirname as dn, join ' | |||||
28 | import os |
|
28 | import os | |
29 | import sys |
|
29 | import sys | |
30 | import uuid |
|
30 | import uuid | |
31 | ROOT = dn(dn(dn(os.path.realpath(__file__)))) |
|
|||
32 | sys.path.append(ROOT) |
|
|||
33 |
|
31 | |||
34 | from rhodecode.lib.auth import get_crypt_password |
|
32 | from rhodecode.lib.auth import get_crypt_password | |
35 | from rhodecode.lib.utils import ask_ok |
|
33 | from rhodecode.lib.utils import ask_ok | |
@@ -43,20 +41,22 b' import logging' | |||||
43 | log = logging.getLogger(__name__) |
|
41 | log = logging.getLogger(__name__) | |
44 |
|
42 | |||
45 | class DbManage(object): |
|
43 | class DbManage(object): | |
46 | def __init__(self, log_sql, dbname, tests=False): |
|
44 | def __init__(self, log_sql, dbname, root, tests=False): | |
47 | self.dbname = dbname |
|
45 | self.dbname = dbname | |
48 | self.tests = tests |
|
46 | self.tests = tests | |
49 | dburi = 'sqlite:////%s' % jn(ROOT, self.dbname) |
|
47 | self.root = root | |
|
48 | dburi = 'sqlite:////%s' % jn(self.root, self.dbname) | |||
50 | engine = create_engine(dburi, echo=log_sql) |
|
49 | engine = create_engine(dburi, echo=log_sql) | |
51 | init_model(engine) |
|
50 | init_model(engine) | |
52 | self.sa = meta.Session |
|
51 | self.sa = meta.Session | |
53 | self.db_exists = False |
|
52 | self.db_exists = False | |
54 |
|
53 | |||
55 | def check_for_db(self, override): |
|
54 | def check_for_db(self, override): | |
56 | log.info('checking for exisiting db') |
|
55 | db_path = jn(self.root, self.dbname) | |
57 | if os.path.isfile(jn(ROOT, self.dbname)): |
|
56 | log.info('checking for existing db in %s', db_path) | |
|
57 | if os.path.isfile(db_path): | |||
58 | self.db_exists = True |
|
58 | self.db_exists = True | |
59 |
log.info('database exis |
|
59 | log.info('database exist') | |
60 | if not override: |
|
60 | if not override: | |
61 | raise Exception('database already exists') |
|
61 | raise Exception('database already exists') | |
62 |
|
62 | |||
@@ -66,7 +66,7 b' class DbManage(object):' | |||||
66 | """ |
|
66 | """ | |
67 | self.check_for_db(override) |
|
67 | self.check_for_db(override) | |
68 | if override: |
|
68 | if override: | |
69 |
log.info("database exis |
|
69 | log.info("database exist and it's going to be destroyed") | |
70 | if self.tests: |
|
70 | if self.tests: | |
71 | destroy = True |
|
71 | destroy = True | |
72 | else: |
|
72 | else: | |
@@ -74,7 +74,7 b' class DbManage(object):' | |||||
74 | if not destroy: |
|
74 | if not destroy: | |
75 | sys.exit() |
|
75 | sys.exit() | |
76 | if self.db_exists and destroy: |
|
76 | if self.db_exists and destroy: | |
77 |
os.remove(jn( |
|
77 | os.remove(jn(self.root, self.dbname)) | |
78 | checkfirst = not override |
|
78 | checkfirst = not override | |
79 | meta.Base.metadata.create_all(checkfirst=checkfirst) |
|
79 | meta.Base.metadata.create_all(checkfirst=checkfirst) | |
80 | log.info('Created tables for %s', self.dbname) |
|
80 | log.info('Created tables for %s', self.dbname) | |
@@ -84,6 +84,10 b' class DbManage(object):' | |||||
84 | import getpass |
|
84 | import getpass | |
85 | username = raw_input('Specify admin username:') |
|
85 | username = raw_input('Specify admin username:') | |
86 | password = getpass.getpass('Specify admin password:') |
|
86 | password = getpass.getpass('Specify admin password:') | |
|
87 | confirm = getpass.getpass('Confirm password:') | |||
|
88 | if password != confirm: | |||
|
89 | log.error('passwords mismatch') | |||
|
90 | sys.exit() | |||
87 | email = raw_input('Specify admin email:') |
|
91 | email = raw_input('Specify admin email:') | |
88 | self.create_user(username, password, email, True) |
|
92 | self.create_user(username, password, email, True) | |
89 | else: |
|
93 | else: |
@@ -467,9 +467,11 b' def create_test_env(repos_test_path, con' | |||||
467 | log.addHandler(ch) |
|
467 | log.addHandler(ch) | |
468 |
|
468 | |||
469 | #PART ONE create db |
|
469 | #PART ONE create db | |
470 | log.debug('making test db') |
|
470 | log.debug('making test db in %s', repos_test_path) | |
471 | dbname = config['sqlalchemy.db1.url'].split('/')[-1] |
|
471 | dbname = config['sqlalchemy.db1.url'].split('/')[-1] | |
472 | dbmanage = DbManage(log_sql=True, dbname=dbname, tests=True) |
|
472 | ||
|
473 | dbmanage = DbManage(log_sql=True, dbname=dbname, root=config['here'], | |||
|
474 | tests=True) | |||
473 | dbmanage.create_tables(override=True) |
|
475 | dbmanage.create_tables(override=True) | |
474 | dbmanage.config_prompt(repos_test_path) |
|
476 | dbmanage.config_prompt(repos_test_path) | |
475 | dbmanage.create_default_user() |
|
477 | dbmanage.create_default_user() |
@@ -1,32 +1,44 b'' | |||||
1 | """Setup the rhodecode application""" |
|
1 | """Setup the rhodecode application""" | |
2 |
|
2 | from os.path import dirname as dn, join as jn | ||
3 | from os.path import dirname as dn |
|
|||
4 | from rhodecode.config.environment import load_environment |
|
3 | from rhodecode.config.environment import load_environment | |
5 | from rhodecode.lib.db_manage import DbManage |
|
4 | from rhodecode.lib.db_manage import DbManage | |
6 | import logging |
|
5 | import logging | |
7 | import os |
|
6 | import os | |
8 |
import s |
|
7 | import shutil | |
9 |
|
8 | |||
10 | log = logging.getLogger(__name__) |
|
9 | log = logging.getLogger(__name__) | |
11 |
|
10 | ROOT = dn(os.path.realpath(__file__)) | ||
12 | ROOT = dn(dn(os.path.realpath(__file__))) |
|
|||
13 | sys.path.append(ROOT) |
|
|||
14 |
|
||||
15 |
|
11 | |||
16 | def setup_app(command, conf, vars): |
|
12 | def setup_app(command, conf, vars): | |
17 | """Place any commands to setup rhodecode here""" |
|
13 | """Place any commands to setup rhodecode here""" | |
18 | log_sql = True |
|
14 | print dn(os.path.realpath(__file__)) | |
19 | tests = False |
|
15 | print(ROOT) | |
20 | REPO_TEST_PATH = None |
|
|||
21 |
|
||||
22 | dbname = os.path.split(conf['sqlalchemy.db1.url'])[-1] |
|
16 | dbname = os.path.split(conf['sqlalchemy.db1.url'])[-1] | |
23 |
|
17 | dbmanage = DbManage(log_sql=True, dbname=dbname, root=conf['here'], | ||
24 | dbmanage = DbManage(log_sql, dbname, tests) |
|
18 | tests=False) | |
25 | dbmanage.create_tables(override=True) |
|
19 | dbmanage.create_tables(override=True) | |
26 |
dbmanage.config_prompt( |
|
20 | dbmanage.config_prompt(None) | |
27 | dbmanage.create_default_user() |
|
21 | dbmanage.create_default_user() | |
28 | dbmanage.admin_prompt() |
|
22 | dbmanage.admin_prompt() | |
29 | dbmanage.create_permissions() |
|
23 | dbmanage.create_permissions() | |
30 | dbmanage.populate_default_permissions() |
|
24 | dbmanage.populate_default_permissions() | |
|
25 | ||||
|
26 | celeryconfig_file = 'celeryconfig.py' | |||
|
27 | ||||
|
28 | celeryconfig_path = jn(ROOT, celeryconfig_file) | |||
|
29 | ||||
|
30 | ||||
|
31 | if not os.path.isfile(jn(conf['here'], celeryconfig_file)): | |||
|
32 | try: | |||
|
33 | shutil.copy(celeryconfig_path, conf['here']) | |||
|
34 | except IOError: | |||
|
35 | log.error('failed to copy celeryconfig.py from source %s ' | |||
|
36 | ' to this directory please copy it manually ', | |||
|
37 | celeryconfig_path) | |||
|
38 | else: | |||
31 | load_environment(conf.global_conf, conf.local_conf, initial=True) |
|
39 | load_environment(conf.global_conf, conf.local_conf, initial=True) | |
32 |
|
40 | |||
|
41 | ||||
|
42 | ||||
|
43 | ||||
|
44 |
@@ -1,4 +1,31 b'' | |||||
1 | from rhodecode import get_version |
|
1 | from rhodecode import get_version | |
|
2 | ||||
|
3 | ||||
|
4 | requirements = [ | |||
|
5 | "Pylons>=1.0.0", | |||
|
6 | "SQLAlchemy>=0.6", | |||
|
7 | "babel", | |||
|
8 | "Mako>=0.3.2", | |||
|
9 | "vcs>=0.1.7", | |||
|
10 | "pygments>=1.3.0", | |||
|
11 | "mercurial>=1.6", | |||
|
12 | "pysqlite", | |||
|
13 | "whoosh==1.0.0", | |||
|
14 | "py-bcrypt", | |||
|
15 | "celery", | |||
|
16 | ] | |||
|
17 | ||||
|
18 | #additional files for project | |||
|
19 | data_files = [ | |||
|
20 | ('init.d', ['init.d/rhodecode-daemon', | |||
|
21 | 'init.d/rhodecode-daemon2', | |||
|
22 | 'init.d/celeryd']), | |||
|
23 | ('', ['celeryconfig.py', 'production.ini', 'development.ini']), | |||
|
24 | ] | |||
|
25 | ||||
|
26 | ||||
|
27 | long_description = '\n' + open('README.rst').read() | |||
|
28 | ||||
2 | try: |
|
29 | try: | |
3 | from setuptools import setup, find_packages |
|
30 | from setuptools import setup, find_packages | |
4 | except ImportError: |
|
31 | except ImportError: | |
@@ -7,28 +34,18 b' except ImportError:' | |||||
7 | from setuptools import setup, find_packages |
|
34 | from setuptools import setup, find_packages | |
8 |
|
35 | |||
9 | setup( |
|
36 | setup( | |
10 |
name='RhodeCode |
|
37 | name='RhodeCode', | |
11 | version=get_version(), |
|
38 | version=get_version(), | |
12 | description='Mercurial repository serving and browsing app', |
|
39 | description='Mercurial repository serving and browsing app', | |
|
40 | long_description=long_description, | |||
13 | keywords='mercurial web hgwebdir replacement serving hgweb rhodecode', |
|
41 | keywords='mercurial web hgwebdir replacement serving hgweb rhodecode', | |
14 | license='BSD', |
|
42 | license='BSD', | |
15 |
author=' |
|
43 | author='Marcin Kuzminski', | |
16 | author_email='marcin@python-works.com', |
|
44 | author_email='marcin@python-works.com', | |
17 | url='http://hg.python-works.com', |
|
45 | url='http://hg.python-works.com', | |
18 |
install_requires= |
|
46 | install_requires=requirements, | |
19 | "Pylons>=1.0.0", |
|
|||
20 | "SQLAlchemy>=0.6", |
|
|||
21 | "babel", |
|
|||
22 | "Mako>=0.3.2", |
|
|||
23 | "vcs>=0.1.7", |
|
|||
24 | "pygments>=1.3.0", |
|
|||
25 | "mercurial>=1.6", |
|
|||
26 | "pysqlite", |
|
|||
27 | "whoosh==1.0.0b20", |
|
|||
28 | "py-bcrypt", |
|
|||
29 | "celery", |
|
|||
30 | ], |
|
|||
31 | setup_requires=["PasteScript>=1.6.3"], |
|
47 | setup_requires=["PasteScript>=1.6.3"], | |
|
48 | data_files=data_files, | |||
32 | packages=find_packages(exclude=['ez_setup']), |
|
49 | packages=find_packages(exclude=['ez_setup']), | |
33 | include_package_data=True, |
|
50 | include_package_data=True, | |
34 | test_suite='nose.collector', |
|
51 | test_suite='nose.collector', |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now