Difference between revisions of "Sunrise.fjfi.cvut.cz"
From NMS
(→Základní informace (sunrise)) |
(→Konfigurace) |
||
Line 45: | Line 45: | ||
Konfigurace worker nodů se provádí pomocí puppetu z <tt>ashley.fjfi.cvut.cz</tt>. | Konfigurace worker nodů se provádí pomocí puppetu z <tt>ashley.fjfi.cvut.cz</tt>. | ||
+ | |||
+ | ==Creating puppet.git repository== | ||
+ | |||
+ | # source scl_source enable git19 | ||
+ | cd | ||
+ | git init --bare puppet.git | ||
+ | git clone ssh://root@ashley.fjfi.cvut.cz:/root/puppet.git | ||
+ | cd puppet | ||
+ | cp -a /etc/puppetlabs/code/environments/production/* | ||
+ | rm -rf .git | ||
+ | git commit -m "Initial commit with basic configuration for puppet 4.10.1" | ||
+ | git branch -m master production | ||
+ | git push origin production | ||
+ | # create puppet.git/hooks/post-receive using code from | ||
+ | # https://puppet.com/blog/git-workflow-and-puppet-environments | ||
+ | # modify code to skip post-receive hook for branches with "tmp" prefix | ||
+ | |||
+ | ==Puppet configuration workflow== | ||
+ | |||
+ | * on RHEL6 it is necessary to use SCL version of git 1.9 | ||
+ | source scl_source enable git19 | ||
+ | * checkout current data from remote production branch | ||
+ | git clone -b production ssh://root@ashley.fjfi.cvut.cz:/root/puppet.git tmpwork | ||
+ | cd tmpwork | ||
+ | git checkout -b tmpwork | ||
+ | * modify files in "tmpwork" directory and if you cloned these files in puppet environment directory <tt>/etc/puppetlabs/code/environments</tt> you can test updated configuration | ||
+ | puppet apply --environment=tmpwork --test --debug | ||
+ | * when you are happy with updated configuration merge modification in "production" branch and commit to master repository | ||
+ | git commit -m "summary info for modifications" file1 file2 ... | ||
+ | git checkout production | ||
+ | git pull | ||
+ | git checkout tmpwork | ||
+ | git rebase production | ||
+ | git checkout production | ||
+ | git merge tmpwork | ||
+ | git push | ||
==Batch== | ==Batch== |
Revision as of 19:50, 22 May 2017
Servery / Služby |
Přístupné komukoliv |
Omezený/individuální účet |
Služby |
backup · DHCP · DNS · doména FJFI · eduroam · fileserver · IdM · forum · gitlab · lists · moodle · indico · mailgw · K4 · mailserver · NMS · openvpn · skolniftp · ssh · videokonference · VoIP · video · VPN · wififjfi · wiki · www |
Učebny |
e-sklipek · KFE unixlab · KFE pclab · PD1 · KM 105 · KM 115 |
Ostatní |
Network · Blokované porty |
[edit] · [view] |
Contents
Základní informace (sunrise)
- Správce
- Radek Novotný
- HW
- ~ 300 core cluster, 20TB storage
- OS
- SLC6 (Scientific Linux CERN)
- Využití
- cluster KF
- Konto
- domluvit se správcem
(Re)Instalace worker nodů
Instalace
- použít oficiální boot image SLC6 a nahrát na CD nebo flash
wget http://linuxsoft.cern.ch/cern/slc6X/x86_64/images/boot.iso livecd-iso-to-disk boot.iso /dev/sd?1 # nahradit "?" písmenem zařízení odpovídající flash
- nabootovat z CDROM/USB (na sunrise11-24 lze zobrazit boot menu po klávese F11)
- přidat bootovací parametry pro instalaci, po stisku klávesy TAB doplnit (XX je číslo sunriseXX)
ks=http://192.168.20.1/ks.php?id=XX ksdevice=eth0 ip=192.168.20.1XX gateway=192.168.20.1 netmask=255.255.255.0 dns=147.32.9.4 ssh vnc
- u worker nodů sunrise01-10 se při bootovaní z flash přehodí pořadí disků a je potřeba instalovat na sdb místo standardního prvního disku sda
ks=http://192.168.20.1/ks.php?id=XX&dev=sdb ...
Reinstall
- z boot.iso vykopírovat vmlinuz a initramfs do /boot
- do konfigurace grubu v /boot/grub/menu.lst přidat další záznam s výše uvedenými soubory
- přidat parametry odpovídající bootovacím parametrům uvedeným v sekci Instalace
- v principu by mělo stačit spustit níže uvedený skript (01 je potřeba nahradit číslem sunrise stroje):
XX=01 cd /boot wget -O vmlinuz http://linuxsoft.cern.ch/cern/slc6X/x86_64/isolinux/vmlinuz wget -O initrd.img http://linuxsoft.cern.ch/cern/slc6X/x86_64/isolinux/initrd.img wget -O ks.cfg "http://192.168.20.1/ks.php?id=${XX}" cat >> /boot/grub/menu.lst <<EOF title Install root (hd0,0) kernel /vmlinuz ks=hd:/dev/sda1:/ks.cfg ksdevice=eth0 ip=192.168.20.1${XX} gateway=192.168.20.1 netmask=255.255.255.0 dns=147.32.9.4 ssh vnc initrd /initrd.img EOF
Konfigurace
Konfigurace worker nodů se provádí pomocí puppetu z ashley.fjfi.cvut.cz.
Creating puppet.git repository
# source scl_source enable git19 cd git init --bare puppet.git git clone ssh://root@ashley.fjfi.cvut.cz:/root/puppet.git cd puppet cp -a /etc/puppetlabs/code/environments/production/* rm -rf .git git commit -m "Initial commit with basic configuration for puppet 4.10.1" git branch -m master production git push origin production # create puppet.git/hooks/post-receive using code from # https://puppet.com/blog/git-workflow-and-puppet-environments # modify code to skip post-receive hook for branches with "tmp" prefix
Puppet configuration workflow
- on RHEL6 it is necessary to use SCL version of git 1.9
source scl_source enable git19
- checkout current data from remote production branch
git clone -b production ssh://root@ashley.fjfi.cvut.cz:/root/puppet.git tmpwork cd tmpwork git checkout -b tmpwork
- modify files in "tmpwork" directory and if you cloned these files in puppet environment directory /etc/puppetlabs/code/environments you can test updated configuration
puppet apply --environment=tmpwork --test --debug
- when you are happy with updated configuration merge modification in "production" branch and commit to master repository
git commit -m "summary info for modifications" file1 file2 ... git checkout production git pull git checkout tmpwork git rebase production git checkout production git merge tmpwork git push
Batch
Aktuálně je nainstalován Torque.
# nastavení worker nodu online/offline pbsnodes -o sunriseXX-0 pbsnodes -r sunriseXX-0