mirror of https://gitee.com/bigwinds/arangodb
packetize updates
This commit is contained in:
parent
8e531dfbc8
commit
6bf21ef153
|
@ -1,11 +1,22 @@
|
||||||
[server]
|
[server]
|
||||||
http-port = localhost:8529
|
http-port = localhost:8529
|
||||||
admin-port = localhost:8530
|
admin-port = localhost:8530
|
||||||
|
admin-directory= @STATICFILES@/html/admin
|
||||||
|
|
||||||
[action]
|
[action]
|
||||||
|
system-directory= @STATICFILES@/js/actions/system
|
||||||
threads = 4
|
threads = 4
|
||||||
|
|
||||||
[log]
|
[log]
|
||||||
level = info
|
level = info
|
||||||
severity = human
|
severity = human
|
||||||
file = /var/log/voc/arango.log
|
file = @LOGDIR@/arango.log
|
||||||
|
|
||||||
|
[database]
|
||||||
|
directory= @DATABASE@
|
||||||
|
# maximal-journal-size=33554432
|
||||||
|
# remove-on-drop=true
|
||||||
|
|
||||||
|
[startup]
|
||||||
|
# directory =
|
||||||
|
modules-path = @STATICFILES@/js/server/modules;@STATICFILES@/js/common/modules
|
||||||
|
|
|
@ -23,25 +23,30 @@ $release=${arangodb_release}
|
||||||
## File List
|
## File List
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
d 0755 ${susr} ${sgrp} /etc/voc -
|
d 0755 ${susr} ${sgrp} /etc/arangodb -
|
||||||
d 0755 ${susr} ${sgrp} /etc/voc/${vers_dir} -
|
d 0755 ${susr} ${sgrp} /etc/arangodb/${vers_dir} -
|
||||||
f 0644 ${susr} ${sgrp} /etc/voc/${vers_dir}/arango.conf.template ${project_dir}/Installation/arango.conf
|
f 0644 ${susr} ${sgrp} /etc/arangodb/${vers_dir}/arango.conf.template ${project_dir}/Installation/arango.conf
|
||||||
|
|
||||||
f 0755 ${susr} ${sgrp} ${bindir}/arangod-${arangodb_version} ${project_dir}/arangod
|
f 0755 ${susr} ${sgrp} ${bindir}/arangod-${arangodb_version} ${project_dir}/arangod
|
||||||
|
l 000 ${rusr} ${rgrp} ${bindir}/arangod ${bindir}/arangod-${arangodb_version}
|
||||||
|
|
||||||
d 0755 ${rusr} ${rgrp} ${datadir}/voc -
|
# database directory
|
||||||
d 0755 ${susr} ${sgrp} ${datadir}/voc/${vers_dir} -
|
d 0755 ${rusr} ${rgrp} ${data_dir} -
|
||||||
d 0755 ${susr} ${sgrp} ${datadir}/voc/${vers_dir}/js -
|
d 0755 ${susr} ${sgrp} ${data_dir}/arango -
|
||||||
d 0755 ${susr} ${sgrp} ${datadir}/voc/${vers_dir}/js/modules -
|
|
||||||
d 0755 ${susr} ${sgrp} ${datadir}/voc/${vers_dir}/js/system -
|
|
||||||
d 0755 ${susr} ${sgrp} ${datadir}/voc/${vers_dir}/html -
|
|
||||||
d 0755 ${susr} ${sgrp} ${datadir}/voc/${vers_dir}/html/admin -
|
|
||||||
|
|
||||||
d 0755 ${susr} ${sgrp} /var/lib/arango -
|
# static files
|
||||||
d 0755 ${rusr} ${rgrp} /var/run/voc -
|
d 0755 ${susr} ${sgrp} ${static_dir} -
|
||||||
d 0755 ${susr} ${sgrp} /var/run/voc/${vers_dir}/ -
|
d 0755 ${susr} ${sgrp} ${static_dir}/js -
|
||||||
d 0755 ${rusr} ${rgrp} /var/log/voc -
|
d 0755 ${susr} ${sgrp} ${static_dir}/html -
|
||||||
d 0755 ${susr} ${sgrp} /var/log/voc/${vers_dir}/ -
|
|
||||||
|
# ????
|
||||||
|
# d 0755 ${susr} ${sgrp} /var/lib/arango -
|
||||||
|
|
||||||
|
# PID file directory
|
||||||
|
d 0755 ${susr} ${sgrp} /var/run/arangod -
|
||||||
|
|
||||||
|
# logfile directory
|
||||||
|
d 0755 ${rusr} ${rgrp} /var/log/arangodb -
|
||||||
|
|
||||||
%include ${project_dir}/Installation/arangodb.sublist
|
%include ${project_dir}/Installation/arangodb.sublist
|
||||||
|
|
||||||
|
@ -50,14 +55,14 @@ d 0755 ${susr} ${sgrp} /var/log/voc/${vers_dir}/ -
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
%postinstall <<EOF
|
%postinstall <<EOF
|
||||||
sed -e 's%@LOGDIR@%/var/log/voc/${vers_dir}%g' -e 's%@DATADIR@%${datadir}/voc/${vers_dir}%' -e 's%@DATABASE@%/var/lib/arango%g' /etc/voc/${vers_dir}/arango.conf.template > /etc/voc/${vers_dir}/arango.conf
|
sed -e 's%@LOGDIR@%/var/log/arangodb%g' -e 's%@DATABASE@%${data_dir}/arango%g' -e 's%@STATICFILES@%${static_dir}/arango%g' /etc/arangodb/${vers_dir}/arango.conf.template > /etc/arango.conf
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
%ifdef macosx
|
%ifdef macosx
|
||||||
d 0755 ${rusr} ${rgrp} /Library/LaunchDaemons/ -
|
d 0755 ${rusr} ${rgrp} /Library/LaunchDaemons/ -
|
||||||
f 0755 ${rusr} ${rgrp} /Library/LaunchDaemons/de.triagens.arango.plist.template ${project_dir}/Installation/MacOSX/MacPorts/org.arangodb.plist
|
f 0755 ${rusr} ${rgrp} /Library/LaunchDaemons/de.triagens.arango.plist.template ${project_dir}/Installation/org.arangodb.plist
|
||||||
%postinstall <<EOF
|
%postinstall <<EOF
|
||||||
sed -e 's%@BINARY@%${bindir}/arango-${version}%g' -e 's%@CONFIGDIR@%/etc/voc/${vers_dir}/%g' /Library/LaunchDaemons/de.triagens.arango.plist.template > /Library/LaunchDaemons/de.triagens.arango.plist
|
sed -e 's%@BINARY@%${bindir}/arango-${version}%g' -e 's%@CONFIGDIR@%/etc%g' /Library/LaunchDaemons/de.triagens.arango.plist.template > /Library/LaunchDaemons/de.triagens.arango.plist
|
||||||
launchctl unload /Library/LaunchDaemons/de.triagens.arango.plist
|
launchctl unload /Library/LaunchDaemons/de.triagens.arango.plist
|
||||||
launchctl load /Library/LaunchDaemons/de.triagens.arango.plist
|
launchctl load /Library/LaunchDaemons/de.triagens.arango.plist
|
||||||
launchctl start de.triagens.arango
|
launchctl start de.triagens.arango
|
||||||
|
@ -71,7 +76,7 @@ EOF
|
||||||
%else
|
%else
|
||||||
%preinstall <<EOF
|
%preinstall <<EOF
|
||||||
getent group arango >/dev/null || groupadd -r arango
|
getent group arango >/dev/null || groupadd -r arango
|
||||||
getent passwd arango >/dev/null || useradd -r -g arango -d /usr/share/arango -s /bin/false -c "ArangoDB Application User" arango
|
getent passwd arango >/dev/null || useradd -r -g arango -d ${static_dir} -s /bin/false -c "ArangoDB Application User" arango
|
||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -90,4 +95,4 @@ EOF
|
||||||
|
|
||||||
%system linux
|
%system linux
|
||||||
i 0755 ${rusr} ${rgrp} arango ${project_dir}/Installation/${START_SCRIPT} ${runlevels}
|
i 0755 ${rusr} ${rgrp} arango ${project_dir}/Installation/${START_SCRIPT} ${runlevels}
|
||||||
# l 000 ${rusr} ${rgrp} ${bindir}/rcarango /etc/init.d/arango
|
l 000 ${rusr} ${rgrp} ${bindir}/rcarango /etc/init.d/arango
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Disabled</key>
|
||||||
|
<false/>
|
||||||
|
|
||||||
|
<key>Label</key>
|
||||||
|
<string>org.arangodb</string>
|
||||||
|
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>@BINARY@</string>
|
||||||
|
<string>-c</string>
|
||||||
|
<string>@CONFIGDIR@/arango.conf</string>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<key>UserName</key>
|
||||||
|
<string>arango</string>
|
||||||
|
|
||||||
|
<key>GroupName</key>
|
||||||
|
<string>arango</string>
|
||||||
|
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1,145 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Copyright (c) 2011-2012 triAGENS GmbH Cologne, Germany.
|
||||||
|
#
|
||||||
|
# Author: Achim Brandt <a.brandt@triagens.de>
|
||||||
|
#
|
||||||
|
# /etc/init.d/arango
|
||||||
|
#
|
||||||
|
# and symbolic its link
|
||||||
|
#
|
||||||
|
# /usr/sbin/rcarango
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: arangod
|
||||||
|
# Required-Start: $network
|
||||||
|
# Required-Stop: $network
|
||||||
|
# Default-Start: 3 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
# Description: Start the session voc daemon
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
ARANGO_BIN=/usr/sbin/arangod
|
||||||
|
test -x $ARANGO_BIN || exit 5
|
||||||
|
|
||||||
|
ARANGO_SYSCONFIG=/etc/arango.conf
|
||||||
|
test -r $ARANGO_SYSCONFIG || exit 6
|
||||||
|
|
||||||
|
|
||||||
|
ARANGO_PIDFILE=/var/run/arangod/pid
|
||||||
|
|
||||||
|
. /etc/rc.status
|
||||||
|
|
||||||
|
# Shell functions sourced from /etc/rc.status:
|
||||||
|
# rc_check check and set local and overall rc status
|
||||||
|
# rc_status check and set local and overall rc status
|
||||||
|
# rc_status -v ditto but be verbose in local rc status
|
||||||
|
# rc_status -v -r ditto and clear the local rc status
|
||||||
|
# rc_failed set local and overall rc status to failed
|
||||||
|
# rc_reset clear local rc status (overall remains)
|
||||||
|
# rc_exit exit appropriate to overall rc status
|
||||||
|
|
||||||
|
# First reset status of this service
|
||||||
|
rc_reset
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Start daemon with startproc(8). If this fails
|
||||||
|
## the echo return value is set appropriate.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
start)
|
||||||
|
echo -n "Starting ARANGO daemon"
|
||||||
|
|
||||||
|
$ARANGO_BIN -c $ARANGO_SYSCONFIG --pid-file "$ARANGO_PIDFILE" --supervisor --uid arango
|
||||||
|
|
||||||
|
# Remember status and be verbose
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Stop daemon with killproc(8) and if this fails
|
||||||
|
## set echo the echo return value.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
stop)
|
||||||
|
echo -n "Shutting down ARANGO daemon"
|
||||||
|
|
||||||
|
killproc -p $ARANGO_PIDFILE -TERM $ARANGO_BIN
|
||||||
|
|
||||||
|
# Remember status and be verbose
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Stop the service and if this succeeds (i.e. the
|
||||||
|
## service was running before), start it again.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
try-restart)
|
||||||
|
$0 status >/dev/null && $0 restart
|
||||||
|
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Stop the service and regardless of whether it was
|
||||||
|
## running or not, start it again.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Signal the daemon to reload its config. Most daemons
|
||||||
|
## do this on signal 1 (SIGHUP).
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
force-reload|reload)
|
||||||
|
echo -n "Reload service ARANGO"
|
||||||
|
|
||||||
|
echo "reload is currently not supported"
|
||||||
|
|
||||||
|
rc_status -v
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Check status with checkproc(8), if process is running
|
||||||
|
## checkproc will return with exit status 0.
|
||||||
|
## Status has a slightly different for the status command:
|
||||||
|
##
|
||||||
|
## 0 - service running
|
||||||
|
## 1 - service dead, but /var/run/ pid file exists
|
||||||
|
## 2 - service dead, but /var/lock/ lock file exists
|
||||||
|
## 3 - service not running
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
status)
|
||||||
|
echo -n "Checking for service ARANGO "
|
||||||
|
|
||||||
|
checkproc -p $ARANGO_PIDFILE $ARANGO_BIN
|
||||||
|
|
||||||
|
rc_status -v
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## print usage message
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|status|try-restart|restart}"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rc_exit
|
26
packetize.sh
26
packetize.sh
|
@ -15,8 +15,14 @@ sgrp=arango
|
||||||
package_type=""
|
package_type=""
|
||||||
product_name="arangodb"
|
product_name="arangodb"
|
||||||
project_name="arangodb"
|
project_name="arangodb"
|
||||||
|
runlevels="runlevel(035)"
|
||||||
|
|
||||||
|
|
||||||
|
# name of the epm configuration file
|
||||||
LIST="Installation/${project_name}.list"
|
LIST="Installation/${project_name}.list"
|
||||||
|
# name of a created epm include file
|
||||||
SUBLIST="Installation/${project_name}.sublist"
|
SUBLIST="Installation/${project_name}.sublist"
|
||||||
|
|
||||||
START_SCRIPT="";
|
START_SCRIPT="";
|
||||||
|
|
||||||
arangodb_version=`cat VERSION | awk -F"." '{print $1 "." $2}'`
|
arangodb_version=`cat VERSION | awk -F"." '{print $1 "." $2}'`
|
||||||
|
@ -29,9 +35,9 @@ osvers=`uname -r | awk -F"." '{print $1 "." $2}'`
|
||||||
prefix=/usr
|
prefix=/usr
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
bindir=${exec_prefix}/sbin
|
bindir=${exec_prefix}/sbin
|
||||||
datadir=${prefix}/share
|
data_dir=${prefix}/var
|
||||||
|
static_dir=${prefix}/share
|
||||||
vers_dir=arango-${arangodb_version}
|
vers_dir=arango-${arangodb_version}
|
||||||
runlevels="runlevel(035)"
|
|
||||||
docdir=${prefix}/share/doc/voc/${vers_dir}
|
docdir=${prefix}/share/doc/voc/${vers_dir}
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,20 +150,20 @@ export EPM_RPM_OPTION
|
||||||
test -f ${SUBLIST} && rm -f ${SUBLIST}
|
test -f ${SUBLIST} && rm -f ${SUBLIST}
|
||||||
touch ${SUBLIST}
|
touch ${SUBLIST}
|
||||||
|
|
||||||
share_base=/usr/share/voc/arangodb-${arangodb_version}
|
share_base=${static_dir}/arango
|
||||||
sfolder_name=$(pwd)
|
sfolder_name=$(pwd)
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "########################################################"
|
echo "########################################################"
|
||||||
echo "Call mkepmlist to create a sublist"
|
echo "Call mkepmlist to create a sublist"
|
||||||
|
|
||||||
for dir in modules modules/jsunity system; do
|
for dir in js/server/modules js/common/modules js/actions/system js/client js/common/bootstrap; do
|
||||||
echo " mkepmlist -u ${susr} -g ${sgrp} --prefix ${share_base}/js ${sfolder_name}/js/${dir}/*.js >> ${SUBLIST}"
|
echo " mkepmlist -u ${susr} -g ${sgrp} --prefix ${share_base}/${dir} ${sfolder_name}/${dir}/*.js >> ${SUBLIST}"
|
||||||
mkepmlist -u ${susr} -g ${sgrp} --prefix ${share_base}/js ${sfolder_name}/js/${dir}/*.js > ${SUBLIST}
|
mkepmlist -u ${susr} -g ${sgrp} --prefix ${share_base}/${dir} ${sfolder_name}/${dir}/*.js >> ${SUBLIST}
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Call mkepmlist to create a sublist"
|
echo "Call mkepmlist to create a sublist"
|
||||||
for dir in . css css/images images script; do
|
for dir in . css css/images media media/icons media/images js js/modules; do
|
||||||
for typ in css html js png gif ico; do
|
for typ in css html js png gif ico; do
|
||||||
FILES=${sfolder_name}/html/admin/${dir}/*.${typ}
|
FILES=${sfolder_name}/html/admin/${dir}/*.${typ}
|
||||||
|
|
||||||
|
@ -189,7 +195,8 @@ echo " export sgrp=$sgrp"
|
||||||
echo " export prefix=$prefix"
|
echo " export prefix=$prefix"
|
||||||
echo " export exec_prefix=$exec_prefix"
|
echo " export exec_prefix=$exec_prefix"
|
||||||
echo " export bindir=$bindir"
|
echo " export bindir=$bindir"
|
||||||
echo " export datadir=$datadir"
|
echo " export data_dir=$data_dir"
|
||||||
|
echo " export static_dir=$static_dir"
|
||||||
echo " export vers_dir=$vers_dir"
|
echo " export vers_dir=$vers_dir"
|
||||||
echo " export START_SCRIPT=$START_SCRIPT"
|
echo " export START_SCRIPT=$START_SCRIPT"
|
||||||
echo " export runlevels=$runlevels"
|
echo " export runlevels=$runlevels"
|
||||||
|
@ -207,7 +214,8 @@ export sgrp
|
||||||
export prefix
|
export prefix
|
||||||
export exec_prefix
|
export exec_prefix
|
||||||
export bindir
|
export bindir
|
||||||
export datadir
|
export data_dir
|
||||||
|
export static_dir
|
||||||
export vers_dir
|
export vers_dir
|
||||||
export START_SCRIPT
|
export START_SCRIPT
|
||||||
export runlevels
|
export runlevels
|
||||||
|
|
Loading…
Reference in New Issue