From 03a0746299f8ae73abdb4c03315b7908a1b2b0cd Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sat, 5 Jul 2014 20:01:20 +0200 Subject: [PATCH] Convert every JSON file to YAML Lines removed: over 500. Readiblity gained: A shitload Now you can actually get an overview of a manifest on a single screen height. I am sure that it will also save a lot of hassle when modifying schema in the future. No more "expected property name" etc. because of an extraneous comma Comments are of course natively support, so there's no need for this minify_json hokey pokey --- bootstrapvz/base/__init__.py | 2 +- bootstrapvz/base/bootstrapinfo.py | 2 +- bootstrapvz/base/manifest-schema.json | 214 ------------------ bootstrapvz/base/manifest-schema.yml | 177 +++++++++++++++ bootstrapvz/base/manifest.py | 19 +- bootstrapvz/base/release-codenames.json | 22 -- bootstrapvz/base/release-codenames.yml | 23 ++ bootstrapvz/common/exceptions.py | 12 +- .../common/tasks/network-configuration.json | 14 -- .../common/tasks/network-configuration.yml | 17 ++ bootstrapvz/common/tasks/network.py | 2 +- bootstrapvz/common/tools.py | 17 +- bootstrapvz/plugins/admin_user/__init__.py | 2 +- .../plugins/admin_user/manifest-schema.json | 21 -- .../plugins/admin_user/manifest-schema.yml | 13 ++ bootstrapvz/plugins/apt_proxy/__init__.py | 2 +- .../plugins/apt_proxy/manifest-schema.json | 27 --- .../plugins/apt_proxy/manifest-schema.yml | 17 ++ bootstrapvz/plugins/chef/__init__.py | 2 +- bootstrapvz/plugins/chef/manifest-schema.json | 25 -- bootstrapvz/plugins/chef/manifest-schema.yml | 19 ++ bootstrapvz/plugins/cloud_init/__init__.py | 2 +- .../plugins/cloud_init/manifest-schema.json | 44 ---- .../plugins/cloud_init/manifest-schema.yml | 30 +++ bootstrapvz/plugins/docker_daemon/__init__.py | 8 +- .../docker_daemon/manifest-schema.json | 24 -- .../plugins/docker_daemon/manifest-schema.yml | 17 ++ .../plugins/image_commands/__init__.py | 2 +- .../image_commands/manifest-schema.json | 29 --- .../image_commands/manifest-schema.yml | 25 ++ bootstrapvz/plugins/minimize_size/__init__.py | 2 +- .../minimize_size/manifest-schema.json | 19 -- .../plugins/minimize_size/manifest-schema.yml | 15 ++ bootstrapvz/plugins/ntp/__init__.py | 2 +- bootstrapvz/plugins/ntp/manifest-schema.json | 22 -- bootstrapvz/plugins/ntp/manifest-schema.yml | 15 ++ bootstrapvz/plugins/pip_install/__init__.py | 2 +- .../plugins/pip_install/manifest-schema.json | 30 --- .../plugins/pip_install/manifest-schema.yml | 17 ++ .../plugins/prebootstrapped/__init__.py | 2 +- .../prebootstrapped/manifest-schema.json | 34 --- .../prebootstrapped/manifest-schema.yml | 25 ++ bootstrapvz/plugins/puppet/__init__.py | 2 +- .../plugins/puppet/manifest-schema.json | 28 --- .../plugins/puppet/manifest-schema.yml | 20 ++ bootstrapvz/plugins/root_password/__init__.py | 2 +- .../root_password/manifest-schema.json | 21 -- .../plugins/root_password/manifest-schema.yml | 13 ++ bootstrapvz/plugins/salt/__init__.py | 2 +- bootstrapvz/plugins/salt/manifest-schema.json | 28 --- bootstrapvz/plugins/salt/manifest-schema.yml | 24 ++ .../plugins/unattended_upgrades/__init__.py | 2 +- .../unattended_upgrades/manifest-schema.json | 29 --- .../unattended_upgrades/manifest-schema.yml | 18 ++ bootstrapvz/plugins/vagrant/__init__.py | 2 +- .../plugins/vagrant/manifest-schema.json | 34 --- .../plugins/vagrant/manifest-schema.yml | 24 ++ bootstrapvz/providers/azure/__init__.py | 2 +- .../providers/azure/manifest-schema.json | 50 ---- .../providers/azure/manifest-schema.yml | 38 ++++ bootstrapvz/providers/ec2/__init__.py | 4 +- .../providers/ec2/manifest-schema-s3.json | 49 ---- .../providers/ec2/manifest-schema-s3.yml | 38 ++++ .../providers/ec2/manifest-schema.json | 56 ----- bootstrapvz/providers/ec2/manifest-schema.yml | 47 ++++ bootstrapvz/providers/ec2/tasks/ami-akis.json | 34 --- bootstrapvz/providers/ec2/tasks/ami-akis.yml | 33 +++ bootstrapvz/providers/ec2/tasks/ami.py | 2 +- .../providers/ec2/tasks/packages-kernels.json | 15 -- .../providers/ec2/tasks/packages-kernels.yml | 14 ++ bootstrapvz/providers/ec2/tasks/packages.py | 2 +- bootstrapvz/providers/gce/__init__.py | 2 +- .../providers/gce/manifest-schema.json | 43 ---- bootstrapvz/providers/gce/manifest-schema.yml | 29 +++ bootstrapvz/providers/gce/tasks/packages.py | 2 +- bootstrapvz/providers/kvm/__init__.py | 2 +- .../providers/kvm/manifest-schema.json | 50 ---- bootstrapvz/providers/kvm/manifest-schema.yml | 44 ++++ bootstrapvz/providers/virtualbox/__init__.py | 2 +- .../providers/virtualbox/manifest-schema.json | 40 ---- .../providers/virtualbox/manifest-schema.yml | 36 +++ manifests/azure.manifest.json | 45 ---- manifests/azure.manifest.yml | 33 +++ ...fficial-amd64-hvm-cn-north-1.manifest.json | 44 ---- ...official-amd64-hvm-cn-north-1.manifest.yml | 32 +++ ...bs-debian-official-amd64-hvm.manifest.json | 44 ---- ...ebs-debian-official-amd64-hvm.manifest.yml | 32 +++ ...fficial-amd64-pvm-cn-north-1.manifest.json | 44 ---- ...official-amd64-pvm-cn-north-1.manifest.yml | 32 +++ ...bs-debian-official-amd64-pvm.manifest.json | 44 ---- ...ebs-debian-official-amd64-pvm.manifest.yml | 32 +++ ...ebs-debian-official-i386-pvm.manifest.json | 44 ---- ...-ebs-debian-official-i386-pvm.manifest.yml | 32 +++ ...ebs-debian-testing-amd64-pvm.manifest.json | 44 ---- ...-ebs-debian-testing-amd64-pvm.manifest.yml | 49 ++-- ...bs-debian-unstable-amd64-pvm.manifest.json | 44 ---- ...ebs-debian-unstable-amd64-pvm.manifest.yml | 32 +++ ...n-unstable-contrib-amd64-pvm.manifest.json | 45 ---- ...an-unstable-contrib-amd64-pvm.manifest.yml | 36 +++ manifests/ec2-ebs-partitioned.manifest.json | 38 ---- manifests/ec2-ebs-partitioned.manifest.yml | 28 +++ manifests/ec2-ebs-single.manifest.json | 38 ---- manifests/ec2-ebs-single.manifest.yml | 28 +++ ...fficial-amd64-pvm-cn-north-1.manifest.json | 46 ---- ...official-amd64-pvm-cn-north-1.manifest.yml | 40 ++++ manifests/ec2-s3.manifest.json | 43 ---- manifests/ec2-s3.manifest.yml | 33 +++ manifests/gce-backports.manifest.json | 55 ----- manifests/gce-backports.manifest.yml | 41 ++++ manifests/gce.manifest.json | 39 ---- manifests/gce.manifest.yml | 32 +++ manifests/kvm-virtio.manifest.json | 42 ---- manifests/kvm-virtio.manifest.yml | 34 +++ manifests/kvm.manifest.json | 41 ---- manifests/kvm.manifest.yml | 31 +++ ...bs-debian-official-amd64-pvm.manifest.json | 44 ---- ...ebs-debian-official-amd64-pvm.manifest.yml | 31 +++ ...ebs-debian-official-i386-pvm.manifest.json | 44 ---- ...-ebs-debian-official-i386-pvm.manifest.yml | 31 +++ manifests/virtualbox-vagrant.manifest.json | 42 ---- manifests/virtualbox-vagrant.manifest.yml | 32 +++ manifests/virtualbox.manifest.json | 37 --- manifests/virtualbox.manifest.yml | 29 +++ 123 files changed, 1518 insertions(+), 1987 deletions(-) delete mode 100644 bootstrapvz/base/manifest-schema.json create mode 100644 bootstrapvz/base/manifest-schema.yml delete mode 100644 bootstrapvz/base/release-codenames.json create mode 100644 bootstrapvz/base/release-codenames.yml delete mode 100644 bootstrapvz/common/tasks/network-configuration.json create mode 100644 bootstrapvz/common/tasks/network-configuration.yml delete mode 100644 bootstrapvz/plugins/admin_user/manifest-schema.json create mode 100644 bootstrapvz/plugins/admin_user/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/apt_proxy/manifest-schema.json create mode 100644 bootstrapvz/plugins/apt_proxy/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/chef/manifest-schema.json create mode 100644 bootstrapvz/plugins/chef/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/cloud_init/manifest-schema.json create mode 100644 bootstrapvz/plugins/cloud_init/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/docker_daemon/manifest-schema.json create mode 100644 bootstrapvz/plugins/docker_daemon/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/image_commands/manifest-schema.json create mode 100644 bootstrapvz/plugins/image_commands/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/minimize_size/manifest-schema.json create mode 100644 bootstrapvz/plugins/minimize_size/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/ntp/manifest-schema.json create mode 100644 bootstrapvz/plugins/ntp/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/pip_install/manifest-schema.json create mode 100644 bootstrapvz/plugins/pip_install/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/prebootstrapped/manifest-schema.json create mode 100644 bootstrapvz/plugins/prebootstrapped/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/puppet/manifest-schema.json create mode 100644 bootstrapvz/plugins/puppet/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/root_password/manifest-schema.json create mode 100644 bootstrapvz/plugins/root_password/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/salt/manifest-schema.json create mode 100644 bootstrapvz/plugins/salt/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/unattended_upgrades/manifest-schema.json create mode 100644 bootstrapvz/plugins/unattended_upgrades/manifest-schema.yml delete mode 100644 bootstrapvz/plugins/vagrant/manifest-schema.json create mode 100644 bootstrapvz/plugins/vagrant/manifest-schema.yml delete mode 100644 bootstrapvz/providers/azure/manifest-schema.json create mode 100644 bootstrapvz/providers/azure/manifest-schema.yml delete mode 100644 bootstrapvz/providers/ec2/manifest-schema-s3.json create mode 100644 bootstrapvz/providers/ec2/manifest-schema-s3.yml delete mode 100644 bootstrapvz/providers/ec2/manifest-schema.json create mode 100644 bootstrapvz/providers/ec2/manifest-schema.yml delete mode 100644 bootstrapvz/providers/ec2/tasks/ami-akis.json create mode 100644 bootstrapvz/providers/ec2/tasks/ami-akis.yml delete mode 100644 bootstrapvz/providers/ec2/tasks/packages-kernels.json create mode 100644 bootstrapvz/providers/ec2/tasks/packages-kernels.yml delete mode 100644 bootstrapvz/providers/gce/manifest-schema.json create mode 100644 bootstrapvz/providers/gce/manifest-schema.yml delete mode 100644 bootstrapvz/providers/kvm/manifest-schema.json create mode 100644 bootstrapvz/providers/kvm/manifest-schema.yml delete mode 100644 bootstrapvz/providers/virtualbox/manifest-schema.json create mode 100644 bootstrapvz/providers/virtualbox/manifest-schema.yml delete mode 100644 manifests/azure.manifest.json create mode 100644 manifests/azure.manifest.yml delete mode 100644 manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json create mode 100644 manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.yml delete mode 100644 manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json create mode 100644 manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml delete mode 100644 manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json create mode 100644 manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.yml delete mode 100644 manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json create mode 100644 manifests/ec2-ebs-debian-official-amd64-pvm.manifest.yml delete mode 100644 manifests/ec2-ebs-debian-official-i386-pvm.manifest.json create mode 100644 manifests/ec2-ebs-debian-official-i386-pvm.manifest.yml delete mode 100644 manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json delete mode 100644 manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json create mode 100644 manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.yml delete mode 100644 manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json create mode 100644 manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.yml delete mode 100644 manifests/ec2-ebs-partitioned.manifest.json create mode 100644 manifests/ec2-ebs-partitioned.manifest.yml delete mode 100644 manifests/ec2-ebs-single.manifest.json create mode 100644 manifests/ec2-ebs-single.manifest.yml delete mode 100644 manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json create mode 100644 manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.yml delete mode 100644 manifests/ec2-s3.manifest.json create mode 100644 manifests/ec2-s3.manifest.yml delete mode 100644 manifests/gce-backports.manifest.json create mode 100644 manifests/gce-backports.manifest.yml delete mode 100644 manifests/gce.manifest.json create mode 100644 manifests/gce.manifest.yml delete mode 100644 manifests/kvm-virtio.manifest.json create mode 100644 manifests/kvm-virtio.manifest.yml delete mode 100644 manifests/kvm.manifest.json create mode 100644 manifests/kvm.manifest.yml delete mode 100644 manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json create mode 100644 manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.yml delete mode 100644 manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json create mode 100644 manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.yml delete mode 100644 manifests/virtualbox-vagrant.manifest.json create mode 100644 manifests/virtualbox-vagrant.manifest.yml delete mode 100644 manifests/virtualbox.manifest.json create mode 100644 manifests/virtualbox.manifest.yml diff --git a/bootstrapvz/base/__init__.py b/bootstrapvz/base/__init__.py index 1cafa81..b76d520 100644 --- a/bootstrapvz/base/__init__.py +++ b/bootstrapvz/base/__init__.py @@ -12,7 +12,7 @@ def validate_manifest(data, validator, error): :param function error: The function tha raises an error when the validation fails """ import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) # Check the bootloader/partitioning configuration. diff --git a/bootstrapvz/base/bootstrapinfo.py b/bootstrapvz/base/bootstrapinfo.py index 7aba5b0..8edb5e8 100644 --- a/bootstrapvz/base/bootstrapinfo.py +++ b/bootstrapvz/base/bootstrapinfo.py @@ -33,7 +33,7 @@ class BootstrapInformation(object): # Normalize the release codenames so that tasks may query for release codenames rather than # 'stable', 'unstable' etc. This is useful when handling cases that are specific to a release. - release_codenames_path = os.path.join(os.path.dirname(__file__), 'release-codenames.json') + release_codenames_path = os.path.join(os.path.dirname(__file__), 'release-codenames.yml') from bootstrapvz.common.tools import config_get self.release_codename = config_get(release_codenames_path, [self.manifest.system['release']]) diff --git a/bootstrapvz/base/manifest-schema.json b/bootstrapvz/base/manifest-schema.json deleted file mode 100644 index 7a5040c..0000000 --- a/bootstrapvz/base/manifest-schema.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Generic manifest", - "type": "object", - "properties": { - "provider": { - "type": "object", - "properties": { - "name": { "type": "string" } - }, - "required": ["name"] - }, - "bootstrapper": { - "type": "object", - "properties": { - "workspace": { "$ref": "#/definitions/path" }, - "mirror": { "type": "string", "format": "uri" }, - "tarball": { "type": "boolean" }, - "include_packages": { - "type": "array", - "items": { - "type": "string", - "pattern": "^[^/]+$" - }, - "minItems": 1 - }, - "exclude_packages": { - "type": "array", - "items": { - "type": "string", - "pattern": "^[^/]+$" - }, - "minItems": 1 - } - }, - "required": ["workspace"] - }, - "image": { - "type": "object", - "properties": { - "name": { "type": "string" } - }, - "required": ["name"] - }, - "system": { - "type": "object", - "properties": { - "release": { - "enum": [ - "squeeze", "wheezy", "jessie", "sid", - "oldstable", "stable", "testing", "unstable" - ] - }, - "architecture": { "enum": ["i386", "amd64"] }, - "bootloader": { "enum": ["pvgrub", "grub", "extlinux"] }, - "timezone": { "type": "string" }, - "locale": { "type": "string" }, - "charmap": { "type": "string" }, - "hostname": { - "type": "string", - "pattern": "^\\S+$" - } - }, - "required": ["release", "architecture", "bootloader", "timezone", "locale", "charmap"] - }, - "packages": { - "type": "object", - "properties": { - "mirror": { "type": "string", "format": "uri" }, - "sources": { - "type": "object", - "patternProperties": { - "^[^\/\\0]+$": { - "type": "array", - "items": { - "type": "string", - "pattern": "^(deb|deb-src)\\s+(\\[\\s*(.+\\S)?\\s*\\]\\s+)?\\S+\\s+\\S+(\\s+(.+\\S))?\\s*$" - }, - "minItems": 1 - } - }, - "additionalProperties": false, - "minItems": 1 - }, - "components": { - "type": "array", - "items": {"type": "string"}, - "minItems": 1 - }, - "preferences": { - "type": "object", - "patternProperties": { - "^[^\/\\0]+$": { - "type": "array", - "items": { - "type": "object", - "properties": { - "pin": { - "type": "string" - }, - "package": { - "type": "string" - }, - "pin-priority": { - "type": "integer" - } - }, - "required": ["pin", "package", "pin-priority"], - "additionalProperties": false - }, - "minItems": 1 - } - }, - "additionalProperties": false, - "minItems": 1 - }, - "trusted-keys": { - "type": "array", - "items": { "$ref": "#/definitions/absolute_path" }, - "minItems": 1 - }, - "install": { - "type": "array", - "items": { - "anyOf": [ - { "pattern": "^[^/]+(/[^/]+)?$" }, - { "$ref": "#/definitions/absolute_path" } - ] - }, - "minItems": 1 - }, - "install_standard": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "volume": { - "type": "object", - "properties": { - "backing": { "type": "string" }, - "partitions": { - "type": "object", - "oneOf": [ - { "$ref": "#/definitions/no_partitions" }, - { "$ref": "#/definitions/partition_table" } - ] - } - }, - "required": ["partitions"] - }, - "plugins": { - "type": "object", - "patternProperties": { - "^\\w+$": { - "type": "object" - } - }, - "additionalProperties": false - } - }, - "required": ["provider", "bootstrapper", "system", "volume"], - "definitions": { - "path": { - "type": "string", - "pattern": "^[^\\0]+$" - }, - "absolute_path": { - "type": "string", - "pattern": "^/[^\\0]+$" - }, - "bytes": { - "type": "string", - "pattern": "^\\d+([KMGT]i?B|B)$" - }, - "no_partitions": { - "type": "object", - "properties": { - "type": { "enum": ["none"] }, - "root": { "$ref": "#/definitions/partition" } - }, - "required": ["root"], - "additionalProperties": false - }, - "partition_table": { - "type": "object", - "properties": { - "type": { "enum": ["msdos", "gpt"] }, - "boot": { "$ref": "#/definitions/partition" }, - "root": { "$ref": "#/definitions/partition" }, - "swap": { - "type": "object", - "properties": { "size": { "$ref": "#/definitions/bytes" } }, - "required": ["size"] - } - }, - "required": ["root"], - "additionalProperties": false - }, - "partition": { - "type": "object", - "properties": { - "size": { "$ref": "#/definitions/bytes" }, - "filesystem": { "enum": ["ext2", "ext3", "ext4", "xfs"] }, - "format_command": { - "type": "array", - "items": {"type": "string"}, - "minItems": 1 - } - }, - "required": ["size", "filesystem"] - } - } -} diff --git a/bootstrapvz/base/manifest-schema.yml b/bootstrapvz/base/manifest-schema.yml new file mode 100644 index 0000000..7110215 --- /dev/null +++ b/bootstrapvz/base/manifest-schema.yml @@ -0,0 +1,177 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Generic manifest +type: object +required: [provider, bootstrapper, system, volume] +properties: + provider: + type: object + properties: + name: {type: string} + required: [name] + bootstrapper: + type: object + properties: + exclude_packages: + type: array + items: + type: string + pattern: '^[^/]+$' + minItems: 1 + include_packages: + type: array + items: + type: string + pattern: '^[^/]+$' + minItems: 1 + mirror: + type: string + format: uri + tarball: {type: boolean} + workspace: + $ref: '#/definitions/path' + required: [workspace] + image: + type: object + properties: + name: {type: string} + required: [name] + system: + properties: + architecture: + enum: [i386, amd64] + bootloader: + enum: + - pvgrub + - grub + - extlinux + charmap: {type: string} + hostname: + type: string + pattern: ^\S+$ + locale: {type: string} + release: + enum: + - squeeze + - wheezy + - jessie + - sid + - oldstable + - stable + - testing + - unstable + timezone: {type: string} + required: + - release + - architecture + - bootloader + - timezone + - locale + - charmap + type: object + packages: + type: object + properties: + components: + type: array + items: {type: string} + minItems: 1 + install: + type: array + items: + anyOf: + - pattern: ^[^/]+(/[^/]+)?$ + - $ref: '#/definitions/absolute_path' + minItems: 1 + install_standard: {type: boolean} + mirror: + type: string + format: uri + preferences: + type: object + patternProperties: + ^[^/\0]+$: + type: array + items: + type: object + properties: + package: {type: string} + pin: {type: string} + pin-priority: {type: integer} + required: [pin, package, pin-priority] + additionalProperties: false + minItems: 1 + minItems: 1 + additionalProperties: false + sources: + type: object + patternProperties: + ^[^/\0]+$: + items: + type: string + pattern: ^(deb|deb-src)\s+(\[\s*(.+\S)?\s*\]\s+)?\S+\s+\S+(\s+(.+\S))?\s*$ + minItems: 1 + type: array + minItems: 1 + additionalProperties: false + trusted-keys: + type: array + items: + $ref: '#/definitions/absolute_path' + minItems: 1 + additionalProperties: false + plugins: + type: object + patternProperties: + ^\w+$: {type: object} + volume: + type: object + properties: + backing: {type: string} + partitions: + type: object + oneOf: + - $ref: '#/definitions/no_partitions' + - $ref: '#/definitions/partition_table' + required: [partitions] +definitions: + absolute_path: + type: string + pattern: ^/[^\0]+$ + bytes: + pattern: ^\d+([KMGT]i?B|B)$ + type: string + no_partitions: + type: object + properties: + root: {$ref: '#/definitions/partition'} + type: {enum: [none]} + required: [root] + additionalProperties: false + partition: + type: object + properties: + filesystem: + enum: [ext2, ext3, ext4, xfs] + format_command: + items: {type: string} + minItems: 1 + type: array + size: {$ref: '#/definitions/bytes'} + required: [size, filesystem] + partition_table: + type: object + additionalProperties: false + properties: + boot: {$ref: '#/definitions/partition'} + root: {$ref: '#/definitions/partition'} + swap: + type: object + properties: + size: {$ref: '#/definitions/bytes'} + required: [size] + type: {enum: [msdos, gpt]} + required: [root] + path: + type: string + pattern: ^[^\0]+$ diff --git a/bootstrapvz/base/manifest.py b/bootstrapvz/base/manifest.py index f982b44..44f56f1 100644 --- a/bootstrapvz/base/manifest.py +++ b/bootstrapvz/base/manifest.py @@ -2,8 +2,7 @@ to determine which tasks should be added to the tasklist, what arguments various invocations should have etc.. """ -from bootstrapvz.common.tools import load_json -from bootstrapvz.common.tools import load_yaml +from bootstrapvz.common.tools import load_data import logging log = logging.getLogger(__name__) @@ -31,12 +30,7 @@ class Manifest(object): Once they are loaded, the initialize() function is called on each of them (if it exists). The provider must have an initialize function. """ - # Load the manifest JSON using the loader in common.tools - # It strips comments (which are invalid in strict json) before loading the data. - if self.path.endswith('.json'): - self.data = load_json(self.path) - elif self.path.endswith('.yml') or self.path.endswith('.yaml'): - self.data = load_yaml(self.path) + self.data = load_data(self.path) # Get the provider name from the manifest and load the corresponding module provider_modname = 'bootstrapvz.providers.' + self.data['provider']['name'] @@ -102,19 +96,20 @@ class Manifest(object): :param str schema_path: Path to the json-schema to use for validation """ import jsonschema - schema = load_json(schema_path) + + schema = load_data(schema_path) try: jsonschema.validate(data, schema) except jsonschema.ValidationError as e: self.validation_error(e.message, e.path) - def validation_error(self, message, json_path=None): + def validation_error(self, message, data_path=None): """This function is passed to all validation functions so that they may raise a validation error because a custom validation of the manifest failed. :param str message: Message to user about the error - :param list json_path: A path to the location in the manifest where the error occurred + :param list data_path: A path to the location in the manifest where the error occurred :raises ManifestError: With absolute certainty """ from bootstrapvz.common.exceptions import ManifestError - raise ManifestError(message, self.path, json_path) + raise ManifestError(message, self.path, data_path) diff --git a/bootstrapvz/base/release-codenames.json b/bootstrapvz/base/release-codenames.json deleted file mode 100644 index cac8692..0000000 --- a/bootstrapvz/base/release-codenames.json +++ /dev/null @@ -1,22 +0,0 @@ -{ // This is a mapping of Debian release names to their respective codenames - "unstable": "sid", - "testing": "jessie", - "stable": "wheezy", - "oldstable": "squeeze", - - "jessie": "jessie", - "wheezy": "wheezy", - "squeeze": "squeeze", - - // The following release names are not supported, but included of completeness sake - "lenny": "lenny", - "etch": "etch", - "sarge": "sarge", - "woody": "woody", - "potato": "potato", - "slink": "slink", - "hamm": "hamm", - "bo": "bo", - "rex": "rex", - "buzz": "buzz" -} diff --git a/bootstrapvz/base/release-codenames.yml b/bootstrapvz/base/release-codenames.yml new file mode 100644 index 0000000..218488d --- /dev/null +++ b/bootstrapvz/base/release-codenames.yml @@ -0,0 +1,23 @@ +--- +# This is a mapping of Debian release names to their respective codenames + +unstable: sid +testing: jessie +stable: wheezy +oldstable: squeeze + +jessie: jessie +wheezy: wheezy +squeeze: squeeze + +# The following release names are not supported, but included fir completeness sake +lenny: lenny +etch: etch +sarge: sarge +woody: woody +potato: potato +slink: slink +hamm: hamm +bo: bo +rex: rex +buzz: buz diff --git a/bootstrapvz/common/exceptions.py b/bootstrapvz/common/exceptions.py index 940d2b0..a349c07 100644 --- a/bootstrapvz/common/exceptions.py +++ b/bootstrapvz/common/exceptions.py @@ -1,16 +1,16 @@ class ManifestError(Exception): - def __init__(self, message, manifest_path, json_path=None): + def __init__(self, message, manifest_path, data_path=None): self.message = message self.manifest_path = manifest_path - self.json_path = json_path + self.data_path = data_path def __str__(self): - if self.json_path is not None: - path = '.'.join(map(str, self.json_path)) - return ('{msg}\n File path: {file}\n JSON path: {jsonpath}' - .format(msg=self.message, file=self.manifest_path, jsonpath=path)) + if self.data_path is not None: + path = '.'.join(map(str, self.data_path)) + return ('{msg}\n File path: {file}\n Data path: {datapath}' + .format(msg=self.message, file=self.manifest_path, datapath=path)) return '{file}: {msg}'.format(msg=self.message, file=self.manifest_path) diff --git a/bootstrapvz/common/tasks/network-configuration.json b/bootstrapvz/common/tasks/network-configuration.json deleted file mode 100644 index 2937384..0000000 --- a/bootstrapvz/common/tasks/network-configuration.json +++ /dev/null @@ -1,14 +0,0 @@ -// This is a mapping of Debian release codenames to NIC configurations -// Every item in an array is a line -{ -"squeeze": ["auto lo", - "iface lo inet loopback", - "auto eth0", - "iface eth0 inet dhcp"], -"wheezy": ["auto eth0", - "iface eth0 inet dhcp"], -"jessie": ["auto eth0", - "iface eth0 inet dhcp"], -"sid": ["auto eth0", - "iface eth0 inet dhcp"] -} diff --git a/bootstrapvz/common/tasks/network-configuration.yml b/bootstrapvz/common/tasks/network-configuration.yml new file mode 100644 index 0000000..c044069 --- /dev/null +++ b/bootstrapvz/common/tasks/network-configuration.yml @@ -0,0 +1,17 @@ +--- +# This is a mapping of Debian release codenames to NIC configurations +# Every item in an array is a line +squeeze: +- auto lo +- iface lo inet loopback +- auto eth0 +- iface eth0 inet dhcp +wheezy: +- auto eth0 +- iface eth0 inet dhcp +jessie: +- auto eth0 +- iface eth0 inet dhcp +sid: +- auto eth0 +- iface eth0 inet dhcp diff --git a/bootstrapvz/common/tasks/network.py b/bootstrapvz/common/tasks/network.py index a85a34d..72da5c9 100644 --- a/bootstrapvz/common/tasks/network.py +++ b/bootstrapvz/common/tasks/network.py @@ -45,7 +45,7 @@ class ConfigureNetworkIF(Task): @classmethod def run(cls, info): - network_config_path = os.path.join(os.path.dirname(__file__), 'network-configuration.json') + network_config_path = os.path.join(os.path.dirname(__file__), 'network-configuration.yml') from ..tools import config_get if_config = config_get(network_config_path, [info.release_codename]) diff --git a/bootstrapvz/common/tools.py b/bootstrapvz/common/tools.py index a2704da..315291e 100644 --- a/bootstrapvz/common/tools.py +++ b/bootstrapvz/common/tools.py @@ -1,3 +1,5 @@ + + def log_check_call(command, stdin=None, env=None, shell=False, cwd=None): status, stdout, stderr = log_call(command, stdin, env, shell, cwd) if status != 0: @@ -73,8 +75,21 @@ def load_yaml(path): return yaml.safe_load(fobj) +def load_data(path): + import os.path + filename, extension = os.path.splitext(path) + if not os.path.isfile(path): + raise Exception('The path {path} does not point to a file.'.format(path=path)) + if extension == '.json': + return load_json(path) + elif extension == '.yml' or extension == '.yaml': + return load_yaml(path) + else: + raise Exception('Unrecognized extension: {ext}'.format(ext=extension)) + + def config_get(path, config_path): - config = load_json(path) + config = load_data(path) for key in config_path: config = config.get(key) return config diff --git a/bootstrapvz/plugins/admin_user/__init__.py b/bootstrapvz/plugins/admin_user/__init__.py index 67f3488..b506b0d 100644 --- a/bootstrapvz/plugins/admin_user/__init__.py +++ b/bootstrapvz/plugins/admin_user/__init__.py @@ -2,7 +2,7 @@ def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/admin_user/manifest-schema.json b/bootstrapvz/plugins/admin_user/manifest-schema.json deleted file mode 100644 index fc3c421..0000000 --- a/bootstrapvz/plugins/admin_user/manifest-schema.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Admin user plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "admin_user": { - "type": "object", - "properties": { - "username": { - "type": "string" - } - }, - "required": ["username"] - } - } - } - } -} diff --git a/bootstrapvz/plugins/admin_user/manifest-schema.yml b/bootstrapvz/plugins/admin_user/manifest-schema.yml new file mode 100644 index 0000000..31e8d82 --- /dev/null +++ b/bootstrapvz/plugins/admin_user/manifest-schema.yml @@ -0,0 +1,13 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Admin user plugin manifest +type: object +properties: + plugins: + type: object + properties: + admin_user: + type: object + properties: + username: {type: string} + required: [username] diff --git a/bootstrapvz/plugins/apt_proxy/__init__.py b/bootstrapvz/plugins/apt_proxy/__init__.py index 6ca8f71..132c679 100644 --- a/bootstrapvz/plugins/apt_proxy/__init__.py +++ b/bootstrapvz/plugins/apt_proxy/__init__.py @@ -1,6 +1,6 @@ def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/apt_proxy/manifest-schema.json b/bootstrapvz/plugins/apt_proxy/manifest-schema.json deleted file mode 100644 index 8c8e932..0000000 --- a/bootstrapvz/plugins/apt_proxy/manifest-schema.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "APT proxy plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "apt_proxy": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "port": { - "type": "integer" - } - }, - "required": ["address", "port"] - } - } - } - } -} diff --git a/bootstrapvz/plugins/apt_proxy/manifest-schema.yml b/bootstrapvz/plugins/apt_proxy/manifest-schema.yml new file mode 100644 index 0000000..5f3f051 --- /dev/null +++ b/bootstrapvz/plugins/apt_proxy/manifest-schema.yml @@ -0,0 +1,17 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: APT proxy plugin manifest +type: object +properties: + plugins: + type: object + properties: + apt_proxy: + type: object + properties: + address: {type: string} + port: {type: integer} + persistent: {type: boolean} + required: + - address + - port diff --git a/bootstrapvz/plugins/chef/__init__.py b/bootstrapvz/plugins/chef/__init__.py index 7ba2396..5716b20 100644 --- a/bootstrapvz/plugins/chef/__init__.py +++ b/bootstrapvz/plugins/chef/__init__.py @@ -3,7 +3,7 @@ import tasks def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/chef/manifest-schema.json b/bootstrapvz/plugins/chef/manifest-schema.json deleted file mode 100644 index 9d70622..0000000 --- a/bootstrapvz/plugins/chef/manifest-schema.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Chef plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "chef": { - "type": "object", - "properties": { - "assets": { "$ref": "#/definitions/absolute_path" } - }, - "required": ["assets"] - } - } - } - }, - "definitions": { - "absolute_path": { - "type": "string", - "pattern": "^/[^\\0]+$" - } - } -} diff --git a/bootstrapvz/plugins/chef/manifest-schema.yml b/bootstrapvz/plugins/chef/manifest-schema.yml new file mode 100644 index 0000000..58fd02f --- /dev/null +++ b/bootstrapvz/plugins/chef/manifest-schema.yml @@ -0,0 +1,19 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Chef plugin manifest +type: object +properties: + plugins: + type: object + properties: + chef: + type: object + properties: + assets: + $ref: '#/definitions/absolute_path' + required: + - assets +definitions: + absolute_path: + pattern: ^/[^\0]+$ + type: string diff --git a/bootstrapvz/plugins/cloud_init/__init__.py b/bootstrapvz/plugins/cloud_init/__init__.py index c08eebe..999572b 100644 --- a/bootstrapvz/plugins/cloud_init/__init__.py +++ b/bootstrapvz/plugins/cloud_init/__init__.py @@ -2,7 +2,7 @@ def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/cloud_init/manifest-schema.json b/bootstrapvz/plugins/cloud_init/manifest-schema.json deleted file mode 100644 index 08cd153..0000000 --- a/bootstrapvz/plugins/cloud_init/manifest-schema.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "cloud-init plugin manifest", - "type": "object", - "properties": { - "system": { - "type": "object", - "properties": { - "release": { - "type": "string", - "enum": ["wheezy", "stable", - "jessie", "testing", - "sid", "unstable"] - } - } - }, - "plugins": { - "type": "object", - "properties": { - "cloud_init": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "disable_modules": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "metadata_sources": { - "type": "string" - } - }, - "required": ["username"] - }, - "packages": {"type": "object"} - }, - "required": ["cloud_init"] - } - } -} diff --git a/bootstrapvz/plugins/cloud_init/manifest-schema.yml b/bootstrapvz/plugins/cloud_init/manifest-schema.yml new file mode 100644 index 0000000..ea7f64c --- /dev/null +++ b/bootstrapvz/plugins/cloud_init/manifest-schema.yml @@ -0,0 +1,30 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: cloud-init plugin manifest +type: object +properties: + system: + type: object + properties: + release: + type: string + enum: + - wheezy + - stable + - jessie + - testing + - sid + - unstable + plugins: + type: object + properties: + cloud_init: + type: object + properties: + username: {type: string} + metadata_sources: {type: string} + disable_modules: + type: array + items: {type: string} + uniqueItems: true + required: [username] diff --git a/bootstrapvz/plugins/docker_daemon/__init__.py b/bootstrapvz/plugins/docker_daemon/__init__.py index f32e6b1..f2eda61 100644 --- a/bootstrapvz/plugins/docker_daemon/__init__.py +++ b/bootstrapvz/plugins/docker_daemon/__init__.py @@ -1,14 +1,10 @@ import tasks import os.path -from bootstrapvz.common.exceptions import ManifestError def validate_manifest(data, validator, error): - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) - try: - validator(data, schema_path) - except ManifestError, e: - error('docker_daemon manifest validation failed: "%s"' % e.message, e.json_path) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) + validator(data, schema_path) if data.get('system', {}).get('release', None) in ['wheezy', 'stable']: # prefs is a generator of apt preferences across files in the manifest prefs = (item for vals in data.get('packages', {}).get('preferences', {}).values() for item in vals) diff --git a/bootstrapvz/plugins/docker_daemon/manifest-schema.json b/bootstrapvz/plugins/docker_daemon/manifest-schema.json deleted file mode 100644 index 365ccfa..0000000 --- a/bootstrapvz/plugins/docker_daemon/manifest-schema.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Install Docker plugin manifest", - "type": "object", - "properties": { - "system": { - "type": "object", - "properties": { - "architecture": { - "type": "string", - "enum": ["amd64"] - // Docker runs on x86_64 only - }, - "release": { - "not": { - "type": "string", - "enum": ["squeeze", "oldstable"] - // Docker needs at least wheezy + backports. - } - } - } - } - } -} diff --git a/bootstrapvz/plugins/docker_daemon/manifest-schema.yml b/bootstrapvz/plugins/docker_daemon/manifest-schema.yml new file mode 100644 index 0000000..0746d90 --- /dev/null +++ b/bootstrapvz/plugins/docker_daemon/manifest-schema.yml @@ -0,0 +1,17 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Install Docker plugin manifest +type: object +properties: + system: + type: object + properties: + architecture: + type: string + enum: [amd64] + release: + not: + type: string + enum: + - squeeze + - oldstable diff --git a/bootstrapvz/plugins/image_commands/__init__.py b/bootstrapvz/plugins/image_commands/__init__.py index 1642e0d..4d1600f 100644 --- a/bootstrapvz/plugins/image_commands/__init__.py +++ b/bootstrapvz/plugins/image_commands/__init__.py @@ -2,7 +2,7 @@ def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/image_commands/manifest-schema.json b/bootstrapvz/plugins/image_commands/manifest-schema.json deleted file mode 100644 index 9785c90..0000000 --- a/bootstrapvz/plugins/image_commands/manifest-schema.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Image commands plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "image_commands": { - "type": "object", - "properties": { - "commands": { - "type": "array", - "items": { - "type": "array", - "items": {"type": "string"}, - "minItems": 1 - }, - "minItems": 1 - } - }, - "required": ["commands"] - } - }, - "required": ["image_commands"] - } - }, - "required": ["plugins"] -} diff --git a/bootstrapvz/plugins/image_commands/manifest-schema.yml b/bootstrapvz/plugins/image_commands/manifest-schema.yml new file mode 100644 index 0000000..da1ad8d --- /dev/null +++ b/bootstrapvz/plugins/image_commands/manifest-schema.yml @@ -0,0 +1,25 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +properties: + plugins: + properties: + image_commands: + properties: + commands: + items: + items: + type: string + minItems: 1 + type: array + minItems: 1 + type: array + required: + - commands + type: object + required: + - image_commands + type: object +required: +- plugins +title: Image commands plugin manifest +type: object diff --git a/bootstrapvz/plugins/minimize_size/__init__.py b/bootstrapvz/plugins/minimize_size/__init__.py index 3f8c583..107da6e 100644 --- a/bootstrapvz/plugins/minimize_size/__init__.py +++ b/bootstrapvz/plugins/minimize_size/__init__.py @@ -3,7 +3,7 @@ import tasks def validate_manifest(data, validator, error): import os.path - schema_path = os.path.join(os.path.dirname(__file__), 'manifest-schema.json') + schema_path = os.path.join(os.path.dirname(__file__), 'manifest-schema.yml') validator(data, schema_path) if data['plugins']['minimize_size'].get('shrink', False) and data['volume']['backing'] != 'vmdk': error('Can only shrink vmdk images', ['plugins', 'minimize_size', 'shrink']) diff --git a/bootstrapvz/plugins/minimize_size/manifest-schema.json b/bootstrapvz/plugins/minimize_size/manifest-schema.json deleted file mode 100644 index 0181fa2..0000000 --- a/bootstrapvz/plugins/minimize_size/manifest-schema.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Minimize size plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "minimize_size": { - "type": "object", - "properties": { - "shrink": { "type": "boolean" }, - "zerofree": { "type": "boolean" } - } - } - } - } - } -} diff --git a/bootstrapvz/plugins/minimize_size/manifest-schema.yml b/bootstrapvz/plugins/minimize_size/manifest-schema.yml new file mode 100644 index 0000000..fc84249 --- /dev/null +++ b/bootstrapvz/plugins/minimize_size/manifest-schema.yml @@ -0,0 +1,15 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +properties: + plugins: + properties: + minimize_size: + properties: + shrink: + type: boolean + zerofree: + type: boolean + type: object + type: object +title: Minimize size plugin manifest +type: object diff --git a/bootstrapvz/plugins/ntp/__init__.py b/bootstrapvz/plugins/ntp/__init__.py index 9a68d0f..858af72 100644 --- a/bootstrapvz/plugins/ntp/__init__.py +++ b/bootstrapvz/plugins/ntp/__init__.py @@ -1,6 +1,6 @@ def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/ntp/manifest-schema.json b/bootstrapvz/plugins/ntp/manifest-schema.json deleted file mode 100644 index c386045..0000000 --- a/bootstrapvz/plugins/ntp/manifest-schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "NTP plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "ntp": { - "type": "object", - "properties": { - "servers": { - "type": "array", - "items": {"type": "string"}, - "minItems": 1 - } - } - } - } - } - } -} diff --git a/bootstrapvz/plugins/ntp/manifest-schema.yml b/bootstrapvz/plugins/ntp/manifest-schema.yml new file mode 100644 index 0000000..2303d1c --- /dev/null +++ b/bootstrapvz/plugins/ntp/manifest-schema.yml @@ -0,0 +1,15 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: NTP plugin manifest +type: object +properties: + plugins: + type: object + properties: + ntp: + type: object + properties: + servers: + type: array + items: {type: string} + minItems: 1 diff --git a/bootstrapvz/plugins/pip_install/__init__.py b/bootstrapvz/plugins/pip_install/__init__.py index fe75aae..0f6810b 100644 --- a/bootstrapvz/plugins/pip_install/__init__.py +++ b/bootstrapvz/plugins/pip_install/__init__.py @@ -3,7 +3,7 @@ import tasks def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/pip_install/manifest-schema.json b/bootstrapvz/plugins/pip_install/manifest-schema.json deleted file mode 100644 index 6d3f27e..0000000 --- a/bootstrapvz/plugins/pip_install/manifest-schema.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Pip install plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "pip_install": { - "type": "object", - "properties": { - "packages": { "$ref": "#/definitions/packages" } - }, - "minProperties": 1, - "additionalProperties": false - } - } - } - }, - "definitions": { - "packages": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - } - } -} diff --git a/bootstrapvz/plugins/pip_install/manifest-schema.yml b/bootstrapvz/plugins/pip_install/manifest-schema.yml new file mode 100644 index 0000000..df3b922 --- /dev/null +++ b/bootstrapvz/plugins/pip_install/manifest-schema.yml @@ -0,0 +1,17 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Pip install plugin manifest +type: object +properties: + plugins: + type: object + properties: + pip_install: + type: object + properties: + packages: + type: array + items: + type: string + minItems: 1 + uniqueItems: true diff --git a/bootstrapvz/plugins/prebootstrapped/__init__.py b/bootstrapvz/plugins/prebootstrapped/__init__.py index dbda042..bcdc4fc 100644 --- a/bootstrapvz/plugins/prebootstrapped/__init__.py +++ b/bootstrapvz/plugins/prebootstrapped/__init__.py @@ -15,7 +15,7 @@ from bootstrapvz.common.tasks import partitioning def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/prebootstrapped/manifest-schema.json b/bootstrapvz/plugins/prebootstrapped/manifest-schema.json deleted file mode 100644 index d3a19d7..0000000 --- a/bootstrapvz/plugins/prebootstrapped/manifest-schema.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Prebootstrapped plugin manifest", - "type": "object", - "properties": { - "volume": { - "type": "object", - "properties": { - "backing": { - "type": "string", - "enum": ["raw", "ebs", "s3", "vdi", "vmdk"] - } - }, - "required": ["backing"] - }, - "plugins": { - "type": "object", - "properties": { - "prebootstrapped": { - "type": "object", - "properties": { - "snapshot": { - "type": "string" - }, - "image": { - "type": "string" - } - } - } - } - } - }, - "required": ["volume"] -} diff --git a/bootstrapvz/plugins/prebootstrapped/manifest-schema.yml b/bootstrapvz/plugins/prebootstrapped/manifest-schema.yml new file mode 100644 index 0000000..68fbbe4 --- /dev/null +++ b/bootstrapvz/plugins/prebootstrapped/manifest-schema.yml @@ -0,0 +1,25 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Prebootstrapped plugin manifest +type: object +properties: + volume: + type: object + properties: + backing: + type: string + enum: + - raw + - ebs + - s3 + - vdi + - vmdk + required: [backing] + plugins: + type: object + properties: + prebootstrapped: + type: object + properties: + image: {type: string} + snapshot: {type: string} diff --git a/bootstrapvz/plugins/puppet/__init__.py b/bootstrapvz/plugins/puppet/__init__.py index 5a4fcbf..529c1d5 100644 --- a/bootstrapvz/plugins/puppet/__init__.py +++ b/bootstrapvz/plugins/puppet/__init__.py @@ -3,7 +3,7 @@ import tasks def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/puppet/manifest-schema.json b/bootstrapvz/plugins/puppet/manifest-schema.json deleted file mode 100644 index cd3891f..0000000 --- a/bootstrapvz/plugins/puppet/manifest-schema.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Puppet plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "puppet": { - "type": "object", - "properties": { - "manifest": { "$ref": "#/definitions/absolute_path" }, - "assets": { "$ref": "#/definitions/absolute_path" }, - "enable_agent": { "type": "boolean" } - }, - "minProperties": 1, - "additionalProperties": false - } - } - } - }, - "definitions": { - "absolute_path": { - "type": "string", - "pattern": "^/[^\\0]+$" - } - } -} diff --git a/bootstrapvz/plugins/puppet/manifest-schema.yml b/bootstrapvz/plugins/puppet/manifest-schema.yml new file mode 100644 index 0000000..e874dac --- /dev/null +++ b/bootstrapvz/plugins/puppet/manifest-schema.yml @@ -0,0 +1,20 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Puppet plugin manifest +type: object +properties: + plugins: + properties: + type: object + puppet: + type: object + properties: + assets: {$ref: '#/definitions/absolute_path'} + enable_agent: {type: boolean} + manifest: {$ref: '#/definitions/absolute_path'} + minProperties: 1 + additionalProperties: false +definitions: + absolute_path: + pattern: ^/[^\0]+$ + type: string diff --git a/bootstrapvz/plugins/root_password/__init__.py b/bootstrapvz/plugins/root_password/__init__.py index 7ca6870..850c6d2 100644 --- a/bootstrapvz/plugins/root_password/__init__.py +++ b/bootstrapvz/plugins/root_password/__init__.py @@ -2,7 +2,7 @@ def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/root_password/manifest-schema.json b/bootstrapvz/plugins/root_password/manifest-schema.json deleted file mode 100644 index fee0b5f..0000000 --- a/bootstrapvz/plugins/root_password/manifest-schema.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Root password plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "root_password": { - "type": "object", - "properties": { - "password": { - "type": "string" - } - }, - "required": ["password"] - } - } - } - } -} diff --git a/bootstrapvz/plugins/root_password/manifest-schema.yml b/bootstrapvz/plugins/root_password/manifest-schema.yml new file mode 100644 index 0000000..7267807 --- /dev/null +++ b/bootstrapvz/plugins/root_password/manifest-schema.yml @@ -0,0 +1,13 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Root password plugin manifest +type: object +properties: + plugins: + type: object + properties: + root_password: + type: object + properties: + password: {type: string} + required: [password] diff --git a/bootstrapvz/plugins/salt/__init__.py b/bootstrapvz/plugins/salt/__init__.py index 0b9cf11..f165f49 100644 --- a/bootstrapvz/plugins/salt/__init__.py +++ b/bootstrapvz/plugins/salt/__init__.py @@ -3,7 +3,7 @@ import tasks def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/salt/manifest-schema.json b/bootstrapvz/plugins/salt/manifest-schema.json deleted file mode 100644 index c6f12ca..0000000 --- a/bootstrapvz/plugins/salt/manifest-schema.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Saltstack plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "salt": { - "type": "object", - "properties": { - "master": { "type": "string" }, - "install_source": { "enum": ["stable", "daily", "git"] }, - "version": { "type": "string" }, - "grains": { - "type": "object", - "patternProperties": { - "^[^\/\\0]+$": { "type": "string" } - }, - "minItems": 1 - } - }, - "required": ["install_source"] - } - } - } - } -} diff --git a/bootstrapvz/plugins/salt/manifest-schema.yml b/bootstrapvz/plugins/salt/manifest-schema.yml new file mode 100644 index 0000000..43b6b3a --- /dev/null +++ b/bootstrapvz/plugins/salt/manifest-schema.yml @@ -0,0 +1,24 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Saltstack plugin manifest +type: object +properties: + plugins: + type: object + properties: + salt: + type: object + properties: + grains: + type: object + patternProperties: + ^[^/\0]+$: {type: string} + minItems: 1 + install_source: + enum: + - stable + - daily + - git + master: {type: string} + version: {type: string} + required: [install_source] diff --git a/bootstrapvz/plugins/unattended_upgrades/__init__.py b/bootstrapvz/plugins/unattended_upgrades/__init__.py index f67e60e..dbf5ebd 100644 --- a/bootstrapvz/plugins/unattended_upgrades/__init__.py +++ b/bootstrapvz/plugins/unattended_upgrades/__init__.py @@ -2,7 +2,7 @@ def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/unattended_upgrades/manifest-schema.json b/bootstrapvz/plugins/unattended_upgrades/manifest-schema.json deleted file mode 100644 index 3e45a7b..0000000 --- a/bootstrapvz/plugins/unattended_upgrades/manifest-schema.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Unattended upgrades plugin manifest", - "type": "object", - "properties": { - "plugins": { - "type": "object", - "properties": { - "unattended_upgrades": { - "type": "object", - "properties": { - "update_interval": { - "type": "integer" - }, - "download_interval": { - "type": "integer" - }, - "upgrade_interval": { - "type": "integer" - } - }, - "required": ["update_interval", "download_interval", "upgrade_interval"] - } - }, - "required": ["unattended_upgrades"] - } - }, - "required": ["plugins"] -} diff --git a/bootstrapvz/plugins/unattended_upgrades/manifest-schema.yml b/bootstrapvz/plugins/unattended_upgrades/manifest-schema.yml new file mode 100644 index 0000000..7e5fc0b --- /dev/null +++ b/bootstrapvz/plugins/unattended_upgrades/manifest-schema.yml @@ -0,0 +1,18 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Unattended upgrades plugin manifest +type: object +properties: + plugins: + type: object + properties: + unattended_upgrades: + type: object + properties: + download_interval: {type: integer} + update_interval: {type: integer} + upgrade_interval: {type: integer} + required: + - update_interval + - download_interval + - upgrade_interval diff --git a/bootstrapvz/plugins/vagrant/__init__.py b/bootstrapvz/plugins/vagrant/__init__.py index af0c6c5..b820a8c 100644 --- a/bootstrapvz/plugins/vagrant/__init__.py +++ b/bootstrapvz/plugins/vagrant/__init__.py @@ -3,7 +3,7 @@ import tasks def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/plugins/vagrant/manifest-schema.json b/bootstrapvz/plugins/vagrant/manifest-schema.json deleted file mode 100644 index bb35ab5..0000000 --- a/bootstrapvz/plugins/vagrant/manifest-schema.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Vagrant plugin manifest", - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": ["virtualbox"] - }, - "system": { - "required": ["hostname"] - }, - "volume": { - "type": "object", - "properties": { - "backing": { - "type": "string", - "enum": ["vmdk"] - // VirtualBox only supports vmdk or raw when importing via OVF: - // https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp?rev=51092#L636 - } - }, - "required": ["backing"] - }, - "plugins": { - "type": "object", - "properties": { - "vagrant": { - "type": "object" - } - } - } - } -} diff --git a/bootstrapvz/plugins/vagrant/manifest-schema.yml b/bootstrapvz/plugins/vagrant/manifest-schema.yml new file mode 100644 index 0000000..c27172f --- /dev/null +++ b/bootstrapvz/plugins/vagrant/manifest-schema.yml @@ -0,0 +1,24 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Vagrant plugin manifest +type: object +properties: + provider: + type: object + properties: + name: + type: string + enum: [virtualbox] + system: + required: [hostname] + volume: + type: object + properties: + backing: + type: string + enum: [vmdk] + required: [backing] + plugins: + type: object + properties: + vagrant: {type: object} diff --git a/bootstrapvz/providers/azure/__init__.py b/bootstrapvz/providers/azure/__init__.py index 8b40123..a4c2415 100644 --- a/bootstrapvz/providers/azure/__init__.py +++ b/bootstrapvz/providers/azure/__init__.py @@ -13,7 +13,7 @@ def initialize(): def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/providers/azure/manifest-schema.json b/bootstrapvz/providers/azure/manifest-schema.json deleted file mode 100644 index 52516e6..0000000 --- a/bootstrapvz/providers/azure/manifest-schema.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Azure manifest", - "type": "object", - "properties": { - "provider": { - "type": "object", - "properties": { - "waagent": { - "type": "object", - "properties": { - "conf": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": ["version"] - } - } - "required": ["waagent"] - }, - "system": { - "type": "object", - "properties": { - "bootloader": { - "type": "string", - "enum": ["grub", "extlinux"] - } - }, - }, - "volume": { - "type": "object", - "properties": { - "backing": { - "type": "string", - "enum": ["raw"] - }, - "partitions": { - "type": "object", - "properties": { - "type": { "enum": ["none", "msdos", "gpt"] } - } - } - }, - "required": ["backing"] - } - } -} diff --git a/bootstrapvz/providers/azure/manifest-schema.yml b/bootstrapvz/providers/azure/manifest-schema.yml new file mode 100644 index 0000000..8d9a34d --- /dev/null +++ b/bootstrapvz/providers/azure/manifest-schema.yml @@ -0,0 +1,38 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: Azure manifest +type: object +properties: + provider: + type: object + properties: + waagent: + type: object + properties: + conf: {type: string} + version: {type: string} + required: [version] + required: [waagent] + system: + type: object + properties: + bootloader: + type: string + enum: + - grub + - extlinux + volume: + type: object + properties: + backing: + type: string + enum: [raw] + partitions: + type: object + properties: + type: + enum: + - none + - msdos + - gpt + required: [backing] diff --git a/bootstrapvz/providers/ec2/__init__.py b/bootstrapvz/providers/ec2/__init__.py index 4a06d39..ed761d1 100644 --- a/bootstrapvz/providers/ec2/__init__.py +++ b/bootstrapvz/providers/ec2/__init__.py @@ -23,7 +23,7 @@ def initialize(): def validate_manifest(data, validator, error): import os.path - validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) from bootstrapvz.common.bytes import Bytes if data['volume']['backing'] == 'ebs': @@ -35,7 +35,7 @@ def validate_manifest(data, validator, error): msg = ('The volume size must be a multiple of 1GiB when using EBS backing') error(msg, ['volume', 'partitions']) else: - validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema-s3.json')) + validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema-s3.yml')) bootloader = data['system']['bootloader'] virtualization = data['provider']['virtualization'] diff --git a/bootstrapvz/providers/ec2/manifest-schema-s3.json b/bootstrapvz/providers/ec2/manifest-schema-s3.json deleted file mode 100644 index 6c92f33..0000000 --- a/bootstrapvz/providers/ec2/manifest-schema-s3.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "EC2 manifest for instance store AMIs", - "type": "object", - "properties": { - "provider": { - "type": "object", - "properties": { - "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}$)" - } - } - } - } - }, - "image": { - "type": "object", - "properties": { - "bucket": { - "type": "string" - }, - "region": { - "$ref": "#/definitions/aws-region" - } - }, - "required": ["bucket", "region"] - } - }, - "required": ["image"], - "definitions": { - "aws-region": { - "enum": ["ap-northeast-1", "ap-southeast-1", - "ap-southeast-2", "eu-west-1", - "sa-east-1", "us-east-1", - "us-gov-west-1", "us-west-1", - "us-west-2", "cn-north-1"] - } - } -} diff --git a/bootstrapvz/providers/ec2/manifest-schema-s3.yml b/bootstrapvz/providers/ec2/manifest-schema-s3.yml new file mode 100644 index 0000000..6e0fc3e --- /dev/null +++ b/bootstrapvz/providers/ec2/manifest-schema-s3.yml @@ -0,0 +1,38 @@ +--- +$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: + 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}$) +required: [image] +definitions: + aws-region: + enum: + - ap-northeast-1 + - ap-southeast-1 + - ap-southeast-2 + - eu-west-1 + - sa-east-1 + - us-east-1 + - us-gov-west-1 + - us-west-1 + - us-west-2 + - cn-north-1 diff --git a/bootstrapvz/providers/ec2/manifest-schema.json b/bootstrapvz/providers/ec2/manifest-schema.json deleted file mode 100644 index 2baed68..0000000 --- a/bootstrapvz/providers/ec2/manifest-schema.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "EC2 manifest", - "type": "object", - "properties": { - "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": { - "description": { - "type": "string" - } - } - }, - "system": { - "type": "object", - "properties": { - "bootloader": { - "type": "string", - "enum": ["pvgrub", "extlinux"] - } - } - }, - "volume": { - "type": "object", - "properties": { - "backing": { "enum": ["ebs", "s3"] }, - "partitions": { - "type": "object", - "properties": { - "type": { "enum": ["none", "msdos", "gpt"] } - } - } - }, - "required": ["backing"] - } - }, - "required": ["image"] -} diff --git a/bootstrapvz/providers/ec2/manifest-schema.yml b/bootstrapvz/providers/ec2/manifest-schema.yml new file mode 100644 index 0000000..7bd28df --- /dev/null +++ b/bootstrapvz/providers/ec2/manifest-schema.yml @@ -0,0 +1,47 @@ +--- +$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: + credentials: + type: object + properties: + access-key: {type: string} + secret-key: {type: string} + virtualization: + enum: + - pvm + - hvm + required: [virtualization] + system: + type: object + properties: + bootloader: + type: string + enum: + - pvgrub + - extlinux + volume: + type: object + properties: + backing: + enum: + - ebs + - s3 + partitions: + type: object + properties: + type: + enum: + - none + - msdos + - gpt + required: [backing] +required: [image] diff --git a/bootstrapvz/providers/ec2/tasks/ami-akis.json b/bootstrapvz/providers/ec2/tasks/ami-akis.json deleted file mode 100644 index 79e1b66..0000000 --- a/bootstrapvz/providers/ec2/tasks/ami-akis.json +++ /dev/null @@ -1,34 +0,0 @@ -// This is a mapping of EC2 regions to processor architectures to Amazon Kernel Images -// Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html#AmazonKernelImageIDs -{ -"ap-northeast-1": // Asia Pacific (Tokyo) Region - {"i386": "aki-136bf512", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-176bf516"}, // pv-grub-hd0_1.04-x86_64.gz -"ap-southeast-1": // Asia Pacific (Singapore) Region - {"i386": "aki-ae3973fc", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-503e7402"}, // pv-grub-hd0_1.04-x86_64.gz -"ap-southeast-2": // Asia Pacific (Sydney) Region - {"i386": "aki-cd62fff7", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-c362fff9"}, // pv-grub-hd0_1.04-x86_64.gz -"eu-west-1": // EU (Ireland) Region - {"i386": "aki-68a3451f", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-52a34525"}, // pv-grub-hd0_1.04-x86_64.gz -"sa-east-1": // South America (Sao Paulo) Region - {"i386": "aki-5b53f446", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-5553f448"}, // pv-grub-hd0_1.04-x86_64.gz -"us-east-1": // US East (Northern Virginia) Region - {"i386": "aki-8f9dcae6", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-919dcaf8"}, // pv-grub-hd0_1.04-x86_64.gz -"us-gov-west-1": // AWS GovCloud (US) - {"i386": "aki-1fe98d3c", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-1de98d3e"}, // pv-grub-hd0_1.04-x86_64.gz -"us-west-1": // US West (Northern California) Region - {"i386": "aki-8e0531cb", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-880531cd"}, // pv-grub-hd0_1.04-x86_64.gz -"us-west-2": // US West (Oregon) Region - {"i386": "aki-f08f11c0", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-fc8f11cc"}, // pv-grub-hd0_1.04-x86_64.gz -"cn-north-1":// China North (Beijing) Region - {"i386": "aki-908f1da9", // pv-grub-hd0_1.04-i386.gz - "amd64": "aki-9e8f1da7"} // pv-grub-hd0_1.04-x86_64.gz -} diff --git a/bootstrapvz/providers/ec2/tasks/ami-akis.yml b/bootstrapvz/providers/ec2/tasks/ami-akis.yml new file mode 100644 index 0000000..f03a64f --- /dev/null +++ b/bootstrapvz/providers/ec2/tasks/ami-akis.yml @@ -0,0 +1,33 @@ +--- +# This is a mapping of EC2 regions to processor architectures to Amazon Kernel Images +# Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html#AmazonKernelImageIDs +ap-northeast-1: + amd64: aki-176bf516 + i386: aki-136bf512 +ap-southeast-1: + amd64: aki-503e7402 + i386: aki-ae3973fc +ap-southeast-2: + amd64: aki-c362fff9 + i386: aki-cd62fff7 +eu-west-1: + amd64: aki-52a34525 + i386: aki-68a3451f +sa-east-1: + amd64: aki-5553f448 + i386: aki-5b53f446 +us-east-1: + amd64: aki-919dcaf8 + i386: aki-8f9dcae6 +us-gov-west-1: + amd64: aki-1de98d3e + i386: aki-1fe98d3c +us-west-1: + amd64: aki-880531cd + i386: aki-8e0531cb +us-west-2: + amd64: aki-fc8f11cc + i386: aki-f08f11c0 +cn-north-1: + amd64: aki-9e8f1da7 + i386: aki-908f1da9 diff --git a/bootstrapvz/providers/ec2/tasks/ami.py b/bootstrapvz/providers/ec2/tasks/ami.py index 2561769..80feda3 100644 --- a/bootstrapvz/providers/ec2/tasks/ami.py +++ b/bootstrapvz/providers/ec2/tasks/ami.py @@ -117,7 +117,7 @@ class RegisterAMI(Task): registration_params['virtualization_type'] = 'hvm' else: registration_params['virtualization_type'] = 'paravirtual' - akis_path = os.path.join(os.path.dirname(__file__), 'ami-akis.json') + akis_path = os.path.join(os.path.dirname(__file__), 'ami-akis.yml') from bootstrapvz.common.tools import config_get registration_params['kernel_id'] = config_get(akis_path, [info._ec2['region'], info.manifest.system['architecture']]) diff --git a/bootstrapvz/providers/ec2/tasks/packages-kernels.json b/bootstrapvz/providers/ec2/tasks/packages-kernels.json deleted file mode 100644 index 9fcf825..0000000 --- a/bootstrapvz/providers/ec2/tasks/packages-kernels.json +++ /dev/null @@ -1,15 +0,0 @@ -// This is a mapping of Debian release codenames to processor architectures to kernel packages -{ -"squeeze": // In squeeze, we need a special kernel flavor for xen - {"i386": "linux-image-xen-686", - "amd64": "linux-image-xen-amd64"}, -"wheezy": - {"i386": "linux-image-686", - "amd64": "linux-image-amd64"}, -"jessie": - {"i386": "linux-image-686-pae", - "amd64": "linux-image-amd64"}, -"sid": - {"i386": "linux-image-686-pae", - "amd64": "linux-image-amd64"} -} diff --git a/bootstrapvz/providers/ec2/tasks/packages-kernels.yml b/bootstrapvz/providers/ec2/tasks/packages-kernels.yml new file mode 100644 index 0000000..1d5a4a0 --- /dev/null +++ b/bootstrapvz/providers/ec2/tasks/packages-kernels.yml @@ -0,0 +1,14 @@ +--- +# This is a mapping of Debian release codenames to processor architectures to kernel packages +squeeze: # In squeeze, we need a special kernel flavor for xen + amd64: linux-image-xen-amd64 + i386: linux-image-xen-686 +wheezy: + amd64: linux-image-amd64 + i386: linux-image-686 +jessie: + amd64: linux-image-amd64 + i386: linux-image-686-pae +sid: + amd64: linux-image-amd64 + i386: linux-image-686-pae diff --git a/bootstrapvz/providers/ec2/tasks/packages.py b/bootstrapvz/providers/ec2/tasks/packages.py index 62b21b5..a85f7ed 100644 --- a/bootstrapvz/providers/ec2/tasks/packages.py +++ b/bootstrapvz/providers/ec2/tasks/packages.py @@ -21,7 +21,7 @@ class DefaultPackages(Task): info.exclude_packages.add('isc-dhcp-common') import os.path - kernel_packages_path = os.path.join(os.path.dirname(__file__), 'packages-kernels.json') + kernel_packages_path = os.path.join(os.path.dirname(__file__), 'packages-kernels.yml') from bootstrapvz.common.tools import config_get kernel_package = config_get(kernel_packages_path, [info.release_codename, info.manifest.system['architecture']]) diff --git a/bootstrapvz/providers/gce/__init__.py b/bootstrapvz/providers/gce/__init__.py index f3e3454..710e893 100644 --- a/bootstrapvz/providers/gce/__init__.py +++ b/bootstrapvz/providers/gce/__init__.py @@ -18,7 +18,7 @@ def initialize(): def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/providers/gce/manifest-schema.json b/bootstrapvz/providers/gce/manifest-schema.json deleted file mode 100644 index 4e1d02d..0000000 --- a/bootstrapvz/providers/gce/manifest-schema.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "GCE manifest", - "type": "object", - "properties": { - "image": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "gcs_destination": { - "type": "string" - }, - "gce_project": { - "type": "string" - } - } - }, - "system": { - "type": "object", - "properties": { - "bootloader": { - "type": "string", - "enum": ["grub", "extlinux"] - } - } - }, - "volume": { - "type": "object", - "properties": { - "partitions": { - "type": "object", - "properties": { - "type": { "enum": ["msdos"] } - } - } - }, - "required": ["partitions"] - } - } -} - diff --git a/bootstrapvz/providers/gce/manifest-schema.yml b/bootstrapvz/providers/gce/manifest-schema.yml new file mode 100644 index 0000000..aa6bb59 --- /dev/null +++ b/bootstrapvz/providers/gce/manifest-schema.yml @@ -0,0 +1,29 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: GCE manifest +type: object +properties: + image: + type: object + properties: + description: {type: string} + gce_project: {type: string} + gcs_destination: {type: string} + system: + type: object + properties: + bootloader: + type: string + enum: + - grub + - extlinux + volume: + type: object + properties: + partitions: + type: object + properties: + type: + enum: + - msdos + required: [partitions] diff --git a/bootstrapvz/providers/gce/tasks/packages.py b/bootstrapvz/providers/gce/tasks/packages.py index 4d8f3b5..8bee994 100644 --- a/bootstrapvz/providers/gce/tasks/packages.py +++ b/bootstrapvz/providers/gce/tasks/packages.py @@ -21,7 +21,7 @@ class DefaultPackages(Task): info.packages.add('openssh-server') info.packages.add('dhcpd') - kernel_packages_path = os.path.join(os.path.dirname(__file__), '../../ec2/tasks/packages-kernels.json') + kernel_packages_path = os.path.join(os.path.dirname(__file__), '../../ec2/tasks/packages-kernels.yml') from bootstrapvz.common.tools import config_get kernel_package = config_get(kernel_packages_path, [info.release_codename, info.manifest.system['architecture']]) diff --git a/bootstrapvz/providers/kvm/__init__.py b/bootstrapvz/providers/kvm/__init__.py index f678bb0..55879d4 100644 --- a/bootstrapvz/providers/kvm/__init__.py +++ b/bootstrapvz/providers/kvm/__init__.py @@ -11,7 +11,7 @@ def initialize(): def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/providers/kvm/manifest-schema.json b/bootstrapvz/providers/kvm/manifest-schema.json deleted file mode 100644 index a800409..0000000 --- a/bootstrapvz/providers/kvm/manifest-schema.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "KVM manifest", - "type": "object", - "properties": { - "provider": { - "type": "object", - "properties": { - "virtio": { - "type": "array", - "items": { - "type": "string", - "enum": ["virtio", - "virtio_pci", - "virtio_balloon", - "virtio_blk", - "virtio_net", - "virtio_ring"] - }, - "minItems": 1 - } - } - }, - "system": { - "type": "object", - "properties": { - "bootloader": { - "type": "string", - "enum": ["grub", "extlinux"] - } - } - }, - "volume": { - "type": "object", - "properties": { - "backing": { - "type": "string", - "enum": ["raw"] - }, - "partitions": { - "type": "object", - "properties": { - "type": { "enum": ["none", "msdos", "gpt"] } - } - } - }, - "required": ["backing"] - } - } -} diff --git a/bootstrapvz/providers/kvm/manifest-schema.yml b/bootstrapvz/providers/kvm/manifest-schema.yml new file mode 100644 index 0000000..0deb7da --- /dev/null +++ b/bootstrapvz/providers/kvm/manifest-schema.yml @@ -0,0 +1,44 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: KVM manifest +type: object +properties: + provider: + type: object + properties: + virtio: + type: array + items: + type: string + enum: + - virtio + - virtio_pci + - virtio_balloon + - virtio_blk + - virtio_net + - virtio_ring + minItems: 1 + system: + type: object + properties: + bootloader: + type: string + enum: + - grub + - extlinux + volume: + type: object + properties: + backing: + type: string + enum: [raw] + partitions: + type: object + properties: + type: + type: string + enum: + - none + - msdos + - gpt + required: [backing] diff --git a/bootstrapvz/providers/virtualbox/__init__.py b/bootstrapvz/providers/virtualbox/__init__.py index 4645ff5..83411f8 100644 --- a/bootstrapvz/providers/virtualbox/__init__.py +++ b/bootstrapvz/providers/virtualbox/__init__.py @@ -9,7 +9,7 @@ def initialize(): def validate_manifest(data, validator, error): import os.path - schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) + schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml')) validator(data, schema_path) diff --git a/bootstrapvz/providers/virtualbox/manifest-schema.json b/bootstrapvz/providers/virtualbox/manifest-schema.json deleted file mode 100644 index faefa6f..0000000 --- a/bootstrapvz/providers/virtualbox/manifest-schema.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "VirtualBox manifest", - "type": "object", - "properties": { - "bootstrapper": { - "type": "object", - "properties": { - "guest_additions": { - "type": "string" - } - } - }, - "system": { - "type": "object", - "properties": { - "bootloader": { - "type": "string", - "enum": ["grub", "extlinux"] - } - } - }, - "volume": { - "type": "object", - "properties": { - "backing": { - "type": "string", - "enum": ["raw", "vdi", "vmdk"] - }, - "partitions": { - "type": "object", - "properties": { - "type": { "enum": ["none", "msdos", "gpt"] } - } - } - }, - "required": ["backing"] - } - } -} diff --git a/bootstrapvz/providers/virtualbox/manifest-schema.yml b/bootstrapvz/providers/virtualbox/manifest-schema.yml new file mode 100644 index 0000000..1141e66 --- /dev/null +++ b/bootstrapvz/providers/virtualbox/manifest-schema.yml @@ -0,0 +1,36 @@ +--- +$schema: http://json-schema.org/draft-04/schema# +title: VirtualBox manifest +type: object +properties: + bootstrapper: + type: object + properties: + guest_additions: {type: string} + system: + type: object + properties: + bootloader: + type: string + enum: + - grub + - extlinux + volume: + type: object + properties: + backing: + type: string + enum: + - raw + - vdi + - vmdk + partitions: + type: object + properties: + type: + type: string + enum: + - none + - msdos + - gpt + required: [backing] diff --git a/manifests/azure.manifest.json b/manifests/azure.manifest.json deleted file mode 100644 index a8eebc9..0000000 --- a/manifests/azure.manifest.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "provider": { - "name": "azure", - "waagent": { - "version": "2.0.4" - } - }, - "bootstrapper": { - "workspace": "/target", - "mirror": "http://ftp.fr.debian.org/debian/" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "grub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - }, - "volume": { - "backing": "raw", - "partitions": { - "type": "msdos", - "boot": { - "size": "32MiB", - "filesystem": "ext2" - }, - "root": { - "size": "7GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "ntp": { - "servers": ["time.windows.com"] - } - } -} diff --git a/manifests/azure.manifest.yml b/manifests/azure.manifest.yml new file mode 100644 index 0000000..a6cd751 --- /dev/null +++ b/manifests/azure.manifest.yml @@ -0,0 +1,33 @@ +--- +provider: + name: azure + waagent: + version: 2.0.4 +bootstrapper: + mirror: http://ftp.fr.debian.org/debian/ + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: grub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: raw + partitions: + type: msdos + boot: + filesystem: ext2 + size: 32MiB + root: + filesystem: ext4 + size: 7GiB +packages: {} +plugins: + ntp: + servers: + - time.windows.com 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 deleted file mode 100644 index 0c3d844..0000000 --- a/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "hvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "extlinux", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://ftp.cn.debian.org/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.yml b/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.yml new file mode 100644 index 0000000..7ec2d57 --- /dev/null +++ b/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.yml @@ -0,0 +1,32 @@ +--- +provider: + name: ec2 + virtualization: hvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: extlinux + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://ftp.cn.debian.org/debian +plugins: + cloud_init: + metadata_sources: Ec2 + username: admin diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json deleted file mode 100644 index 32d2e5f..0000000 --- a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "hvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "extlinux", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml new file mode 100644 index 0000000..ad5a030 --- /dev/null +++ b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml @@ -0,0 +1,32 @@ +--- +provider: + name: ec2 + virtualization: hvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: extlinux + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian +plugins: + cloud_init: + metadata_sources: Ec2 + username: admin 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 deleted file mode 100644 index 01e9c63..0000000 --- a/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://ftp.cn.debian.org/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.yml b/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.yml new file mode 100644 index 0000000..9de6156 --- /dev/null +++ b/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.yml @@ -0,0 +1,32 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://ftp.cn.debian.org/debian +plugins: + cloud_init: + metadata_sources: Ec2 + username: admin diff --git a/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json deleted file mode 100644 index 4f37a23..0000000 --- a/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.yml b/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.yml new file mode 100644 index 0000000..78d414e --- /dev/null +++ b/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.yml @@ -0,0 +1,32 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian +plugins: + cloud_init: + metadata_sources: Ec2 + username: admin diff --git a/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json b/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json deleted file mode 100644 index b7244a8..0000000 --- a/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "i386", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-official-i386-pvm.manifest.yml b/manifests/ec2-ebs-debian-official-i386-pvm.manifest.yml new file mode 100644 index 0000000..d6aabc8 --- /dev/null +++ b/manifests/ec2-ebs-debian-official-i386-pvm.manifest.yml @@ -0,0 +1,32 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: i386 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian +plugins: + cloud_init: + metadata_sources: Ec2 + username: admin diff --git a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json deleted file mode 100644 index 03035d6..0000000 --- a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "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" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml index 8fb5a53..6f66f07 100644 --- a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml +++ b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml @@ -1,37 +1,32 @@ --- provider: - name: "ec2" - virtualization: "pvm" - credentials: - access-key: "" - secret-key: "" + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva 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" -packages: - #mirror: "http://cloudfront.debian.net/debian" - install_standard: true + release: testing + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC volume: - backing: "ebs" + backing: ebs partitions: - type: "none" + type: none root: - size: "8GiB" - filesystem: "ext4" + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian plugins: cloud_init: - username: "admin" - #metadata_sources: "Ec2" - disable_modules: - - "landscape" - - "byobu" - - "ssh-import-id" + metadata_sources: Ec2 + username: admin diff --git a/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json deleted file mode 100644 index 04cf637..0000000 --- a/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "unstable", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.yml b/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.yml new file mode 100644 index 0000000..f7bb3ca --- /dev/null +++ b/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.yml @@ -0,0 +1,32 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: unstable + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian +plugins: + cloud_init: + metadata_sources: Ec2 + username: admin diff --git a/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json deleted file mode 100644 index 3af6564..0000000 --- a/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "unstable", - "sections": ["main", "contrib", "non-free"], - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "metadata_sources": "Ec2" - } - } -} diff --git a/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.yml b/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.yml new file mode 100644 index 0000000..9394c3c --- /dev/null +++ b/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.yml @@ -0,0 +1,36 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: unstable + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian + components: + - main + - contrib + - non-free +plugins: + cloud_init: + metadata_sources: Ec2 + username: admin diff --git a/manifests/ec2-ebs-partitioned.manifest.json b/manifests/ec2-ebs-partitioned.manifest.json deleted file mode 100644 index 4f2606f..0000000 --- a/manifests/ec2-ebs-partitioned.manifest.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%y}{%m}{%d}", - "description": "Debian {system.release} {system.architecture} AMI ({virtualization})" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "msdos", - "root": { - "size": "1GiB", - "filesystem": "ext4" - } - } - } -} diff --git a/manifests/ec2-ebs-partitioned.manifest.yml b/manifests/ec2-ebs-partitioned.manifest.yml new file mode 100644 index 0000000..9cfc2fe --- /dev/null +++ b/manifests/ec2-ebs-partitioned.manifest.yml @@ -0,0 +1,28 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%y}{%m}{%d} + description: Debian {system.release} {system.architecture} AMI ({virtualization}) +system: + release: wheezy + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: msdos + root: + filesystem: ext4 + size: 1GiB +packages: + mirror: http://cloudfront.debian.net/debian diff --git a/manifests/ec2-ebs-single.manifest.json b/manifests/ec2-ebs-single.manifest.json deleted file mode 100644 index 72fa0ca..0000000 --- a/manifests/ec2-ebs-single.manifest.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%y}{%m}{%d}", - "description": "Debian {system.release} {system.architecture} AMI ({virtualization})" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "1GiB", - "filesystem": "ext4" - } - } - } -} diff --git a/manifests/ec2-ebs-single.manifest.yml b/manifests/ec2-ebs-single.manifest.yml new file mode 100644 index 0000000..d017eae --- /dev/null +++ b/manifests/ec2-ebs-single.manifest.yml @@ -0,0 +1,28 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%y}{%m}{%d} + description: Debian {system.release} {system.architecture} AMI ({virtualization}) +system: + release: wheezy + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 1GiB +packages: + mirror: http://cloudfront.debian.net/debian 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 deleted file mode 100644 index d5f989e..0000000 --- a/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}", - "description": "Debian {system.release} {system.architecture} AMI", - "bucket": "debian-amis-cn-north-1", - "region": "cn-north-1" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://ftp.cn.debian.org/debian" - }, - "volume": { - "backing": "s3", - "partitions": { - "type": "none", - "root": { - "size": "4GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "cloud_init": { - "username": "admin", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] - } - } -} diff --git a/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.yml b/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.yml new file mode 100644 index 0000000..708e6eb --- /dev/null +++ b/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.yml @@ -0,0 +1,40 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + # 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}-{virtualization}-{%Y}-{%m}-{%d} + description: Debian {system.release} {system.architecture} AMI + bucket: debian-amis-cn-north-1 + region: cn-north-1 +system: + release: wheezy + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: s3 + partitions: + type: none + root: + filesystem: ext4 + size: 4GiB +packages: + mirror: http://ftp.cn.debian.org/debian +plugins: + cloud_init: + disable_modules: + - landscape + - byobu + - ssh-import-id + username: admin diff --git a/manifests/ec2-s3.manifest.json b/manifests/ec2-s3.manifest.json deleted file mode 100644 index 36bcfad..0000000 --- a/manifests/ec2-s3.manifest.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null, - // "certificate": null, - // "private-key": null, - // "user-id": null - } - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%y}{%m}{%d}", - "description": "Debian {system.release} {system.architecture} AMI", - "bucket": "debian-amis", - "region": "us-west-1" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "s3", - "partitions": { - "type": "none", - "root": { - "size": "4GiB", - "filesystem": "ext4" - } - } - } -} diff --git a/manifests/ec2-s3.manifest.yml b/manifests/ec2-s3.manifest.yml new file mode 100644 index 0000000..464fefe --- /dev/null +++ b/manifests/ec2-s3.manifest.yml @@ -0,0 +1,33 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva + # 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}-{virtualization}-{%y}{%m}{%d} + description: Debian {system.release} {system.architecture} AMI + bucket: debian-amis + region: us-west-1 +system: + release: wheezy + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: s3 + partitions: + type: none + root: + filesystem: ext4 + size: 4GiB +packages: + mirror: http://cloudfront.debian.net/debian diff --git a/manifests/gce-backports.manifest.json b/manifests/gce-backports.manifest.json deleted file mode 100644 index 44f087d..0000000 --- a/manifests/gce-backports.manifest.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "provider": { - "name": "gce" - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "disk", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "sections": ["main", "contrib", "non-free"], - "architecture": "amd64", - "bootloader": "grub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://gce_debian_mirror.storage.googleapis.com/", - "preferences": { - "backport-kernel": [ - { - "package": "linux-image-* initramfs-tools", - "pin": "release n=wheezy-backports", - "pin-priority": 500 - } - ], - "backport-ssh": [ - { - "package": "init-system-helpers openssh-sftp-server openssh-client openssh-server", - "pin": "release n=wheezy-backports", - "pin-priority": 500 - } - ] - } - }, - "plugins": { - "ntp": { - "servers": ["metadata.google.internal"] - } - }, - "volume": { - "backing": "raw", - "partitions": { - "type": "msdos", - "root": { - "size": "10GiB", - "filesystem": "ext4" - } - } - } -} diff --git a/manifests/gce-backports.manifest.yml b/manifests/gce-backports.manifest.yml new file mode 100644 index 0000000..76cf7f9 --- /dev/null +++ b/manifests/gce-backports.manifest.yml @@ -0,0 +1,41 @@ +--- +provider: + name: gce +bootstrapper: + workspace: /target +image: + name: disk + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: grub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: raw + partitions: + type: msdos + root: + filesystem: ext4 + size: 10GiB +packages: + mirror: http://gce_debian_mirror.storage.googleapis.com/ + components: + - main + - contrib + - non-free + preferences: + backport-kernel: + - package: linux-image-* initramfs-tools + pin: release n=wheezy-backports + pin-priority: 500 + backport-ssh: + - package: init-system-helpers openssh-sftp-server openssh-client openssh-server + pin: release n=wheezy-backports + pin-priority: 500 +plugins: + ntp: + servers: + - metadata.google.internal diff --git a/manifests/gce.manifest.json b/manifests/gce.manifest.json deleted file mode 100644 index 9d2e079..0000000 --- a/manifests/gce.manifest.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "provider": { - "name": "gce" - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "disk", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "sections": ["main", "contrib", "non-free"], - "architecture": "amd64", - "bootloader": "grub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://gce_debian_mirror.storage.googleapis.com/" - }, - "plugins": { - "ntp": { - "servers": ["metadata.google.internal"] - } - }, - "volume": { - "backing": "raw", - "partitions": { - "type": "msdos", - "root": { - "size": "10GiB", - "filesystem": "ext4" - } - } - } -} diff --git a/manifests/gce.manifest.yml b/manifests/gce.manifest.yml new file mode 100644 index 0000000..db26dd1 --- /dev/null +++ b/manifests/gce.manifest.yml @@ -0,0 +1,32 @@ +--- +provider: + name: gce +bootstrapper: + workspace: /target +image: + name: disk + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: grub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: raw + partitions: + type: msdos + root: + filesystem: ext4 + size: 10GiB +packages: + mirror: http://gce_debian_mirror.storage.googleapis.com/ + components: + - main + - contrib + - non-free +plugins: + ntp: + servers: + - metadata.google.internal diff --git a/manifests/kvm-virtio.manifest.json b/manifests/kvm-virtio.manifest.json deleted file mode 100644 index 33c8b23..0000000 --- a/manifests/kvm-virtio.manifest.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "provider": { - "name": "kvm", - "virtio_modules": [ "virtio_pci", "virtio_blk" ] - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "grub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": {}, - "volume": { - "backing": "raw", - "partitions": { - "type": "msdos", - "boot": { - "size": "32MiB", - "filesystem": "ext2" - }, - "root": { - "size": "864MiB", - "filesystem": "ext4" - }, - "swap": {"size": "128MiB"} - } - }, - "plugins": { - "root_password": { - "password": "test" - } - } -} diff --git a/manifests/kvm-virtio.manifest.yml b/manifests/kvm-virtio.manifest.yml new file mode 100644 index 0000000..81e6c59 --- /dev/null +++ b/manifests/kvm-virtio.manifest.yml @@ -0,0 +1,34 @@ +--- +provider: + name: kvm + virtio_modules: + - virtio_pci + - virtio_blk +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: grub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: raw + partitions: + type: msdos + boot: + filesystem: ext2 + size: 32MiB + root: + filesystem: ext4 + size: 864MiB + swap: + size: 128MiB +packages: {} +plugins: + root_password: + password: test diff --git a/manifests/kvm.manifest.json b/manifests/kvm.manifest.json deleted file mode 100644 index bd26b50..0000000 --- a/manifests/kvm.manifest.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "provider": { - "name": "kvm" - }, - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "grub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": {}, - "volume": { - "backing": "raw", - "partitions": { - "type": "msdos", - "boot": { - "size": "32MiB", - "filesystem": "ext2" - }, - "root": { - "size": "864MiB", - "filesystem": "ext4" - }, - "swap": {"size": "128MiB"} - } - }, - "plugins": { - "root_password": { - "password": "test" - } - } -} diff --git a/manifests/kvm.manifest.yml b/manifests/kvm.manifest.yml new file mode 100644 index 0000000..4b35e63 --- /dev/null +++ b/manifests/kvm.manifest.yml @@ -0,0 +1,31 @@ +--- +provider: + name: kvm +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} + description: Debian {system.release} {system.architecture} +system: + release: wheezy + architecture: amd64 + bootloader: grub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: raw + partitions: + type: msdos + boot: + filesystem: ext2 + size: 32MiB + root: + filesystem: ext4 + size: 864MiB + swap: + size: 128MiB +packages: {} +plugins: + root_password: + password: test diff --git a/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json b/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json deleted file mode 100644 index d9e8e29..0000000 --- a/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "squeeze", - "architecture": "amd64", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "admin_user": { - "username": "admin" - } - } -} diff --git a/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.yml b/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.yml new file mode 100644 index 0000000..c175565 --- /dev/null +++ b/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.yml @@ -0,0 +1,31 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: squeeze + architecture: amd64 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian +plugins: + admin_user: + username: admin diff --git a/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json b/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json deleted file mode 100644 index 703eea8..0000000 --- a/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "provider": { - "name": "ec2", - "virtualization": "pvm", - "credentials": { - // "access-key": null, - // "secret-key": null - } - }, - - "bootstrapper": { - "workspace": "/target" - }, - "image": { - "name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs", - "description": "Debian {system.release} {system.architecture}" - }, - "system": { - "release": "squeeze", - "architecture": "i386", - "bootloader": "pvgrub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": { - "mirror": "http://cloudfront.debian.net/debian" - }, - "volume": { - "backing": "ebs", - "partitions": { - "type": "none", - "root": { - "size": "8GiB", - "filesystem": "ext4" - } - } - }, - "plugins": { - "admin_user": { - "username": "admin" - } - } -} diff --git a/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.yml b/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.yml new file mode 100644 index 0000000..1fb07b6 --- /dev/null +++ b/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.yml @@ -0,0 +1,31 @@ +--- +provider: + name: ec2 + virtualization: pvm + # credentials: + # access-key: AFAKEACCESSKEYFORAWS + # secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva +bootstrapper: + workspace: /target +image: + name: debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs + description: Debian {system.release} {system.architecture} +system: + release: squeeze + architecture: i386 + bootloader: pvgrub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: ebs + partitions: + type: none + root: + filesystem: ext4 + size: 8GiB +packages: + mirror: http://cloudfront.debian.net/debian +plugins: + admin_user: + username: admin diff --git a/manifests/virtualbox-vagrant.manifest.json b/manifests/virtualbox-vagrant.manifest.json deleted file mode 100644 index 632c0b4..0000000 --- a/manifests/virtualbox-vagrant.manifest.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "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}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "grub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8", - "hostname": "localhost" - }, - "packages": {}, - "volume": { - "backing": "vmdk", - "partitions": { - "type": "msdos", - "boot": { - "size": "64MiB", - "filesystem": "ext2" - }, - "root": { - "size": "1856MiB", - "filesystem": "ext4" - }, - "swap": {"size": "128MiB"} - } - }, - "plugins": { - "vagrant": { - } - } -} diff --git a/manifests/virtualbox-vagrant.manifest.yml b/manifests/virtualbox-vagrant.manifest.yml new file mode 100644 index 0000000..e440ca7 --- /dev/null +++ b/manifests/virtualbox-vagrant.manifest.yml @@ -0,0 +1,32 @@ +--- +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} +system: + release: wheezy + architecture: amd64 + bootloader: grub + charmap: UTF-8 + hostname: localhost + locale: en_US + timezone: UTC +volume: + backing: vmdk + partitions: + type: msdos + boot: + filesystem: ext2 + size: 64MiB + root: + filesystem: ext4 + size: 1856MiB + swap: + size: 128MiB +packages: {} +plugins: + vagrant: {} diff --git a/manifests/virtualbox.manifest.json b/manifests/virtualbox.manifest.json deleted file mode 100644 index 9e69292..0000000 --- a/manifests/virtualbox.manifest.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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}" - }, - "system": { - "release": "wheezy", - "architecture": "amd64", - "bootloader": "grub", - "timezone": "UTC", - "locale": "en_US", - "charmap": "UTF-8" - }, - "packages": {}, - "volume": { - "backing": "vdi", - "partitions": { - "type": "msdos", - "boot": { - "size": "32MiB", - "filesystem": "ext2" - }, - "root": { - "size": "864MiB", - "filesystem": "ext4" - }, - "swap": {"size": "128MiB"} - } - } -} diff --git a/manifests/virtualbox.manifest.yml b/manifests/virtualbox.manifest.yml new file mode 100644 index 0000000..6a1b358 --- /dev/null +++ b/manifests/virtualbox.manifest.yml @@ -0,0 +1,29 @@ +--- +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} +system: + release: wheezy + architecture: amd64 + bootloader: grub + charmap: UTF-8 + locale: en_US + timezone: UTC +volume: + backing: vdi + partitions: + type: msdos + boot: + filesystem: ext2 + size: 32MiB + root: + filesystem: ext4 + size: 864MiB + swap: + size: 128MiB +packages: {}