images

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Images Build Status Release

Images is a tool to manage machine images from multiple providers over a single CLI interface. Its fast(concurrent actions), simple to use and and very flexible. Think of it as a companion to the popular image creation tool Packer. You can fetch images from multiple providers, delete them, change tags or names of multiple images, any many other things.

images

Features

  • Multiple provider backend support: AWS, DigitalOcean, GCE, etc...
  • Multi region support
  • List images from multiple regions/providers
  • Modify image attributes, such as tags, names, states
  • Delete images
  • Copy images from one region to another region
  • Commands are executed concurrently (delete, list, etc..).
  • Flexible configuration system. Read from file, environment variables or command line flags.

Installation

Images is still under development. Any feedback/contribution is welcome! Download the latest release suitable for your system:

=> Images releases

Or if you have Go installed, install latest development version:

go get -u github.com/fatih/images

Intro

To list all commands just run images:

$ images
usage: images [--version] [--help] <command> [<args>]

Available commands are:
    copy        Copy images to regions
    delete      Delete available images
    list        List available images
    modify      Modify image properties
    version     Prints the Images version

...

Because images is built around to support multiple providers, each provider has a specific set of features. To display the specific provider help message pass the -providers name -help flags at any time, where name is the provider name, such as "aws".

Current supported providers are:

  • aws
  • do
  • gce

Coming soon:

  • virtualbox
  • docker

Configuration

images is a very flexible CLI tool. It can parse the necessary configuration from either a file, from environment variables or command line flags. Examples:

$ images list --providers aws --regions "us-east-1,eu-west-2" --access-key "..." -secret-key "..."

or via environment variable:

$ IMAGES_PROVIDERS=aws IMAGES_AWS_REGIONS="us-east-1" IMAGES_AWS_ACCESS_KEY=".." images list

or via .imagesrc file, which can be either in TOML or JSON. Below is an example for TOML:

providers = ["aws"]
no_color  = true

[aws]
regions    = ["us-east-1","eu-west-2"]
access_key = "..."
secret_key = "..."

and execute simply:

$ images list

Usage

images has multi provider support. The following examples are for the provider "aws". The commands are supposed to be executed with IMAGES_PROVIDER=aws or with --providers aws or added to .imagesrc file via providers = "aws"

List

List images for a given region. Examples:

$ images list -regions "us-east-1"

List from all regions (fetches concurrently):

$ images list -regions "all"

List from multiple providers (fetches concurrently):

$ images list -providers "aws,do"

List from all supported providers

$ images list -providers "all"

Change output mode to json

$ images list -output json
Delete

Delete images from the given provider. Examples:

$ images delete -ids "ami-1ec4d766,ami-c3h207b4,ami-26f1d9r37"

Note that you don't need to specify a region if you define multiple ids. images is automatically matching the correct region and deletes it. Plus they all are deleted concurrently.

Modify

images allows to change the tags of AWS images for the provider "aws".

To create or override a image tag:

$images modify --create-tags "Name=ImagesExample" --ids ami-f465e69d

To delete the tags of an image

$images modify --delete-tags "Name=ImagesExample" --ids ami-f465e69d

The commands also have support for batch action:

$images modify --create-tags "Name=Example" --ids ami-f465e69d,ami-c5c237ac,ami-64pgca7e
$images modify --delete-tags "Name=Example" --ids ami-f465e69d,ami-c5c237ac,ami-64pgca7e

Just like for the delete command, all you need to give is the ami ids. images will automatically match the region for the given id. You don't need to define any region information.

Copy

Copy supports copying an AMI to the same or different regions. Below is a simple example:

$ images copy -image "ami-530ay345" -to "us-east-1"

Copy supports concurrent copying to multiple regions.:

$ images copy -image "ami-530ay345" -to "us-east-1,ap-southeast-1,eu-central-1"

Description can be given too (optional):

$ images copy -image "ami-530ay345" -to "us-east-1"  -desc "My new AMI"

Build & Development

To build images just run:

$ make build

This will put the images binary in the bin folder. Development builds doesn't have a version, so if called with "--version" it'll output dev:

$ .bin/images --version
dev

For creating release binaries run (goxc required):

IMAGES_VERSION="0.1.0" make release

License

The BSD 3-Clause License - see LICENSE for more details

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/aws/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
_workspace/src/github.com/aws/aws-sdk-go/aws/awserr
Package awserr represents API error interface accessors for the SDK.
Package awserr represents API error interface accessors for the SDK.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
_workspace/src/github.com/aws/aws-sdk-go/internal/apierr
Package apierr represents API error types.
Package apierr represents API error types.
_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints
Package endpoints validates regional endpoints for services.
Package endpoints validates regional endpoints for services.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query
Package ec2query provides serialisation of AWS EC2 requests and responses.
Package ec2query provides serialisation of AWS EC2 requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest
Package rest provides RESTful serialisation of AWS requests and responses.
Package rest provides RESTful serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil
Package xmlutil provides XML serialisation of AWS requests and responses.
Package xmlutil provides XML serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4
Package v4 implements signing for AWS V4 signer
Package v4 implements signing for AWS V4 signer
_workspace/src/github.com/aws/aws-sdk-go/service/ec2
Package ec2 provides a client for Amazon Elastic Compute Cloud.
Package ec2 provides a client for Amazon Elastic Compute Cloud.
_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface
Package ec2iface provides an interface for the Amazon Elastic Compute Cloud.
Package ec2iface provides an interface for the Amazon Elastic Compute Cloud.
_workspace/src/github.com/digitalocean/godo
Package godo is the DigtalOcean API v2 client for Go
Package godo is the DigtalOcean API v2 client for Go
_workspace/src/github.com/fatih/camelcase
Package camelcase is a micro package to split the words of a camelcase type string into a slice of words.
Package camelcase is a micro package to split the words of a camelcase type string into a slice of words.
_workspace/src/github.com/fatih/color
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
_workspace/src/github.com/fatih/flags
Package flags is a low level package for parsing or managing single flag arguments and their associated values from an argument list.
Package flags is a low level package for parsing or managing single flag arguments and their associated values from an argument list.
_workspace/src/github.com/fatih/structs
Package structs contains various utilities functions to work with structs.
Package structs contains various utilities functions to work with structs.
_workspace/src/github.com/google/go-querystring/query
Package query implements encoding of structs into URL query parameters.
Package query implements encoding of structs into URL query parameters.
_workspace/src/github.com/koding/multiconfig
Package multiconfig provides a way to load and read configurations from multiple sources.
Package multiconfig provides a way to load and read configurations from multiple sources.
_workspace/src/github.com/shiena/ansicolor
Package ansicolor provides color console in Windows as ANSICON.
Package ansicolor provides color console in Windows as ANSICON.
_workspace/src/github.com/shiena/ansicolor/ansicolor
The ansicolor command colors a console text by ANSI escape sequence like wac.
The ansicolor command colors a console text by ANSI escape sequence like wac.
_workspace/src/github.com/tent/http-link-go
Package link implements parsing and serialization of Link header values as defined in RFC 5988.
Package link implements parsing and serialization of Link header values as defined in RFC 5988.
_workspace/src/github.com/vaughan0/go-ini
Package ini provides functions for parsing INI configuration files.
Package ini provides functions for parsing INI configuration files.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/golang.org/x/oauth2
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests.
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests.
_workspace/src/golang.org/x/oauth2/clientcredentials
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0".
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0".
_workspace/src/golang.org/x/oauth2/facebook
Package facebook provides constants for using OAuth2 to access Facebook.
Package facebook provides constants for using OAuth2 to access Facebook.
_workspace/src/golang.org/x/oauth2/github
Package github provides constants for using OAuth2 to access Github.
Package github provides constants for using OAuth2 to access Github.
_workspace/src/golang.org/x/oauth2/google
Package google provides support for making OAuth2 authorized and authenticated HTTP requests to Google APIs.
Package google provides support for making OAuth2 authorized and authenticated HTTP requests to Google APIs.
_workspace/src/golang.org/x/oauth2/internal
Package internal contains support packages for oauth2 package.
Package internal contains support packages for oauth2 package.
_workspace/src/golang.org/x/oauth2/jws
Package jws provides encoding and decoding utilities for signed JWS messages.
Package jws provides encoding and decoding utilities for signed JWS messages.
_workspace/src/golang.org/x/oauth2/jwt
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0".
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0".
_workspace/src/golang.org/x/oauth2/linkedin
Package linkedin provides constants for using OAuth2 to access LinkedIn.
Package linkedin provides constants for using OAuth2 to access LinkedIn.
_workspace/src/golang.org/x/oauth2/odnoklassniki
Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki.
Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki.
_workspace/src/golang.org/x/oauth2/paypal
Package paypal provides constants for using OAuth2 to access PayPal.
Package paypal provides constants for using OAuth2 to access PayPal.
_workspace/src/golang.org/x/oauth2/vk
Package vk provides constants for using OAuth2 to access VK.com.
Package vk provides constants for using OAuth2 to access VK.com.
_workspace/src/google.golang.org/api/compute/v1
Package compute provides access to the Compute Engine API.
Package compute provides access to the Compute Engine API.
_workspace/src/google.golang.org/api/googleapi
Package googleapi contains the common code shared by all Google API libraries.
Package googleapi contains the common code shared by all Google API libraries.
_workspace/src/google.golang.org/api/googleapi/internal/uritemplates
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
_workspace/src/google.golang.org/api/googleapi/transport
Package transport contains HTTP transports used to make authenticated API requests.
Package transport contains HTTP transports used to make authenticated API requests.
_workspace/src/google.golang.org/cloud/compute/metadata
Package metadata provides access to Google Compute Engine (GCE) metadata and API service accounts.
Package metadata provides access to Google Compute Engine (GCE) metadata and API service accounts.
_workspace/src/google.golang.org/cloud/internal
Package internal provides support for the cloud packages.
Package internal provides support for the cloud packages.
_workspace/src/google.golang.org/cloud/internal/datastore
Package datastore is a generated protocol buffer package.
Package datastore is a generated protocol buffer package.
_workspace/src/google.golang.org/cloud/internal/testutil
Package testutil contains helper functions for writing tests.
Package testutil contains helper functions for writing tests.
provider
aws
do
gce

Jump to

Keyboard shortcuts

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