gimmeproj

command
v0.0.0-...-71aea42 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

README

gimmeproj

gimmeproj manages a pool of projects and leases to those projects.

The meta project (specified by the -project flag) stores the metadata for the pool.

Usage:
  gimmeproj -project=[meta project ID] command

Commands:
  lease [duration]    Leases a project for a given duration. Prints the project ID to stdout.
  done [project ID]   Returns a project to the pool.

Administrative commands:
  pool-add [project ID]       Adds a project to the pool.
  pool-rm  [project ID]       Removes a project from the pool.
  status                      Displays the current status of the meta project.

Example use in integration tests

set -e -x

curl https://storage.googleapis.com/gimme-proj/linux_amd64/gimmeproj > gimmeproj
chmod +x gimmeproj
./gimmeproj version

export TEST_PROJECT=$(./gimmeproj -project meta-project lease 15m)
trap "./gimmeproj -project meta-project done $TEST_PROJECT" EXIT

go test ....

Documentation

Overview

Command gimmeproj provides access to a pool of projects.

The metadata about the project pool is stored in Cloud Datastore in a meta-project. Projects are leased for a certain duration, and automatically returned to the pool when the lease expires. Projects should be returned before the lease expires.

Jump to

Keyboard shortcuts

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