gce

package
v0.0.0-...-2d5464a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2015 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package gce provides tools to deploy Camlistore on Google Compute Engine.

Index

Constants

View Source
const (

	// default instance configuration values.
	InstanceName = "camlistore-server"
	Machine      = "g1-small"
	Zone         = "us-central1-a"

	HelpCreateProject  = "Create new project: go to https://console.developers.google.com to create a new Project."
	HelpEnableAPIs     = `` /* 192-byte string literal not displayed */
	HelpDeleteInstance = `` /* 170-byte string literal not displayed */
)

Variables

View Source
var Verbose bool

Verbose enables more info to be printed.

Functions

func NewOAuthConfig

func NewOAuthConfig(clientId, clientSecret string) *oauth.Config

NewOAuthConfig returns an OAuth configuration template.

Types

type Deployer

type Deployer struct {
	Cl   *http.Client
	Conf *InstanceConf
}

Deployer creates and starts an instance such as defined in Conf.

func (*Deployer) Create

func (d *Deployer) Create(ctx *context.Context) (*compute.Instance, error)

Create sets up and starts a Google Compute Engine instance as defined in d.Conf. It creates the necessary Google Storage buckets beforehand.

func (*Deployer) Get

func (d *Deployer) Get(ctx *context.Context) (*compute.Instance, error)

Get returns the Instance corresponding to the Project, Zone, and Name defined in the Deployer's Conf.

type InstanceConf

type InstanceConf struct {
	Name     string // Name given to the virtual machine instance.
	Project  string // Google project ID where the instance is created.
	Machine  string // Machine type.
	Zone     string // Geographic zone.
	SSHPub   string // SSH public key.
	CertFile string // HTTPS certificate file.
	KeyFile  string // HTTPS key file.
	Hostname string // Fully qualified domain name.
	// contains filtered or unexported fields
}

InstanceConf is the configuration for the Google Compute Engine instance that will be deployed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL