spot-ninja

module
v0.0.0-...-9392beb Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0

README

spot-ninja

Go Report Card Build Status GoDoc

Available translations:

This software is responsible for all the intelligence in increasing and decreasing AutoScalingGroups size based on Spotfleet health.

License

spot ninja is released under the terms of the Apache License. See LICENSE file for more information or see apache.

Requirements

  • Docker >=v1.13.1
  • Docker Compose >=1.23.1
  • Go >= 1.12.7
  • aws-sdk-go Module
  • yaml.v2 Module
  • Polices:
    • CloudWatchReadOnlyAccess
    • AmazonEC2SpotFleetAutoscaleRole
    • AutoScalingConsoleFullAccess

Architecture

spot-ninja

ENVs configuration

To configure the spot-ninja, you need to configure some environment variables. The variables are:

  • AWS_REGION
    • Default us-east-1
  • DATA_POINT_CONFIG
    • Default 30
  • STATISTIC_CONFIG
    • Default Average
  • FLEET_TYPE_CONFIG
    • Default FleetRequestId
  • ID_METRIC_CONFIG
    • Default metric
  • SCAN_TYPE_CONFIG
    • Default TimestampDescending
  • METRIC_NAME_CONFIG
    • Default PendingCapacity
  • NAMESPACE_CONFIG
    • Default AWS/EC2Spot
  • UNIT_CONFIG
    • Default Count
  • TIME_TO_CONFIG
    • Default 5
  • SPEED_CONFIG
    • Default 10
  • DIVIDER_CONFIG
    • Default 4
  • FLEET_IGNORED
    • Default none
  • ENABLE_EVENTS_ON_SQS
    • Default false
  • SQS_URL
    • Default none
  • PREFIX
    • Default ecs-
  • TIME_TO_LIVE
    • In seconds Default 15 min.

Installing with docker-compose

1 - Build

docker-compose build

2 - Run spot-ninja

docker-compose up

Project Structure

  • cmd/
    • main spot-ninja
  • config/
    • general configs to spot ninja
  • pkg/
    • general libs
References

Directories

Path Synopsis
cmd
spot-ninja
Package advisor is a daemon to automatically activate the autoscaling on AWS if the fleet spot is unstable.
Package advisor is a daemon to automatically activate the autoscaling on AWS if the fleet spot is unstable.
pkg
api

Jump to

Keyboard shortcuts

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