Show More
@@ -20,7 +20,7 b' Upgrading from PyPI (aka "Cheeseshop")' | |||||
20 | If using a sqlite database, stop the Rhodecode process/daemon/service, and |
|
20 | If using a sqlite database, stop the Rhodecode process/daemon/service, and | |
21 | then make a copy of the database file:: |
|
21 | then make a copy of the database file:: | |
22 |
|
22 | |||
23 |
service |
|
23 | service kallithea stop | |
24 | cp rhodecode.db rhodecode.db.{version} |
|
24 | cp rhodecode.db rhodecode.db.{version} | |
25 |
|
25 | |||
26 |
|
26 | |||
@@ -90,7 +90,7 b' readily apparent::' | |||||
90 |
|
90 | |||
91 | Once that is complete, you may now start your upgraded Rhodecode Instance:: |
|
91 | Once that is complete, you may now start your upgraded Rhodecode Instance:: | |
92 |
|
92 | |||
93 |
service |
|
93 | service kallithea start | |
94 |
|
94 | |||
95 | Or:: |
|
95 | Or:: | |
96 |
|
96 |
@@ -1,19 +1,19 b'' | |||||
1 |
# celeryd - run the celeryd daemon as an upstart job for |
|
1 | # celeryd - run the celeryd daemon as an upstart job for kallithea | |
2 | # Change variables/paths as necessary and place file /etc/init/celeryd.conf |
|
2 | # Change variables/paths as necessary and place file /etc/init/celeryd.conf | |
3 | # start/stop/restart as normal upstart job (ie: $ start celeryd) |
|
3 | # start/stop/restart as normal upstart job (ie: $ start celeryd) | |
4 |
|
4 | |||
5 | description "Celery for RhodeCode Mercurial Server" |
|
5 | description "Celery for RhodeCode Mercurial Server" | |
6 | author "Matt Zuba <matt.zuba@goodwillaz.org" |
|
6 | author "Matt Zuba <matt.zuba@goodwillaz.org" | |
7 |
|
7 | |||
8 |
start on starting |
|
8 | start on starting kallithea | |
9 |
stop on stopped |
|
9 | stop on stopped kallithea | |
10 |
|
10 | |||
11 | respawn |
|
11 | respawn | |
12 |
|
12 | |||
13 | umask 0022 |
|
13 | umask 0022 | |
14 |
|
14 | |||
15 | env PIDFILE=/tmp/celeryd.pid |
|
15 | env PIDFILE=/tmp/celeryd.pid | |
16 |
env APPINI=/var/hg/ |
|
16 | env APPINI=/var/hg/kallithea/production.ini | |
17 | env HOME=/var/hg |
|
17 | env HOME=/var/hg | |
18 | env USER=hg |
|
18 | env USER=hg | |
19 | # To use group (if different from user), you must edit sudoers file and change |
|
19 | # To use group (if different from user), you must edit sudoers file and change | |
@@ -21,7 +21,7 b' env USER=hg' | |||||
21 | # env GROUP=hg |
|
21 | # env GROUP=hg | |
22 |
|
22 | |||
23 | script |
|
23 | script | |
24 |
COMMAND="/var/hg/.virtualenvs/ |
|
24 | COMMAND="/var/hg/.virtualenvs/kallithea/bin/paster celeryd $APPINI --pidfile=$PIDFILE" | |
25 | if [ -z "$GROUP" ]; then |
|
25 | if [ -z "$GROUP" ]; then | |
26 | exec sudo -u $USER $COMMAND |
|
26 | exec sudo -u $USER $COMMAND | |
27 | else |
|
27 | else |
@@ -6,7 +6,7 b'' | |||||
6 | . /etc/rc.conf |
|
6 | . /etc/rc.conf | |
7 | . /etc/rc.d/functions |
|
7 | . /etc/rc.d/functions | |
8 |
|
8 | |||
9 | DAEMON=rhodecode |
|
9 | DAEMON=kallithea | |
10 | APP_HOMEDIR="/srv" |
|
10 | APP_HOMEDIR="/srv" | |
11 | APP_PATH="$APP_HOMEDIR/$DAEMON" |
|
11 | APP_PATH="$APP_HOMEDIR/$DAEMON" | |
12 | CONF_NAME="production.ini" |
|
12 | CONF_NAME="production.ini" |
@@ -4,16 +4,16 b'' | |||||
4 | ######################################## |
|
4 | ######################################## | |
5 |
|
5 | |||
6 | ### BEGIN INIT INFO |
|
6 | ### BEGIN INIT INFO | |
7 |
# Provides: |
|
7 | # Provides: kallithea | |
8 | # Required-Start: $all |
|
8 | # Required-Start: $all | |
9 | # Required-Stop: $all |
|
9 | # Required-Stop: $all | |
10 | # Default-Start: 2 3 4 5 |
|
10 | # Default-Start: 2 3 4 5 | |
11 | # Default-Stop: 0 1 6 |
|
11 | # Default-Stop: 0 1 6 | |
12 |
# Short-Description: starts instance of |
|
12 | # Short-Description: starts instance of kallithea | |
13 |
# Description: starts instance of |
|
13 | # Description: starts instance of kallithea using start-stop-daemon | |
14 | ### END INIT INFO |
|
14 | ### END INIT INFO | |
15 |
|
15 | |||
16 |
APP_NAME=" |
|
16 | APP_NAME="kallithea" | |
17 | APP_HOMEDIR="opt" |
|
17 | APP_HOMEDIR="opt" | |
18 | APP_PATH="/$APP_HOMEDIR/$APP_NAME" |
|
18 | APP_PATH="/$APP_HOMEDIR/$APP_NAME" | |
19 |
|
19 |
@@ -3,8 +3,8 b'' | |||||
3 | #### THIS IS AN GENTOO INIT.D SCRIPT#### |
|
3 | #### THIS IS AN GENTOO INIT.D SCRIPT#### | |
4 | ######################################## |
|
4 | ######################################## | |
5 |
|
5 | |||
6 |
APP_NAME=" |
|
6 | APP_NAME="kallithea" | |
7 |
APP_HOMEDIR=" |
|
7 | APP_HOMEDIR="username/python_workspace" | |
8 | APP_PATH="/home/$APP_HOMEDIR/$APP_NAME" |
|
8 | APP_PATH="/home/$APP_HOMEDIR/$APP_NAME" | |
9 |
|
9 | |||
10 | CONF_NAME="production.ini" |
|
10 | CONF_NAME="production.ini" | |
@@ -14,7 +14,7 b' LOG_PATH="$APP_PATH/$APP_NAME.log"' | |||||
14 |
|
14 | |||
15 | PYTHON_PATH="/home/$APP_HOMEDIR/v-env" |
|
15 | PYTHON_PATH="/home/$APP_HOMEDIR/v-env" | |
16 |
|
16 | |||
17 |
RUN_AS=" |
|
17 | RUN_AS="username" | |
18 |
|
18 | |||
19 | DAEMON="$PYTHON_PATH/bin/paster" |
|
19 | DAEMON="$PYTHON_PATH/bin/paster" | |
20 |
|
20 |
@@ -12,7 +12,7 b'' | |||||
12 | ################################################## |
|
12 | ################################################## | |
13 |
|
13 | |||
14 |
|
14 | |||
15 |
APP_NAME=" |
|
15 | APP_NAME="kallithea" | |
16 | # the location of your app |
|
16 | # the location of your app | |
17 | # since this is a web app, it should go in /var/www |
|
17 | # since this is a web app, it should go in /var/www | |
18 | APP_PATH="/var/www/$APP_NAME" |
|
18 | APP_PATH="/var/www/$APP_NAME" | |
@@ -22,14 +22,14 b' CONF_NAME="production.ini"' | |||||
22 | # write to wherever the PID should be stored, just ensure |
|
22 | # write to wherever the PID should be stored, just ensure | |
23 | # that the user you run paster as has the appropriate permissions |
|
23 | # that the user you run paster as has the appropriate permissions | |
24 | # same goes for the log file |
|
24 | # same goes for the log file | |
25 |
PID_PATH="/var/run/ |
|
25 | PID_PATH="/var/run/kallithea/pid" | |
26 |
LOG_PATH="/var/log/ |
|
26 | LOG_PATH="/var/log/kallithea/kallithea.log" | |
27 |
|
27 | |||
28 | # replace this with the path to the virtual environment you |
|
28 | # replace this with the path to the virtual environment you | |
29 | # made for RhodeCode |
|
29 | # made for RhodeCode | |
30 |
PYTHON_PATH="/opt/python_virtualenvironments/ |
|
30 | PYTHON_PATH="/opt/python_virtualenvironments/kallithea-venv" | |
31 |
|
31 | |||
32 |
RUN_AS=" |
|
32 | RUN_AS="kallithea" | |
33 |
|
33 | |||
34 | DAEMON="$PYTHON_PATH/bin/paster" |
|
34 | DAEMON="$PYTHON_PATH/bin/paster" | |
35 |
|
35 | |||
@@ -39,7 +39,7 b' DAEMON_OPTS="serve --daemon \\' | |||||
39 | --pid-file=$PID_PATH \ |
|
39 | --pid-file=$PID_PATH \ | |
40 | --log-file=$LOG_PATH $APP_PATH/$CONF_NAME" |
|
40 | --log-file=$LOG_PATH $APP_PATH/$CONF_NAME" | |
41 |
|
41 | |||
42 |
DESC=" |
|
42 | DESC="kallithea-server" | |
43 | LOCK_FILE="/var/lock/subsys/$APP_NAME" |
|
43 | LOCK_FILE="/var/lock/subsys/$APP_NAME" | |
44 |
|
44 | |||
45 | # source CentOS init functions |
|
45 | # source CentOS init functions | |
@@ -61,7 +61,7 b' ensure_pid_dir () {' | |||||
61 | fi |
|
61 | fi | |
62 | } |
|
62 | } | |
63 |
|
63 | |||
64 |
start_ |
|
64 | start_kallithea () { | |
65 | ensure_pid_dir |
|
65 | ensure_pid_dir | |
66 | PYTHON_EGG_CACHE="/tmp" daemon --pidfile $PID_PATH \ |
|
66 | PYTHON_EGG_CACHE="/tmp" daemon --pidfile $PID_PATH \ | |
67 | --user $RUN_AS "$DAEMON $DAEMON_OPTS" |
|
67 | --user $RUN_AS "$DAEMON $DAEMON_OPTS" | |
@@ -70,7 +70,7 b' start_rhodecode () {' | |||||
70 | return $RETVAL |
|
70 | return $RETVAL | |
71 | } |
|
71 | } | |
72 |
|
72 | |||
73 |
stop_ |
|
73 | stop_kallithea () { | |
74 | if [ -e $LOCK_FILE ]; then |
|
74 | if [ -e $LOCK_FILE ]; then | |
75 | killproc -p $PID_PATH |
|
75 | killproc -p $PID_PATH | |
76 | RETVAL=$? |
|
76 | RETVAL=$? | |
@@ -82,7 +82,7 b' stop_rhodecode () {' | |||||
82 | return $RETVAL |
|
82 | return $RETVAL | |
83 | } |
|
83 | } | |
84 |
|
84 | |||
85 |
status_ |
|
85 | status_kallithea() { | |
86 | if [ -e $LOCK_FILE ]; then |
|
86 | if [ -e $LOCK_FILE ]; then | |
87 | # exit with non-zero to indicate failure |
|
87 | # exit with non-zero to indicate failure | |
88 | RETVAL=1 |
|
88 | RETVAL=1 | |
@@ -92,25 +92,25 b' status_rhodecode() {' | |||||
92 | return $RETVAL |
|
92 | return $RETVAL | |
93 | } |
|
93 | } | |
94 |
|
94 | |||
95 |
restart_ |
|
95 | restart_kallithea () { | |
96 |
stop_ |
|
96 | stop_kallithea | |
97 |
start_ |
|
97 | start_kallithea | |
98 | RETVAL=$? |
|
98 | RETVAL=$? | |
99 | } |
|
99 | } | |
100 |
|
100 | |||
101 | case "$1" in |
|
101 | case "$1" in | |
102 | start) |
|
102 | start) | |
103 | echo -n $"Starting $DESC: " |
|
103 | echo -n $"Starting $DESC: " | |
104 |
start_ |
|
104 | start_kallithea | |
105 | echo |
|
105 | echo | |
106 | ;; |
|
106 | ;; | |
107 | stop) |
|
107 | stop) | |
108 | echo -n $"Stopping $DESC: " |
|
108 | echo -n $"Stopping $DESC: " | |
109 |
stop_ |
|
109 | stop_kallithea | |
110 | echo |
|
110 | echo | |
111 | ;; |
|
111 | ;; | |
112 | status) |
|
112 | status) | |
113 |
status_ |
|
113 | status_kallithea | |
114 | RETVAL=$? |
|
114 | RETVAL=$? | |
115 | if [ ! $RETVAL -eq 0 ]; then |
|
115 | if [ ! $RETVAL -eq 0 ]; then | |
116 | echo "RhodeCode server is running..." |
|
116 | echo "RhodeCode server is running..." | |
@@ -120,7 +120,7 b' case "$1" in' | |||||
120 | ;; |
|
120 | ;; | |
121 | restart) |
|
121 | restart) | |
122 | echo -n $"Restarting $DESC: " |
|
122 | echo -n $"Restarting $DESC: " | |
123 |
restart_ |
|
123 | restart_kallithea | |
124 | echo |
|
124 | echo | |
125 | ;; |
|
125 | ;; | |
126 | *) |
|
126 | *) |
@@ -1,6 +1,6 b'' | |||||
1 |
# |
|
1 | # kallithea - run the kallithea daemon as an upstart job | |
2 |
# Change variables/paths as necessary and place file /etc/init/ |
|
2 | # Change variables/paths as necessary and place file /etc/init/kallithea.conf | |
3 |
# start/stop/restart as normal upstart job (ie: $ start |
|
3 | # start/stop/restart as normal upstart job (ie: $ start kallithea) | |
4 |
|
4 | |||
5 | description "RhodeCode Mercurial Server" |
|
5 | description "RhodeCode Mercurial Server" | |
6 | author "Matt Zuba <matt.zuba@goodwillaz.org" |
|
6 | author "Matt Zuba <matt.zuba@goodwillaz.org" | |
@@ -12,14 +12,14 b' respawn' | |||||
12 |
|
12 | |||
13 | umask 0022 |
|
13 | umask 0022 | |
14 |
|
14 | |||
15 |
env PIDFILE=/var/hg/ |
|
15 | env PIDFILE=/var/hg/kallithea/kallithea.pid | |
16 |
env LOGFILE=/var/hg/ |
|
16 | env LOGFILE=/var/hg/kallithea/log/kallithea.log | |
17 |
env APPINI=/var/hg/ |
|
17 | env APPINI=/var/hg/kallithea/production.ini | |
18 | env HOME=/var/hg |
|
18 | env HOME=/var/hg | |
19 | env USER=hg |
|
19 | env USER=hg | |
20 | env GROUP=hg |
|
20 | env GROUP=hg | |
21 |
|
21 | |||
22 |
exec /var/hg/.virtualenvs/ |
|
22 | exec /var/hg/.virtualenvs/kallithea/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI | |
23 |
|
23 | |||
24 | post-stop script |
|
24 | post-stop script | |
25 | rm -f $PIDFILE |
|
25 | rm -f $PIDFILE |
@@ -9,21 +9,21 b' port=127.0.0.1:9001 ; (ip_address' | |||||
9 | ;password=123 ; (default is no password (open server)) |
|
9 | ;password=123 ; (default is no password (open server)) | |
10 |
|
10 | |||
11 | [supervisord] |
|
11 | [supervisord] | |
12 |
logfile=/%(here)s/supervisord_ |
|
12 | logfile=/%(here)s/supervisord_kallithea.log ; (main log file;default $CWD/supervisord.log) | |
13 | logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) |
|
13 | logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | |
14 | logfile_backups=10 ; (num of main logfile rotation backups;default 10) |
|
14 | logfile_backups=10 ; (num of main logfile rotation backups;default 10) | |
15 | loglevel=info ; (log level;default info; others: debug,warn,trace) |
|
15 | loglevel=info ; (log level;default info; others: debug,warn,trace) | |
16 |
pidfile=/%(here)s/supervisord_ |
|
16 | pidfile=/%(here)s/supervisord_kallithea.pid ; (supervisord pidfile;default supervisord.pid) | |
17 | nodaemon=true ; (start in foreground if true;default false) |
|
17 | nodaemon=true ; (start in foreground if true;default false) | |
18 | minfds=1024 ; (min. avail startup file descriptors;default 1024) |
|
18 | minfds=1024 ; (min. avail startup file descriptors;default 1024) | |
19 | minprocs=200 ; (min. avail process descriptors;default 200) |
|
19 | minprocs=200 ; (min. avail process descriptors;default 200) | |
20 | umask=022 ; (process file creation umask;default 022) |
|
20 | umask=022 ; (process file creation umask;default 022) | |
21 |
user= |
|
21 | user=username ; (default is current user, required if root) | |
22 | ;identifier=supervisor ; (supervisord identifier, default is 'supervisor') |
|
22 | ;identifier=supervisor ; (supervisord identifier, default is 'supervisor') | |
23 | ;directory=/tmp ; (default is not to cd during start) |
|
23 | ;directory=/tmp ; (default is not to cd during start) | |
24 | ;nocleanup=true ; (don't clean up tempfiles at start;default false) |
|
24 | ;nocleanup=true ; (don't clean up tempfiles at start;default false) | |
25 | ;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP) |
|
25 | ;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP) | |
26 |
environment=HOME=/home/ |
|
26 | environment=HOME=/home/username ; (key value pairs to add to environment) | |
27 | ;strip_ansi=false ; (strip ansi escape codes in logs; def. false) |
|
27 | ;strip_ansi=false ; (strip ansi escape codes in logs; def. false) | |
28 |
|
28 | |||
29 | ; the below section must remain in the config file for RPC |
|
29 | ; the below section must remain in the config file for RPC | |
@@ -40,12 +40,12 b' serverurl=http://127.0.0.1:9001 ; use an' | |||||
40 | ;history_file=~/.sc_history ; use readline history if available |
|
40 | ;history_file=~/.sc_history ; use readline history if available | |
41 |
|
41 | |||
42 |
|
42 | |||
43 |
; restart with supervisorctl restart |
|
43 | ; restart with supervisorctl restart kallithea:* | |
44 |
[program: |
|
44 | [program:kallithea] | |
45 | numprocs = 1 |
|
45 | numprocs = 1 | |
46 | numprocs_start = 5000 # possible should match ports |
|
46 | numprocs_start = 5000 # possible should match ports | |
47 |
directory=/home/ |
|
47 | directory=/home/username/kallithea-dir | |
48 |
command = /home/ |
|
48 | command = /home/username/v-env/bin/paster serve rc.ini | |
49 | process_name = %(program_name)s_%(process_num)04d |
|
49 | process_name = %(program_name)s_%(process_num)04d | |
50 | redirect_stderr=true |
|
50 | redirect_stderr=true | |
51 |
stdout_logfile=/%(here)s/ |
|
51 | stdout_logfile=/%(here)s/kallithea.log No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now