Merge pull request #357 from zmarano/master

Fixes to create stretch images. Add stretch manifest for GCE.
This commit is contained in:
Anders Ingemann 2017-01-10 22:38:26 +01:00 committed by GitHub
commit b27658652d
5 changed files with 107 additions and 4 deletions

View file

@ -77,10 +77,13 @@ class AddBackports(Task):
@classmethod
def run(cls, info):
from bootstrapvz.common.releases import testing
from bootstrapvz.common.releases import unstable
if info.source_lists.target_exists('{system.release}-backports'):
msg = ('{system.release}-backports target already exists').format(**info.manifest_vars)
logging.getLogger(__name__).info(msg)
elif info.manifest.release == testing:
logging.getLogger(__name__).info('There are no backports for stretch/testing')
elif info.manifest.release == unstable:
logging.getLogger(__name__).info('There are no backports for sid/unstable')
else:

View file

@ -16,8 +16,8 @@ def validate_manifest(data, validator, error):
def resolve_tasks(taskset, manifest):
from bootstrapvz.common.releases import stretch
taskset.update(task_groups.get_standard_groups(manifest))
taskset.update([apt.AddBackports,
apt.AddDefaultSources,
loopback.AddRequiredCommands,
@ -26,10 +26,10 @@ def resolve_tasks(taskset, manifest):
tasks.configuration.GatherReleaseInformation,
tasks.host.DisableIPv6,
tasks.boot.ConfigureGrub,
initd.InstallInitScripts,
initd.AddExpandRoot,
initd.AdjustExpandRootScript,
tasks.initd.AdjustExpandRootDev,
initd.InstallInitScripts,
boot.BlackListModules,
boot.UpdateInitramfs,
ssh.AddSSHKeyGeneration,
@ -42,6 +42,13 @@ def resolve_tasks(taskset, manifest):
])
taskset.discard(grub.SetGrubConsolOutputDeviceToSerial)
# Temporary fix for Stretch
if manifest.release == stretch:
taskset.discard(initd.InstallInitScripts)
taskset.discard(initd.AddExpandRoot)
taskset.discard(initd.AdjustExpandRootScript)
taskset.discard(tasks.initd.AdjustExpandRootDev)
if 'gcs_destination' in manifest.provider:
taskset.add(tasks.image.UploadImage)
if 'gce_project' in manifest.provider:

View file

@ -7,6 +7,7 @@ The included packages and configuration changes are necessary for Debian to run
Included GCE software is published on github: [Google Compute Engine guest environment](https://github.com/GoogleCloudPlatform/compute-image-packages)
Debian 8 Jessie Package Notes:
* python-crcmod is pulled in from backports as it provides a compiled crcmod required for the Google Cloud Storage CLI (gsutil).
* cloud-utils and cloud-guest-utils are pulled in from backports as they provide a fixed version of growpart to safely grow the root partition on disks >2TB.
* google-cloud-sdk is pulled from a Google Cloud repository.
@ -14,8 +15,15 @@ Debian 8 Jessie Package Notes:
* google-compute-engine-init is pulled from a Google Cloud repository.
* google-config is pulled from a Google Cloud repository.
jessie-minimal Notes:
jessie-minimal:
The only additions are the necessary google-compute-engine, google-compute-engine-init, and google-config packages. This image is not published on GCE however the manifest is provided here for those wishing a minimal GCE Debian image.
Note: Debian 7 Wheezy and Backports Debian 7 Wheezy are deprecated images on GCE and are no longer supported.
stretch and stretch-minimal:
These manifests are provided for testing. Debian 9 Stretch is not yet stable.
Deprecated manifests:
Debian 7 Wheezy and Backports Debian 7 Wheezy are deprecated images on GCE and are no longer supported.
These manifests are provided here for historic purposes.

View file

@ -0,0 +1,37 @@
---
name: disk
provider:
name: gce
description: Debian {system.release} {system.architecture}
bootstrapper:
workspace: /target
system:
release: stretch
architecture: amd64
bootloader: grub
charmap: UTF-8
locale: en_US
timezone: UTC
volume:
backing: raw
partitions:
type: msdos
root:
filesystem: ext4
size: 10GiB
packages:
include-source-type: true
sources:
google-cloud:
- deb http://packages.cloud.google.com/apt google-cloud-compute-{system.release} main
install:
- google-compute-engine-{system.release}
- google-compute-engine-init-{system.release}
- google-config-{system.release}
plugins:
google_cloud_repo:
cleanup_bootstrap_key: true
enable_keyring_repo: true
ntp:
servers:
- metadata.google.internal

View file

@ -0,0 +1,48 @@
---
name: disk
provider:
name: gce
description: Debian {system.release} {system.architecture}
bootstrapper:
workspace: /target
system:
release: stretch
architecture: amd64
bootloader: grub
charmap: UTF-8
locale: en_US
timezone: UTC
volume:
backing: raw
partitions:
type: msdos
root:
filesystem: ext4
size: 10GiB
packages:
include-source-type: true
sources:
google-cloud:
- deb http://packages.cloud.google.com/apt cloud-sdk-{system.release} main
- deb http://packages.cloud.google.com/apt google-cloud-compute-{system.release} main
install:
- cloud-initramfs-growroot
- cloud-utils
- google-cloud-sdk
- google-compute-engine-{system.release}
- google-compute-engine-init-{system.release}
- google-config-{system.release}
- python-crcmod
- screen
- vim
plugins:
google_cloud_repo:
cleanup_bootstrap_key: true
enable_keyring_repo: true
ntp:
servers:
- metadata.google.internal
unattended_upgrades:
download_interval: 1
update_interval: 1
upgrade_interval: 1