This is temporarily broken on F11 unless you manually comment out the rubygem(thin) requires line and install the gem manually, as thin is not currently pushed to the F11 repo due to a missing dep.
Signed-off-by: Scott Seago sseago@redhat.com --- README | 6 +- conf/deltacloud-aggregator | 90 +++++++++++++++++++++++++++ conf/deltacloud-aggregator.sysconf | 18 +++++ conf/deltacloud-mongrel-rails | 86 ------------------------- conf/deltacloud-mongrel-rails.sysconf | 18 ----- conf/deltacloud-portal.logrotate | 4 +- deltacloud-portal.spec.in | 18 +++--- src/config/initializers/abstract_request.rb | 20 ------ 8 files changed, 122 insertions(+), 138 deletions(-) create mode 100755 conf/deltacloud-aggregator create mode 100644 conf/deltacloud-aggregator.sysconf delete mode 100755 conf/deltacloud-mongrel-rails delete mode 100644 conf/deltacloud-mongrel-rails.sysconf delete mode 100644 src/config/initializers/abstract_request.rb
diff --git a/README b/README index 31d38d5..79c89fe 100644 --- a/README +++ b/README @@ -46,7 +46,7 @@ There are three ways you can install the portal application (though all require * rubygem(activeldap) >= 0.10.0 * rubygem(activerecord) >= 2.1.1-2 * rubygem(gettext_rails) - * rubygem(mongrel) >= 1.0.1 + * rubygem(thin) >= 1.2.5 * rubygem(rails) >= 2.3.2 4. Continue to Section 5 - Database setup
@@ -129,7 +129,7 @@ Next, you need to have the correct rubygems installed. If you followed the steps === Section 6 - Finishing Setup ===
You should now have everyting configured and installed to run the portal. If you followed either of the RPM instructions, you can now run: - * service deltacloud-mongrel-rails start + * service deltacloud-aggregator start * service deltacloud-taskomatic start
If you followed the development steps: @@ -141,7 +141,7 @@ Lastly, you will need one or more instances of the Deltacloud framework running
=== Getting Started ===
-For these steps, we will assume the mock driver is setup and running in a framework on http://localhost:3001/api, and your portal is running on http://localhost:3000 (this will just be http://localhost/deltacloud if you are running through apache, and can be started with 'service deltacloud-mongrel-rails start') +For these steps, we will assume the mock driver is setup and running in a framework on http://localhost:3001/api, and your portal is running on http://localhost:3000 (this will just be http://localhost/deltacloud if you are running through apache, and can be started with 'service deltacloud-aggregator start')
Taskomatic is a separate process that checks for tasks needing to be handled for portal instances. (If you installed the rpm, you can simply start the deltacloud-taskomatic service) This can be run from the commandline from the taskomatic directory with 'ruby taskomatic -n'. If you are running in development mode, you can point taskomatic there by exporting 'RAILS_ENV=development'. Taskomatic needs to be running to do things like 'start an instance'.
diff --git a/conf/deltacloud-aggregator b/conf/deltacloud-aggregator new file mode 100755 index 0000000..a3c08a0 --- /dev/null +++ b/conf/deltacloud-aggregator @@ -0,0 +1,90 @@ +#!/bin/bash +# +# +# deltacloud-aggregator startup script for deltacloud-aggregator +# +# chkconfig: - 97 03 +# description: deltacloud-aggregator is primary server process for the \ +# Deltacloud Aggregator. +# + +[ -r /etc/sysconfig/deltacloud-rails ] && . /etc/sysconfig/deltacloud-rails + +[ -r /etc/sysconfig/deltacloud-aggregator ] && . /etc/sysconfig/deltacloud-aggregator + +RAILS_ENV="${RAILS_ENV:-production}" +DELTACLOUD_DIR="${DELTACLOUD_DIR:-/usr/share/deltacloud-portal}" +THIN_LOG="${THIN_LOG:-/var/log/deltacloud-portal/thin.log}" +THIN_PID="${THIN_PID:-/var/run/deltacloud-portal/thin.pid}" +THIN_LOCKFILE="${THIN_LOCKFILE:-/var/lock/subsys/deltacloud-aggregator }" +USER="${USER:-dcloud}" +GROUP="${GROUP:-dcloud}" +PREFIX="${PREFIX:-/deltacloud}" +ADAPTER="${ADAPTER:-/rails}" + +THIN_PROG=thin +ADDR=127.0.0.1 +RETVAL=0 + +. /etc/init.d/functions + +start() { + echo -n "Starting deltacloud-aggregator: " + echo $THIN_PROG start -c $DELTACLOUD_DIR -l $THIN_LOG -P $THIN_PID \ + -a $ADDR -e $RAILS_ENV --user $USER --group $GROUP \ + -d --prefix=$PREFIX -A $ADAPTER + + $THIN_PROG start -c $DELTACLOUD_DIR -l $THIN_LOG -P $THIN_PID \ + -a $ADDR -e $RAILS_ENV --user $USER --group $GROUP \ + -d --prefix=$PREFIX + RETVAL=$? + if [ $RETVAL -eq 0 ] && touch $THIN_LOCKFILE ; then + echo_success + echo + else + echo_failure + echo + fi + +} + +stop() { + echo -n "Shutting down deltacloud-aggregator: " + $THIN_PROG stop -c $DELTACLOUD_DIR -P $THIN_PID + RETVAL=$? + if [ $RETVAL -eq 0 ] && rm -f $THIN_LOCKFILE ; then + echo_success + echo + else + echo_failure + echo + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + reload) + ;; + force-reload) + restart + ;; + status) + status $THIN_PROG + RETVAL=$? + ;; + *) + echo "Usage: deltacloud-aggregator {start|stop|restart|status}" + exit 1 + ;; +esac + +exit $RETVAL diff --git a/conf/deltacloud-aggregator.sysconf b/conf/deltacloud-aggregator.sysconf new file mode 100644 index 0000000..5c94997 --- /dev/null +++ b/conf/deltacloud-aggregator.sysconf @@ -0,0 +1,18 @@ +# root directory of the Deltacloud Aggregator Rails application +#DELTACLOUD_DIR=/usr/share/deltacloud-portal + +# location of the logfile +#THIN_LOG=/var/log/deltacloud-portal/thin.log + +# location of the lockfile +#THIN_LOCKFILE=/var/lock/subsys/deltacloud-portal + +# location of the file containing running process ID +#THIN_PID=/var/run/deltacloud-portal/thin.pid + +# user and group under which Rails application runs +#USER=dcloud +#GROUP=dcloud + +# URL prefix for Rails application +#PREFIX=/deltacloud diff --git a/conf/deltacloud-mongrel-rails b/conf/deltacloud-mongrel-rails deleted file mode 100755 index bbbc829..0000000 --- a/conf/deltacloud-mongrel-rails +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash -# -# -# deltacloud-mongrel-rails startup script for deltacloud-mongrel-rails -# -# chkconfig: - 97 03 -# description: deltacloud-mongrel-rails is an essential component of the \ -# deltacloud Portal. -# - -[ -r /etc/sysconfig/deltacloud-rails ] && . /etc/sysconfig/deltacloud-rails - -[ -r /etc/sysconfig/deltacloud-mongrel-rails ] && . /etc/sysconfig/deltacloud-mongrel-rails - -RAILS_ENV="${RAILS_ENV:-production}" -DELTACLOUD_DIR="${DELTACLOUD_DIR:-/usr/share/deltacloud-portal}" -MONGREL_LOG="${MONGREL_LOG:-/var/log/deltacloud-portal/mongrel.log}" -MONGREL_PID="${MONGREL_PID:-/var/run/deltacloud-portal/mongrel.pid}" -MONGREL_LOCKFILE="${MONGREL_LOCKFILE:-/var/lock/subsys/deltacloud-mongrel-rails }" -USER="${USER:-dcloud}" -GROUP="${GROUP:-dcloud}" -PREFIX="${PREFIX:-/deltacloud}" - -MONGREL_PROG=mongrel_rails -ADDR=127.0.0.1 -RETVAL=0 - -. /etc/init.d/functions - -start() { - echo -n "Starting deltacloud-mongrel-rails: " - - $MONGREL_PROG start -c $DELTACLOUD_DIR -l $MONGREL_LOG -P $MONGREL_PID \ - -a $ADDR -e $RAILS_ENV --user $USER --group $GROUP \ - -d --prefix=$PREFIX - RETVAL=$? - if [ $RETVAL -eq 0 ] && touch $MONGREL_LOCKFILE ; then - echo_success - echo - else - echo_failure - echo - fi - -} - -stop() { - echo -n "Shutting down deltacloud-mongrel-rails: " - $MONGREL_PROG stop -c $DELTACLOUD_DIR -P $MONGREL_PID - RETVAL=$? - if [ $RETVAL -eq 0 ] && rm -f $MONGREL_LOCKFILE ; then - echo_success - echo - else - echo_failure - echo - fi -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - reload) - ;; - force-reload) - restart - ;; - status) - status $MONGREL_PROG - RETVAL=$? - ;; - *) - echo "Usage: deltacloud-mongrel-rails {start|stop|restart|status}" - exit 1 - ;; -esac - -exit $RETVAL diff --git a/conf/deltacloud-mongrel-rails.sysconf b/conf/deltacloud-mongrel-rails.sysconf deleted file mode 100644 index 582418c..0000000 --- a/conf/deltacloud-mongrel-rails.sysconf +++ /dev/null @@ -1,18 +0,0 @@ -# root directory of the Deltacloud Portal Rails application -#OVIRT_DIR=/usr/share/deltacloud-portal - -# location of the logfile -#MONGREL_LOG=/var/log/deltacloud-portal/mongrel.log - -# location of the lockfile -#MONGREL_LOCKFILE=/var/lock/subsys/deltacloud-portal - -# location of the file containing running process ID -#MONGREL_PID=/var/run/deltacloud-portal/mongrel.pid - -# user and group under which Rails application runs -#USER=dcloud -#GROUP=dcloud - -# URL prefix for Rails application -#PREFIX=/deltacloud diff --git a/conf/deltacloud-portal.logrotate b/conf/deltacloud-portal.logrotate index ff4b390..92a494f 100644 --- a/conf/deltacloud-portal.logrotate +++ b/conf/deltacloud-portal.logrotate @@ -10,9 +10,9 @@ notifempty endscript }
-/var/log/deltacloud-portal/rails.log /var/log/deltacloud-portal/mongrel.log { +/var/log/deltacloud-portal/rails.log /var/log/deltacloud-portal/thin.log { sharedscripts postrotate - /etc/init.d/deltacloud-mongrel-rails restart + /etc/init.d/deltacloud-aggregator restart endscript } diff --git a/deltacloud-portal.spec.in b/deltacloud-portal.spec.in index 642da34..106d36a 100644 --- a/deltacloud-portal.spec.in +++ b/deltacloud-portal.spec.in @@ -16,7 +16,7 @@ Requires: ruby(abi) = 1.8 Requires: rubygem(activerecord) >= 2.1.1-2 Requires: rubygem(activeldap) >= 0.10.0 Requires: rubygem(rails) >= 2.1.1 -Requires: rubygem(mongrel) >= 1.0.1 +Requires: rubygem(thin) >= 1.2.5 %if 0%{?fedora} >= 11 Requires: rubygem(gettext_rails) %else @@ -69,14 +69,14 @@ mkdir %{buildroot} # by dcloud:dcloud. This is a temporary workaround while we've still # got root-owned daemon processes. Once we resolve that issue # these files will no longer be added explicitly here. -touch %{buildroot}%{_localstatedir}/log/%{name}/mongrel.log +touch %{buildroot}%{_localstatedir}/log/%{name}/thin.log touch %{buildroot}%{_localstatedir}/log/%{name}/rails.log touch %{buildroot}%{_localstatedir}/log/%{name}/taskomatic.log %{__install} -p -m0644 %{pbuild}/conf/%{name}.conf %{buildroot}%{_sysconfdir}/httpd/conf.d %{__install} -p -m0644 %{pbuild}/conf/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
-%{__install} -Dp -m0755 %{pbuild}/conf/deltacloud-mongrel-rails %{buildroot}%{_initrddir} -%{__install} -Dp -m0644 %{pbuild}/conf/deltacloud-mongrel-rails.sysconf %{buildroot}%{_sysconfdir}/sysconfig/deltacloud-mongrel-rails +%{__install} -Dp -m0755 %{pbuild}/conf/deltacloud-aggregator %{buildroot}%{_initrddir} +%{__install} -Dp -m0644 %{pbuild}/conf/deltacloud-aggregator.sysconf %{buildroot}%{_sysconfdir}/sysconfig/deltacloud-aggregator %{__install} -Dp -m0644 %{pbuild}/conf/deltacloud-rails.sysconf %{buildroot}%{_sysconfdir}/sysconfig/deltacloud-rails %{__install} -Dp -m0755 %{pbuild}/conf/deltacloud-taskomatic %{buildroot}%{_initrddir}
@@ -126,23 +126,23 @@ fi \ # if this is the initial RPM install, then we want to turn the new services # on; otherwise, we respect the choices the administrator already has made. # check this by seeing if each daemon is already installed -%daemon_chkconfig_post -d deltacloud-mongrel-rails +%daemon_chkconfig_post -d deltacloud-aggregator %daemon_chkconfig_post -d deltacloud-taskomatic
%preun if [ "$1" = 0 ] ; then - /sbin/service deltacloud-mongrel-rails stop > /dev/null 2>&1 + /sbin/service deltacloud-aggregator stop > /dev/null 2>&1 /sbin/service deltacloud-taskomatic stop > /dev/null 2>&1 - /sbin/chkconfig --del deltacloud-mongrel-rails + /sbin/chkconfig --del deltacloud-aggregator /sbin/chkconfig --del deltacloud-taskomatic fi
%files %defattr(-,root,root,0755) -%{_initrddir}/deltacloud-mongrel-rails +%{_initrddir}/deltacloud-aggregator %{_initrddir}/deltacloud-taskomatic %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/deltacloud-mongrel-rails +%config(noreplace) %{_sysconfdir}/sysconfig/deltacloud-aggregator %config(noreplace) %{_sysconfdir}/sysconfig/deltacloud-rails %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %doc README AUTHORS COPYING diff --git a/src/config/initializers/abstract_request.rb b/src/config/initializers/abstract_request.rb deleted file mode 100644 index 12d4378..0000000 --- a/src/config/initializers/abstract_request.rb +++ /dev/null @@ -1,20 +0,0 @@ -# This is a (hopefully) temporary workaround to help -# mongrel, since it hooks into the now-gone AbstractRequest -# class. We should test if this issue occurs with thin -# webserver, perhaps we can use that instead of mongrel -# and drop this altogether. Set only to production, otherwise -# it kills our test suite. - -config = Rails::Configuration.new -if config.environment == 'production' - module ActionController - class AbstractRequest < ActionController::Request - def self.relative_url_root=(path) - ActionController::Base.relative_url_root=(path) - end - def self.relative_url_root - ActionController::Base.relative_url_root - end - end - end -end
Conditional ACK. With the inline corrections, WFM, tested on F11. Fails as expected if you do not have the thin gem installed there.
On Thu, 2010-03-04 at 17:08 -0500, Scott Seago wrote:
This is temporarily broken on F11 unless you manually comment out the rubygem(thin) requires line and install the gem manually, as thin is not currently pushed to the F11 repo due to a missing dep.
Signed-off-by: Scott Seago sseago@redhat.com
README | 6 +- conf/deltacloud-aggregator | 90 +++++++++++++++++++++++++++ conf/deltacloud-aggregator.sysconf | 18 +++++ conf/deltacloud-mongrel-rails | 86 ------------------------- conf/deltacloud-mongrel-rails.sysconf | 18 ----- conf/deltacloud-portal.logrotate | 4 +- deltacloud-portal.spec.in | 18 +++--- src/config/initializers/abstract_request.rb | 20 ------ 8 files changed, 122 insertions(+), 138 deletions(-) create mode 100755 conf/deltacloud-aggregator create mode 100644 conf/deltacloud-aggregator.sysconf delete mode 100755 conf/deltacloud-mongrel-rails delete mode 100644 conf/deltacloud-mongrel-rails.sysconf delete mode 100644 src/config/initializers/abstract_request.rb
diff --git a/README b/README index 31d38d5..79c89fe 100644 --- a/README +++ b/README
Maybe add in here somewhere that you need deltacloud-client gem installed, since it is not an rpm yet
@@ -46,7 +46,7 @@ There are three ways you can install the portal application (though all require * rubygem(activeldap) >= 0.10.0 * rubygem(activerecord) >= 2.1.1-2 * rubygem(gettext_rails)
- rubygem(mongrel) >= 1.0.1
- rubygem(thin) >= 1.2.5
- rubygem(rails) >= 2.3.2
- Continue to Section 5 - Database setup
@@ -129,7 +129,7 @@ Next, you need to have the correct rubygems installed. If you followed the steps === Section 6 - Finishing Setup ===
You should now have everyting configured and installed to run the portal. If you followed either of the RPM instructions, you can now run:
- service deltacloud-mongrel-rails start
- service deltacloud-aggregator start
- service deltacloud-taskomatic start
If you followed the development steps: @@ -141,7 +141,7 @@ Lastly, you will need one or more instances of the Deltacloud framework running
=== Getting Started ===
-For these steps, we will assume the mock driver is setup and running in a framework on http://localhost:3001/api, and your portal is running on http://localhost:3000 (this will just be http://localhost/deltacloud if you are running through apache, and can be started with 'service deltacloud-mongrel-rails start') +For these steps, we will assume the mock driver is setup and running in a framework on http://localhost:3001/api, and your portal is running on http://localhost:3000 (this will just be http://localhost/deltacloud if you are running through apache, and can be started with 'service deltacloud-aggregator start')
Taskomatic is a separate process that checks for tasks needing to be handled for portal instances. (If you installed the rpm, you can simply start the deltacloud-taskomatic service) This can be run from the commandline from the taskomatic directory with 'ruby taskomatic -n'. If you are running in development mode, you can point taskomatic there by exporting 'RAILS_ENV=development'. Taskomatic needs to be running to do things like 'start an instance'.
diff --git a/conf/deltacloud-aggregator b/conf/deltacloud-aggregator new file mode 100755 index 0000000..a3c08a0 --- /dev/null +++ b/conf/deltacloud-aggregator @@ -0,0 +1,90 @@ +#!/bin/bash +# +# +# deltacloud-aggregator startup script for deltacloud-aggregator +# +# chkconfig: - 97 03 +# description: deltacloud-aggregator is primary server process for the \ +# Deltacloud Aggregator. +#
+[ -r /etc/sysconfig/deltacloud-rails ] && . /etc/sysconfig/deltacloud-rails
+[ -r /etc/sysconfig/deltacloud-aggregator ] && . /etc/sysconfig/deltacloud-aggregator
+RAILS_ENV="${RAILS_ENV:-production}" +DELTACLOUD_DIR="${DELTACLOUD_DIR:-/usr/share/deltacloud-portal}" +THIN_LOG="${THIN_LOG:-/var/log/deltacloud-portal/thin.log}" +THIN_PID="${THIN_PID:-/var/run/deltacloud-portal/thin.pid}" +THIN_LOCKFILE="${THIN_LOCKFILE:-/var/lock/subsys/deltacloud-aggregator }" +USER="${USER:-dcloud}" +GROUP="${GROUP:-dcloud}" +PREFIX="${PREFIX:-/deltacloud}" +ADAPTER="${ADAPTER:-/rails}"
remove '/' before rails^
+THIN_PROG=thin +ADDR=127.0.0.1 +RETVAL=0
+. /etc/init.d/functions
+start() {
- echo -n "Starting deltacloud-aggregator: "
- echo $THIN_PROG start -c $DELTACLOUD_DIR -l $THIN_LOG -P $THIN_PID \
- -a $ADDR -e $RAILS_ENV --user $USER --group $GROUP \
- -d --prefix=$PREFIX -A $ADAPTER
Remove this echo ^
- $THIN_PROG start -c $DELTACLOUD_DIR -l $THIN_LOG -P $THIN_PID \
- -a $ADDR -e $RAILS_ENV --user $USER --group $GROUP \
- -d --prefix=$PREFIX
Add -A $ADAPTER to end here ^
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && touch $THIN_LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
+}
+stop() {
- echo -n "Shutting down deltacloud-aggregator: "
- $THIN_PROG stop -c $DELTACLOUD_DIR -P $THIN_PID
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && rm -f $THIN_LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
+}
+case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- reload)
;;
- force-reload)
restart
;;
- status)
- status $THIN_PROG
- RETVAL=$?
- ;;
- *)
echo "Usage: deltacloud-aggregator {start|stop|restart|status}"
exit 1
- ;;
+esac
+exit $RETVAL diff --git a/conf/deltacloud-aggregator.sysconf b/conf/deltacloud-aggregator.sysconf new file mode 100644 index 0000000..5c94997 --- /dev/null +++ b/conf/deltacloud-aggregator.sysconf @@ -0,0 +1,18 @@ +# root directory of the Deltacloud Aggregator Rails application +#DELTACLOUD_DIR=/usr/share/deltacloud-portal
+# location of the logfile +#THIN_LOG=/var/log/deltacloud-portal/thin.log
+# location of the lockfile +#THIN_LOCKFILE=/var/lock/subsys/deltacloud-portal
+# location of the file containing running process ID +#THIN_PID=/var/run/deltacloud-portal/thin.pid
+# user and group under which Rails application runs +#USER=dcloud +#GROUP=dcloud
+# URL prefix for Rails application +#PREFIX=/deltacloud diff --git a/conf/deltacloud-mongrel-rails b/conf/deltacloud-mongrel-rails deleted file mode 100755 index bbbc829..0000000 --- a/conf/deltacloud-mongrel-rails +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash -# -# -# deltacloud-mongrel-rails startup script for deltacloud-mongrel-rails -# -# chkconfig: - 97 03 -# description: deltacloud-mongrel-rails is an essential component of the \ -# deltacloud Portal. -#
-[ -r /etc/sysconfig/deltacloud-rails ] && . /etc/sysconfig/deltacloud-rails
-[ -r /etc/sysconfig/deltacloud-mongrel-rails ] && . /etc/sysconfig/deltacloud-mongrel-rails
-RAILS_ENV="${RAILS_ENV:-production}" -DELTACLOUD_DIR="${DELTACLOUD_DIR:-/usr/share/deltacloud-portal}" -MONGREL_LOG="${MONGREL_LOG:-/var/log/deltacloud-portal/mongrel.log}" -MONGREL_PID="${MONGREL_PID:-/var/run/deltacloud-portal/mongrel.pid}" -MONGREL_LOCKFILE="${MONGREL_LOCKFILE:-/var/lock/subsys/deltacloud-mongrel-rails }" -USER="${USER:-dcloud}" -GROUP="${GROUP:-dcloud}" -PREFIX="${PREFIX:-/deltacloud}"
-MONGREL_PROG=mongrel_rails -ADDR=127.0.0.1 -RETVAL=0
-. /etc/init.d/functions
-start() {
- echo -n "Starting deltacloud-mongrel-rails: "
- $MONGREL_PROG start -c $DELTACLOUD_DIR -l $MONGREL_LOG -P $MONGREL_PID \
- -a $ADDR -e $RAILS_ENV --user $USER --group $GROUP \
- -d --prefix=$PREFIX
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && touch $MONGREL_LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
-}
-stop() {
- echo -n "Shutting down deltacloud-mongrel-rails: "
- $MONGREL_PROG stop -c $DELTACLOUD_DIR -P $MONGREL_PID
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && rm -f $MONGREL_LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
-}
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- reload)
;;
- force-reload)
restart
;;
- status)
- status $MONGREL_PROG
- RETVAL=$?
- ;;
- *)
echo "Usage: deltacloud-mongrel-rails {start|stop|restart|status}"
exit 1
- ;;
-esac
-exit $RETVAL diff --git a/conf/deltacloud-mongrel-rails.sysconf b/conf/deltacloud-mongrel-rails.sysconf deleted file mode 100644 index 582418c..0000000 --- a/conf/deltacloud-mongrel-rails.sysconf +++ /dev/null @@ -1,18 +0,0 @@ -# root directory of the Deltacloud Portal Rails application -#OVIRT_DIR=/usr/share/deltacloud-portal
-# location of the logfile -#MONGREL_LOG=/var/log/deltacloud-portal/mongrel.log
-# location of the lockfile -#MONGREL_LOCKFILE=/var/lock/subsys/deltacloud-portal
-# location of the file containing running process ID -#MONGREL_PID=/var/run/deltacloud-portal/mongrel.pid
-# user and group under which Rails application runs -#USER=dcloud -#GROUP=dcloud
-# URL prefix for Rails application -#PREFIX=/deltacloud diff --git a/conf/deltacloud-portal.logrotate b/conf/deltacloud-portal.logrotate index ff4b390..92a494f 100644 --- a/conf/deltacloud-portal.logrotate +++ b/conf/deltacloud-portal.logrotate @@ -10,9 +10,9 @@ notifempty endscript }
-/var/log/deltacloud-portal/rails.log /var/log/deltacloud-portal/mongrel.log { +/var/log/deltacloud-portal/rails.log /var/log/deltacloud-portal/thin.log { sharedscripts postrotate
/etc/init.d/deltacloud-mongrel-rails restart
endscript/etc/init.d/deltacloud-aggregator restart
} diff --git a/deltacloud-portal.spec.in b/deltacloud-portal.spec.in index 642da34..106d36a 100644 --- a/deltacloud-portal.spec.in +++ b/deltacloud-portal.spec.in @@ -16,7 +16,7 @@ Requires: ruby(abi) = 1.8 Requires: rubygem(activerecord) >= 2.1.1-2 Requires: rubygem(activeldap) >= 0.10.0 Requires: rubygem(rails) >= 2.1.1 -Requires: rubygem(mongrel) >= 1.0.1 +Requires: rubygem(thin) >= 1.2.5 %if 0%{?fedora} >= 11 Requires: rubygem(gettext_rails) %else @@ -69,14 +69,14 @@ mkdir %{buildroot} # by dcloud:dcloud. This is a temporary workaround while we've still # got root-owned daemon processes. Once we resolve that issue # these files will no longer be added explicitly here. -touch %{buildroot}%{_localstatedir}/log/%{name}/mongrel.log +touch %{buildroot}%{_localstatedir}/log/%{name}/thin.log touch %{buildroot}%{_localstatedir}/log/%{name}/rails.log touch %{buildroot}%{_localstatedir}/log/%{name}/taskomatic.log %{__install} -p -m0644 %{pbuild}/conf/%{name}.conf %{buildroot}%{_sysconfdir}/httpd/conf.d %{__install} -p -m0644 %{pbuild}/conf/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
-%{__install} -Dp -m0755 %{pbuild}/conf/deltacloud-mongrel-rails %{buildroot}%{_initrddir} -%{__install} -Dp -m0644 %{pbuild}/conf/deltacloud-mongrel-rails.sysconf %{buildroot}%{_sysconfdir}/sysconfig/deltacloud-mongrel-rails +%{__install} -Dp -m0755 %{pbuild}/conf/deltacloud-aggregator %{buildroot}%{_initrddir} +%{__install} -Dp -m0644 %{pbuild}/conf/deltacloud-aggregator.sysconf %{buildroot}%{_sysconfdir}/sysconfig/deltacloud-aggregator %{__install} -Dp -m0644 %{pbuild}/conf/deltacloud-rails.sysconf %{buildroot}%{_sysconfdir}/sysconfig/deltacloud-rails %{__install} -Dp -m0755 %{pbuild}/conf/deltacloud-taskomatic %{buildroot}%{_initrddir}
@@ -126,23 +126,23 @@ fi \ # if this is the initial RPM install, then we want to turn the new services # on; otherwise, we respect the choices the administrator already has made. # check this by seeing if each daemon is already installed -%daemon_chkconfig_post -d deltacloud-mongrel-rails +%daemon_chkconfig_post -d deltacloud-aggregator %daemon_chkconfig_post -d deltacloud-taskomatic
%preun if [ "$1" = 0 ] ; then
- /sbin/service deltacloud-mongrel-rails stop > /dev/null 2>&1
- /sbin/service deltacloud-aggregator stop > /dev/null 2>&1 /sbin/service deltacloud-taskomatic stop > /dev/null 2>&1
- /sbin/chkconfig --del deltacloud-mongrel-rails
- /sbin/chkconfig --del deltacloud-aggregator /sbin/chkconfig --del deltacloud-taskomatic
fi
%files %defattr(-,root,root,0755) -%{_initrddir}/deltacloud-mongrel-rails +%{_initrddir}/deltacloud-aggregator %{_initrddir}/deltacloud-taskomatic %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/deltacloud-mongrel-rails +%config(noreplace) %{_sysconfdir}/sysconfig/deltacloud-aggregator %config(noreplace) %{_sysconfdir}/sysconfig/deltacloud-rails %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %doc README AUTHORS COPYING diff --git a/src/config/initializers/abstract_request.rb b/src/config/initializers/abstract_request.rb deleted file mode 100644 index 12d4378..0000000 --- a/src/config/initializers/abstract_request.rb +++ /dev/null @@ -1,20 +0,0 @@ -# This is a (hopefully) temporary workaround to help -# mongrel, since it hooks into the now-gone AbstractRequest -# class. We should test if this issue occurs with thin -# webserver, perhaps we can use that instead of mongrel -# and drop this altogether. Set only to production, otherwise -# it kills our test suite.
-config = Rails::Configuration.new -if config.environment == 'production'
- module ActionController
- class AbstractRequest < ActionController::Request
def self.relative_url_root=(path)
ActionController::Base.relative_url_root=(path)
end
def self.relative_url_root
ActionController::Base.relative_url_root
end
- end
- end
-end
deltacloud-devel@lists.fedorahosted.org