Exemplo n.º 1
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([bootstrapvz.plugins.cloud_init.tasks.AddBackports,
	                loopback.Create,
	                tasks.apt.SetPackageRepositories,
	                tasks.apt.ImportGoogleKey,
	                tasks.packages.DefaultPackages,
	                tasks.packages.GooglePackages,
	                tasks.packages.InstallGSUtil,

	                tasks.configuration.GatherReleaseInformation,

	                tasks.host.DisableIPv6,
	                tasks.boot.ConfigureGrub,
	                ssh.AddSSHKeyGeneration,
	                tasks.apt.CleanGoogleRepositoriesAndKeys,

	                loopback.MoveImage,
	                tasks.image.CreateTarball,
	                ])

	if 'gcs_destination' in manifest.image:
		taskset.add(tasks.image.UploadImage)
		if 'gce_project' in manifest.image:
			taskset.add(tasks.image.RegisterImage)
Exemplo n.º 2
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))

    taskset.update([tasks.packages.DefaultPackages,
                    initd.InstallInitScripts,
                    ssh.AddOpenSSHPackage,
                    ssh.ShredHostkeys,
                    ssh.AddSSHKeyGeneration,
                    ])
    if manifest.volume.get('logicalvolume', []):
        taskset.update([logicalvolume.AddRequiredCommands,
                        logicalvolume.Create,
                        ])
    else:
        taskset.update([loopback.AddRequiredCommands,
                        loopback.Create,
                        image.MoveImage,
                        ])

    if manifest.provider.get('virtio', []):
        from tasks import virtio
        taskset.update([virtio.VirtIO])

    if manifest.provider.get('console', False):
        if manifest.provider['console'] == 'virtual':
            taskset.update([tasks.boot.SetGrubConsolOutputDeviceToVirtual])

            from bootstrapvz.common.releases import jessie
            if manifest.release >= jessie:
                taskset.update([tasks.boot.SetGrubConsolOutputDeviceToVirtual,
                                tasks.boot.SetSystemdTTYVTDisallocate,
                                ])
Exemplo n.º 3
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))

    taskset.update([
        tasks.packages.DefaultPackages,
        initd.InstallInitScripts,
        ssh.AddOpenSSHPackage,
        ssh.ShredHostkeys,
        ssh.AddSSHKeyGeneration,
    ])
    if manifest.volume.get('logicalvolume', []):
        taskset.update([
            logicalvolume.AddRequiredCommands,
            logicalvolume.Create,
        ])
    else:
        taskset.update([
            loopback.AddRequiredCommands,
            loopback.Create,
            image.MoveImage,
        ])

    if manifest.provider.get('virtio', []):
        from tasks import virtio
        taskset.update([virtio.VirtIO])
Exemplo n.º 4
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))

    taskset.update([apt.AddBackports,
                    apt.AddDefaultSources,
                    loopback.AddRequiredCommands,
                    loopback.Create,
                    tasks.packages.DefaultPackages,
                    tasks.configuration.GatherReleaseInformation,
                    tasks.host.DisableIPv6,
                    tasks.boot.ConfigureGrub,
                    initd.AddExpandRoot,
                    initd.AdjustExpandRootScript,
                    tasks.initd.AdjustExpandRootDev,
                    initd.InstallInitScripts,
                    boot.BlackListModules,
                    boot.UpdateInitramfs,
                    ssh.AddSSHKeyGeneration,
                    ssh.DisableSSHPasswordAuthentication,
                    ssh.DisableRootLogin,
                    tasks.apt.AddBaselineAptCache,
                    image.MoveImage,
                    tasks.image.CreateTarball,
                    volume.Delete,
                    ])
    taskset.discard(grub.SetGrubConsolOutputDeviceToSerial)

    if 'gcs_destination' in manifest.provider:
        taskset.add(tasks.image.UploadImage)
        if 'gce_project' in manifest.provider:
            taskset.add(tasks.image.RegisterImage)
Exemplo n.º 5
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))
    taskset.update(task_groups.ssh_group)

    taskset.update([
        tasks.host.AddExternalCommands,
        tasks.packages.DefaultPackages,
        tasks.connection.SilenceBotoDebug,
        tasks.connection.GetCredentials,
        tasks.ami.AMIName,
        tasks.connection.Connect,
        boot.BlackListModules,
        boot.DisableGetTTYs,
        tasks.network.EnableDHCPCDDNS,
        initd.AddExpandRoot,
        initd.RemoveHWClock,
        tasks.initd.AddEC2InitScripts,
        initd.InstallInitScripts,
        tasks.ami.RegisterAMI,
    ])

    if manifest.volume['partitions']['type'] != 'none':
        taskset.add(initd.AdjustExpandRootScript)

    if manifest.system['bootloader'] == 'pvgrub':
        taskset.add(grub.AddGrubPackage)
        taskset.add(tasks.boot.ConfigurePVGrub)

    if manifest.volume['backing'].lower() == 'ebs':
        taskset.update([
            tasks.host.GetInstanceMetadata,
            tasks.ebs.Create,
            tasks.ebs.Snapshot,
        ])
        taskset.add(tasks.ebs.Attach)
        taskset.discard(volume.Attach)

    if manifest.volume['backing'].lower() == 's3':
        taskset.update([
            loopback.AddRequiredCommands,
            tasks.host.SetRegion,
            loopback.Create,
            tasks.filesystem.S3FStab,
            tasks.ami.BundleImage,
            tasks.ami.UploadImage,
            tasks.ami.RemoveBundle,
        ])
        taskset.discard(filesystem.FStab)

    if manifest.provider.get('enhanced_networking', None) == 'simple':
        taskset.update([
            kernel.AddDKMSPackages, tasks.network.InstallEnhancedNetworking,
            kernel.UpdateInitramfs
        ])

    taskset.update([
        filesystem.Format,
        volume.Delete,
    ])
Exemplo n.º 6
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))
	taskset.update(task_groups.ssh_group)

	taskset.update([tasks.host.AddExternalCommands,
	                tasks.packages.DefaultPackages,
	                tasks.connection.SilenceBotoDebug,
	                tasks.connection.GetCredentials,
	                tasks.ami.AMIName,
	                tasks.connection.Connect,

	                boot.BlackListModules,
	                boot.DisableGetTTYs,
	                tasks.network.EnableDHCPCDDNS,
	                initd.AddExpandRoot,
	                initd.RemoveHWClock,
	                initd.InstallInitScripts,

	                tasks.ami.RegisterAMI,
	                ])

	if manifest.provider.get('install_init_scripts', True):
		taskset.add(tasks.initd.AddEC2InitScripts)

	if manifest.volume['partitions']['type'] != 'none':
		taskset.add(initd.AdjustExpandRootScript)

	if manifest.system['bootloader'] == 'pvgrub':
		taskset.add(grub.AddGrubPackage)
		taskset.add(tasks.boot.ConfigurePVGrub)

	if manifest.volume['backing'].lower() == 'ebs':
		taskset.update([tasks.host.GetInstanceMetadata,
		                tasks.ebs.Create,
		                tasks.ebs.Snapshot,
		                ])
		taskset.add(tasks.ebs.Attach)
		taskset.discard(volume.Attach)

	if manifest.volume['backing'].lower() == 's3':
		taskset.update([loopback.AddRequiredCommands,
		                tasks.host.SetRegion,
		                loopback.Create,
		                tasks.filesystem.S3FStab,
		                tasks.ami.BundleImage,
		                tasks.ami.UploadImage,
		                tasks.ami.RemoveBundle,
		                ])
		taskset.discard(filesystem.FStab)

	if manifest.provider.get('enhanced_networking', None) == 'simple':
		taskset.update([kernel.AddDKMSPackages,
		                tasks.network.InstallEnhancedNetworking,
		                kernel.UpdateInitramfs])

	taskset.update([filesystem.Format,
	                volume.Delete,
	                ])
Exemplo n.º 7
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))
	taskset.update([apt.AddBackports,
	                tasks.packages.DefaultPackages,
	                loopback.AddRequiredCommands,
	                loopback.Create,
	                image.MoveImage,
	                initd.InstallInitScripts,
	                ssh.AddOpenSSHPackage,
	                ssh.ShredHostkeys,
	                ssh.AddSSHKeyGeneration,
	                ])
Exemplo n.º 8
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([tasks.packages.DefaultPackages,
	                loopback.Create,
	                initd.InstallInitScripts,
	                ssh.AddOpenSSHPackage,
	                ssh.ShredHostkeys,
	                ssh.AddSSHKeyGeneration,
	                tasks.packages.Waagent,
	                tasks.boot.ConfigureGrub,
	                tasks.image.ConvertToVhd,
	                ])
Exemplo n.º 9
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))
	taskset.update(task_groups.ssh_group)

	taskset.update([loopback.AddRequiredCommands,
	                loopback.Create,
	                image.MoveImage,
	                ssh.DisableRootLogin,
	                volume.Delete,
	                tasks.image.CreateImageTarball,
	                tasks.network.InstallDHCPCD,
	                tasks.packages.DefaultPackages,
	                ])
Exemplo n.º 10
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))

    taskset.update([
        tasks.packages.DefaultPackages,
        loopback.Create,
        initd.InstallInitScripts,
        ssh.AddOpenSSHPackage,
        ssh.ShredHostkeys,
        ssh.AddSSHKeyGeneration,
        tasks.packages.Waagent,
        tasks.boot.ConfigureGrub,
        tasks.image.ConvertToVhd,
    ])
Exemplo n.º 11
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([tasks.packages.DefaultPackages,
	                loopback.Create,
	                loopback.MoveImage,
	                ])

	if manifest.bootstrapper.get('guest_additions', False):
		from tasks import guest_additions
		taskset.update([guest_additions.CheckGuestAdditionsPath,
		                guest_additions.AddGuestAdditionsPackages,
		                guest_additions.InstallGuestAdditions,
		                ])
Exemplo n.º 12
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))
    taskset.update(task_groups.ssh_group)

    taskset.update([
        loopback.AddRequiredCommands,
        loopback.Create,
        image.MoveImage,
        ssh.DisableRootLogin,
        volume.Delete,
        tasks.image.CreateImageTarball,
        tasks.network.InstallDHCPCD,
        tasks.packages.DefaultPackages,
    ])
Exemplo n.º 13
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([tasks.packages.DefaultPackages,
	                loopback.Create,
	                initd.InstallInitScripts,
	                ssh.AddOpenSSHPackage,
	                ssh.ShredHostkeys,
	                ssh.AddSSHKeyGeneration,
	                loopback.MoveImage,
	                ])

	if manifest.bootstrapper.get('virtio', []):
		from tasks import virtio
		taskset.update([virtio.VirtIO])
Exemplo n.º 14
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([tasks.packages.DefaultPackages,
	                loopback.AddRequiredCommands,
	                loopback.Create,
	                image.MoveImage,
	                tasks.boot.ConfigureGrub,
	                ])

	if manifest.provider.get('guest_additions', False):
		from tasks import guest_additions
		taskset.update([guest_additions.CheckGuestAdditionsPath,
		                guest_additions.AddGuestAdditionsPackages,
		                guest_additions.InstallGuestAdditions,
		                ])
Exemplo n.º 15
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))

    taskset.update([
        tasks.packages.DefaultPackages,
        loopback.Create,
        initd.InstallInitScripts,
        ssh.AddOpenSSHPackage,
        ssh.ShredHostkeys,
        ssh.AddSSHKeyGeneration,
        loopback.MoveImage,
    ])

    if manifest.bootstrapper.get('virtio', []):
        from tasks import virtio
        taskset.update([virtio.VirtIO])
Exemplo n.º 16
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))
    taskset.update([apt.AddBackports,
                    tasks.packages.DefaultPackages,
                    loopback.AddRequiredCommands,
                    loopback.Create,
                    image.MoveImage,
                    initd.InstallInitScripts,
                    ssh.AddOpenSSHPackage,
                    ssh.ShredHostkeys,
                    ssh.AddSSHKeyGeneration,
                    tasks.packages.Waagent,
                    tasks.boot.ConfigureGrub,
                    tasks.boot.PatchUdev,
                    ])
    taskset.discard(grub.SetGrubConsolOutputDeviceToSerial)
Exemplo n.º 17
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))
    taskset.update([
        apt.AddBackports,
        tasks.packages.DefaultPackages,
        loopback.AddRequiredCommands,
        loopback.Create,
        image.MoveImage,
        initd.InstallInitScripts,
        ssh.AddOpenSSHPackage,
        ssh.ShredHostkeys,
        ssh.AddSSHKeyGeneration,
        tasks.packages.Waagent,
        tasks.boot.ConfigureGrub,
        tasks.boot.PatchUdev,
    ])
Exemplo n.º 18
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))

    taskset.update([packages.DefaultPackages,
                    boot.AddVirtualConsoleGrubOutputDevice,
                    loopback.AddRequiredCommands,
                    loopback.Create,
                    image.MoveImage,
                    ])

    if manifest.provider.get('guest_additions', False):
        from .tasks import guest_additions
        taskset.update([guest_additions.CheckGuestAdditionsPath,
                        guest_additions.AddGuestAdditionsPackages,
                        guest_additions.InstallGuestAdditions,
                        ])
Exemplo n.º 19
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([tasks.packages.DefaultPackages,
	                loopback.AddRequiredCommands,
	                loopback.Create,
	                initd.InstallInitScripts,
	                ssh.AddOpenSSHPackage,
	                ssh.ShredHostkeys,
	                ssh.AddSSHKeyGeneration,
	                image.MoveImage,
	                tasks.boot.ConfigureGrub,
	                ])

	if manifest.provider.get('virtio', []):
		from tasks import virtio
		taskset.update([virtio.VirtIO])
Exemplo n.º 20
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([apt.AddBackports,
	                loopback.AddRequiredCommands,
	                loopback.Create,
	                tasks.apt.SetPackageRepositories,
	                tasks.apt.ImportGoogleKey,
	                tasks.apt.DisableAptPDiffs,
	                tasks.packages.DefaultPackages,
	                tasks.packages.ReleasePackages,
	                tasks.packages.GooglePackages,

	                tasks.configuration.GatherReleaseInformation,

	                tasks.host.DisableIPv6,
	                tasks.host.InstallHostnameHook,
	                tasks.boot.ConfigureGrub,
	                initd.AddExpandRoot,
	                tasks.initd.AdjustExpandRootDev,
	                initd.InstallInitScripts,
	                boot.BlackListModules,
	                boot.UpdateInitramfs,
	                ssh.AddSSHKeyGeneration,
	                ssh.DisableSSHPasswordAuthentication,
	                tasks.apt.CleanGoogleRepositoriesAndKeys,

	                loopback.MoveImage,
	                tasks.image.CreateTarball,
	                volume.Delete,
	                ])

	if manifest.volume['partitions']['type'] != 'none':
		taskset.add(initd.AdjustExpandRootScript)

	if manifest.volume['partitions']['type'] != 'mbr':
		taskset.update([tasks.initd.AddGrowRootDisable,
		                kernel.UpdateInitramfs])

	if 'gcs_destination' in manifest.image:
		taskset.add(tasks.image.UploadImage)
		if 'gce_project' in manifest.image:
			taskset.add(tasks.image.RegisterImage)
Exemplo n.º 21
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))

	taskset.update([apt.AddBackports,
	                loopback.AddRequiredCommands,
	                loopback.Create,
	                tasks.apt.SetPackageRepositories,
	                tasks.apt.ImportGoogleKey,
	                tasks.packages.DefaultPackages,
	                tasks.packages.ReleasePackages,
	                tasks.packages.GooglePackages,

	                tasks.configuration.GatherReleaseInformation,

	                tasks.host.DisableIPv6,
	                tasks.host.InstallHostnameHook,
	                tasks.boot.ConfigureGrub,
	                initd.AddExpandRoot,
	                tasks.initd.AdjustExpandRootDev,
	                initd.InstallInitScripts,
	                boot.BlackListModules,
	                boot.UpdateInitramfs,
	                ssh.AddSSHKeyGeneration,
	                ssh.DisableSSHPasswordAuthentication,
	                ssh.DisableRootLogin,
	                tasks.apt.CleanGoogleRepositoriesAndKeys,

	                image.MoveImage,
	                tasks.image.CreateTarball,
	                volume.Delete,
	                ])

	if manifest.volume['partitions']['type'] != 'none':
		taskset.add(initd.AdjustExpandRootScript)

	if manifest.volume['partitions']['type'] != 'mbr':
		taskset.update([tasks.initd.AddGrowRootDisable,
		                kernel.UpdateInitramfs])

	if 'gcs_destination' in manifest.provider:
		taskset.add(tasks.image.UploadImage)
		if 'gce_project' in manifest.provider:
			taskset.add(tasks.image.RegisterImage)
Exemplo n.º 22
0
def resolve_tasks(taskset, manifest):
	taskset.update(task_groups.get_standard_groups(manifest))
	taskset.update(task_groups.ssh_group)

	taskset.update([loopback.AddRequiredCommands,
	                loopback.Create,
	                image.MoveImage,
	                ssh.DisableRootLogin,
	                volume.Delete,
	                tasks.image.CreateImageTarball,
	                tasks.network.InstallDHCPCD,
	                tasks.packages.DefaultPackages,
	                ])

	if 'credentials' in manifest.provider:
		taskset.add(tasks.api.InstantiateAPIClient)
		taskset.add(tasks.image.UploadImageTarball)
		if manifest.provider.get('verify', False):
			taskset.add(tasks.image.DownloadImageTarball)
			taskset.add(tasks.image.CompareImageTarballs)
Exemplo n.º 23
0
def resolve_tasks(taskset, manifest):
    taskset.update(task_groups.get_standard_groups(manifest))
    taskset.update(task_groups.ssh_group)

    taskset.update([loopback.AddRequiredCommands,
                    loopback.Create,
                    image.MoveImage,
                    ssh.DisableRootLogin,
                    volume.Delete,
                    tasks.image.CreateImageTarball,
                    tasks.network.InstallDHCPCD,
                    tasks.packages.DefaultPackages,
                    ])

    if 'credentials' in manifest.provider:
        taskset.add(tasks.api.Connect)
        taskset.add(tasks.image.UploadImageTarball)
        if manifest.provider.get('verify', False):
            taskset.add(tasks.image.DownloadImageTarball)
            taskset.add(tasks.image.CompareImageTarballs)
Exemplo n.º 24
0
def resolve_tasks(taskset, manifest):
    """
    Function setting up tasks to run for this provider
    """
    from bootstrapvz.common.releases import wheezy, jessie, stable

    taskset.update(task_groups.get_standard_groups(manifest))
    taskset.update(task_groups.ssh_group)

    taskset.update([
        tasks.host.AddExternalCommands,
        tasks.packages.DefaultPackages,
        tasks.connection.SilenceBotoDebug,
        tasks.connection.GetCredentials,
        tasks.ami.AMIName,
        tasks.connection.Connect,
        tasks.tuning.TuneSystem,
        tasks.tuning.BlackListModules,
        boot.BlackListModules,
        boot.DisableGetTTYs,
        tasks.boot.AddXenGrubConsoleOutputDevice,
        grub.WriteGrubConfig,
        tasks.boot.UpdateGrubConfig,
        initd.AddExpandRoot,
        initd.RemoveHWClock,
        initd.InstallInitScripts,
        tasks.ami.RegisterAMI,
    ])

    if manifest.release > wheezy:
        taskset.add(
            tasks.network.InstallNetworkingUDevHotplugAndDHCPSubinterface)

    if manifest.release <= wheezy:
        # The default DHCP client `isc-dhcp' doesn't work properly on wheezy and earlier
        taskset.add(tasks.network.InstallDHCPCD)
        taskset.add(tasks.network.EnableDHCPCDDNS)

    if manifest.release >= jessie:
        taskset.add(tasks.tuning.SetCloudInitMountOptions)
        taskset.add(tasks.packages.AddWorkaroundGrowpart)
        taskset.add(initd.AdjustGrowpartWorkaround)
        if manifest.system['bootloader'] == 'grub':
            taskset.add(grub.EnableSystemd)
        if manifest.release <= stable:
            taskset.add(apt.AddBackports)

    if manifest.provider.get('install_init_scripts', True):
        taskset.add(tasks.initd.AddEC2InitScripts)

    if manifest.volume['partitions']['type'] != 'none':
        taskset.add(initd.AdjustExpandRootScript)

    if manifest.system['bootloader'] == 'pvgrub':
        taskset.add(grub.AddGrubPackage)
        taskset.update([
            grub.AddGrubPackage, grub.InitGrubConfig,
            grub.SetGrubTerminalToConsole,
            grub.SetGrubConsolOutputDeviceToSerial, grub.RemoveGrubTimeout,
            grub.DisableGrubRecovery, tasks.boot.CreatePVGrubCustomRule,
            tasks.boot.ConfigurePVGrub, grub.WriteGrubConfig,
            tasks.boot.UpdateGrubConfig, tasks.boot.LinkGrubConfig
        ])

    if manifest.volume['backing'].lower() == 'ebs':
        taskset.update([
            tasks.host.GetInstanceMetadata,
            tasks.ebs.Create,
            tasks.ebs.Snapshot,
        ])
        taskset.add(tasks.ebs.Attach)
        taskset.discard(volume.Attach)

    if manifest.volume['backing'].lower() == 's3':
        taskset.update([
            loopback.AddRequiredCommands,
            tasks.host.SetRegion,
            loopback.Create,
            tasks.filesystem.S3FStab,
            tasks.ami.BundleImage,
            tasks.ami.UploadImage,
            tasks.ami.RemoveBundle,
        ])
        taskset.discard(filesystem.FStab)

    if manifest.provider.get('enhanced_networking', None) == 'simple':
        taskset.update([
            kernel.AddDKMSPackages, tasks.network.InstallEnhancedNetworking,
            tasks.network.InstallENANetworking, kernel.UpdateInitramfs
        ])

    taskset.update([
        filesystem.Format,
        volume.Delete,
    ])
Exemplo n.º 25
0
def resolve_tasks(taskset, manifest):
	from bootstrapvz.common.releases import wheezy, jessie

	taskset.update(task_groups.get_standard_groups(manifest))
	taskset.update(task_groups.ssh_group)

	taskset.update([apt.AddBackports,
                        tasks.host.AddExternalCommands,
	                tasks.packages.DefaultPackages,
	                tasks.connection.SilenceBotoDebug,
	                tasks.connection.GetCredentials,
	                tasks.ami.AMIName,
	                tasks.connection.Connect,

	                boot.BlackListModules,
	                boot.DisableGetTTYs,
	                initd.AddExpandRoot,
	                initd.RemoveHWClock,
	                initd.InstallInitScripts,
	                tasks.ami.RegisterAMI,
	                ])

	if manifest.release > wheezy:
		taskset.add(tasks.network.InstallNetworkingUDevHotplugAndDHCPSubinterface)

	if manifest.release <= wheezy:
		# The default DHCP client `isc-dhcp' doesn't work properly on wheezy and earlier
		taskset.add(tasks.network.InstallDHCPCD)
		taskset.add(tasks.network.EnableDHCPCDDNS)

	if manifest.release >= jessie:
		taskset.add(tasks.packages.AddWorkaroundGrowpart)

	if manifest.provider.get('install_init_scripts', True):
		taskset.add(tasks.initd.AddEC2InitScripts)

	if manifest.volume['partitions']['type'] != 'none':
		taskset.add(initd.AdjustExpandRootScript)

	if manifest.system['bootloader'] == 'pvgrub':
		taskset.add(grub.AddGrubPackage)
		taskset.add(tasks.boot.ConfigurePVGrub)
	elif manifest.system['bootloader'] == 'grub':
		taskset.add(grub.AddGrubPackage)

	taskset.add(tasks.tuning.Tune)

	if manifest.volume['backing'].lower() == 'ebs':
		taskset.update([tasks.host.GetInstanceMetadata,
		                tasks.ebs.Create,
		                tasks.ebs.Snapshot,
		                ])
		taskset.add(tasks.ebs.Attach)
		taskset.discard(volume.Attach)

	if manifest.volume['backing'].lower() == 's3':
		taskset.update([loopback.AddRequiredCommands,
		                tasks.host.SetRegion,
		                loopback.Create,
		                tasks.filesystem.S3FStab,
		                tasks.ami.BundleImage,
		                tasks.ami.UploadImage,
		                tasks.ami.RemoveBundle,
		                ])
		taskset.discard(filesystem.FStab)

	if manifest.provider.get('enhanced_networking', None) == 'simple':
		taskset.update([kernel.AddDKMSPackages,
		                tasks.network.InstallEnhancedNetworking,
		                kernel.UpdateInitramfs])

	taskset.update([filesystem.Format,
	                volume.Delete,
	                ])