[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.51
Holger Levsen
holger at layer-acht.org
Wed May 15 10:10:06 UTC 2013
The following commit has been merged in the master branch:
commit 917d475ed991b92d7d2a8ca5fd3365fa40f001c9
Author: Holger Levsen <holger at layer-acht.org>
Date: Sun May 12 23:02:58 2013 +0200
Update scripts to handle installation from git on pejacevic and slave
diff --git a/README_piatti.txt b/README_pejacevic.txt
similarity index 92%
rename from README_piatti.txt
rename to README_pejacevic.txt
index bbd9401..101a596 100644
--- a/README_piatti.txt
+++ b/README_pejacevic.txt
@@ -1,11 +1,9 @@
-Notes about the piuparts installation on piatti.debian.org
-==========================================================
+Notes about the piuparts installation on pejacevic.debian.org and it's slave
+============================================================================
== ToDo
-- review sudoers and come up with (a bit) more restrictive one
-- there should be a 2nd group of piuparts-people. those who can sudo into
- piupartsm to process logfiles. maybe make that the qa-group
+- re-read everything and update for pejacevic.d.o
== Installation
diff --git a/instances/forward.pejacevic b/instances/forward.pejacevic
new file mode 120000
index 0000000..069eb97
--- /dev/null
+++ b/instances/forward.pejacevic
@@ -0,0 +1 @@
+forward.piatti
\ No newline at end of file
diff --git a/instances/forward.piu-slave-bm-a b/instances/forward.piu-slave-bm-a
new file mode 120000
index 0000000..069eb97
--- /dev/null
+++ b/instances/forward.piu-slave-bm-a
@@ -0,0 +1 @@
+forward.piatti
\ No newline at end of file
diff --git a/instances/piuparts.conf.piatti b/instances/piuparts.conf.pejacevic
similarity index 96%
copy from instances/piuparts.conf.piatti
copy to instances/piuparts.conf.pejacevic
index e4c5f5b..58c6c37 100644
--- a/instances/piuparts.conf.piatti
+++ b/instances/piuparts.conf.pejacevic
@@ -1,7 +1,7 @@
#
-# This is the configuration file for piuparts running in master-slave mode on piatti.debian.org
+# This is the configuration file for piuparts running in master-slave mode on pejacevic.debian.org (as master)
#
-# For more information on this setup see http://anonscm.debian.org/gitweb/?p=piuparts/piuparts.git;hb=piatti;a=blob;f=README_piatti.txt
+# For more information on this setup see http://anonscm.debian.org/gitweb/?p=piuparts/piuparts.git;hb=develop;a=blob;f=README_pejacevic.txt
#
[DEFAULT]
@@ -74,7 +74,7 @@ sections =
squeeze
lenny2squeeze
#
-mirror = http://piatti.debian.org/debian/
+mirror = http://mirror.bm.debian.org/debian/
master-host = localhost
master-user = piupartsm
bts-from = piuparts-devel at lists.alioth.debian.org
diff --git a/instances/piuparts.conf.piatti b/instances/piuparts.conf.piu-slave-bm-a
similarity index 95%
copy from instances/piuparts.conf.piatti
copy to instances/piuparts.conf.piu-slave-bm-a
index e4c5f5b..07e2415 100644
--- a/instances/piuparts.conf.piatti
+++ b/instances/piuparts.conf.piu-slave-bm-a
@@ -1,7 +1,8 @@
#
-# This is the configuration file for piuparts running in master-slave mode on piatti.debian.org
+# This is the configuration file for piuparts running in master-slave mode on piu-slave-bm-a.debian.org as slave.
+# For now we just run one slave on this host, soon thereafter we'll run two :)
#
-# For more information on this setup see http://anonscm.debian.org/gitweb/?p=piuparts/piuparts.git;hb=piatti;a=blob;f=README_piatti.txt
+# For more information on this setup see http://anonscm.debian.org/gitweb/?p=piuparts/piuparts.git;hb=develop;a=blob;f=README_pejacevic.txt
#
[DEFAULT]
@@ -74,7 +75,7 @@ sections =
squeeze
lenny2squeeze
#
-mirror = http://piatti.debian.org/debian/
+mirror = http://mirror.bm.debian.org/debian/
master-host = localhost
master-user = piupartsm
bts-from = piuparts-devel at lists.alioth.debian.org
diff --git a/update-piuparts-setup b/update-piuparts-master-setup
similarity index 69%
copy from update-piuparts-setup
copy to update-piuparts-master-setup
index 34991e9..7b8defd 100755
--- a/update-piuparts-setup
+++ b/update-piuparts-master-setup
@@ -2,7 +2,7 @@
set -e
#
-# update piuparts setup on piatti.debian.org
+# update piuparts master setup on pejacevic.debian.org
#
# Copyright 2009-2013 Holger Levsen (holger at layer-acht.org)
@@ -21,8 +21,8 @@ set -e
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-if [ "`id -n -u`" != "piupartss" ] ; then
- echo please run this script as piupartss user
+if [ "`id -n -u`" != "piupartsm" ] ; then
+ echo please run this script as piupartsm user
exit 1
fi
@@ -30,18 +30,12 @@ PIUPARTS_PREFIX=/srv/piuparts.debian.org
PIUPARTS_HTDOCS=$PIUPARTS_PREFIX/htdocs
PIUPARTS_TMPDIR=$PIUPARTS_PREFIX/tmp
-# please cleanup yourself
-cd
-if [ -d piatti ] ; then
- echo please rm ~/piatti manually
-fi
-
#
# create $PIUPARTS_PREFIX
#
if [ ! -d $PIUPARTS_PREFIX ] ; then
sudo mkdir -p $PIUPARTS_PREFIX
- sudo chown piupartss:piuparts $PIUPARTS_PREFIX
+ sudo chown piupartsm:piuparts $PIUPARTS_PREFIX
sudo chmod 0775 $PIUPARTS_PREFIX
fi
@@ -75,7 +69,7 @@ fi
make clean
make prefix=$PIUPARTS_PREFIX \
build build-doc
-sudo make prefix=$PIUPARTS_PREFIX \
+make prefix=$PIUPARTS_PREFIX \
docdir=$PIUPARTS_HTDOCS/doc \
htdocsdir=$PIUPARTS_HTDOCS \
install install-doc install-conf-4-running-from-git
@@ -87,12 +81,8 @@ make clean
#
for icon in weather-severe-alert.png sunny.png
do
- if [ -h $PIUPARTS_HTDOCS/images/$icon ] ; then
- sudo rm -f $PIUPARTS_HTDOCS/images/$icon
- fi
-
if [ -e /usr/share/icons/Tango/24x24/status/$icon ] ; then
- sudo cp -f /usr/share/icons/Tango/24x24/status/$icon $PIUPARTS_HTDOCS/images/$icon
+ cp -f /usr/share/icons/Tango/24x24/status/$icon $PIUPARTS_HTDOCS/images/$icon
fi
done
@@ -101,14 +91,9 @@ done
#
cd $PIUPARTS_PREFIX
pwd
-mkdir -p master slave slave/basetgz backup
-sudo chown piupartss:piuparts slave slave/basetgz
-sudo chown piupartsm:piuparts master htdocs backup
+mkdir -p master backup
# to support multiple hosts with this setup
-cd $PIUPARTS_PREFIX/etc/piuparts
-pwd
-sudo chown piupartss:piuparts . piuparts.conf.*
-chmod 0664 piuparts.conf.*
+cd etc/piuparts
HOSTNAME=$(hostname)
for f in piuparts.conf forward
do
@@ -121,26 +106,12 @@ done
mkdir -p $PIUPARTS_TMPDIR
#
-# update slave home
+# update master home
#
cd
pwd
-test ! -L bin || rm bin
-test ! -d bin || mv bin bin.old
-ln -sf $PIUPARTS_PREFIX/share/piuparts/slave bin
-cp $PIUPARTS_PREFIX/etc/piuparts/forward .forward
-crontab $PIUPARTS_PREFIX/etc/piuparts/crontab-slave
-
-#
-# update master home
-#
-ssh piupartsm at localhost "
-set -e
-test ! -L bin || rm bin
-test ! -d bin || mv bin bin.old
ln -sf $PIUPARTS_PREFIX/share/piuparts/master bin
cp $PIUPARTS_PREFIX/etc/piuparts/forward .forward
crontab $PIUPARTS_PREFIX/etc/piuparts/crontab-master
-"
echo "Update finished."
diff --git a/update-piuparts-setup b/update-piuparts-slave-setup
similarity index 68%
copy from update-piuparts-setup
copy to update-piuparts-slave-setup
index 34991e9..a1092d8 100755
--- a/update-piuparts-setup
+++ b/update-piuparts-slave-setup
@@ -30,12 +30,6 @@ PIUPARTS_PREFIX=/srv/piuparts.debian.org
PIUPARTS_HTDOCS=$PIUPARTS_PREFIX/htdocs
PIUPARTS_TMPDIR=$PIUPARTS_PREFIX/tmp
-# please cleanup yourself
-cd
-if [ -d piatti ] ; then
- echo please rm ~/piatti manually
-fi
-
#
# create $PIUPARTS_PREFIX
#
@@ -75,40 +69,20 @@ fi
make clean
make prefix=$PIUPARTS_PREFIX \
build build-doc
-sudo make prefix=$PIUPARTS_PREFIX \
+make prefix=$PIUPARTS_PREFIX \
docdir=$PIUPARTS_HTDOCS/doc \
htdocsdir=$PIUPARTS_HTDOCS \
install install-doc install-conf-4-running-from-git
make clean
#
-# install copies of the weather icons
-# to avoid needing FollowSymlinks in the apache config
-#
-for icon in weather-severe-alert.png sunny.png
-do
- if [ -h $PIUPARTS_HTDOCS/images/$icon ] ; then
- sudo rm -f $PIUPARTS_HTDOCS/images/$icon
- fi
-
- if [ -e /usr/share/icons/Tango/24x24/status/$icon ] ; then
- sudo cp -f /usr/share/icons/Tango/24x24/status/$icon $PIUPARTS_HTDOCS/images/$icon
- fi
-done
-
-#
# update $PIUPARTS_PREFIX
#
cd $PIUPARTS_PREFIX
pwd
-mkdir -p master slave slave/basetgz backup
-sudo chown piupartss:piuparts slave slave/basetgz
-sudo chown piupartsm:piuparts master htdocs backup
+mkdir -p slave slave/basetgz
# to support multiple hosts with this setup
-cd $PIUPARTS_PREFIX/etc/piuparts
-pwd
-sudo chown piupartss:piuparts . piuparts.conf.*
-chmod 0664 piuparts.conf.*
+cd etc/piuparts
HOSTNAME=$(hostname)
for f in piuparts.conf forward
do
@@ -125,22 +99,8 @@ mkdir -p $PIUPARTS_TMPDIR
#
cd
pwd
-test ! -L bin || rm bin
-test ! -d bin || mv bin bin.old
ln -sf $PIUPARTS_PREFIX/share/piuparts/slave bin
cp $PIUPARTS_PREFIX/etc/piuparts/forward .forward
crontab $PIUPARTS_PREFIX/etc/piuparts/crontab-slave
-#
-# update master home
-#
-ssh piupartsm at localhost "
-set -e
-test ! -L bin || rm bin
-test ! -d bin || mv bin bin.old
-ln -sf $PIUPARTS_PREFIX/share/piuparts/master bin
-cp $PIUPARTS_PREFIX/etc/piuparts/forward .forward
-crontab $PIUPARTS_PREFIX/etc/piuparts/crontab-master
-"
-
echo "Update finished."
--
piuparts git repository
More information about the Piuparts-commits
mailing list