From c880a6849a589197420c32ef59d754b9e37daa16 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sun, 13 Dec 2015 14:54:06 +0100 Subject: [PATCH] Remove image section in manifest All provider specific settings have been moved to the provider section. The image name itself is now located at the top level and called "name". It is required for all providers. --- bootstrapvz/base/manifest-schema.yml | 9 ++--- bootstrapvz/base/manifest.py | 2 +- bootstrapvz/common/tasks/image.py | 2 +- bootstrapvz/plugins/vagrant/tasks.py | 2 +- bootstrapvz/providers/ec2/README.rst | 18 ++++++++- .../providers/ec2/manifest-schema-s3.yml | 14 +++---- bootstrapvz/providers/ec2/manifest-schema.yml | 5 +-- bootstrapvz/providers/ec2/tasks/ami.py | 8 ++-- bootstrapvz/providers/ec2/tasks/host.py | 2 +- bootstrapvz/providers/gce/README.rst | 19 +++++++++- bootstrapvz/providers/gce/__init__.py | 4 +- bootstrapvz/providers/gce/manifest-schema.yml | 2 +- bootstrapvz/providers/gce/tasks/image.py | 12 +++--- manifests/README.rst | 37 +++++++++++-------- manifests/examples/azure/jessie.yml | 3 +- manifests/examples/azure/wheezy.yml | 3 +- manifests/examples/docker/jessie.yml | 4 +- .../examples/ec2/ebs-testing-amd64-pvm.yml | 6 +-- .../ec2/ebs-unstable-amd64-pvm-contrib.yml | 5 +-- .../examples/ec2/ebs-unstable-amd64-pvm.yml | 5 +-- .../examples/ec2/s3-wheezy-amd64-pvm.yml | 7 ++-- manifests/examples/kvm/wheezy-virtio.yml | 3 +- manifests/examples/kvm/wheezy.yml | 3 +- .../examples/virtualbox/wheezy-vagrant.yml | 3 +- manifests/examples/virtualbox/wheezy.yml | 3 +- .../official/ec2/ebs-jessie-amd64-hvm.yml | 5 +-- .../official/ec2/ebs-squeeze-amd64-pvm.yml | 5 +-- .../official/ec2/ebs-squeeze-i386-pvm.yml | 5 +-- .../ec2/ebs-wheezy-amd64-hvm-cn-north-1.yml | 5 +-- .../official/ec2/ebs-wheezy-amd64-hvm.yml | 5 +-- .../ec2/ebs-wheezy-amd64-pvm-cn-north-1.yml | 5 +-- .../official/ec2/ebs-wheezy-amd64-pvm.yml | 5 +-- .../official/ec2/ebs-wheezy-i386-pvm.yml | 5 +-- .../ec2/s3-wheezy-amd64-pvm-cn-north-1.yml | 7 ++-- manifests/official/gce/jessie-backports.yml | 5 +-- manifests/official/gce/jessie.yml | 5 +-- manifests/official/gce/wheezy-backports.yml | 5 +-- manifests/official/gce/wheezy.yml | 5 +-- tests/integration/ec2_ebs_hvm_tests.py | 1 + tests/integration/ec2_ebs_pvm_tests.py | 1 + tests/integration/ec2_s3_pvm_tests.py | 3 +- tests/integration/manifests/base.yml | 4 +- 42 files changed, 131 insertions(+), 126 deletions(-) diff --git a/bootstrapvz/base/manifest-schema.yml b/bootstrapvz/base/manifest-schema.yml index 7869ced..aaebfe1 100644 --- a/bootstrapvz/base/manifest-schema.yml +++ b/bootstrapvz/base/manifest-schema.yml @@ -2,8 +2,10 @@ $schema: http://json-schema.org/draft-04/schema# title: Generic manifest type: object -required: [provider, bootstrapper, system, volume] +required: [name, provider, bootstrapper, system, volume] properties: + name: + type: string provider: type: object properties: @@ -40,11 +42,6 @@ properties: - scratchbox required: [workspace] additionalProperties: false - image: - type: object - properties: - name: {type: string} - required: [name] system: type: object properties: diff --git a/bootstrapvz/base/manifest.py b/bootstrapvz/base/manifest.py index 53a87da..24386bd 100644 --- a/bootstrapvz/base/manifest.py +++ b/bootstrapvz/base/manifest.py @@ -100,9 +100,9 @@ class Manifest(object): don't have to access information with info.manifest.data['section'] but can do it with info.manifest.section. """ + self.name = self.data['name'] self.provider = self.data['provider'] self.bootstrapper = self.data['bootstrapper'] - self.image = self.data['image'] self.volume = self.data['volume'] self.system = self.data['system'] from bootstrapvz.common.releases import get_release diff --git a/bootstrapvz/common/tasks/image.py b/bootstrapvz/common/tasks/image.py index 375a254..a23a3dd 100644 --- a/bootstrapvz/common/tasks/image.py +++ b/bootstrapvz/common/tasks/image.py @@ -8,7 +8,7 @@ class MoveImage(Task): @classmethod def run(cls, info): - image_name = info.manifest.image['name'].format(**info.manifest_vars) + image_name = info.manifest.name.format(**info.manifest_vars) filename = image_name + '.' + info.volume.extension import os.path diff --git a/bootstrapvz/plugins/vagrant/tasks.py b/bootstrapvz/plugins/vagrant/tasks.py index 776f1c3..9bdda2a 100644 --- a/bootstrapvz/plugins/vagrant/tasks.py +++ b/bootstrapvz/plugins/vagrant/tasks.py @@ -13,7 +13,7 @@ class CheckBoxPath(Task): @classmethod def run(cls, info): - box_basename = info.manifest.image['name'].format(**info.manifest_vars) + box_basename = info.manifest.name.format(**info.manifest_vars) box_name = box_basename + '.box' box_path = os.path.join(info.manifest.bootstrapper['workspace'], box_name) if os.path.exists(box_path): diff --git a/bootstrapvz/providers/ec2/README.rst b/bootstrapvz/providers/ec2/README.rst index 7c54c19..f8bceec 100644 --- a/bootstrapvz/providers/ec2/README.rst +++ b/bootstrapvz/providers/ec2/README.rst @@ -107,8 +107,24 @@ Example: Image ~~~~~ -- ``image.description``: Description of the AMI. +- ``description``: Description of the AMI. ``manifest vars`` +- ``bucket``: When bootstrapping an S3 backed image, this + will be the bucket where the image is uploaded to. + ``required for S3 backing`` +- ``region``: Region in which the AMI should be registered. + ``required for S3 backing`` + +Example: + +.. code:: yaml + + --- + provider: + name: ec2 + description: Debian {system.release} {system.architecture} + bucket: debian-amis + region: us-west-1 Dependencies diff --git a/bootstrapvz/providers/ec2/manifest-schema-s3.yml b/bootstrapvz/providers/ec2/manifest-schema-s3.yml index 6e0fc3e..3d12c53 100644 --- a/bootstrapvz/providers/ec2/manifest-schema-s3.yml +++ b/bootstrapvz/providers/ec2/manifest-schema-s3.yml @@ -3,14 +3,6 @@ $schema: http://json-schema.org/draft-04/schema# title: EC2 manifest for instance store AMIs type: object properties: - image: - type: object - properties: - bucket: {type: string} - region: {$ref: '#/definitions/aws-region'} - required: - - bucket - - region provider: type: object properties: @@ -22,7 +14,11 @@ properties: user-id: type: string pattern: (^arn:aws:iam::\d*:user/\w.*$)|(^\d{4}-\d{4}-\d{4}$) -required: [image] + bucket: {type: string} + region: {$ref: '#/definitions/aws-region'} + required: + - bucket + - region definitions: aws-region: enum: diff --git a/bootstrapvz/providers/ec2/manifest-schema.yml b/bootstrapvz/providers/ec2/manifest-schema.yml index 696cfa7..86820ac 100644 --- a/bootstrapvz/providers/ec2/manifest-schema.yml +++ b/bootstrapvz/providers/ec2/manifest-schema.yml @@ -3,13 +3,10 @@ $schema: http://json-schema.org/draft-04/schema# title: EC2 manifest type: object properties: - image: - type: object - properties: - description: {type: string} provider: type: object properties: + description: {type: string} credentials: type: object properties: diff --git a/bootstrapvz/providers/ec2/tasks/ami.py b/bootstrapvz/providers/ec2/tasks/ami.py index 3585f45..103c5ff 100644 --- a/bootstrapvz/providers/ec2/tasks/ami.py +++ b/bootstrapvz/providers/ec2/tasks/ami.py @@ -18,8 +18,8 @@ class AMIName(Task): @classmethod def run(cls, info): - ami_name = info.manifest.image['name'].format(**info.manifest_vars) - ami_description = info.manifest.image['description'].format(**info.manifest_vars) + ami_name = info.manifest.name.format(**info.manifest_vars) + ami_description = info.manifest.provider['description'].format(**info.manifest_vars) images = info._ec2['connection'].get_all_images(owners=['self']) for image in images: @@ -64,9 +64,9 @@ class UploadImage(Task): s3_url = 'https://s3.cn-north-1.amazonaws.com.cn' else: s3_url = 'https://s3-{region}.amazonaws.com/'.format(region=info._ec2['region']) - info._ec2['manifest_location'] = info.manifest.image['bucket'] + '/' + info._ec2['ami_name'] + '.manifest.xml' + info._ec2['manifest_location'] = info.manifest.provider['bucket'] + '/' + info._ec2['ami_name'] + '.manifest.xml' log_check_call(['euca-upload-bundle', - '--bucket', info.manifest.image['bucket'], + '--bucket', info.manifest.provider['bucket'], '--manifest', manifest_file, '--access-key', info.credentials['access-key'], '--secret-key', info.credentials['secret-key'], diff --git a/bootstrapvz/providers/ec2/tasks/host.py b/bootstrapvz/providers/ec2/tasks/host.py index d8bfe09..508678e 100644 --- a/bootstrapvz/providers/ec2/tasks/host.py +++ b/bootstrapvz/providers/ec2/tasks/host.py @@ -35,4 +35,4 @@ class SetRegion(Task): @classmethod def run(cls, info): - info._ec2['region'] = info.manifest.image['region'] + info._ec2['region'] = info.manifest.provider['region'] diff --git a/bootstrapvz/providers/gce/README.rst b/bootstrapvz/providers/gce/README.rst index cc54959..f38f7ac 100644 --- a/bootstrapvz/providers/gce/README.rst +++ b/bootstrapvz/providers/gce/README.rst @@ -11,4 +11,21 @@ be used by Google Compute Engine to project provided in manifest by Manifest settings ----------------- -- ``image.description``: Description of the image. +Provider +~~~~~~~~ + +- ``description``: Description of the image. +- ``gcs_destination``: Image destination in GSE. +- ``gce_project``: GCE project in which to register the image. + + +Example: + +.. code:: yaml + + --- + provider: + name: gce + description: Debian {system.release} {system.architecture} + gcs_destination: gs://my-bucket + gce_project: my-project diff --git a/bootstrapvz/providers/gce/__init__.py b/bootstrapvz/providers/gce/__init__.py index 2cd2f24..895a33d 100644 --- a/bootstrapvz/providers/gce/__init__.py +++ b/bootstrapvz/providers/gce/__init__.py @@ -60,9 +60,9 @@ def resolve_tasks(taskset, manifest): taskset.update([tasks.initd.AddGrowRootDisable, kernel.UpdateInitramfs]) - if 'gcs_destination' in manifest.image: + if 'gcs_destination' in manifest.provider: taskset.add(tasks.image.UploadImage) - if 'gce_project' in manifest.image: + if 'gce_project' in manifest.provider: taskset.add(tasks.image.RegisterImage) diff --git a/bootstrapvz/providers/gce/manifest-schema.yml b/bootstrapvz/providers/gce/manifest-schema.yml index 8a38642..aea3254 100644 --- a/bootstrapvz/providers/gce/manifest-schema.yml +++ b/bootstrapvz/providers/gce/manifest-schema.yml @@ -3,7 +3,7 @@ $schema: http://json-schema.org/draft-04/schema# title: GCE manifest type: object properties: - image: + provider: type: object properties: description: {type: string} diff --git a/bootstrapvz/providers/gce/tasks/image.py b/bootstrapvz/providers/gce/tasks/image.py index 7b674cc..f04b702 100644 --- a/bootstrapvz/providers/gce/tasks/image.py +++ b/bootstrapvz/providers/gce/tasks/image.py @@ -13,7 +13,7 @@ class CreateTarball(Task): @classmethod def run(cls, info): import datetime - image_name = info.manifest.image['name'].format(**info.manifest_vars) + image_name = info.manifest.name.format(**info.manifest_vars) filename = image_name + '.' + info.volume.extension today = datetime.datetime.today() name_suffix = today.strftime('%Y%m%d') @@ -42,7 +42,7 @@ class UploadImage(Task): @classmethod def run(cls, info): log_check_call(['gsutil', 'cp', info._gce['tarball_path'], - info.manifest.image['gcs_destination'] + info._gce['tarball_name']]) + info.manifest.provider['gcs_destination'] + info._gce['tarball_name']]) class RegisterImage(Task): @@ -53,9 +53,9 @@ class RegisterImage(Task): @classmethod def run(cls, info): image_description = info._gce['lsb_description'] - if 'description' in info.manifest.image: - image_description = info.manifest.image['description'] - log_check_call(['gcutil', '--project=' + info.manifest.image['gce_project'], + if 'description' in info.manifest.provider: + image_description = info.manifest.provider['description'] + log_check_call(['gcutil', '--project=' + info.manifest.provider['gce_project'], 'addimage', info._gce['image_name'], - info.manifest.image['gcs_destination'] + info._gce['tarball_name'], + info.manifest.provider['gcs_destination'] + info._gce['tarball_name'], '--description=' + image_description]) diff --git a/manifests/README.rst b/manifests/README.rst index 21ab9e6..50554d4 100644 --- a/manifests/README.rst +++ b/manifests/README.rst @@ -26,6 +26,26 @@ Sections The manifest is split into 7 sections. +Name +~~~~~ + +Single string property that specifies the name of the image. + +- ``name``: The name of the resulting image. + When bootstrapping cloud images, this would be the name visible in + the interface when booting up new instances. + When bootstrapping for VirtualBox or kvm, it's the filename of the + image. + ``required`` + ``manifest vars`` + +Example: + +.. code:: yaml + + --- + name: debian-{system.release}-{system.architecture}-{%Y}-{%m}-{%d}-ebs + Provider ~~~~~~~~ @@ -76,25 +96,10 @@ are 4 possible settings: It specifies the path to the VirtualBox Guest Additions ISO, which, when specified, will be mounted and used to install the VirtualBox Guest Additions. ``optional`` +- ``variant``: -Image -~~~~~ -The image section configures anything pertaining directly to the image -that will be created. -- ``name``: The name of the resulting image. - When bootstrapping cloud images, this would be the name visible in - the interface when booting up new instances. - When bootstrapping for VirtualBox or kvm, it's the filename of the - image. - ``required`` - ``manifest vars`` -- ``bucket``: When bootstrapping an S3 backed image for AWS, this - will be the bucket where the image is uploaded to. - ``required for S3 backing`` -- ``region``: Region in which the AMI should be registered. - ``required for S3 backing`` System ~~~~~~ diff --git a/manifests/examples/azure/jessie.yml b/manifests/examples/azure/jessie.yml index 39887cc..afc0c45 100644 --- a/manifests/examples/azure/jessie.yml +++ b/manifests/examples/azure/jessie.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} provider: name: azure waagent: @@ -6,8 +7,6 @@ provider: bootstrapper: mirror: http://httpredir.debian.org/debian/ workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} system: release: jessie architecture: amd64 diff --git a/manifests/examples/azure/wheezy.yml b/manifests/examples/azure/wheezy.yml index 3a25ab1..fee71a4 100644 --- a/manifests/examples/azure/wheezy.yml +++ b/manifests/examples/azure/wheezy.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} provider: name: azure waagent: @@ -6,8 +7,6 @@ provider: bootstrapper: mirror: http://httpredir.debian.org/debian/ workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} system: release: wheezy architecture: amd64 diff --git a/manifests/examples/docker/jessie.yml b/manifests/examples/docker/jessie.yml index 82adde6..b383766 100644 --- a/manifests/examples/docker/jessie.yml +++ b/manifests/examples/docker/jessie.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} provider: name: docker repository: bootstrap-vz @@ -6,9 +7,6 @@ provider: bootstrapper: workspace: /target variant: minbase -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} - description: Debian {system.release} {system.architecture} system: release: jessie architecture: amd64 diff --git a/manifests/examples/ec2/ebs-testing-amd64-pvm.yml b/manifests/examples/ec2/ebs-testing-amd64-pvm.yml index 7488073..6ea9011 100644 --- a/manifests/examples/ec2/ebs-testing-amd64-pvm.yml +++ b/manifests/examples/ec2/ebs-testing-amd64-pvm.yml @@ -1,15 +1,15 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} + system: release: testing architecture: amd64 diff --git a/manifests/examples/ec2/ebs-unstable-amd64-pvm-contrib.yml b/manifests/examples/ec2/ebs-unstable-amd64-pvm-contrib.yml index f7f4935..1ab1c24 100644 --- a/manifests/examples/ec2/ebs-unstable-amd64-pvm-contrib.yml +++ b/manifests/examples/ec2/ebs-unstable-amd64-pvm-contrib.yml @@ -1,15 +1,14 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: unstable architecture: amd64 diff --git a/manifests/examples/ec2/ebs-unstable-amd64-pvm.yml b/manifests/examples/ec2/ebs-unstable-amd64-pvm.yml index cf417a2..29cf608 100644 --- a/manifests/examples/ec2/ebs-unstable-amd64-pvm.yml +++ b/manifests/examples/ec2/ebs-unstable-amd64-pvm.yml @@ -1,15 +1,14 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: unstable architecture: amd64 diff --git a/manifests/examples/ec2/s3-wheezy-amd64-pvm.yml b/manifests/examples/ec2/s3-wheezy-amd64-pvm.yml index bb837ff..8fbed78 100644 --- a/manifests/examples/ec2/s3-wheezy-amd64-pvm.yml +++ b/manifests/examples/ec2/s3-wheezy-amd64-pvm.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%y}{%m}{%d} provider: name: ec2 virtualization: pvm @@ -8,13 +9,11 @@ provider: # certificate: /path/to/your/certificate.pem # private-key: /path/to/your/private.key # user-id: arn:aws:iam::123456789012:user/iamuser -bootstrapper: - workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%y}{%m}{%d} description: Debian {system.release} {system.architecture} AMI bucket: debian-amis region: us-west-1 +bootstrapper: + workspace: /target system: release: wheezy architecture: amd64 diff --git a/manifests/examples/kvm/wheezy-virtio.yml b/manifests/examples/kvm/wheezy-virtio.yml index 4b64e70..53dd943 100644 --- a/manifests/examples/kvm/wheezy-virtio.yml +++ b/manifests/examples/kvm/wheezy-virtio.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} provider: name: kvm virtio_modules: @@ -6,8 +7,6 @@ provider: - virtio_blk bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} system: release: wheezy architecture: amd64 diff --git a/manifests/examples/kvm/wheezy.yml b/manifests/examples/kvm/wheezy.yml index 907992e..357e202 100644 --- a/manifests/examples/kvm/wheezy.yml +++ b/manifests/examples/kvm/wheezy.yml @@ -1,10 +1,9 @@ --- +name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} provider: name: kvm bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} system: release: wheezy architecture: amd64 diff --git a/manifests/examples/virtualbox/wheezy-vagrant.yml b/manifests/examples/virtualbox/wheezy-vagrant.yml index 7ac0ee4..4e5dbda 100644 --- a/manifests/examples/virtualbox/wheezy-vagrant.yml +++ b/manifests/examples/virtualbox/wheezy-vagrant.yml @@ -1,11 +1,10 @@ --- +name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} provider: name: virtualbox guest_additions: /usr/share/virtualbox/VBoxGuestAdditions.iso bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} system: release: wheezy architecture: amd64 diff --git a/manifests/examples/virtualbox/wheezy.yml b/manifests/examples/virtualbox/wheezy.yml index 8a5a68c..8abbb56 100644 --- a/manifests/examples/virtualbox/wheezy.yml +++ b/manifests/examples/virtualbox/wheezy.yml @@ -1,11 +1,10 @@ --- +name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} provider: name: virtualbox guest_additions: /usr/share/virtualbox/VBoxGuestAdditions.iso bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} system: release: wheezy architecture: amd64 diff --git a/manifests/official/ec2/ebs-jessie-amd64-hvm.yml b/manifests/official/ec2/ebs-jessie-amd64-hvm.yml index 4343938..7f8f338 100644 --- a/manifests/official/ec2/ebs-jessie-amd64-hvm.yml +++ b/manifests/official/ec2/ebs-jessie-amd64-hvm.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: hvm @@ -6,11 +7,9 @@ provider: # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: jessie architecture: amd64 diff --git a/manifests/official/ec2/ebs-squeeze-amd64-pvm.yml b/manifests/official/ec2/ebs-squeeze-amd64-pvm.yml index b36e832..2eb190b 100644 --- a/manifests/official/ec2/ebs-squeeze-amd64-pvm.yml +++ b/manifests/official/ec2/ebs-squeeze-amd64-pvm.yml @@ -1,15 +1,14 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: squeeze architecture: amd64 diff --git a/manifests/official/ec2/ebs-squeeze-i386-pvm.yml b/manifests/official/ec2/ebs-squeeze-i386-pvm.yml index 539c2d3..ac501fa 100644 --- a/manifests/official/ec2/ebs-squeeze-i386-pvm.yml +++ b/manifests/official/ec2/ebs-squeeze-i386-pvm.yml @@ -1,15 +1,14 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: squeeze architecture: i386 diff --git a/manifests/official/ec2/ebs-wheezy-amd64-hvm-cn-north-1.yml b/manifests/official/ec2/ebs-wheezy-amd64-hvm-cn-north-1.yml index 5fa8688..467e913 100644 --- a/manifests/official/ec2/ebs-wheezy-amd64-hvm-cn-north-1.yml +++ b/manifests/official/ec2/ebs-wheezy-amd64-hvm-cn-north-1.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: hvm @@ -6,11 +7,9 @@ provider: # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: wheezy architecture: amd64 diff --git a/manifests/official/ec2/ebs-wheezy-amd64-hvm.yml b/manifests/official/ec2/ebs-wheezy-amd64-hvm.yml index 7b7f23e..a4216fb 100644 --- a/manifests/official/ec2/ebs-wheezy-amd64-hvm.yml +++ b/manifests/official/ec2/ebs-wheezy-amd64-hvm.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: hvm @@ -6,11 +7,9 @@ provider: # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: wheezy architecture: amd64 diff --git a/manifests/official/ec2/ebs-wheezy-amd64-pvm-cn-north-1.yml b/manifests/official/ec2/ebs-wheezy-amd64-pvm-cn-north-1.yml index 2160e59..35acd58 100644 --- a/manifests/official/ec2/ebs-wheezy-amd64-pvm-cn-north-1.yml +++ b/manifests/official/ec2/ebs-wheezy-amd64-pvm-cn-north-1.yml @@ -1,15 +1,14 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: wheezy architecture: amd64 diff --git a/manifests/official/ec2/ebs-wheezy-amd64-pvm.yml b/manifests/official/ec2/ebs-wheezy-amd64-pvm.yml index 1729377..a325230 100644 --- a/manifests/official/ec2/ebs-wheezy-amd64-pvm.yml +++ b/manifests/official/ec2/ebs-wheezy-amd64-pvm.yml @@ -1,15 +1,14 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: wheezy architecture: amd64 diff --git a/manifests/official/ec2/ebs-wheezy-i386-pvm.yml b/manifests/official/ec2/ebs-wheezy-i386-pvm.yml index 360ed6d..9bd7fa9 100644 --- a/manifests/official/ec2/ebs-wheezy-i386-pvm.yml +++ b/manifests/official/ec2/ebs-wheezy-i386-pvm.yml @@ -1,15 +1,14 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs provider: name: ec2 virtualization: pvm # credentials: # access-key: AFAKEACCESSKEYFORAWS # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs - description: Debian {system.release} {system.architecture} system: release: wheezy architecture: i386 diff --git a/manifests/official/ec2/s3-wheezy-amd64-pvm-cn-north-1.yml b/manifests/official/ec2/s3-wheezy-amd64-pvm-cn-north-1.yml index 6268883..450d0eb 100644 --- a/manifests/official/ec2/s3-wheezy-amd64-pvm-cn-north-1.yml +++ b/manifests/official/ec2/s3-wheezy-amd64-pvm-cn-north-1.yml @@ -1,4 +1,5 @@ --- +name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d} provider: name: ec2 virtualization: pvm @@ -8,13 +9,11 @@ provider: # certificate: /path/to/your/certificate.pem # private-key: /path/to/your/private.key # user-id: arn:aws:iam::123456789012:user/iamuser -bootstrapper: - workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d} description: Debian {system.release} {system.architecture} AMI bucket: debian-amis-cn-north-1 region: cn-north-1 +bootstrapper: + workspace: /target system: release: wheezy architecture: amd64 diff --git a/manifests/official/gce/jessie-backports.yml b/manifests/official/gce/jessie-backports.yml index a0a1eab..45b7e05 100644 --- a/manifests/official/gce/jessie-backports.yml +++ b/manifests/official/gce/jessie-backports.yml @@ -1,11 +1,10 @@ --- +name: disk provider: name: gce + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: disk - description: Debian {system.release} {system.architecture} system: release: jessie architecture: amd64 diff --git a/manifests/official/gce/jessie.yml b/manifests/official/gce/jessie.yml index a0a1eab..45b7e05 100644 --- a/manifests/official/gce/jessie.yml +++ b/manifests/official/gce/jessie.yml @@ -1,11 +1,10 @@ --- +name: disk provider: name: gce + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: disk - description: Debian {system.release} {system.architecture} system: release: jessie architecture: amd64 diff --git a/manifests/official/gce/wheezy-backports.yml b/manifests/official/gce/wheezy-backports.yml index 2fd78e4..c8a79b8 100644 --- a/manifests/official/gce/wheezy-backports.yml +++ b/manifests/official/gce/wheezy-backports.yml @@ -1,11 +1,10 @@ --- +name: disk provider: name: gce + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: disk - description: Debian {system.release} {system.architecture} system: release: wheezy architecture: amd64 diff --git a/manifests/official/gce/wheezy.yml b/manifests/official/gce/wheezy.yml index 3fdaf56..c8dd149 100644 --- a/manifests/official/gce/wheezy.yml +++ b/manifests/official/gce/wheezy.yml @@ -1,11 +1,10 @@ --- +name: disk provider: name: gce + description: Debian {system.release} {system.architecture} bootstrapper: workspace: /target -image: - name: disk - description: Debian {system.release} {system.architecture} system: release: wheezy architecture: amd64 diff --git a/tests/integration/ec2_ebs_hvm_tests.py b/tests/integration/ec2_ebs_hvm_tests.py index 5cda8cd..eab0c96 100644 --- a/tests/integration/ec2_ebs_hvm_tests.py +++ b/tests/integration/ec2_ebs_hvm_tests.py @@ -5,6 +5,7 @@ partials = {'ebs_hvm': ''' provider: name: ec2 virtualization: hvm + description: Debian {system.release} {system.architecture} volume: {backing: ebs} ''', 'extlinux': 'system: {bootloader: extlinux}', diff --git a/tests/integration/ec2_ebs_pvm_tests.py b/tests/integration/ec2_ebs_pvm_tests.py index 3c05e11..3b54de1 100644 --- a/tests/integration/ec2_ebs_pvm_tests.py +++ b/tests/integration/ec2_ebs_pvm_tests.py @@ -5,6 +5,7 @@ partials = {'ebs_pvm': ''' provider: name: ec2 virtualization: pvm + description: Debian {system.release} {system.architecture} system: {bootloader: pvgrub} volume: {backing: ebs} ''' diff --git a/tests/integration/ec2_s3_pvm_tests.py b/tests/integration/ec2_s3_pvm_tests.py index da64923..4a17c20 100644 --- a/tests/integration/ec2_s3_pvm_tests.py +++ b/tests/integration/ec2_s3_pvm_tests.py @@ -7,7 +7,8 @@ partials = {'s3_pvm': ''' provider: name: ec2 virtualization: pvm -image: {bucket: ''' + s3_bucket_name + '''} + description: Debian {system.release} {system.architecture} + bucket: ''' + s3_bucket_name + ''' system: {bootloader: pvgrub} volume: {backing: s3} ''' diff --git a/tests/integration/manifests/base.yml b/tests/integration/manifests/base.yml index 3dec767..ea0cf8d 100644 --- a/tests/integration/manifests/base.yml +++ b/tests/integration/manifests/base.yml @@ -1,11 +1,9 @@ --- +name: deb-{system.release}-{system.architecture}-{system.bootloader}-{volume.partitions.type}-{%y}{%m}{%d} provider: {} bootstrapper: workspace: /target tarball: true -image: - name: deb-{system.release}-{system.architecture}-{system.bootloader}-{volume.partitions.type}-{%y}{%m}{%d} - description: Debian {system.release} {system.architecture} system: charmap: UTF-8 locale: en_US