Configuration Tasks

Version 9 (Nikos Skalkotos, 01/04/2012 06:56 pm)

1 1 Nikos Skalkotos
h1. Configuration Tasks
2 1 Nikos Skalkotos
3 7 Nikos Skalkotos
Configuration tasks are scripts called by snf-image-helper, to accomplish various configuration steps on the newly created instance. See below for a description of each one of them:
4 7 Nikos Skalkotos
5 8 Nikos Skalkotos
*FixPartitionTable*: Enlarges the last partition in the partition table of the instance, to consume all the available space. For now, only primary partitions are supported.
6 1 Nikos Skalkotos
7 8 Nikos Skalkotos
*FilesystemResizeUnmounted*: Extends the file system of the last partition to cover up the whole partition. This only works for ext{2,3,4} file systems. Any other file system type is ignored and a warning is triggered. The task will fail if @SNF_IMAGE_DEV@ environmental variable is missing.
8 8 Nikos Skalkotos
 
9 8 Nikos Skalkotos
*MountImage*: Mounts the nth partition of @SNF_IMAGE_DEV@, which is specified by @SNF_IMAGE_PROPERTY_ROOT_PARTITION@ variable under the directory specified by @SNF_IMAGE_TARGET@. The script will fail if any of those 3 variables has a non-sane value.
10 8 Nikos Skalkotos
11 9 Nikos Skalkotos
*DeleteSSHKeys*: For linux images, this script will clear out any ssh keys found in the image and for debian, it will recreate them too. In order to find the ssh keys, the script looks in default locations (@/etc/ssh/ssh_*_key@) and also parses @/etc/ssh/sshd_config@ file if present. The script will fail if @SNF_IMAGE_TARGET@ is not set.
12 1 Nikos Skalkotos
13 9 Nikos Skalkotos
*DisableRemoteDesktopConnections*: This script temporary disables RDP connections in windows instances by changing the value fDenyTSConnection registry key. RDP connections will be enabled back during the specialize pass of the Windows setup. The task will fail if @SNF_IMAGE_TARGET@ is not defined.
14 9 Nikos Skalkotos
15 9 Nikos Skalkotos
*InstallUnattend*: Installs the Unattend.xml files in windows images. This is needed by windows in order to perform an unattended setup. The @SNF_IMAGE_TARGET@ variables needs to be present for this task to run.
16 9 Nikos Skalkotos
17 7 Nikos Skalkotos
*SELinuxAutorelabel*:
18 7 Nikos Skalkotos
*AssignHostname*:
19 7 Nikos Skalkotos
*ChangePassword*:
20 7 Nikos Skalkotos
*EnforcePersonality*:
21 7 Nikos Skalkotos
*FilesystemResizeMounted*:
22 2 Nikos Skalkotos
23 6 Nikos Skalkotos
|_/2=.Name|_/2=.Pr.|_\2=.Dependencies|_\2=.Enviromental Variables ^1^|
24 1 Nikos Skalkotos
|_.Run-After|_.Run-Before|_.Required|_.Optional|
25 6 Nikos Skalkotos
|FixPartitionTable|10||FilesystemResizeUnmounted|@DEV@||
26 6 Nikos Skalkotos
|FilesystemResizeUnmounted|20|FixPartitionTable|MountImage|@DEV@||
27 6 Nikos Skalkotos
|MountImage|30||UmountImage|@DEV@
28 6 Nikos Skalkotos
@TARGET@
29 6 Nikos Skalkotos
@PROPERTY_ROOT_PARTITION@||
30 6 Nikos Skalkotos
|DeleteSSHKeys|40|MountImage|UmountImage|@TARGET@|@PROPERTY_OSFAMILY@|
31 6 Nikos Skalkotos
|DisableRemoteDesktopConnections|40|MountImage|UmountImage|@TARGET@|@PROPERTY_OSFAMILY@|
32 6 Nikos Skalkotos
|InstallUnattend|40|MountImage|UmountImage|@TARGET@|@PROPERTY_OSFAMILY@|
33 6 Nikos Skalkotos
|SELinuxAutorelabel|40|MountImage|UmountImage|@TARGET@|@PROPERTY_OSFAMILY@|
34 6 Nikos Skalkotos
|AssignHostname|50|InstallUnattend|UmountImage|@TARGET@
35 6 Nikos Skalkotos
@HOSTNAME@|@PROPERTY_OSFAMILY@|
36 6 Nikos Skalkotos
|ChangePassword|50|InstallUnattend|UmountImage|@TARGET@
37 6 Nikos Skalkotos
@PASSWORD@|@PROPERTY_USERS@
38 6 Nikos Skalkotos
@PROPERTY_OSFAMILY@|
39 6 Nikos Skalkotos
|EnforcePersonality|50|DeleteSSHKeys|UmountImage|@TARGET@|@PERSONALITY@
40 6 Nikos Skalkotos
@PROPERTY_OSFAMILY@|
41 6 Nikos Skalkotos
|FilesystemResizeMounted|50|InstallUnattend|UmountImage|@TARGET@|@PROPERTY_OSFAMILY@|
42 6 Nikos Skalkotos
|UmountImage|80|MountImage||@TARGET@||
43 6 Nikos Skalkotos
44 6 Nikos Skalkotos
^1: all enviromental variables are prefixed with SNF_IMAGE_^