Skip to main content

SlapOS Setup kit for dedicated SuSE machines.

Project description

slapprepare
***********

Slapprepare is the script responsible to prepare a openSUSE computer to run slapos as a dedicated machine.

Process
-------------------------------------------
1. Will parse option and set basic parameters
2. Add slapos repositories with zypper
3. Install latest version of slapos but will deactivate slapos-node service
(Wait till everything is ready)
4. If option --update or -u wasn't choosen slapprepare will consider
it need to prepare computer like a newborn one
-It is a first run and ask a few question a user:
* "Automatically register new computer to Vifib?" (Default is yes)
is yes choosen two more question will follow:
"Define a unique name for this computer:"
Unique name to register computer on Vifib Master
"Number of SlapOS partitions for this computer? Default is 20 :"
Partition amount for this computer
* "Is this a virtual Machine?" (Default is False)
Is it 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 address
to download user' public ssh key and put it in root authorized_keys
-If automatically register to vifib was choosen
it will run slapos node register which prepare slapos configuration
-Display 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 hostname
* Adding the hostname as a valid address
* Creating safe sshd_config
* Creating default bridge config
* If remote ssh: Writing ssh key
* Adding slapos_firstboot in case of MultiDisk usage
- If multi-disk usage it will run slapos_firstboot and reinstall slapos
5. It will install boot script that are not included in package
- Boot 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 slapprepare
6. Configure NTP daemon
7. "#systemctl enable slapos-boot-dedicated.service"
"#systemctl start slapos-boot-dedicated.service"
Will activate an start slapos-boot-dedicated

About slapos-boot-dedicated
-------------------------------------------
It is in slapprepare/script/slapos

Process
+++++++
1. Deactivate slapos-node.service (daemon from package) to prepare quietly
2. Check ipv4-ipv6 and start openvpn if needed or asked
3. Reset root password
4. Check if slapos is installed (if not reinstall it)
5. Create PKI repository
6. If slapos.cfg is not in /etc/opt/slapos/ it correct path in package
script and cron file
7. Set dedicated cron file "/etc/cron.d/slapos"
- If SlapContainer-needed file in configuration directory will add a line
to use it
8. Set various parameters to improve running performance of slapos



How 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 config
-------------------------------------------
Check your config file and your cron file
+++++++++++++++++++++++++++++++++++++++++
Run:
# slapos-test
This script will check your config file for missing section or parameters

You 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.example


Check dedicated cron file
+++++++++++++++++++++++++
# less /etc/cron.d/slapos

It should contain a call to slapupdate

Check your configuration directory
++++++++++++++++++++++++++++++++++
# ls /etc/opt/slapos/

It should only contain your slapos configuration files and *-needed files


Configure your machine:
-------------------------------------------
LXC
++++
If you want to run lxc on you machine run these command:

# touch /etc/opt/slapos/SlapContainer-needed ; systemctl restart slapos-boot-dedicated.service

openvpn
+++++++
Openvpn by vifib for ipv6 is forced by default in the package.
- If you want to deactivate it run
# rm /etc/opt/slapos/openvpn-needed




Changes
=======

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 slapprepare
* Force start of VPN if defined
* Add limits.conf file preventing fork bombs and ensuring root can spawn lot
of processes

1.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slapprepare-1.0a6.tar.gz (20.9 kB view details)

Uploaded Source

File details

Details for the file slapprepare-1.0a6.tar.gz.

File metadata

  • Download URL: slapprepare-1.0a6.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for slapprepare-1.0a6.tar.gz
Algorithm Hash digest
SHA256 5f4ba15c22aa5f26a282cf8b054ba1561785cd4b82f06394ce08d8a224f2fb78
MD5 11d880fd6159ea31813b7d7ac41d2c76
BLAKE2b-256 e3ba9b2923f878bf091ca4cdfd5dfd7513b2103f5c3d383986d6231c7e4c5a2a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page