auto-update.rst 1.85 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
About auto update system
************************

Auto-update system is composed of two script:
- slapudate.py in charge of updating/upgrading computer
- upload-update.py in charge of uploading update information


slapupdate
----------
slapudate is called by a cron job every day at midnight.

It will connect to shacache to obtain last update information available.
This file give authorized reporitories, date of needed reboot and upgrade
and requested openSUSE version.

If update date is newer than last requested update:
1. We remove all repositories
2. We add authorized repositories
3. We check openSUSE version
- If requested version is higher than current version we do a dist-upgrade
  and reboot
- Else we run upgrade

If reboot date is newer than last requested one on we reboot.


upload-update
-------------

This script will use a slapos-upgrade information file
(in /etc/slapos-cache/slapos-upgrade by default),
modify it according to option, ask confirmation and upload it to shacache.

- Note: You will need your slapos.cfg for shacache upload ready in /etc/slapos-cache/

options
+++++++
  --upgrade-file=UPGRADE_FILE
                        File use as reference to upgrade.
  -u, --upgrade         If selected will update tomorrow.
  -r, --reboot          If selected will reboot tomorrow.
  -n, --dry-run         Simulate the execution steps
  -h, --help            show this help message and exit

slapos-upgrade information file
+++++++++++++++++++++++++++++++
[repositories]
suse = http://download.opensuse.org/distribution/12.1/repo/oss/
slapos = http://download.opensuse.org/repositories/home:/VIFIBnexedi/openSUSE_12.1

[system]
reboot = 2012-09-05
upgrade = 2012-09-05
opensuse_version = 12.1

Example
+++++++

- We want computers to update (at midnight)
python upload-update.py -u

- We want computers to update and reboot (at midnght)
python upload-update.py -u -r