|
How to setup a server to follow development?
|
| Author |
Message |
ispcomm
Junior Member

Posts: 29
Group: Registered
Joined: Apr 2008
Status:
Offline
Reputation: 1
|
How to setup a server to follow development?
I would like to follow development of ispcp on a test server (debian).
I am wondering what would be the best setup to be able to "svn update" my local tree and test slight mods in "real time".
Currently I have to svn update then make install and then go trough the "perl ispcp-update" script that takes ages.
There must be a simpler and more direct way, specially for small daily updates where ispcp-update really is not updating from an "old" version but from "yesterday".
I would like to get an idea on how you devs have solved this problem. Do you work in /var/www/ispcp (and have your repository there) or do you copy every changed file over and over to /var/www.... perhaps I'm missing something obvious.
ispcomm
PS: Yes... i like to tweak things around and I want to understand how development works in ispcp so I can fix myself out if I need to ;-)
|
|
| 05-04-2008 04:45 AM |
|
 |
ispcomm
Junior Member

Posts: 29
Group: Registered
Joined: Apr 2008
Status:
Offline
Reputation: 1
|
RE: How to setup a server to follow development?
Nobody has any ideas? Weird
|
|
| 05-07-2008 12:31 AM |
|
 |
gOOvER
Documentation Team
  
Posts: 1,128
Group: Docu Team
Joined: Jul 2007
Status:
Away
Reputation: 11
|
RE: How to setup a server to follow development?
There is an HowTo in the Wiki. With this it should possible to upgrade from nightly to nightly. But all changes in the configs /etc you have to update it manually. You have to read the changelog in the Timeline, to see what has changed.
OS : Debian 4.0 Etch 64bit
ispCP Version : RC5 r1123 - 23.04.08
Activated : AWStats dynamic
Mods : none
-> This Signature is OpenSource <-
|
|
| 05-07-2008 12:36 AM |
|
 |
ispcomm
Junior Member

Posts: 29
Group: Registered
Joined: Apr 2008
Status:
Offline
Reputation: 1
|
RE: How to setup a server to follow development?
|
|
| 05-07-2008 01:24 AM |
|
 |
ispcomm
Junior Member

Posts: 29
Group: Registered
Joined: Apr 2008
Status:
Offline
Reputation: 1
|
RE: How to setup a server to follow development?
Being a lazy programmer I made a script to automate nightly updates. It's little more than cut and paste from the wiki, but I think it might be usefull for somebody. Use it and mod it to your liking ;-)
Run it from the ispcp root directory (that would be the "trunk" dir in case you're following trunk).
Updated: version 0.0.1, including a proper license an credits. Very alpha but seems to work.
#!/bin/sh
#
# ispcp-nightly-update
# Version: 0.0.1
# License: GPL
# Author : ispcomm
# Credits: ispcp development team
# Variables
BACKUPDIR="/var/www/backup"
WWWDIR="/var/www"
ISPCPDIR="${WWWDIR}/ispcp/"
REBUILD_SITES="yes"
# Backup current installation
mkdir -p ${BACKUPDIR}
pushd ${BACKUPDIR}
tar czpf "ispcp_backup-`date +'%Y-%m-%d %H-%M-%S'`.tar.gz" ../ispcp/
cp ../ispcp/engine/ispcp-db-keys.pl .
cp ../ispcp/gui/include/ispcp-db-keys.php .
cp ../ispcp/gui/tools/pma/config.inc.php .
popd
# Compile ispcp. Install will copy files to /tmp/ispcp
make clean install
# Update current installation
/etc/init.d/ispcp_daemon stop
pushd /tmp/ispcp${WWWDIR}
cp -R ispcp/ ${WWWDIR}
find ${ISPCPDIR} -type d -name '.svn' -exec rm -fr '{}' \;
cd ${BACKUPDIR}
cp ispcp-db-keys.pl ../ispcp/engine/
cp ispcp-db-keys.pl ../ispcp/engine/messager/
cp ispcp-db-keys.php ../ispcp/gui/include/
cp config.inc.php ../ispcp/gui/tools/pma/
cd ../ispcp/engine/setup/
./set-engine-permissions.sh
./set-gui-permissions.sh
if [ $REBUILD_SITES == "yes" ] ; then
# Some old releases require this. not necessary for current ones.
#DELETE FROM config WHERE name = 'DATABASE_REVISION';
cat <<EOF | mysql -uroot -p ispcp
UPDATE mail_users SET status='toadd' where status='ok';
UPDATE domain SET domain_status = 'change' WHERE domain_status = 'ok';
UPDATE domain_aliasses SET alias_status = 'change' WHERE alias_status = 'ok';
UPDATE subdomain SET subdomain_status = 'change' WHERE subdomain_status = 'ok';
EOF
${ISPCPDIR}/engine/ispcp-rqst-mngr
fi
/etc/init.d/ispcp_daemon start
rm -fR /tmp/ispcp
popd
ispcomm
This post was last modified: Yesterday 02:46 AM by ispcomm.
|
|
| 05-10-2008 12:20 AM |
|
 |
mr.x
Junior Member
   
Posts: 15
Group: Dev Team
Joined: Nov 2006
Status:
Offline
Reputation: 0
|
RE: How to setup a server to follow development?
Hi ispcomm,
thanks for your script. It looks very nice.
Mr.X
|
|
| 05-10-2008 01:25 AM |
|
 |
gOOvER
Documentation Team
  
Posts: 1,128
Group: Docu Team
Joined: Jul 2007
Status:
Away
Reputation: 11
|
RE: How to setup a server to follow development?
thanks for that script. I will test it at the Weekend. Maybe we can "tune" it.
OS : Debian 4.0 Etch 64bit
ispCP Version : RC5 r1123 - 23.04.08
Activated : AWStats dynamic
Mods : none
-> This Signature is OpenSource <-
|
|
| 05-10-2008 03:33 AM |
|
 |
blocker
Junior Member

Posts: 63
Group: Registered
Joined: Apr 2007
Status:
Offline
Reputation: 1
|
RE: How to setup a server to follow development?
since svn 1134, freebsd distro have a little capability to detect if system already installed with ispcp, may be this can be merge to other distro
BSDmakefile
=-=-=-=-=-=
... cut ...
.if exists ($(SYSTEM_WEB)/ispcp/engine/ispcp-db-keys.pl)
#
# Previous database key detected, assuming being perform Upgrade Procedure
#
cp $(SYSTEM_WEB)/ispcp/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/
cp $(SYSTEM_WEB)/ispcp/engine/messager/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/
cp $(SYSTEM_WEB)/ispcp/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/gui/include/
cp $(SYSTEM_WEB)/ispcp/gui/tools/pma/config.inc.php $(SYSTEM_ROOT)/gui/tools/pma/
.endif
.. cut ..
OS: FreeBSD 7.0, 6.3, 6.2 - ISPCP Omega Dev. Version =T-W-S= Blocker
This post was last modified: 05-10-2008 11:34 AM by blocker.
|
|
| 05-10-2008 11:28 AM |
|
 |
BioALIEN
Junior Member
 
Posts: 203
Group: Graph Team
Joined: Feb 2007
Status:
Offline
Reputation: 0
|
RE: How to setup a server to follow development?
Can someone test and confirm this works. It would make life so much easier if us testers can keep up with Nightly builds. I know BeNe would love this for his Demo server.
BioALIEN
OS: Debian 4.0 Etch
ispCP Build: RC3 r953 - 28.12.07
Mods: AWStats dynamic
|
|
| 05-11-2008 07:30 AM |
|
 |
sci2tech
Junior Member

Posts: 18
Group: Registered
Joined: Jan 2007
Status:
Offline
Reputation: 0
|
RE: How to setup a server to follow development?
I`ve tested and it worked for me. But if you are using svn you should remove all folder named .svn copied by line
cp -R ispcp/ /var/www/
(it`s not a good ideea to expose php code even if there are not any confidential data: passwords to database). Maybe you can add a
rm -r `find -iname .svn`
.
Second, none of template file are copied in /etc. (i think that files from ../parts are mandatory.
Anyway, great tools.
|
|
| 05-11-2008 06:57 PM |
|
 |
|
|