Deploying Plesk in a Virtuozzo containers environment implies the following two stages:
For further details on Virtuozzo containers CLI, or the Virtuozzo containers API (XML or SOAP) functionality, refer to the Virtuozzo containers developer documentation.
The first stage is performed on each hardware node only once: As soon as an application template is installed on a hardware node, it can be deployed to as many Containers as required. Instead of creating a new Container every time you need to deploy a Container with Plesk, you can clone an existing Container where Plesk is installed, which acts as a sort of Template Container.
When the template is being installed on a hardware node, the core set of files is deployed, which includes defining of the application packages repository. Then, when the application is installed in a container, Virtuozzo containers communicates with the repository (the default one resides at http://installer.plesk.com), retrieves the application packages, and installs them in the container. The packages are stored in the node cache until it is cleaned up, and then the packages are retrieved from the repository again when the application is installed in the Container.To save time and bandwidth, you may want to use a custom mirror of Plesk repository. For details, see Appendix C: Mirroring Plesk updates Server.
To install a Plesk template on a Virtuozzo containers hardware node using the vzup2date utility:
vzup2date -z
Note: On Virtuozzo (former Cloud Server), the vzup2date utility is deprecated. You should use yum
instead.
To install a Plesk template on a Virtuozzo containers hardware node manually:
rpm -Uvh <absolute path to the template>
For example, the following command installs Qmail:
rpm -Uvh pp11.5-centos-5-x86_64-ez-3.0.0-35.prl.293476.noarch.rpm
To use a custom mirror:
The file for editing is /vz/template/<os>/<os-version>/<platform>/config/app/<app-template-name>/default/repositories
. For example: /vz/template/<os>/<os-version>/<platform>/config/app/pp10/default/repositories
.
You can do this, for example, with the vzpkg clean
command. For details, refer to the Virtuozzo containers for Linux Reference Guide located at https://virtuozzo.com/support/.
To create a Container and install Plesk to it:
Issue the following commands:
vzctl create <CTID> [options]
vzctl set <CTID> <setting_name> <value> [--save]
where
<CTID>
defines an arbitrary container ID number higher than 100, which is unique on the hardware node--save
switch tells vzctl
whether to save changes into the Container configuration fileNote: For details on the Container creation and configuration options, refer to the Virtuozzo Containers for Linux Reference Guide located at https://virtuozzo.com/support/.
The commands below do the following:
--offline_management yes --offline_service vzpp
" options.# vzctl create 444 --ostemplate debian-5.0-x86_64
# vzctl set 444 --ipadd 10.100.1.2 --hostname example.com --save
# vzctl set 444 --save --kmemsize 24299200:26429120 --privvmpages 362144:392912 --numfile
12000:12000 --diskspace 5117880:5242880 --diskinodes 350000:370000
# vzctl set 444 --save --offline_management yes --offline_service vzpp
Important: It is mandatory to use exactly these values for the options to ensure the Plesk compatibility with the Virtuozzo environment.
Important: Plesk needs the container to be configured with an IPv4 address in order to work properly.
# vzctl start <CTID>
vzpkg install <CTID> <ppp_template_name> ...
For example, the following command installs the Plesk base components, BIND DNS server, and Kaspersky Antivirus:
# vzpkg install 444 pp11.5 pp11.5-bind pp11.5-kav
Note: During installation of templates, you must specify the template of the mail server that you want to use. It can be pp12-qmail
, pp12-postfix
, or pp12-msmtp
(if you do not want to install a mail server with Plesk).
To clone a Container:
Issue a command in the following format:
vzmlocal -C {CT List}
{CT List} = <source_CTID>:<dst_CTID>[:[<dstCT_private>][:<dstCT_root>]] [...]
You should specify the source Container ID (<source_CTID>
) and the destination Container ID (<dst_CTID>
). Specifying the destination Container private area path (<dstCT_private>
) and root path (<dstCT_root>
) is optional allowing you to override the default paths - /vz/private/
<dst_CTID>
and /vz/root/
<dst_CTID>
, respectively. For details on the command options, refer to the Virtuozzo Containers for Linux Reference Guide located at https://virtuozzo.com/support/.
For example, to clone the Container with Plesk created during the previous procedure, run the following command:
# vzmlocal -C 444:445