github.com/cloud-green/juju@v0.0.0-20151002100041-a00291338d3d/provider/gce/gce.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package gce 5 6 import ( 7 "github.com/juju/errors" 8 "github.com/juju/loggo" 9 10 "github.com/juju/juju/environs/tags" 11 ) 12 13 // The metadata keys used when creating new instances. 14 const ( 15 metadataKeyIsState = tags.JujuEnv 16 // This is defined by the cloud-init code: 17 // http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/sources/DataSourceGCE.py 18 // http://cloudinit.readthedocs.org/en/latest/ 19 // https://cloud.google.com/compute/docs/metadata 20 metadataKeyCloudInit = "user-data" 21 metadataKeyEncoding = "user-data-encoding" 22 metadataKeyWindowsUserdata = "windows-startup-script-ps1" 23 metadataKeyWindowsSysprep = "sysprep-specialize-script-ps1" 24 // GCE uses this specific key for authentication (*handwaving*) 25 // https://cloud.google.com/compute/docs/instances#sshkeys 26 metadataKeySSHKeys = "sshKeys" 27 ) 28 29 // Common metadata values used when creating new instances. 30 const ( 31 metadataValueTrue = "true" 32 metadataValueFalse = "false" 33 ) 34 35 const ( 36 // See https://cloud.google.com/compute/docs/operating-systems/linux-os#ubuntu 37 // TODO(ericsnow) Should this be handled in cloud-images (i.e. 38 // simplestreams)? 39 ubuntuImageBasePath = "projects/ubuntu-os-cloud/global/images/" 40 windowsImageBasePath = "projects/windows-cloud/global/images/" 41 ) 42 43 var ( 44 logger = loggo.GetLogger("juju.provider.gce") 45 46 errNotImplemented = errors.NotImplementedf("gce provider functionality") 47 )