mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Create snapshot of volume *after* package install
This commit is contained in:
parent
569f6fd505
commit
15661ae680
2 changed files with 11 additions and 5 deletions
|
@ -5,6 +5,8 @@ from tasks import CreateFromImage
|
|||
from providers.ec2.tasks import ebs
|
||||
from common.tasks import loopback
|
||||
from common.tasks import volume
|
||||
from common.tasks import locale
|
||||
from common.tasks import apt
|
||||
from common.tasks import bootstrap
|
||||
from common.tasks import filesystem
|
||||
from common.tasks import partitioning
|
||||
|
@ -26,6 +28,9 @@ def resolve_tasks(tasklist, manifest):
|
|||
filesystem.TuneVolumeFS,
|
||||
filesystem.AddXFSProgs,
|
||||
filesystem.CreateBootMountDir,
|
||||
|
||||
apt.DisableDaemonAutostart,
|
||||
locale.GenerateLocale,
|
||||
bootstrap.MakeTarball,
|
||||
bootstrap.Bootstrap]
|
||||
if manifest.volume['backing'] == 'ebs':
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
from base import Task
|
||||
from common import phases
|
||||
from common.tasks import volume
|
||||
from common.tasks import bootstrap
|
||||
from common.tasks import packages
|
||||
from providers.virtualbox.tasks import guest_additions
|
||||
from providers.ec2.tasks import ebs
|
||||
from common.fs import remount
|
||||
from shutil import copyfile
|
||||
|
@ -13,8 +14,8 @@ log = logging.getLogger(__name__)
|
|||
|
||||
class Snapshot(Task):
|
||||
description = 'Creating a snapshot of the bootstrapped volume'
|
||||
phase = phases.os_installation
|
||||
predecessors = [bootstrap.Bootstrap]
|
||||
phase = phases.package_installation
|
||||
predecessors = [packages.InstallRemotePackages, guest_additions.InstallGuestAdditions]
|
||||
|
||||
def run(self, info):
|
||||
def mk_snapshot():
|
||||
|
@ -45,8 +46,8 @@ class CreateFromSnapshot(Task):
|
|||
|
||||
class CopyImage(Task):
|
||||
description = 'Creating a snapshot of the bootstrapped volume'
|
||||
phase = phases.os_installation
|
||||
predecessors = [bootstrap.Bootstrap]
|
||||
phase = phases.package_installation
|
||||
predecessors = [packages.InstallRemotePackages, guest_additions.InstallGuestAdditions]
|
||||
|
||||
def run(self, info):
|
||||
loopback_backup_name = 'volume-{id}.{ext}.backup'.format(id=info.run_id, ext=info.volume.extension)
|
||||
|
|
Loading…
Add table
Reference in a new issue