|
H-Sphere updater uses an absolutely new approach to H-Sphere boxes install/update. In brief, it checks H-Sphere
packages and updates those that are outdated.
H-Sphere updater's main features:
- Using set of H-Sphere self-configured packages, which take IP dependent information from config.xml file
with the help of the hsinfo utility.
- MD5 sum check before/after package download.
- Update of H-Sphere packages to the last set of available packages, allowed by specific H-Sphere version/subversion.
- Global check of the installed software after update for each box.
- Possibility to add additional service/server after configuring them via CP interface.
H-Sphere Updater consist of two parts:
- Wrapper which checks and installs, if needed, the hsphere-update package on each box.
- Set of update scripts installed as the hsphere-update package.
H-Sphere updater command line interface of the wrapper:
Usage: hspackages [ help ] [ nomd5 ] [ force ] [ ips=IP1,IP2,.. ] [ subversion ] [ url=Link ] [ verbose ]
[ exclude=[show|add:pattern1,pattern2,...|del:pattern1,pattern2,...|del:all ]] [ skip=[check|preparing]]
[ help2 ]
Where:
- nomd5 - update is not critical for wrong md5 sum, only warning;
- force - check md5 sum of the installed packages with the same version too, if wrong md5 sum, install new package by force;
- ips - only specific list of the target boxes from HS cluster may be pointed instead
of provide check update for all IPs in HS cluster;
- subversion - there is global hsphere package list and its subversion differences.
This key allow to check only subversion check to speed up update (of course, update to corresponding hsphere version is required before);
- url=Link - alternative path for package download (instead of http://www.psoft.net/shiv/HS);
- verbose - inform whether package was installed by force or with nodeps;
- sitestudio - update SiteStudio to last supported version.
- postgres - update postgressql to the last supported version.
H-Sphere 2.5 Beta 4 and up:
- exclude=[show|add:pattern1,pattern2,...|del:pattern1,pattern2,...|del:all]
- show, set or delete list of the package patterns to be skipped during update on all or specified list of H-Sphere boxes.
For example, to exclude hsphere-info-1-1 from the update on the 192.168.1.10 box,
execute:
hspackages exclude=add:hsphere-info ips=192.168.1.10
i.e. package version must be left out.
* Use this carefully, as H-Sphere packages have direct correlation with H-Sphere version.
This may be used in the the following cases:
1. You have customized version of the specific H-Spshere package.
2. You update system packages, like MySQL server via native OS package manager, etc.
- skip=[check|preparing]
- check - skip check-up and regeneration of the existing updater.
- preparing - skip config.xml regeneration on boxes during update.
- help2 - get additional possibilities description.
Note: Currently, H-Sphere updater does not update H-Sphere VPS servers.
Sysctl parameters (to be updated)
H-Sphere 2.5 Beta 4 +
fs.file-max (Linux) and kern.maxfiles (FreeBSD)
define the maximum of files allowed open on a web box.
Because of the changes in apache log formation the amount of open files
on high load servers may exceed the initial value of this parameter.
H-Sphere updater updates it with a new value calculated in the following way:
newmaxopenfile = maxopenfile + (vhnumber + vhnumber2) / 2 * maxchildren * 4
where:
- newmaxopenfile is a new value of the fs.file-max (Linux) and kern.maxfiles (FreeBSD) sysctl parameter
- maxopenfile is the initial value of the fs.file-max (Linux) and kern.maxfiles (FreeBSD) sysctl parameter
Note: the initial value of the fs.file-max (Linux) and kern.maxfiles (FreeBSD) sysctl parameter is stored and used in proceeding updates.
- vhnumber is the amount of VirtualHosts on a box
- vhnumber2 is the amount of VirtualHosts on a box that have at least one of the log formation types
(for example: TransferLog or RefererLog or AgentLog or ErrorLog apache directives)
- maxchildren is max allowed apache child process (MaxSpareServers
apache directive, if missing, default value of 10 is used).
The resulting figure is set for these parameters and a corresponding entry is included into the /etc/sysctl.conf file.
|