Current time: 12-24-2024, 09:15 AM Hello There, Guest! (LoginRegister)


Post Reply 
How to setup a server to follow development?
Author Message
ispcomm Offline
Junior Member
*

Posts: 93
Joined: Apr 2008
Reputation: 3
Post: #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
Find all posts by this user Quote this message in a reply
ispcomm Offline
Junior Member
*

Posts: 93
Joined: Apr 2008
Reputation: 3
Post: #2
RE: How to setup a server to follow development?
Nobody has any ideas? Weird
05-07-2008 12:31 AM
Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #3
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.
05-07-2008 12:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ispcomm Offline
Junior Member
*

Posts: 93
Joined: Apr 2008
Reputation: 3
Post: #4
RE: How to setup a server to follow development?
Thanks for replying. It took me long time after your post to actually find it (it's burried in the upgrade section here: http://www.isp-control.net/documentation...de/nightly )

I've been looking everywhere but not there Sad

Thanks
ispcomm
05-07-2008 01:24 AM
Find all posts by this user Quote this message in a reply
ispcomm Offline
Junior Member
*

Posts: 93
Joined: Apr 2008
Reputation: 3
Post: #5
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.
Code:
#!/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: 05-12-2008 02:46 AM by ispcomm.)
05-10-2008 12:20 AM
Find all posts by this user Quote this message in a reply
mr.x Offline
Development Team
*****
Dev Team

Posts: 232
Joined: Nov 2006
Reputation: 3
Post: #6
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
Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #7
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. Smile
05-10-2008 03:33 AM
Visit this user's website Find all posts by this user Quote this message in a reply
blocker Offline
Junior Member
*

Posts: 123
Joined: Apr 2007
Reputation: 2
Post: #8
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 ..
(This post was last modified: 05-10-2008 11:34 AM by blocker.)
05-10-2008 11:28 AM
Find all posts by this user Quote this message in a reply
BioALIEN Offline
Public Relations Officer
*****
Dev Team

Posts: 620
Joined: Feb 2007
Reputation: 5
Post: #9
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.
05-11-2008 07:30 AM
Find all posts by this user Quote this message in a reply
sci2tech Away
Senior Member
****

Posts: 1,285
Joined: Jan 2007
Reputation: 23
Post: #10
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
Quote: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
Quote: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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 7 Guest(s)