Package: slapprepare
Slapprepare is the script responsible of preparing an openSUSE computer to run slapos as a dedicated machine.ProcessWill parse option and set basic parametersAdd slapos repositories with zypperInstall latest version of slapos but will deactivate slapos-node service(Wait till everything is ready)If option –update (-u) is given, it will skip the initial configuration step (disk formatting, etc)Will ask a few questions:“Automatically register new computer to Vifib?” (Default is yes)is yes choosen two more question will follow:“Define a unique name for this computer:”“Number of SlapOS partitions for this computer? Default is 20 :”“Is this a virtual Machine?” (Default is False)If not a virtual machine:“Do you want to use SlapOS with a second disk?” (Default is True)If True selected the script slapos_firstboot will be run searching
for second a second disk.“Do you want to use vpn to provide ipv6?” (Default is Yes)If False selected will remove openvpn-needed file in config directory“Do you want to force the use lxc on this computer?” (Default is No)If Yes choosen will run “# touch /etc/opt/slapos/SlapContainer-needed”“Do you want a remote ssh access?” (Default is Yes)If yes is choosen, will later ask for a web addressto download user’ public ssh key and put it in root authorized_keysIf automatically register to vifib was choosen, it will run slapos node register which prepare slapos configurationDisplay computer’s reference (“Your Computer is : COMP-1234”)If remote ssh access was choosen will ask for public key address and download it.Will prepare computer:Setting hostnameAdding the hostname as a valid addressCreating safe sshd_configCreating default bridge configIf remote ssh: Writing ssh keyAdding slapos_firstboot in case of MultiDisk usageIf multi-disk usage it will run slapos_firstboot and reinstall slaposIt will install boot script that are not included in packageBoot script in “/usr/sbin/slapos-boot-dedicated” and its associated service in:“/etc/systemd/system/slapos-boot-dedicated.service”clientipv4 (openvpn conf)Remove script form older versions of slapprepareConfigure NTP daemonWill enable an start slapos-boot-dedicated serviceAbout slapos-boot-dedicatedIt is in slapprepare/script/slaposProcessDeactivate slapos-node.service (daemon from package) to prepare quietlyCheck ipv4-ipv6 and start openvpn if needed or askedReset root passwordCheck if slapos is installed (if not reinstall it)Create PKI repositoryIf slapos.cfg is not in /etc/opt/slapos/ it correct path in packagescript and cron fileSet dedicated cron file “/etc/cron.d/slapos”
- If SlapContainer-needed file in configuration directory  will add a line to use itSet various parameters to improve running performance of slaposHow to update you old Suse Image (Suse 12.1 or sooner)Run this whole command as root:# wget zypper remove -y slapos.node; rm -f /etc/opt/slapos/slapos.node*.rpm; easy_install slapparepare && slapprepare -u ;Check your configCheck your config file and your cron fileRun:
# slapos-test
This script will check your config file for missing section or parametersYou can use the slapos.cfg.example config file as reference for slapos.cfg.http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/slapos.cfg.exampleCheck dedicated cron file# less /etc/cron.d/slaposIt should contain a call to slapupdateCheck your configuration directory# ls /etc/opt/slapos/It should only contain your slapos configuration files and *-needed filesConfigure your machine:LXCIf you want to run lxc on you machine run these command:# touch /etc/opt/slapos/SlapContainer-needed ; systemctl restart slapos-boot-dedicated.serviceopenvpnOpenvpn by vifib for ipv6 is forced by default in the package.
- If you want to deactivate it run
# rm /etc/opt/slapos/openvpn-neededChanges1.2.1 (2013-04-16)Fixes:Start VPN if required before registering to SlapOS Master.1.2.0 (2013-04-16)Note: it is no longer possible to run slapprepare without either registering Node or having an existing Node configuration.New features:Add support for any SlapOS Master, not only slapos.orgFixes:Don’t force install slapos if already installed.Only ask bridge question if it is not a VM.1.1.2 (2013-04-15)Fix:Don’t raise if impossible to find slapos configuration while trying to setup bridge (bug introduced in 1.0).1.1.1 (2013-04-15)This is a re-release of 1.1.0, including correct “iniparse” dependency.1.1.0 (2013-04-12)New features:Will autoreboot after two minutes in case of a kernel panic.Ask if machine will host VMs.1.0.0 (2013-03-07)Initial stable release!New features:Chown all files in software root and instance root when doing slapprepare.
It allows easier USB key replacement.Completely disable root password. Won’t create random password.1.0a7 (2013-01-24)Fixed a bug where the hostname would contain a newline.1.0a6 (2013-01-15)Machine tweaks: raise max AIO NR and nofile, set semaphore limits. This
allows to run many instances of apache/mysql/zope on the same machine.Mount /var/log on disk in order not to touch USB key.When running slapupdate, will update slapprepare as well.update crontab so that it calls slapupdate randomly. It means: not all
nodes in the same timezone will try to update at the same time (thus not
kill cache system).1.0a5 (2013-01-07)autoupdate through easy_install before running slapprepareForce start of VPN if definedAdd limits.conf file preventing fork bombs and ensuring root can spawn lot
of processes1.0a4 (2012-11-22)Re-release previous version with correct changes.1.0a3 (2012-11-13)Minor release: doesn’t show scary error when modprobe of some monitoring
module can’t be done. [Cédric de Saint Martin]Change references of VIFIB to slapos.org.1.0a2 (2012-11-12)Don’t crash when we don’t want to create slapos.cfg file. [Cédric de Saint
Martin]1.0a1 (2012-10-30)Initial release on Pypi.