From ebba39f59b3fd9ef14ea8132986f5d351853821b Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sat, 5 Jul 2014 18:14:29 +0200 Subject: [PATCH] Convert "provider" into provider specific section This is where all provider specific settings belong like waagent on azure, guest additions iso path on vbox and virtualization type on ec2 --- bootstrapvz/base/manifest-schema.json | 6 +- bootstrapvz/base/manifest.py | 2 +- bootstrapvz/plugins/cloud_init/tasks.py | 4 +- .../providers/azure/manifest-schema.json | 17 ++++-- bootstrapvz/providers/azure/tasks/packages.py | 2 +- bootstrapvz/providers/ec2/__init__.py | 2 +- .../providers/ec2/manifest-schema-s3.json | 25 +++++---- .../providers/ec2/manifest-schema.json | 30 ++++++---- bootstrapvz/providers/ec2/tasks/ami.py | 4 +- bootstrapvz/providers/ec2/tasks/connection.py | 4 +- bootstrapvz/providers/kvm/__init__.py | 2 +- .../providers/kvm/manifest-schema.json | 9 ++- bootstrapvz/providers/kvm/tasks/virtio.py | 2 +- bootstrapvz/providers/virtualbox/__init__.py | 2 +- .../virtualbox/tasks/guest_additions.py | 4 +- manifests/azure.manifest.json | 12 ++-- ...fficial-amd64-hvm-cn-north-1.manifest.json | 13 +++-- ...bs-debian-official-amd64-hvm.manifest.json | 13 +++-- ...fficial-amd64-pvm-cn-north-1.manifest.json | 13 +++-- ...bs-debian-official-amd64-pvm.manifest.json | 13 +++-- ...ebs-debian-official-i386-pvm.manifest.json | 13 +++-- ...ebs-debian-testing-amd64-pvm.manifest.json | 13 +++-- ...-ebs-debian-testing-amd64-pvm.manifest.yml | 55 ++++++++++--------- ...bs-debian-unstable-amd64-pvm.manifest.json | 13 +++-- ...n-unstable-contrib-amd64-pvm.manifest.json | 13 +++-- manifests/ec2-ebs-partitioned.manifest.json | 13 +++-- manifests/ec2-ebs-single.manifest.json | 13 +++-- ...fficial-amd64-pvm-cn-north-1.manifest.json | 16 +++--- manifests/ec2-s3.manifest.json | 19 ++++--- manifests/gce-backports.manifest.json | 6 +- manifests/gce.manifest.json | 6 +- manifests/kvm-virtio.manifest.json | 11 ++-- manifests/kvm.manifest.json | 7 ++- ...bs-debian-official-amd64-pvm.manifest.json | 12 ++-- ...ebs-debian-official-i386-pvm.manifest.json | 12 ++-- manifests/virtualbox-vagrant.manifest.json | 8 ++- manifests/virtualbox.manifest.json | 8 ++- 37 files changed, 234 insertions(+), 183 deletions(-) diff --git a/bootstrapvz/base/manifest-schema.json b/bootstrapvz/base/manifest-schema.json index 5a836f3..7a5040c 100644 --- a/bootstrapvz/base/manifest-schema.json +++ b/bootstrapvz/base/manifest-schema.json @@ -4,7 +4,11 @@ "type": "object", "properties": { "provider": { - "type": "string" + "type": "object", + "properties": { + "name": { "type": "string" } + }, + "required": ["name"] }, "bootstrapper": { "type": "object", diff --git a/bootstrapvz/base/manifest.py b/bootstrapvz/base/manifest.py index e1d6d95..f982b44 100644 --- a/bootstrapvz/base/manifest.py +++ b/bootstrapvz/base/manifest.py @@ -39,7 +39,7 @@ class Manifest(object): self.data = load_yaml(self.path) # Get the provider name from the manifest and load the corresponding module - provider_modname = 'bootstrapvz.providers.' + self.data['provider'] + provider_modname = 'bootstrapvz.providers.' + self.data['provider']['name'] log.debug('Loading provider ' + provider_modname) # Create a modules dict that contains the loaded provider and plugins import importlib diff --git a/bootstrapvz/plugins/cloud_init/tasks.py b/bootstrapvz/plugins/cloud_init/tasks.py index 007ad86..44e2dff 100644 --- a/bootstrapvz/plugins/cloud_init/tasks.py +++ b/bootstrapvz/plugins/cloud_init/tasks.py @@ -63,10 +63,10 @@ class SetMetadataSource(Task): sources = info.manifest.plugins['cloud_init']['metadata_sources'] else: source_mapping = {'ec2': 'Ec2'} - sources = source_mapping.get(info.manifest.provider, None) + sources = source_mapping.get(info.manifest.provider['name'], None) if sources is None: msg = ('No cloud-init metadata source mapping found for provider `{provider}\', ' - 'skipping selections setting.').format(provider=info.manifest.provider) + 'skipping selections setting.').format(provider=info.manifest.provider['name']) logging.getLogger(__name__).warn(msg) return sources = "cloud-init cloud-init/datasources multiselect " + sources diff --git a/bootstrapvz/providers/azure/manifest-schema.json b/bootstrapvz/providers/azure/manifest-schema.json index 97b4330..52516e6 100644 --- a/bootstrapvz/providers/azure/manifest-schema.json +++ b/bootstrapvz/providers/azure/manifest-schema.json @@ -3,13 +3,9 @@ "title": "Azure manifest", "type": "object", "properties": { - "system": { + "provider": { "type": "object", "properties": { - "bootloader": { - "type": "string", - "enum": ["grub", "extlinux"] - }, "waagent": { "type": "object", "properties": { @@ -22,9 +18,18 @@ }, "required": ["version"] } - }, + } "required": ["waagent"] }, + "system": { + "type": "object", + "properties": { + "bootloader": { + "type": "string", + "enum": ["grub", "extlinux"] + } + }, + }, "volume": { "type": "object", "properties": { diff --git a/bootstrapvz/providers/azure/tasks/packages.py b/bootstrapvz/providers/azure/tasks/packages.py index 6cb4fa0..40a51e2 100644 --- a/bootstrapvz/providers/azure/tasks/packages.py +++ b/bootstrapvz/providers/azure/tasks/packages.py @@ -29,7 +29,7 @@ class Waagent(Task): def run(cls, info): from bootstrapvz.common.tools import log_check_call import os - waagent_version = info.manifest.system['waagent']['version'] + waagent_version = info.manifest.provider['waagent']['version'] waagent_file = 'WALinuxAgent-' + waagent_version + '.tar.gz' waagent_url = 'https://github.com/Azure/WALinuxAgent/archive/' + waagent_file log_check_call(['wget', '-P', info.root, waagent_url]) diff --git a/bootstrapvz/providers/ec2/__init__.py b/bootstrapvz/providers/ec2/__init__.py index fd5c804..4a06d39 100644 --- a/bootstrapvz/providers/ec2/__init__.py +++ b/bootstrapvz/providers/ec2/__init__.py @@ -38,7 +38,7 @@ def validate_manifest(data, validator, error): validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema-s3.json')) bootloader = data['system']['bootloader'] - virtualization = data['virtualization'] + virtualization = data['provider']['virtualization'] backing = data['volume']['backing'] partition_type = data['volume']['partitions']['type'] diff --git a/bootstrapvz/providers/ec2/manifest-schema-s3.json b/bootstrapvz/providers/ec2/manifest-schema-s3.json index 79cd334..6c92f33 100644 --- a/bootstrapvz/providers/ec2/manifest-schema-s3.json +++ b/bootstrapvz/providers/ec2/manifest-schema-s3.json @@ -3,18 +3,23 @@ "title": "EC2 manifest for instance store AMIs", "type": "object", "properties": { - "credentials": { + "provider": { "type": "object", "properties": { - "certificate": { - "type": "string" - }, - "private-key": { - "type": "string" - }, - "user-id": { - "type": "string", - "pattern": "(^arn:aws:iam::\\d*:user/\\w.*$)|(^\\d{4}-\\d{4}-\\d{4}$)" + "credentials": { + "type": "object", + "properties": { + "certificate": { + "type": "string" + }, + "private-key": { + "type": "string" + }, + "user-id": { + "type": "string", + "pattern": "(^arn:aws:iam::\\d*:user/\\w.*$)|(^\\d{4}-\\d{4}-\\d{4}$)" + } + } } } }, diff --git a/bootstrapvz/providers/ec2/manifest-schema.json b/bootstrapvz/providers/ec2/manifest-schema.json index bb4bd97..2baed68 100644 --- a/bootstrapvz/providers/ec2/manifest-schema.json +++ b/bootstrapvz/providers/ec2/manifest-schema.json @@ -3,7 +3,24 @@ "title": "EC2 manifest", "type": "object", "properties": { - "virtualization": { "enum": ["pvm", "hvm"] }, + "provider": { + "type": "object", + "properties": { + "virtualization": { "enum": ["pvm", "hvm"] }, + "credentials": { + "type": "object", + "properties": { + "access-key": { + "type": "string" + }, + "secret-key": { + "type": "string" + } + } + } + }, + "required": ["virtualization"] + }, "image": { "type": "object", "properties": { @@ -12,17 +29,6 @@ } } }, - "credentials": { - "type": "object", - "properties": { - "access-key": { - "type": "string" - }, - "secret-key": { - "type": "string" - } - } - }, "system": { "type": "object", "properties": { diff --git a/bootstrapvz/providers/ec2/tasks/ami.py b/bootstrapvz/providers/ec2/tasks/ami.py index dcf90ae..2561769 100644 --- a/bootstrapvz/providers/ec2/tasks/ami.py +++ b/bootstrapvz/providers/ec2/tasks/ami.py @@ -103,7 +103,7 @@ class RegisterAMI(Task): registration_params['image_location'] = info._ec2['manifest_location'] else: root_dev_name = {'pvm': '/dev/sda', - 'hvm': '/dev/xvda'}.get(info.manifest.data['virtualization']) + 'hvm': '/dev/xvda'}.get(info.manifest.provider['virtualization']) registration_params['root_device_name'] = root_dev_name from boto.ec2.blockdevicemapping import BlockDeviceType @@ -113,7 +113,7 @@ class RegisterAMI(Task): registration_params['block_device_map'] = BlockDeviceMapping() registration_params['block_device_map'][root_dev_name] = block_device - if info.manifest.data['virtualization'] == 'hvm': + if info.manifest.provider['virtualization'] == 'hvm': registration_params['virtualization_type'] = 'hvm' else: registration_params['virtualization_type'] = 'paravirtual' diff --git a/bootstrapvz/providers/ec2/tasks/connection.py b/bootstrapvz/providers/ec2/tasks/connection.py index e05cf6c..e68cd6d 100644 --- a/bootstrapvz/providers/ec2/tasks/connection.py +++ b/bootstrapvz/providers/ec2/tasks/connection.py @@ -18,9 +18,9 @@ class GetCredentials(Task): def get_credentials(cls, manifest, keys): from os import getenv creds = {} - if all(key in manifest.data['credentials'] for key in keys): + if all(key in manifest.provider['credentials'] for key in keys): for key in keys: - creds[key] = manifest.data['credentials'][key] + creds[key] = manifest.provider['credentials'][key] return creds def env_key(key): diff --git a/bootstrapvz/providers/kvm/__init__.py b/bootstrapvz/providers/kvm/__init__.py index ecded2b..f678bb0 100644 --- a/bootstrapvz/providers/kvm/__init__.py +++ b/bootstrapvz/providers/kvm/__init__.py @@ -28,7 +28,7 @@ def resolve_tasks(taskset, manifest): loopback.MoveImage, ]) - if manifest.bootstrapper.get('virtio', []): + if manifest.provider.get('virtio', []): from tasks import virtio taskset.update([virtio.VirtIO]) diff --git a/bootstrapvz/providers/kvm/manifest-schema.json b/bootstrapvz/providers/kvm/manifest-schema.json index 3586e4e..a800409 100644 --- a/bootstrapvz/providers/kvm/manifest-schema.json +++ b/bootstrapvz/providers/kvm/manifest-schema.json @@ -3,7 +3,7 @@ "title": "KVM manifest", "type": "object", "properties": { - "system": { + "provider": { "type": "object", "properties": { "virtio": { @@ -18,7 +18,12 @@ "virtio_ring"] }, "minItems": 1 - }, + } + } + }, + "system": { + "type": "object", + "properties": { "bootloader": { "type": "string", "enum": ["grub", "extlinux"] diff --git a/bootstrapvz/providers/kvm/tasks/virtio.py b/bootstrapvz/providers/kvm/tasks/virtio.py index cb3ae68..402ba1a 100644 --- a/bootstrapvz/providers/kvm/tasks/virtio.py +++ b/bootstrapvz/providers/kvm/tasks/virtio.py @@ -12,5 +12,5 @@ class VirtIO(Task): modules = os.path.join(info.root, '/etc/initramfs-tools/modules') with open(modules, "a") as modules_file: modules_file.write("\n") - for module in info.manifest.system.get('virtio', []): + for module in info.manifest.provider.get('virtio', []): modules_file.write(module + "\n") diff --git a/bootstrapvz/providers/virtualbox/__init__.py b/bootstrapvz/providers/virtualbox/__init__.py index ea4ce88..4645ff5 100644 --- a/bootstrapvz/providers/virtualbox/__init__.py +++ b/bootstrapvz/providers/virtualbox/__init__.py @@ -22,7 +22,7 @@ def resolve_tasks(taskset, manifest): loopback.MoveImage, ]) - if manifest.bootstrapper.get('guest_additions', False): + if manifest.provider.get('guest_additions', False): from tasks import guest_additions taskset.update([guest_additions.CheckGuestAdditionsPath, guest_additions.AddGuestAdditionsPackages, diff --git a/bootstrapvz/providers/virtualbox/tasks/guest_additions.py b/bootstrapvz/providers/virtualbox/tasks/guest_additions.py index e9a6257..726ef29 100644 --- a/bootstrapvz/providers/virtualbox/tasks/guest_additions.py +++ b/bootstrapvz/providers/virtualbox/tasks/guest_additions.py @@ -11,7 +11,7 @@ class CheckGuestAdditionsPath(Task): @classmethod def run(cls, info): import os.path - guest_additions_path = info.manifest.bootstrapper['guest_additions'] + guest_additions_path = info.manifest.provider['guest_additions'] if not os.path.exists(guest_additions_path): msg = 'The file {file} does not exist.'.format(file=guest_additions_path) raise TaskError(msg) @@ -43,7 +43,7 @@ class InstallGuestAdditions(Task): @classmethod def run(cls, info): import os - guest_additions_path = info.manifest.bootstrapper['guest_additions'] + guest_additions_path = info.manifest.provider['guest_additions'] mount_dir = 'mnt/guest_additions' mount_path = os.path.join(info.root, mount_dir) os.mkdir(mount_path) diff --git a/manifests/azure.manifest.json b/manifests/azure.manifest.json index 4007691..a8eebc9 100644 --- a/manifests/azure.manifest.json +++ b/manifests/azure.manifest.json @@ -1,5 +1,10 @@ { - "provider": "azure", + "provider": { + "name": "azure", + "waagent": { + "version": "2.0.4" + } + }, "bootstrapper": { "workspace": "/target", "mirror": "http://ftp.fr.debian.org/debian/" @@ -14,10 +19,7 @@ "bootloader": "grub", "timezone": "UTC", "locale": "en_US", - "charmap": "UTF-8", - "waagent": { - "version": "2.0.4" - } + "charmap": "UTF-8" }, "packages": { }, diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json b/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json index 622879e..0c3d844 100644 --- a/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "hvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "hvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json index 651d211..32d2e5f 100644 --- a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "hvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "hvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json b/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json index 4c88efb..01e9c63 100644 --- a/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json index 34ced43..4f37a23 100644 --- a/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json b/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json index b0a7db3..b7244a8 100644 --- a/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json index 0456892..03035d6 100644 --- a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml index cfdbd73..8fb5a53 100644 --- a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml +++ b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml @@ -1,36 +1,37 @@ --- -provider: "ec2" -virtualization: "pvm" -credentials: +provider: + name: "ec2" + virtualization: "pvm" + credentials: access-key: "" secret-key: "" bootstrapper: - workspace: "/target" + workspace: "/target" image: - name: "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs" - description: "Debian {system.release} {system.architecture}" + name: "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs" + description: "Debian {system.release} {system.architecture}" system: - release: "testing" - architecture: "amd64" - bootloader: "pvgrub" - timezone: "UTC" - locale: "en_US" - charmap: "UTF-8" + release: "testing" + architecture: "amd64" + bootloader: "pvgrub" + timezone: "UTC" + locale: "en_US" + charmap: "UTF-8" packages: - #mirror: "http://cloudfront.debian.net/debian" - install_standard: true + #mirror: "http://cloudfront.debian.net/debian" + install_standard: true volume: - backing: "ebs" - partitions: - type: "none" - root: - size: "8GiB" - filesystem: "ext4" + backing: "ebs" + partitions: + type: "none" + root: + size: "8GiB" + filesystem: "ext4" plugins: - cloud_init: - username: "admin" - #metadata_sources: "Ec2" - disable_modules: - - "landscape" - - "byobu" - - "ssh-import-id" + cloud_init: + username: "admin" + #metadata_sources: "Ec2" + disable_modules: + - "landscape" + - "byobu" + - "ssh-import-id" diff --git a/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json index 98e0f0a..04cf637 100644 --- a/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json index eaf9584..3af6564 100644 --- a/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-partitioned.manifest.json b/manifests/ec2-ebs-partitioned.manifest.json index 441c076..4f2606f 100644 --- a/manifests/ec2-ebs-partitioned.manifest.json +++ b/manifests/ec2-ebs-partitioned.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-ebs-single.manifest.json b/manifests/ec2-ebs-single.manifest.json index 1e7f883..72fa0ca 100644 --- a/manifests/ec2-ebs-single.manifest.json +++ b/manifests/ec2-ebs-single.manifest.json @@ -1,11 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json b/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json index 6039091..d5f989e 100644 --- a/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json +++ b/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json @@ -1,14 +1,12 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null, - // "certificate": null, - // "private-key": null, - // "user-id": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/ec2-s3.manifest.json b/manifests/ec2-s3.manifest.json index fcf7ca2..36bcfad 100644 --- a/manifests/ec2-s3.manifest.json +++ b/manifests/ec2-s3.manifest.json @@ -1,14 +1,15 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null, - // "certificate": null, - // "private-key": null, - // "user-id": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null, + // "certificate": null, + // "private-key": null, + // "user-id": null + } }, - "bootstrapper": { "workspace": "/target" }, diff --git a/manifests/gce-backports.manifest.json b/manifests/gce-backports.manifest.json index 1334ab2..44f087d 100644 --- a/manifests/gce-backports.manifest.json +++ b/manifests/gce-backports.manifest.json @@ -1,7 +1,9 @@ { - "provider": "gce", + "provider": { + "name": "gce" + }, "bootstrapper": { - "workspace": "/target" + "workspace": "/target" }, "image": { "name": "disk", diff --git a/manifests/gce.manifest.json b/manifests/gce.manifest.json index 2f2bdb6..9d2e079 100644 --- a/manifests/gce.manifest.json +++ b/manifests/gce.manifest.json @@ -1,7 +1,9 @@ { - "provider": "gce", + "provider": { + "name": "gce" + }, "bootstrapper": { - "workspace": "/target" + "workspace": "/target" }, "image": { "name": "disk", diff --git a/manifests/kvm-virtio.manifest.json b/manifests/kvm-virtio.manifest.json index a7a92b0..33c8b23 100644 --- a/manifests/kvm-virtio.manifest.json +++ b/manifests/kvm-virtio.manifest.json @@ -1,8 +1,10 @@ { - "provider": "kvm", + "provider": { + "name": "kvm", + "virtio_modules": [ "virtio_pci", "virtio_blk" ] + }, "bootstrapper": { - "workspace": "/target", - "mirror": "http://ftp.fr.debian.org/debian/" + "workspace": "/target" }, "image": { "name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}", @@ -14,8 +16,7 @@ "bootloader": "grub", "timezone": "UTC", "locale": "en_US", - "charmap": "UTF-8", - "virtio_modules": [ "virtio_pci", "virtio_blk" ] + "charmap": "UTF-8" }, "packages": {}, "volume": { diff --git a/manifests/kvm.manifest.json b/manifests/kvm.manifest.json index ea4c24a..bd26b50 100644 --- a/manifests/kvm.manifest.json +++ b/manifests/kvm.manifest.json @@ -1,8 +1,9 @@ { - "provider": "kvm", + "provider": { + "name": "kvm" + }, "bootstrapper": { - "workspace": "/target", - "mirror": "http://ftp.fr.debian.org/debian/" + "workspace": "/target" }, "image": { "name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}", diff --git a/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json b/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json index 3be23f7..d9e8e29 100644 --- a/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json +++ b/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json @@ -1,9 +1,11 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, "bootstrapper": { diff --git a/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json b/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json index aaa5669..703eea8 100644 --- a/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json +++ b/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json @@ -1,9 +1,11 @@ { - "provider": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null + "provider": { + "name": "ec2", + "virtualization": "pvm", + "credentials": { + // "access-key": null, + // "secret-key": null + } }, "bootstrapper": { diff --git a/manifests/virtualbox-vagrant.manifest.json b/manifests/virtualbox-vagrant.manifest.json index 6641ac2..632c0b4 100644 --- a/manifests/virtualbox-vagrant.manifest.json +++ b/manifests/virtualbox-vagrant.manifest.json @@ -1,9 +1,11 @@ { - "provider": "virtualbox", - "bootstrapper": { - "workspace": "/target", + "provider": { + "name": "virtualbox", "guest_additions": "/root/images/VBoxGuestAdditions.iso" }, + "bootstrapper": { + "workspace": "/target" + }, "image": { "name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}", "description": "Debian {system.release} {system.architecture}" diff --git a/manifests/virtualbox.manifest.json b/manifests/virtualbox.manifest.json index 062cc9c..9e69292 100644 --- a/manifests/virtualbox.manifest.json +++ b/manifests/virtualbox.manifest.json @@ -1,8 +1,10 @@ { - "provider": "virtualbox", + "provider": { + "name": "virtualbox", + "guest_additions": "/root/images/VBoxGuestAdditions.iso" + }, "bootstrapper": { - "workspace": "/target" - // "guest_additions": "/root/images/VBoxGuestAdditions.iso" + "workspace": "/target" }, "image": { "name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}",