octopus-deregister-lambda

command module
v0.0.0-...-ff5c393 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

README

Octopus Deregister Lambda

An AWS Lambda function to deregister an EC2 instance from an Octopus Deploy server when the instance is terminated.

It expects Octopus credentials to be stored in an S3 bucket. The EC2 instance needs to be tagged with the Octopus machine name.

Building

Octopus Deregister is written in Go, and uses aws-lambda-go to bridge Lambda's Python runtime to Go.

Run tests using go test ./....

Aws-lambda-go distributes a Docker container with build and packaging tools. Run

docker run --rm -v $GOPATH:$GOPATH -e GOPATH=$GOPATH -w `pwd` eawsy/aws-lambda-go

The output handler.zip can then be uploaded to Lambda.

Function Configuration

The following configuration parameters are passed as lambda environment variables

Name Purpose Required
OCTOPUS_API_KEY_BUCKET The S3 bucket name to access the Octopus API key Yes
OCTOPUS_API_KEY_PATH The S3 object key to access the Octopus API key Yes
OCTOPUS_URI URI for the Octopus server Yes
DEBUG_LOG Enables debug logging if non-blank No

EC2 Configuration

The lambda function expects the EC2 instance to have the tag octopus_name set to the Octopus display name for the instance.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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