From 03520a55db2d067d156125e041c7a1da98bf237c Mon Sep 17 00:00:00 2001 From: James Bromberger Date: Wed, 26 Feb 2014 12:19:20 +0000 Subject: [PATCH 1/6] Add in jessie. --- base/manifest-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/manifest-schema.json b/base/manifest-schema.json index b9adbbe..ad37a67 100644 --- a/base/manifest-schema.json +++ b/base/manifest-schema.json @@ -25,7 +25,7 @@ "system": { "type": "object", "properties": { - "release": { "enum": ["wheezy", "jessie", "testing", "unstable"] }, + "release": { "enum": ["squeeze", "wheezy", "jessie", "testing", "unstable"] }, "sections": { "type": "array", "minItems": 1 From 9517f8cd426a5186a39902582afec8b5b3dbba13 Mon Sep 17 00:00:00 2001 From: James Bromberger Date: Sun, 23 Mar 2014 08:56:48 +0000 Subject: [PATCH 2/6] Manifest files for Squeeze (now oldstable). --- ...bs-debian-official-amd64-pvm.manifest.json | 42 +++++++++++++++++++ ...ebs-debian-official-i386-pvm.manifest.json | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json create mode 100644 manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json diff --git a/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json b/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json new file mode 100644 index 0000000..3be23f7 --- /dev/null +++ b/manifests/squeeze-ec2-ebs-debian-official-amd64-pvm.manifest.json @@ -0,0 +1,42 @@ +{ + "provider": "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-i386-pvm.manifest.json b/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json new file mode 100644 index 0000000..aaa5669 --- /dev/null +++ b/manifests/squeeze-ec2-ebs-debian-official-i386-pvm.manifest.json @@ -0,0 +1,42 @@ +{ + "provider": "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" + } + } +} From 89f55addc9e5fcf02a96f9d804e8bb2c54eb8686 Mon Sep 17 00:00:00 2001 From: James Bromberger Date: Sun, 23 Mar 2014 08:57:26 +0000 Subject: [PATCH 3/6] Add security.debian.org to apt sources.list --- common/tasks/apt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/tasks/apt.py b/common/tasks/apt.py index b0a2f75..f440ecb 100644 --- a/common/tasks/apt.py +++ b/common/tasks/apt.py @@ -28,6 +28,8 @@ class AddDefaultSources(Task): sections = ' '.join(info.manifest.system['sections']) info.source_lists.add('main', 'deb {apt_mirror} {system.release} '+sections) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} '+sections) + info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates '+sections) + info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates '+sections) if info.manifest.system['release'] not in {'testing', 'unstable'}: info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates '+sections) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates '+sections) From 834ef3d58c5ba8322bd2f804f9e7f51aa62cf559 Mon Sep 17 00:00:00 2001 From: James Bromberger Date: Sat, 29 Mar 2014 13:30:00 +0000 Subject: [PATCH 4/6] Set grub console to text, and set system console to hvc0 on grub cmdline. --- providers/ec2/tasks/boot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/ec2/tasks/boot.py b/providers/ec2/tasks/boot.py index 399cbac..b921324 100644 --- a/providers/ec2/tasks/boot.py +++ b/providers/ec2/tasks/boot.py @@ -43,6 +43,8 @@ class ConfigurePVGrub(Task): grub_def = os.path.join(info.root, 'etc/default/grub') sed_i(grub_def, '^GRUB_TIMEOUT=[0-9]+', 'GRUB_TIMEOUT=0\n' 'GRUB_HIDDEN_TIMEOUT=true') + sed_i(grub_def, '^#GRUB_TERMINAL=console', 'GRUB_TERMINAL=console') + sed_i(grub_def, '^GRUB_CMDLINE_LINUX_DEFAULT="quiet"', 'GRUB_CMDLINE_LINUX_DEFAULT="console=hvc0"') from common.tools import log_check_call log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub']) From b034ca8ed129754cd4a077d1b9920c901ff0761b Mon Sep 17 00:00:00 2001 From: James Bromberger Date: Tue, 8 Apr 2014 10:09:02 +0000 Subject: [PATCH 5/6] Correct merge/rebase. Fix handling of console to hvc0. Try and pre-seed cloud-init. --- bootstrapvz/common/tasks/apt.py | 5 ----- bootstrapvz/plugins/cloud_init/__init__.py | 4 ++-- bootstrapvz/plugins/cloud_init/tasks.py | 2 +- manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json | 3 +-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/bootstrapvz/common/tasks/apt.py b/bootstrapvz/common/tasks/apt.py index a6f424b..7bb62cc 100644 --- a/bootstrapvz/common/tasks/apt.py +++ b/bootstrapvz/common/tasks/apt.py @@ -26,15 +26,10 @@ class AddDefaultSources(Task): sections = 'main' if 'sections' in info.manifest.system: sections = ' '.join(info.manifest.system['sections']) -<<<<<<< HEAD:common/tasks/apt.py info.source_lists.add('main', 'deb {apt_mirror} {system.release} '+sections) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} '+sections) info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates '+sections) info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates '+sections) -======= - info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + sections) - info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + sections) ->>>>>>> upstream/master:bootstrapvz/common/tasks/apt.py if info.manifest.system['release'] not in {'testing', 'unstable'}: info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + sections) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + sections) diff --git a/bootstrapvz/plugins/cloud_init/__init__.py b/bootstrapvz/plugins/cloud_init/__init__.py index e1df533..3dd8682 100644 --- a/bootstrapvz/plugins/cloud_init/__init__.py +++ b/bootstrapvz/plugins/cloud_init/__init__.py @@ -14,8 +14,8 @@ def resolve_tasks(taskset, manifest): if manifest.system['release'] in ['wheezy', 'stable']: taskset.add(tasks.AddBackports) - taskset.update([tasks.AddCloudInitPackages, - tasks.SetMetadataSource, + taskset.update([ tasks.SetMetadataSource, + tasks.AddCloudInitPackages, ]) options = manifest.plugins['cloud_init'] diff --git a/bootstrapvz/plugins/cloud_init/tasks.py b/bootstrapvz/plugins/cloud_init/tasks.py index 51a9f2f..4e6b41d 100644 --- a/bootstrapvz/plugins/cloud_init/tasks.py +++ b/bootstrapvz/plugins/cloud_init/tasks.py @@ -67,7 +67,7 @@ class SetMetadataSource(Task): 'skipping selections setting.').format(info.manifest.provider) logging.getLogger(__name__).warn(msg) return - sources = "cloud-init cloud-init/datasources multiselect " + sources + sources = "cloud-init cloud-init/datasources multiselect " + sources log_check_call(['chroot', info.root, 'debconf-set-selections'], sources) diff --git a/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json index 9fb8095..34ced43 100644 --- a/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-pvm.manifest.json @@ -37,8 +37,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } From 9c759fe8bf5fbabf1a9239d5aa27ed0f7a05258a Mon Sep 17 00:00:00 2001 From: James Bromberger Date: Tue, 8 Apr 2014 12:34:25 +0000 Subject: [PATCH 6/6] ASwitch manifests ot explicitly use Ec2 for metadata. Swap S3 to use a 4GB root FS. --- bootstrapvz/plugins/cloud_init/tasks.py | 4 +++- ...ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json | 3 +-- manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json | 3 +-- ...ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json | 3 +-- manifests/ec2-ebs-debian-official-i386-pvm.manifest.json | 3 +-- manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json | 3 +-- manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json | 3 +-- .../ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json | 3 +-- .../ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json | 2 +- manifests/ec2-s3.manifest.json | 2 +- 10 files changed, 12 insertions(+), 17 deletions(-) diff --git a/bootstrapvz/plugins/cloud_init/tasks.py b/bootstrapvz/plugins/cloud_init/tasks.py index 4e6b41d..dde46d6 100644 --- a/bootstrapvz/plugins/cloud_init/tasks.py +++ b/bootstrapvz/plugins/cloud_init/tasks.py @@ -52,7 +52,9 @@ class SetUsername(Task): class SetMetadataSource(Task): description = 'Setting metadata source' - phase = phases.system_modification + #phase = phases.system_modification + phase = phases.package_installation + successors = [apt.AptUpdate] @classmethod def run(cls, info): diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json b/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json index afd55ba..622879e 100644 --- a/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-hvm-cn-north-1.manifest.json @@ -37,8 +37,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json index 93039ff..651d211 100644 --- a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.json @@ -37,8 +37,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } diff --git a/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json b/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json index 18dd022..4c88efb 100644 --- a/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json +++ b/manifests/ec2-ebs-debian-official-amd64-pvm-cn-north-1.manifest.json @@ -37,8 +37,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } diff --git a/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json b/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json index d68a6d2..b0a7db3 100644 --- a/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-official-i386-pvm.manifest.json @@ -37,8 +37,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } diff --git a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json index 28c3826..0456892 100644 --- a/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.json @@ -37,8 +37,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } diff --git a/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json index b9a4174..98e0f0a 100644 --- a/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-unstable-amd64-pvm.manifest.json @@ -37,8 +37,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } diff --git a/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json b/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json index 61180df..eaf9584 100644 --- a/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json +++ b/manifests/ec2-ebs-debian-unstable-contrib-amd64-pvm.manifest.json @@ -38,8 +38,7 @@ "plugins": { "cloud_init": { "username": "admin", - //"metadata_sources": "Ec2", - "disable_modules": [ "landscape", "byobu", "ssh-import-id" ] + "metadata_sources": "Ec2" } } } diff --git a/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json b/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json index 57cf316..21acecb 100644 --- a/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json +++ b/manifests/ec2-s3-debian-official-amd64-pvm-cn-north-1.manifest.json @@ -33,7 +33,7 @@ "partitions": { "type": "none", "root": { - "size": "1GiB", + "size": "4GiB", "filesystem": "ext4" } } diff --git a/manifests/ec2-s3.manifest.json b/manifests/ec2-s3.manifest.json index 3351c90..f85f78b 100644 --- a/manifests/ec2-s3.manifest.json +++ b/manifests/ec2-s3.manifest.json @@ -33,7 +33,7 @@ "partitions": { "type": "none", "root": { - "size": "1GiB", + "size": "4GiB", "filesystem": "ext4" } }