cyclist

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: MIT Imports: 32 Imported by: 0

README

cyclist 🚴

Build Status codecov

µService™ for managing AWS auto-scaling groups and their lifecycle events.

By default, ASGs will forcefully shut your instance down when scaling in. In order to prevent that, the lifecycle must be actively handled by responding to events via lifecycle hooks.

This is mostly for running instances of worker on AWS.

On scale-in we do not want to cancel currently running jobs. Instead, we want to stop accepting new work, finish the existing jobs, and then shut down.

On scale-out we want to do some initial set-up (downloading docker images) before taking on work.

For scaling in, cyclist will receive a termination request via SNS. It will notify the instance that is to be retired to shut down gracefully (all workers poll for this condition). The instance finishes the jobs and notifies cyclist that it is ready to shut down. Cyclist then terminates the instance.

Pre-Install

Ensure that you have cloned the repository into your $GOPATH, e.g. ~/go/src/github.com/travis-ci/cyclist.

Install

make

Develop

make dev-server

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// VersionString is a version!
	VersionString = "?"
	// RevisionString is a revision!
	RevisionString = "?"
	// RevisionURLString is a revision URL!
	RevisionURLString = "?"
	// GeneratedString is a timestamp!
	GeneratedString = "?"
	// CopyrightString is legalese!
	CopyrightString = "?"

	// RedisNamespace is the namespace used in redis OK!
	RedisNamespace = "cyclist"
)

Functions

func NewCLI

func NewCLI() *cli.App

NewCLI makes the cli oh wow!

Types

type Instance

type Instance struct {
	InstanceID    string `json:"id" redis:"instance_id"`
	ExpectedState string `json:"expected_state,omitempty" redis:"expected_state"`
}

Instance is the internal representation of an EC2 instance

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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