Merge branch 'stable-2.8' into stable-2.9
[ganeti-local] / doc / install.rst
index ec1c6ab..04ea7c0 100644 (file)
@@ -171,7 +171,11 @@ the file ``/etc/xen/xend-config.sxp`` by setting the value
 
 For optimum performance when running both CPU and I/O intensive
 instances, it's also recommended that the dom0 is restricted to one CPU
-only, for example by booting with the kernel parameter ``maxcpus=1``.
+only. For example you can add ``dom0_max_vcpus=1,dom0_vcpus_pin`` to your
+kernels boot command line and set ``dom0-cpus`` in
+``/etc/xen/xend-config.sxp`` like this::
+
+  (dom0-cpus 1)
 
 It is recommended that you disable xen's automatic save of virtual
 machines at system shutdown and subsequent restore of them at reboot.
@@ -195,32 +199,6 @@ The second line assumes that the hypervisor parameter
 line assumes that all your nodes have secondary IPs in the
 192.0.2.0/24 network, adjust it accordingly to your setup.
 
-.. admonition:: Debian
-
-   Besides the ballooning change which you need to set in
-   ``/etc/xen/xend-config.sxp``, you need to set the memory and nosmp
-   parameters in the file ``/boot/grub/menu.lst``. You need to modify
-   the variable ``xenhopt`` to add ``dom0_mem=1024M`` like this:
-
-   .. code-block:: text
-
-     ## Xen hypervisor options to use with the default Xen boot option
-     # xenhopt=dom0_mem=1024M
-
-   and the ``xenkopt`` needs to include the ``maxcpus`` option like
-   this:
-
-   .. code-block:: text
-
-     ## Xen Linux kernel options to use with the default Xen boot option
-     # xenkopt=maxcpus=1
-
-   Any existing parameters can be left in place: it's ok to have
-   ``xenkopt=console=tty0 maxcpus=1``, for example. After modifying the
-   files, you need to run::
-
-     $ /sbin/update-grub
-
 If you want to run HVM instances too with Ganeti and want VNC access to
 the console of your instances, set the following two entries in
 ``/etc/xen/xend-config.sxp``:
@@ -301,12 +279,19 @@ instances on a node.
      $ apt-get install drbd8-source drbd8-utils
      $ m-a update
      $ m-a a-i drbd8
+
+   Or on newer versions, if the kernel already has modules:
+
+     $ apt-get install drbd8-utils
+
+   Then to configure it for Ganeti::
+
      $ echo drbd minor_count=128 usermode_helper=/bin/true >> /etc/modules
      $ depmod -a
      $ modprobe drbd minor_count=128 usermode_helper=/bin/true
 
-   It is also recommended that you comment out the default resources in
-   the ``/etc/drbd.conf`` file, so that the init script doesn't try to
+   It is also recommended that you comment out the default resources (if any)
+   in the ``/etc/drbd.conf`` file, so that the init script doesn't try to
    configure any drbd devices. You can do this by prefixing all
    *resource* lines in the file with the keyword *skip*, like this:
 
@@ -411,7 +396,9 @@ For more information, please see the `Ceph Docs
 Other required software
 +++++++++++++++++++++++
 
-See :doc:`install-quick`.
+Please install all software requirements mentioned in :doc:`install-quick`.
+If you want to build Ganeti from source, don't forget to follow the steps
+required for that as well.
 
 Setting up the environment for Ganeti
 -------------------------------------
@@ -511,6 +498,21 @@ commands::
   bridge name     bridge id               STP enabled     interfaces
   xen-br0         8000.0020fc1ed55d       no              eth0
 
+In order to have a custom and more advanced networking configuration in Xen
+which can vary among instances, after having successfully installed Ganeti
+you have to create a symbolic link to the vif-script provided by Ganeti
+inside /etc/xen/scripts (assuming you installed Ganeti under /usr/lib)::
+
+  $ ln -s /usr/lib/ganeti/vif-ganeti /etc/xen/scripts/vif-ganeti
+
+This has to be done on all nodes. Afterwards you can set the ``vif_script``
+hypervisor parameter to point to that script by::
+
+  $ gnt-cluster modify -H xen-pvm:vif_script=/etc/xen/scripts/vif-ganeti
+
+Having this hypervisor parameter you are able to create your own scripts
+and create instances with different networking configurations.
+
 .. _configure-lvm-label:
 
 Configuring LVM
@@ -574,12 +576,16 @@ You also need to copy the file ``doc/examples/ganeti.initd`` from the
 source archive to ``/etc/init.d/ganeti`` and register it with your
 distribution's startup scripts, for example in Debian::
 
+  $ chmod +x /etc/init.d/ganeti
   $ update-rc.d ganeti defaults 20 80
 
 In order to automatically restart failed instances, you need to setup a
 cron job run the *ganeti-watcher* command. A sample cron file is
 provided in the source at ``doc/examples/ganeti.cron`` and you can copy
-that (eventually altering the path) to ``/etc/cron.d/ganeti``.
+that (eventually altering the path) to ``/etc/cron.d/ganeti``. Finally,
+a sample logrotate snippet is provided in the source at
+``doc/examples/ganeti.logrotate`` and you can copy it to
+``/etc/logrotate.d/ganeti`` to have Ganeti's logs rotated automatically.
 
 What gets installed
 ~~~~~~~~~~~~~~~~~~~
@@ -591,7 +597,7 @@ distribution mechanisms, will install on the system:
   the python version this can be located in either
   ``lib/python-$ver/site-packages`` or various other locations)
 - a set of programs under ``/usr/local/sbin`` or ``/usr/sbin``
-- if the htools component was enabled, a set of programs unde
+- if the htools component was enabled, a set of programs under
   ``/usr/local/bin`` or ``/usr/bin/``
 - man pages for the above programs
 - a set of tools under the ``lib/ganeti/tools`` directory
@@ -612,14 +618,14 @@ To be able to install instances you need to have an Operating System
 installation script. An example OS that works under Debian and can
 install Debian and Ubuntu instace OSes is provided on the project web
 site.  Download it from the project page and follow the instructions in
-the ``README`` file.  Here is the installation procedure (replace 0.9
+the ``README`` file.  Here is the installation procedure (replace 0.12
 with the latest version that is compatible with your ganeti version)::
 
   $ cd /usr/local/src/
-  $ wget http://ganeti.googlecode.com/files/ganeti-instance-debootstrap-%0.9%.tar.gz
-  $ tar xzf ganeti-instance-debootstrap-%0.9%.tar.gz
-  $ cd ganeti-instance-debootstrap-%0.9%
-  $ ./configure
+  $ wget http://ganeti.googlecode.com/files/ganeti-instance-debootstrap-%0.12%.tar.gz
+  $ tar xzf ganeti-instance-debootstrap-%0.12%.tar.gz
+  $ cd ganeti-instance-debootstrap-%0.12%
+  $ ./configure --with-os-dir=/srv/ganeti/os
   $ make
   $ make install
 
@@ -654,6 +660,9 @@ installed.
    ``kbd`` can be used instead of ``console-tools``, and more packages
    can be added, of course, if needed.
 
+Please refer to the ``README`` file of ``ganeti-instance-debootstrap`` for
+further documentation.
+
 Alternatively, you can create your own OS definitions. See the manpage
 :manpage:`ganeti-os-interface(7)`.
 
@@ -663,8 +672,9 @@ Initializing the cluster
 **Mandatory** once per cluster, on the first node.
 
 The last step is to initialize the cluster. After you have repeated the
-above process on all of your nodes, choose one as the master, and
-execute::
+above process on all of your nodes and choose one as the master. Make sure
+there is a SSH key pair on the master node (optionally generating one using
+``ssh-keygen``). Finally execute::
 
   $ gnt-cluster init %CLUSTERNAME%
 
@@ -721,10 +731,19 @@ modify``.
 Your instance types, networking environment, hypervisor type and version
 may all affect what kind of parameters should be used on your cluster.
 
-For example kvm instances are by default configured to use a host
-kernel, and to be reached via serial console, which works nice for Linux
-paravirtualized instances. If you want fully virtualized instances you
-may want to handle their kernel inside the instance, and to use VNC.
+.. admonition:: KVM
+
+  Instances are by default configured to use a host kernel, and to be
+  reached via serial console, which works nice for Linux paravirtualized
+  instances. If you want fully virtualized instances you may want to
+  handle their kernel inside the instance, and to use VNC.
+
+  Some versions of KVM have a bug that will make an instance hang when
+  configured to use the serial console (which is the default) unless a
+  connection is made to it within about 2 seconds of the instance's
+  startup. For such case it's recommended to disable the
+  ``serial_console`` option.
+
 
 Joining the nodes to the cluster
 ++++++++++++++++++++++++++++++++