bootstrap-vz/bootstrapvz/providers/gce/__init__.py
Jimmy Kaplowitz 89e1a701eb Disable SSH password auth on GCE
This change was unintentional but occurred as part of GCE's transition
from build-debian-cloud to bootstrap-vz.

Might be replaced later with a similar change that applies to all
bootstrap-vz providers, based on the opinion of the debian-cloud list.

Change-Id: I72a694c49f32df06252d9cc01b1d5c7cfc015347
2014-08-14 18:10:54 -07:00

58 lines
1.8 KiB
Python

from bootstrapvz.common import task_groups
import tasks.apt
import tasks.boot
import tasks.configuration
import tasks.image
import tasks.host
import tasks.packages
from bootstrapvz.common.tasks import apt
from bootstrapvz.common.tasks import loopback
from bootstrapvz.common.tasks import initd
from bootstrapvz.common.tasks import ssh
from bootstrapvz.common.tasks import volume
def initialize():
pass
def validate_manifest(data, validator, error):
import os.path
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
validator(data, schema_path)
def resolve_tasks(taskset, manifest):
taskset.update(task_groups.get_standard_groups(manifest))
taskset.update([apt.AddBackports,
loopback.AddRequiredCommands,
loopback.Create,
tasks.apt.SetPackageRepositories,
tasks.apt.ImportGoogleKey,
tasks.packages.DefaultPackages,
tasks.packages.GooglePackages,
tasks.configuration.GatherReleaseInformation,
tasks.host.DisableIPv6,
tasks.host.InstallHostnameHook,
tasks.boot.ConfigureGrub,
initd.InstallInitScripts,
ssh.AddSSHKeyGeneration,
ssh.DisableSSHPasswordAuthentication,
tasks.apt.CleanGoogleRepositoriesAndKeys,
loopback.MoveImage,
tasks.image.CreateTarball,
volume.Delete,
])
if 'gcs_destination' in manifest.image:
taskset.add(tasks.image.UploadImage)
if 'gce_project' in manifest.image:
taskset.add(tasks.image.RegisterImage)
def resolve_rollback_tasks(taskset, manifest, completed, counter_task):
taskset.update(task_groups.get_standard_rollback_tasks(completed))