Skip to content

Update dependencies, including instance type data (#308) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
language: go

go:
- 1.11

sudo: required

services:
- docker

env:
# options: nightly, custom, stable
# default: custom
matrix:
- FLAVOR=nightly

global:
secure: E0H+b3i171uG8e/w6AVV9HDCCcoReTNlk2+YSENFYmnzxBmvQOo2YwI1jtBRgktG51yZZCzUJZnc0bkaghRT6nS6H8gVUN5GuZjMXdEwY3r+2Zqka6sS1ym+PK6JEA1bRjtX2iQFtk2V68gzUNvjKj8YB2zVJmX6St7tcQ9lBcluQ0xEFu7MZMknYrl9W2NnAhajt27D50uUELtSo3n61TEXXIvFRQyjHCMpGmqeZcXYtiSZAyZjraTsZr9/dngOSw0iExXDDa7cYPHHmmre+3aQUJ9AzotgB+C3+SJ+zOaOGPvVc4PS/G2Wj4siQ1Yv3nl9pvGgxeKtZgVQ92KN9ngdVtRs+XnwMC/x9VJN8vHHgI+coETZ9lhwhjeS8yFIXdBaktXz014ZVrVVpSB+BzoW4r6x/MlmZh0muJNME5OGFXbR0qFaaUB9WdQCst+MhVvSKiZ3Slmck4/3UcyAsuePj0sF1Z/yv9YJR84NTEUdif/PQnBDC1ulhXAIhZ+gm7ZOMZXRW9U7YZlHnFpBg8KoVETlnkT6AjKZ5jy+gz4CgisN2H7OuyjVQm5kIEXPo8ORJqYHPM3tu9HVsCHb6Pm+y9pec/1YXSKtmFbJiYeAmbz3Lp8vVUX5tOo24o0hCyU7qA/ypCUxRoHrHHC+c9u8nQDWGcQBD0azp+dcy2s=
script:
- make travisci
- make terraform-test

- make travisci
- make terraform-test
after_success:
- curl --request POST "https://goreportcard.com/checks" --data "repo=github.com/cristim/autospotting"

- curl --request POST "https://goreportcard.com/checks" --data "repo=github.com/AutoSpotting/AutoSpotting"
deploy:
provider: s3
access_key_id: AKIAJLFCT4RDMFFFREPA
Expand All @@ -30,17 +24,14 @@ deploy:
skip_cleanup: true
acl: public_read
on:
repo: cristim/autospotting

repo: AutoSpotting/AutoSpotting
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/73346abd21785c9a053c
# options: [always|never|change] default: always
- https://webhooks.gitter.im/e/73346abd21785c9a053c
on_success: change
on_failure: always
on_start: never

addons:
code_climate:
repo_token:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Contribution guidelines #

[![Chat on Gitter](https://badges.gitter.im/cristim/autospotting.svg)](https://gitter.im/cristim/autospotting?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Chat on Gitter](https://badges.gitter.im/AutoSpotting/AutoSpotting.svg)](https://gitter.im/AutoSpotting/AutoSpotting?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

The usual GitHub contribution model applies, but if you would like to [raise an
issue](https://github.com/cristim/autospotting/issues/new) or start working on a
[pull request](https://github.com/cristim/autospotting/pulls), please get in
touch on [gitter](https://gitter.im/cristim/autospotting) to discuss it first so
issue](https://github.com/AutoSpotting/AutoSpotting/issues/new) or start working on a
[pull request](https://github.com/AutoSpotting/AutoSpotting/pulls), please get in
touch on [gitter](https://gitter.im/AutoSpotting/AutoSpotting) to discuss it first so
we make sure everything is clear and that nobody else is already working on it.

Any random questions are also better asked there.
Expand Down
6 changes: 3 additions & 3 deletions CUSTOM_BUILDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ your CloudFormation or Terraform stack to use those new binaries.
1. Run the following command to install the AutoSpotting project into your
GOPATH directory:

`go get github.com/cristim/autospotting`
`go get github.com/AutoSpotting/AutoSpotting`

This downloads the source from GitHub, pulls in all necessary dependencies,
builds it for local execution and deploys the binary into the golang binary
directory which you may also want to append to your PATH.

1. Navigate to the root of the AutoSpotting repository:

`cd $GOPATH/src/github.com/cristim/autospotting`
`cd $GOPATH/src/github.com/AutoSpotting/AutoSpotting`

1. (Optional) You may want to make a minor change to the source code so you can
tell when the tool is running your own custom-built version. If so, add a
Expand Down Expand Up @@ -159,6 +159,6 @@ This also accepts all the autospotting command-line arguments, including `-help`
which explains all the available options.

Pre-built Docker images for the latest builds are also available on Dockerhub at
[cristim/autospotting](https://hub.docker.com/r/cristim/autospotting/)
[AutoSpotting/AutoSpotting](https://hub.docker.com/r/AutoSpotting/AutoSpotting/)

[Back to the main Readme](./README.md)
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM golang:1.11-alpine as golang
RUN apk add -U --no-cache ca-certificates git make
RUN go get -v github.com/cristim/autospotting/...
WORKDIR /go/src/github.com/cristim/autospotting/
RUN go get -v github.com/AutoSpotting/AutoSpotting/...
WORKDIR /go/src/github.com/AutoSpotting/AutoSpotting/
RUN FLAVOR=nightly CGO_ENABLED=0 make

FROM scratch
WORKDIR /
COPY LICENSE BINARY_LICENSE /
COPY --from=golang /go/src/github.com/cristim/autospotting/autospotting .
COPY --from=golang /go/src/github.com/AutoSpotting/AutoSpotting/autospotting .
COPY --from=golang /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["./autospotting"]
10 changes: 5 additions & 5 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ after spot instances are terminated and on-demand instances are launched again
in the group.

This behavior may be changed once implementing
[#119](https://github.com/cristim/autospotting/issues/119), in which we may
[#119](https://github.com/AutoSpotting/AutoSpotting/issues/119), in which we may
implement a strategy bidding closer to the current spot price in order to avoid
running that spot instance after significant spot price increases.

Expand All @@ -559,9 +559,9 @@ Have a look at the logs for more details.
Spot instances may fail to launch for a number of reasons, such as market
conditions that manifest in high prices across all the compatible instance
types, but also known bugs or limitations in the current implementation, such as
[#105](https://github.com/cristim/autospotting/issues/105),
[#106](https://github.com/cristim/autospotting/issues/106) and
[110](https://github.com/cristim/autospotting/issues/110), which would need to
[#105](https://github.com/AutoSpotting/AutoSpotting/issues/105),
[#106](https://github.com/AutoSpotting/AutoSpotting/issues/106) and
[110](https://github.com/AutoSpotting/AutoSpotting/issues/110), which would need to
be fixed or simply implemented. If you are impacted by such issues please
consider [contributing](CONTRIBUTING.md) a fix.

Expand Down Expand Up @@ -593,7 +593,7 @@ actions against your instances and autoscaling groups.
This configuration was carefully crafted to contain the minimum amount of
permissions needed for the instance replacement and logging its actions. The
full list can be seen in the Cloudformation stack
[template](https://github.com/cristim/autospotting/blob/master/cloudformation/stacks/AutoSpotting/template.yaml#L199),
[template](https://github.com/AutoSpotting/AutoSpotting/blob/master/cloudformation/stacks/AutoSpotting/template.yaml#L199),
but it basically boils down to the following:

- describing the resources you have in order to decide what needs to be done
Expand Down
17 changes: 6 additions & 11 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ html-cover: test ## Display coverage
.PHONY: html-cover

travisci-cover: html-cover ## Test & generate coverage in the TravisCI format, fails unless executed from TravisCI
@goveralls -coverprofile=$(COVER_PROFILE) -service=travis-ci
@goveralls -coverprofile=$(COVER_PROFILE) -service=travis-ci -repotoken=$(COVERALLS_TOKEN)
.PHONY: travisci-cover

travisci-checks: fmt-check vet-check lint ## Pass fmt / vet & lint format
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<img src="logo.png" width="150" align="right">

[![BuildStatus](https://travis-ci.org/cristim/autospotting.svg?branch=master)](https://travis-ci.org/cristim/autospotting)
[![GoReportCard](https://goreportcard.com/badge/github.com/cristim/autospotting)](https://goreportcard.com/report/github.com/cristim/autospotting)
[![CoverageStatus](https://coveralls.io/repos/github/cristim/autospotting/badge.svg?branch=master)](https://coveralls.io/github/cristim/autospotting?branch=master)
[![CodeClimate](https://codeclimate.com/github/cristim/autospotting/badges/gpa.svg)](https://codeclimate.com/github/cristim/autospotting)
[![IssueCount](https://codeclimate.com/github/cristim/autospotting/badges/issue_count.svg)](https://codeclimate.com/github/cristim/autospotting)
[![ChatOnGitter](https://badges.gitter.im/cristim/autospotting.svg)](https://gitter.im/cristim/autospotting?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Open Source Helpers](https://www.codetriage.com/cristim/autospotting/badges/users.svg)](https://www.codetriage.com/cristim/autospotting)
[![BuildStatus](https://travis-ci.org/AutoSpotting/AutoSpotting.svg?branch=master)](https://travis-ci.org/AutoSpotting/AutoSpotting)
[![GoReportCard](https://goreportcard.com/badge/github.com/AutoSpotting/AutoSpotting)](https://goreportcard.com/report/github.com/AutoSpotting/AutoSpotting)
[![CoverageStatus](https://coveralls.io/repos/github/AutoSpotting/AutoSpotting/badge.svg?branch=master)](https://coveralls.io/github/AutoSpotting/AutoSpotting?branch=master)
[![CodeClimate](https://codeclimate.com/github/AutoSpotting/AutoSpotting/badges/gpa.svg)](https://codeclimate.com/github/AutoSpotting/AutoSpotting)
[![IssueCount](https://codeclimate.com/github/AutoSpotting/AutoSpotting/badges/issue_count.svg)](https://codeclimate.com/github/AutoSpotting/AutoSpotting)
[![ChatOnGitter](https://badges.gitter.im/AutoSpotting/AutoSpotting.svg)](https://gitter.im/AutoSpotting/AutoSpotting?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Open Source Helpers](https://www.codetriage.com/AutoSpotting/AutoSpotting/badges/users.svg)](https://www.codetriage.com/AutoSpotting/AutoSpotting)
[![Patreon](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://www.patreon.com/cristim/overview)

A simple and easy to use tool designed to significantly lower your Amazon AWS
Expand Down Expand Up @@ -108,7 +108,7 @@ and we'll do our best to answer them either there or on Gitter.
## Getting Started ##

Just like in the above animation, it's as easy as launching a CloudFormation (or
[Terraform](https://github.com/cristim/autospotting/tree/master/terraform))
[Terraform](https://github.com/AutoSpotting/AutoSpotting/tree/master/terraform))
stack and setting the (configurable) `spot-enabled` tag on the AutoScaling
groups where you want it enabled to `true`.

Expand All @@ -134,7 +134,7 @@ For more detailed information you can read this [document](START.md)
## Support ##

Community support is available on the
[gitter](https://gitter.im/cristim/autospotting) chat room, where the main
[gitter](https://gitter.im/AutoSpotting/AutoSpotting) chat room, where the main
authors and other users are likely to help you solve issues with these official
binaries.

Expand All @@ -150,7 +150,7 @@ appreciate the work they put in it, please consider contributing to the
development effort as well.

You can just try it out and give
[feedback](https://gitter.im/cristim/autospotting), report issues, improve the
[feedback](https://gitter.im/AutoSpotting/AutoSpotting), report issues, improve the
documentation, write some code or assign a developer to work on it, or even just
spread the word among your peers who might be interested in it. Any amount of
help would be greatly appreciated and would make a huge difference to the
Expand Down
12 changes: 6 additions & 6 deletions START.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ on your machine.
#### Default install ####

Pre-built binaries easier to install are available when using the Terraform
[module](https://registry.terraform.io/modules/cristim/autospotting/aws)
[module](https://registry.terraform.io/modules/AutoSpotting/AutoSpotting/aws)
available from the Terraform Registry.

Copy and paste the below snippet into your Terraform configuration:

```hcl
module "autospotting" {
source = "cristim/autospotting/aws"
source = "AutoSpotting/AutoSpotting/aws"
version = "0.0.9" # this version is subject to change
}
```
Expand Down Expand Up @@ -172,7 +172,7 @@ use the module directly:

```hcl
module "autospotting" {
source = "github.com/cristim/autospotting//terraform/autospotting"
source = "github.com/AutoSpotting/AutoSpotting//terraform/autospotting"


autospotting_disallowed_instance_types = "t2.*"
Expand Down Expand Up @@ -204,7 +204,7 @@ in S3:

```hcl
module "autospotting" {
source = "github.com/cristim/autospotting//terraform/autospotting"
source = "github.com/AutoSpotting/AutoSpotting//terraform/autospotting"

lambda_s3_bucket = "lambda-releases"
lambda_s3_key = "autospotting.zip"
Expand All @@ -219,7 +219,7 @@ Kubernetes cron job, instead of running it in AWS Lambda.
<!-- markdownlint-disable MD013 -->

``` shell
curl https://raw.githubusercontent.com/cristim/autospotting/master/kubernetes/autospotting-cron.yaml.example > autospotting-cron.yaml
curl https://raw.githubusercontent.com/AutoSpotting/AutoSpotting/master/kubernetes/autospotting-cron.yaml.example > autospotting-cron.yaml
```

<!-- markdownlint-enable MD013 -->
Expand Down Expand Up @@ -464,7 +464,7 @@ The full list of the objects available in the bucket can be seen
[here](http://s3.amazonaws.com/cloudprowess/index.html).

The full list of TravisCI builds and their respective git commits can be seen on
the Travis CI [builds page](https://travis-ci.org/cristim/autospotting/builds)
the Travis CI [builds page](https://travis-ci.org/AutoSpotting/AutoSpotting/builds)

### Compatibility notices ###

Expand Down
20 changes: 10 additions & 10 deletions TECHNICAL_DETAILS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

## Summary of supported features & options ##

| Option | Status | [Override using ASG tags](https://github.com/cristim/autospotting/blob/master/core/autoscaling.go#L16) |
| Option | Status | [Override using ASG tags](https://github.com/AutoSpotting/AutoSpotting/blob/master/core/autoscaling.go#L16) |
| ------- | :----: | :-------------------: |
| Run on multiple regions | :white_check_mark: (default: all)| :heavy_minus_sign: |
| [Keep a fixed minimum percentage of on-demand](https://github.com/cristim/autospotting/blob/master/START.md#minimum-on-demand-configuration) | :white_check_mark: (default: 0%) | :white_check_mark: |
| [Keep a fixed minimum number of on-demand](https://github.com/cristim/autospotting/blob/master/START.md#minimum-on-demand-configuration) | :white_check_mark: (default: 0) | :white_check_mark: |
| [Keep a fixed minimum percentage of on-demand](https://github.com/AutoSpotting/AutoSpotting/blob/master/START.md#minimum-on-demand-configuration) | :white_check_mark: (default: 0%) | :white_check_mark: |
| [Keep a fixed minimum number of on-demand](https://github.com/AutoSpotting/AutoSpotting/blob/master/START.md#minimum-on-demand-configuration) | :white_check_mark: (default: 0) | :white_check_mark: |
| Bid at a certain percentage of the on-demand price | :white_check_mark: (default: 100%) | :white_check_mark: |
| Can bid the current spot price plus a certain percentage | :white_check_mark: | :white_check_mark: |
| Automatically determine the cheapest compatible instance type | :white_check_mark: (default) | :white_check_mark: |
Expand All @@ -21,17 +21,17 @@

For the options not directly linked to any specific part of the doc, please
check the
[configuration](https://github.com/cristim/autospotting/blob/master/START.md#configuration-of-autospotting) page.
[configuration](https://github.com/AutoSpotting/AutoSpotting/blob/master/START.md#configuration-of-autospotting) page.

| Feature | Status |
| ------- | :----: |
| [Easy installation via Cloudformation](https://github.com/cristim/autospotting/blob/master/START.md#install-via-cloudformation) | :white_check_mark: |
| [Easy installation via Terraform](https://github.com/cristim/autospotting/blob/master/START.md#install-via-terraform) | :white_check_mark: |
| [Available as Docker container image](https://hub.docker.com/r/cristim/autospotting/) | :white_check_mark: :wrench: |
| [Easy installation via Cloudformation](https://github.com/AutoSpotting/AutoSpotting/blob/master/START.md#install-via-cloudformation) | :white_check_mark: |
| [Easy installation via Terraform](https://github.com/AutoSpotting/AutoSpotting/blob/master/START.md#install-via-terraform) | :white_check_mark: |
| [Available as Docker container image](https://hub.docker.com/r/AutoSpotting/AutoSpotting/) | :white_check_mark: :wrench: |
| [Works with Code Deploy](CODEDEPLOY.md) | :white_check_mark: :wrench: |
| [Works with Elastic Beanstalk](https://github.com/cristim/autospotting/blob/053135e97082511fb99b689dce4a7a7830f3327c/START.md#for-elastic-beanstalk) | :white_check_mark: |
| [Works with Elastic Beanstalk](https://github.com/AutoSpotting/AutoSpotting/blob/053135e97082511fb99b689dce4a7a7830f3327c/START.md#for-elastic-beanstalk) | :white_check_mark: |
| Support AWS VPC| :white_check_mark: |
| Support AWS EC2Classic|[:beetle:](https://github.com/cristim/autospotting/issues/48) :pencil: |
| Support AWS EC2Classic|[:beetle:](https://github.com/AutoSpotting/AutoSpotting/issues/48) :pencil: |
| Support AWS DefaultVPC| :white_check_mark: |
| [Rancher compliance](http://rancher.com/reducing-aws-spend/) | :white_check_mark: |
| Lambda X-Ray support | :x: |
Expand All @@ -55,7 +55,7 @@ check the

Some of them can be clicked for more information, you can see if you hover them
with your mouse pointer, but if you have any questions you can always get in
touch on [Gitter](https://gitter.im/cristim/autospotting).
touch on [Gitter](https://gitter.im/AutoSpotting/AutoSpotting).

## Features and Benefits ##

Expand Down
2 changes: 1 addition & 1 deletion autospotting.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"log"
"os"

"github.com/AutoSpotting/AutoSpotting/core"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/cristim/autospotting/core"
"github.com/cristim/ec2-instances-info"
"github.com/namsral/flag"
)
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/stacks/AutoSpotting/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"Path to the Lambda function zip file inside the S3 bucket. Can be used
to update to a more recent version, such as
'nightly/lambda_build_57.zip'. Build numbers can be taken from TravisCI:
https://travis-ci.org/cristim/autospotting/builds"
https://travis-ci.org/AutoSpotting/AutoSpotting/builds"
Type: "String"
LogRetentionPeriod:
Default: "7"
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/autospotting-cron.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
restartPolicy: Never
containers:
- name: autospotting-cron-job
image: cristim/autospotting:latest
image: AutoSpotting/AutoSpotting:latest
# Environment variables for the AutoSpotting pod
# Feel free to configure them to suit your needs
env:
Expand Down
9 changes: 9 additions & 0 deletions vendor/github.com/aws/aws-lambda-go/events/iot_button.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading