github.com/mwhudson/juju@v0.0.0-20160512215208-90ff01f3497f/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/loggo"
     8  
     9  	"github.com/juju/juju/environs/tags"
    10  )
    11  
    12  // The metadata keys used when creating new instances.
    13  const (
    14  	metadataKeyIsState = tags.JujuModel
    15  	// This is defined by the cloud-init code:
    16  	// http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/sources/DataSourceGCE.py
    17  	// http://cloudinit.readthedocs.org/en/latest/
    18  	// https://cloud.google.com/compute/docs/metadata
    19  	metadataKeyCloudInit       = "user-data"
    20  	metadataKeyEncoding        = "user-data-encoding"
    21  	metadataKeyWindowsUserdata = "windows-startup-script-ps1"
    22  	metadataKeyWindowsSysprep  = "sysprep-specialize-script-ps1"
    23  	// GCE uses this specific key for authentication (*handwaving*)
    24  	// https://cloud.google.com/compute/docs/instances#sshkeys
    25  	metadataKeySSHKeys = "sshKeys"
    26  )
    27  
    28  // Common metadata values used when creating new instances.
    29  const (
    30  	metadataValueTrue  = "true"
    31  	metadataValueFalse = "false"
    32  )
    33  
    34  const (
    35  	// See https://cloud.google.com/compute/docs/operating-systems/linux-os#ubuntu
    36  	// TODO(ericsnow) Should this be handled in cloud-images (i.e.
    37  	// simplestreams)?
    38  	ubuntuImageBasePath      = "projects/ubuntu-os-cloud/global/images/"
    39  	ubuntuDailyImageBasePath = "projects/ubuntu-os-cloud-devel/global/images/"
    40  	windowsImageBasePath     = "projects/windows-cloud/global/images/"
    41  )
    42  
    43  var (
    44  	logger = loggo.GetLogger("juju.provider.gce")
    45  )