configuration.rst 5.07 KB
Newer Older
1
2
3
Configuration
=============

4
The user may configure the behavior of *snf-image* by uncommenting and
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
overwriting the default value for some configuration parameters and the path of
some external programs in ``/etc/default/snf-image``:

.. code-block:: console

  # snf-image defaults file

  # IMAGE_DIR: directory location for disk images
  # IMAGE_DIR="/var/lib/snf-image"

  # IMAGE_DEBUG: turn on debugging output for the scripts
  # IMAGE_DEBUG=no

  # VERSION_CHECK: Check if snf-image and snf-image-helper have the same version.
  # This is useful if snf-image is installed as Debian package and not from
  # source.
  # VERSION_CHECK="yes"

  # HELPER_DIR: Directory hosting the helper files
  # HELPER_DIR="/var/lib/snf-image/helper/"

  # HELPER_SIZE: Size of the helper VM image in MB
  # HELPER_SIZE="600"

  # HELPER_TIMEOUT: Soft and hard timeout limits for helper instance. The helper
  # instance will be terminated after a given time if it hasn't exited by itself.
  # A TERM signal will be send if the instance is running after a
  # HELPER_SOFT_TIMEOUT interval. A KILL signal will be sent, if the instance is
  # still running after a HELPER_HARD_TIMEOUT interval since the initial signal
  # was sent. The timeout values are integer numbers with an optional suffix: `s'
  # for seconds (the default), `m' for minutes, `h' for hours or `d' for days.
  # HELPER_SOFT_TIMEOUT="120"
  # HELPER_HARD_TIMEOUT="5"

  # HELPER_USER: For security reasons, it is recommended that the helper VM
  # runs as an unprivileged user. KVM drops root privileges and runs as
  # HELPER_USER immediately before starting execution of the helper VM.
  # HELPER_USER="nobody"

  # HELPER_MEMORY: Virtual RAM size in megabytes to be given to the helper VM.
45
  # HELPER_MEMORY="512"
46
47
48
49
50
51
52
53
54
55

  # MULTISTRAP_CONFIG: Configuration file to be used with multistrap to create
  # the rootfs of the helper image.
  # MULTISTRAP_CONFIG="/etc/snf-image/multistrap.conf"

  # MULTISTRAP_APTPREFDIR: Directory where APT preference files are hosted. Those
  # files will be injected to the helper image before multistrap is called.
  # MULTISTRAP_APTPREFDIR="/etc/snf-image/apt.pref.d"

  # XEN_SCRIPTS_DIR: Directory where the Xen scripts are stored
56
  # XEN_SCRIPTS_DIR="/etc/xen/scripts"
57
58
59
60

  # PITHOS_DB: Pithos database in SQLAlchemy format
  # PITHOS_DB="sqlite://///var/lib/pithos/backend.db"

Chrysostomos Nanakos's avatar
Chrysostomos Nanakos committed
61
62
63
  # PITHOS_BACKEND_STORAGE: Select Pithos backend storage. Possible values are
  # 'nfs' and 'rados'. According to the value you select, you need to set the
  # corresponding variables that follow.
64
65
  # If you select 'nfs' that's 'PITHOS_DATA'. If you select 'rados' then you need
  # to set all the "*_RADOS_*" ones.
Chrysostomos Nanakos's avatar
Chrysostomos Nanakos committed
66
67
  # PITHOS_BACKEND_STORAGE="nfs"

68
69
70
  # PITHOS_DATA: Directory where Pithos data are hosted
  # PITHOS_DATA="//var/lib/pithos/data"

Chrysostomos Nanakos's avatar
Chrysostomos Nanakos committed
71
  # PITHOS_RADOS_CEPH_CONF: RADOS configuration file
72
  # PITHOS_RADOS_CEPH_CONF="/etc/ceph/ceph.conf"
Chrysostomos Nanakos's avatar
Chrysostomos Nanakos committed
73
74
75
76
77
78
79

  # PITHOS_RADOS_POOL_MAPS: RADOS pool for storing Pithos maps
  # PITHOS_RADOS_POOL_MAPS="maps"

  # PITHOS_RADOS_POOL_BLOCKS: RADOS pool for storing Pithos blocks
  # PITHOS_RADOS_POOL_BLOCKS="blocks"

80
81
82
  # PITHOS_ARCHIPELAGO_CONF: Archipelago configuration file
  # PITHOS_ARCHIPELAGO_CONF="/etc/archipelago/archipelago.conf"

83
84
85
86
  # PITHCAT_UMASK: If set, it will change the file mode mask of the pithcat
  # process to the specified one.
  # PITHCAT_UMASK=<not set>

87
88
89
  # PROGRESS_MONITOR: External program that monitors the progress of the image
  # deployment. The snf-image monitor messages will be redirected to the standard
  # input of this program.
90
91
  # PROGRESS_MONITOR=""

92
  # UNATTEND: This variable overwrites the unattend.xml file used when deploying
93
94
95
96
97
98
99
  # a Windows image. snf-image-helper will use its own unattend.xml file if this
  # variable is empty. Please leave this empty, unless you really know what you
  # are doing.
  # UNATTEND=""

  # Paths for needed programs. Uncomment and change the variables below if you
  # don't want to use the default one.
100
  # KVM="kvm"
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  # LOSETUP="losetup"
  # KPARTX="kpartx"
  # SFDISK="sfdisk"
  # INSTALL_MBR="install-mbr"
  # TIMEOUT="timeout"
  # CURL="curl"
  # TAR="tar"

Configuration parameters
^^^^^^^^^^^^^^^^^^^^^^^^

The most common configuration parameters the user may need to overwrite are:

 * **IMAGE_DIR**: To specify the directory where the local images are hosted
 * **HELPER_SOFT_TIMEOUT**: To increase the allowed deployment time
 * **PITHOS_DB**: To specify the Pithos database and credentials, in case the
117
118
119
   user is accessing Pithos-hosted images
 * **PITHOS_DATA**: To specify the directory where the Pithos data blocks are
   hosted, in case the user is accessing Pithos-hosted images
120
 * **PROGRESS_MONITOR**: To specify an executable that will handle the
121
   monitoring messages exported by *snf-image*
122
123
124
125
126

Paths of external programs
^^^^^^^^^^^^^^^^^^^^^^^^^^

In ``/etc/default/snf-image`` the user may also overwrite the path of some
127
128
129
130
external programs *snf-image* uses, or add default options to them. For
example, if the user wants to access network based images via insecure SSL
connections, he/she will need to overwrite the value of the *CURL* variable
like this: ``CURL="curl -k"``
131