[debian-lan-devel] Upgrade Debian-LAN to the latest git config space (Re: Was: When I shoot myself in the foot with a softupdate)
Andreas B. Mundt
andi.mundt at web.de
Thu Jul 25 07:04:04 UTC 2013
Hello Julien,
On Fri, Jul 12, 2013 at 05:42:46PM +0200, Julien Lambot wrote:
> I'm working on the update of debian-lan version 0.12
> The release that I installed was the one available around end of April.
>
I 'upgraded' my system (installed May 11) here and it seems to work
fine. I made some notes about the steps. You might have to modify
some steps depending on your setup, but the general way should be the
same. Please do not hesitate to ask if something is unclear.
Best regards and good luck,
Andi
------------- HowTo upgrade to latest git ---------------
Log into the mainserver, and then:
cd /srv/fai/config/
First make sure you save the latest local modifications of the
config space, use:
git status
git diff
git commit
Then, overwrite the old stuff with the latest contents in git:
(Use 'git clone git://git.debian.org/git/collab-maint/debian-lan' in
/tmp for example).
cp -r /path/to/debian-lan/fai/config/* /srv/fai/config/
Now check what has been modified, step by step, modify files if needed:
git status class/
git diff class/
Add/modify in SERVER_A.var the following lines:
MAINSERVER_IPADDR="10.0.0.1"
GATEWAY="10.0.0.1"
Same for all subrirectories. If you would like to keep a file, use:
git checkout -- files/etc/apt/sources.list/CLIENT_A files/etc/apt/sources.list/SERVER_A
git checkout -- package_config/EDU
git checkout -- package_config/PROXY
Then add all new files to the index:
git add class/GATEWAY_A.var class/ROAMING.var debconf/GATEWAY_A disk_config/GATEWAY_A disk_config/ROAMING files/etc/apt/sources.list/GATEWAY_A files/etc/motd/GATEWAY_A files/etc/sssd/ files/usr/share/ package_config/FIREWALL package_config/GATEWAY_A package_config/ROAMING scripts/DNS_SERVER/30-forwarders scripts/FIREWALL/ scripts/GATEWAY_A/ scripts/ROAMING/
Remove deprecated file:
git rm debconf/DESKTOP
Check all remaining modifications and commit all:
git commit -a
Check your modifications to debian-lan repository:
diff -ru /path/to/debian-lan/fai/config/ . |less
If all is fine, run
fai -vN softupdate
Check if all it went fine so far:
less /var/log/fai/mainserver/softupdate-20130724_100547/fai.log
==========================================
Now enable the firewall, new DHCP and new DNS. First, check
configurations in /etc/:
etckeeper vcs status
Make sure that all modifications are commited, to go back if something fails.
After that, modify the if ...; .... ; fi at the beginning to enable
the following scripts:
git status
# modified: scripts/DNS_SERVER/10-zones
# modified: scripts/FAISERVER/40-dhcp
# modified: scripts/FAISERVER/10-config
# modified: scripts/FIREWALL/10-config
Now run again:
fai -vN softupdate
## Check modifications (already commited, so figure out the relevant
commit from the log):
etckeeper vcs log
--> etckeeper vcs diff 807ee94ecce17d8fb
## Reset config space:
cd /srv/fai/config/
git reset --hard
## Check firewall interfaces (external/internal):
less /etc/shorewall/params
## Check DNS:
Copy MACs from dhcpd.conf_orig (or earlier git commit) to the new dhcpd.conf
## Recreate chroots:
rm -r /srv/fai/nfsroot
rm -r /opt/live
rm /srv/tftp/fai/pxelinux.cfg/diskless.tmpl
/etc/rc.local
That's it, reboot and check if anything still works fine!
Here, it seems to have worked fine.
------------------
More information about the debian-lan-devel
mailing list