Open main menu

OpenVZ Virtuozzo Containers Wiki β

A managed OpenVZ installation

Revision as of 08:17, 16 July 2009 by Notbuu (talk | contribs)

This article will show a managed installation of OpenVZ based on Debian Lenny (Debian 5.0) and some other interesting software pices like PuppetMaster. It is mainly written to show how to manage more than one OpenVZ server in a productive environment.

Contents

Pre-Requierements

You should know this software, because it is used during the setup.

If you have any further questions, please feel free to contact us.

Software list:

  • Debian Installer and preseed [1]
  • Apt-Proxy [2]
  • Private Debian repository [3]
  • Puppet Master [4]

The Debian preseed setup

At first some basics. To use a so called "preseed" file it is good to know what it is. The Debian installation is done with the "Debian Installer", short d-i. This d-i normally is a ncurses based console application that asks you some questions about your timezone, your partition setup, your network and so on. All this questions could be answered trough a preseed file. In this file some or all questions could be answerd.

Now it is good to know that if you do not answer a question or if a question pops up which is not in the preseed file, the d-i wait until you give a right answer. So it is a really good thing because you could leave some thing open and use the same preseed file for different hardware boxes e.g. one hardware have one network interface, another hardware has four network interfaces.

Also it is good to know that you can use the preseed file to answer questions from any Debian package which is using the debconf interface, for example postfix.

How to start the preseed setup

Simply download the Netinstall CD from a Debain mirror put it in your drive an boot the computer. After booting from the CD you should see the Debian Grub Boot menu. In this menu you should select the "Advanced Option" and in the follwing menu place your coursor on "Automated install" - but do not press enter!

You have to edit this boot menu entry by pressing the TAB key. Now you can append the URL option to the end of this boot line. Now press enter and continue the setup. Here is an example and a screenshot.

URL=http://yourserver:yourport/yourpreseedfile

As example here is our preseed file:

During the preseed setup

If the d-i faces a question where it founds no answer in the preseed file it will hold on until you answer the question. The d-i will not cancel the installation process.

This is an interesting feature because you could use one file for different hardware setups. For example, if you have not configured that the d-i to always use the eth0 device during setup and there is more then one network card in your hardware, the d-i will wait until you choose one device.

Additional informations

At our site we use different preseed files for different purposes. As example one preseed for VMWare servers etc... All our preseed files are placed on a webserver but you should know that it is also possible to integrate the preseed process into a self made Debian installation medium.

The apt-proxy

The Debian Netinstall CD covers only a minimal system. So if you need more packages like rsync or others you have to connect to the internet. Without choosing a Debian mirror during the setup, the setup could not continue. If you use Debian OpenVZ Servers and Debian based Virtual Private Server at your site, you should use an apt-proxy to cache the downloaded packages. After the first setup this will speed up your installation time by factors!

The apt-proxy setup is as easy as 1-2-3 go.

Here is an example apt-proxy.conf file:

The private Debian repository

In our case the private repository is an essential factor because it will provide you with a fast software roll out, replicable software and consistent system state trough a large number of setups.

References