Fixed up build and updated dependencies.

This commit is contained in:
Travis Reeder
2017-05-15 15:40:36 -07:00
parent 2b01ae3616
commit 7cfd7d413f
25 changed files with 539 additions and 1059 deletions

2
Gopkg.lock generated
View File

@@ -122,7 +122,7 @@ memo = "a3207ce7cdc29bfe86acf8832a25e44560f834ea1adff813e43c96de7be53eba"
[[projects]]
branch = "master"
name = "github.com/docker/docker"
name = "github.com/moby/moby"
packages = ["api/types","api/types/blkiodev","api/types/container","api/types/filters","api/types/mount","api/types/network","api/types/registry","api/types/strslice","api/types/swarm","api/types/versions","cli/config/configfile","opts","pkg/archive","pkg/fileutils","pkg/homedir","pkg/idtools","pkg/ioutils","pkg/jsonlog","pkg/jsonmessage","pkg/longpath","pkg/pools","pkg/promise","pkg/stdcopy","pkg/system","pkg/term","pkg/term/windows"]
revision = "a9ff628a3c7c55cf016af88f37c4fb6a6029e17a"

View File

@@ -25,7 +25,7 @@
[[dependencies]]
branch = "master"
name = "github.com/docker/docker"
name = "github.com/moby/moby"
[[dependencies]]
branch = "master"

View File

@@ -627,7 +627,7 @@ func (drv *DockerDriver) status(ctx context.Context, container string) (status s
if !cinfo.State.OOMKilled {
// It is possible that the host itself is running out of memory and
// the host kernel killed one of the container processes.
// See: https://github.com/docker/docker/issues/15621
// See: https://github.com/moby/moby/issues/15621
// TODO reed: isn't an OOM an OOM? this is wasting space imo
log.WithFields(logrus.Fields{"container": container}).Info("Setting task as OOM killed, but docker disagreed.")
drv.Inc("docker", "possible_oom_false_alarm", 1, 1.0)

View File

@@ -262,9 +262,9 @@ func parseRepositoryTag(repoTag string) (repository string, tag string) {
func ParseImage(image string) (registry, repo, tag string) {
repo, tag = parseRepositoryTag(image)
// Officially sanctioned at https://github.com/docker/docker/blob/master/registry/session.go#L319 to deal with "Official Repositories".
// Officially sanctioned at https://github.com/moby/moby/blob/master/registry/session.go#L319 to deal with "Official Repositories".
// Without this, token auth fails.
// Registries must exist at root (https://github.com/docker/docker/issues/7067#issuecomment-54302847)
// Registries must exist at root (https://github.com/moby/moby/issues/7067#issuecomment-54302847)
// This cannot support the `library/` shortcut for private registries.
parts := strings.Split(repo, "/")
switch len(parts) {

View File

@@ -9,7 +9,7 @@ import (
"path/filepath"
"time"
"github.com/docker/docker/cli/config/configfile"
"github.com/moby/moby/cli/config/configfile"
docker "github.com/fsouza/go-dockerclient"
"github.com/treeder/functions/api/runner/task"
"github.com/treeder/functions/api/runner/drivers"

25
doc.go
View File

@@ -1,25 +0,0 @@
/*
IronFunctions daemon
Refer to detailed documentation at https://github.com/treeder/functions/tree/master/docs
Environment Variables:
DB_URL
The database URL to use in URL format. See [Databases](databases/README.md) for more information. Default: BoltDB in current working directory `bolt.db`.
MQ_URL
The message queue to use in URL format. See [Message Queues](mqs/README.md) for more information. Default: BoltDB in current working directory `queue.db`.
API_URL
The primary IronFunctions API URL to that this instance will talk to. In a production environment, this would be your load balancer URL.
PORT
Sets the port to run on. Default: `8080`.
NUM_ASYNC
The number of async runners in the functions process (default 1).
LOG_LEVEL
Set to `DEBUG` to enable debugging. Default: INFO.
*/
package main

211
fn/Gopkg.lock generated Normal file
View File

@@ -0,0 +1,211 @@
memo = "b4102c23b2507910df0e91c8f237fa86290a29e4687b96097ed2e4870dfe3a1f"
[[projects]]
branch = "master"
name = "github.com/Azure/go-ansiterm"
packages = [".","winterm"]
revision = "fa152c58bc15761d0200cb75fe958b89a9d4888e"
[[projects]]
name = "github.com/PuerkitoBio/purell"
packages = ["."]
revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4"
version = "v1.1.0"
[[projects]]
branch = "master"
name = "github.com/PuerkitoBio/urlesc"
packages = ["."]
revision = "bbf7a2afc14f93e1e0a5c06df524fbd75e5031e5"
[[projects]]
name = "github.com/Sirupsen/logrus"
packages = ["."]
revision = "ba1b36c82c5e05c4f912a88eab0dcd91a171688f"
version = "v0.11.5"
[[projects]]
name = "github.com/asaskevich/govalidator"
packages = ["."]
revision = "4918b99a7cb949bb295f3c7bbaf24b577d806e35"
version = "v6"
[[projects]]
name = "github.com/aws/aws-sdk-go"
packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","private/protocol","private/protocol/json/jsonutil","private/protocol/jsonrpc","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/restjson","private/protocol/xml/xmlutil","service/lambda","service/sts"]
revision = "9f8b24cb7c7701c78150869d906711a2e7184bc0"
version = "v1.8.23"
[[projects]]
name = "github.com/coreos/go-semver"
packages = ["semver"]
revision = "8ab6407b697782a06568d4b7f1db25550ec2e4c6"
version = "v0.2.0"
[[projects]]
name = "github.com/docker/docker"
packages = ["pkg/jsonlog","pkg/term","pkg/term/windows"]
revision = "092cba3727bb9b4a2f0e922cd6c0f93ea270e363"
version = "v1.13.1"
[[projects]]
name = "github.com/docker/go-units"
packages = ["."]
revision = "f2d77a61e3c169b43402a0a1e84f06daf29b8190"
version = "v0.3.1"
[[projects]]
name = "github.com/giantswarm/semver-bump"
packages = ["bump","storage"]
revision = "88e6c9f2fe390c48839eaba32490fd09cb3b581c"
version = "1.1.1"
[[projects]]
name = "github.com/go-ini/ini"
packages = ["."]
revision = "e7fea39b01aea8d5671f6858f0532f56e8bff3a5"
version = "v1.27.0"
[[projects]]
branch = "master"
name = "github.com/go-openapi/analysis"
packages = ["."]
revision = "0473cb67199f68b8b7d90e641afd9e79ad36b851"
[[projects]]
branch = "master"
name = "github.com/go-openapi/errors"
packages = ["."]
revision = "03cfca65330da08a5a440053faf994a3c682b5bf"
[[projects]]
branch = "master"
name = "github.com/go-openapi/jsonpointer"
packages = ["."]
revision = "779f45308c19820f1a69e9a4cd965f496e0da10f"
[[projects]]
branch = "master"
name = "github.com/go-openapi/jsonreference"
packages = ["."]
revision = "36d33bfe519efae5632669801b180bf1a245da3b"
[[projects]]
branch = "master"
name = "github.com/go-openapi/loads"
packages = ["."]
revision = "ad6217c63d9d12406790ee4acae2aaebd8dc63ec"
[[projects]]
branch = "master"
name = "github.com/go-openapi/runtime"
packages = [".","client"]
revision = "2e9e988df6c290425033bacd425e008950c96be6"
[[projects]]
branch = "master"
name = "github.com/go-openapi/spec"
packages = ["."]
revision = "e51c28f07047ad90caff03f6450908720d337e0c"
[[projects]]
branch = "master"
name = "github.com/go-openapi/strfmt"
packages = ["."]
revision = "93a31ef21ac23f317792fff78f9539219dd74619"
[[projects]]
branch = "master"
name = "github.com/go-openapi/swag"
packages = ["."]
revision = "24ebf76d720bab64f62824d76bced3184a65490d"
[[projects]]
branch = "master"
name = "github.com/go-openapi/validate"
packages = ["."]
revision = "035dcd74f1f61e83debe1c22950dc53556e7e4b2"
[[projects]]
name = "github.com/go-resty/resty"
packages = ["."]
revision = "c45c7bcc0000d1a9ac1b119b2e6043c6540eedea"
version = "v0.11"
[[projects]]
branch = "master"
name = "github.com/iron-io/functions_go"
packages = [".","client","client/apps","client/routes","client/tasks","client/version","models"]
revision = "69e4dec8454c3c710045263c2ede76139c141146"
[[projects]]
name = "github.com/jmespath/go-jmespath"
packages = ["."]
revision = "3433f3ea46d9f8019119e7dd41274e112a2359a9"
version = "0.2.2"
[[projects]]
branch = "master"
name = "github.com/jmoiron/jsonq"
packages = ["."]
revision = "e874b168d07ecc7808bc950a17998a8aa3141d82"
[[projects]]
branch = "master"
name = "github.com/juju/errgo"
packages = ["errors"]
revision = "08cceb5d0b5331634b9826762a8fd53b29b86ad8"
[[projects]]
branch = "master"
name = "github.com/mailru/easyjson"
packages = ["buffer","jlexer","jwriter"]
revision = "dffba8d13bbd998df17d8557570cdea0624b9d1d"
[[projects]]
branch = "master"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
revision = "cc8532a8e9a55ea36402aa21efdf403a60d34096"
[[projects]]
name = "github.com/moby/moby"
packages = ["pkg/jsonmessage"]
revision = "092cba3727bb9b4a2f0e922cd6c0f93ea270e363"
version = "v1.13.1"
[[projects]]
name = "github.com/urfave/cli"
packages = ["."]
revision = "0bdeddeeb0f650497d603c4ad7b20cfe685682f6"
version = "v1.19.1"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["context","context/ctxhttp","idna","publicsuffix"]
revision = "34057069f4ab13dc4433c68d368737ebeafcccdc"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix"]
revision = "1e99a4f9d247b28c670884b9a8d6801f39a47b77"
[[projects]]
branch = "master"
name = "golang.org/x/text"
packages = ["internal/gen","internal/triegen","internal/ucd","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable","width"]
revision = "19e51611da83d6be54ddafce4a4af510cb3e9ea4"
[[projects]]
branch = "v2"
name = "gopkg.in/mgo.v2"
packages = ["bson","internal/json"]
revision = "3f83fa5005286a7fe593b055f0d7771a7dce4655"
[[projects]]
branch = "v2"
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b"

88
fn/Gopkg.toml Normal file
View File

@@ -0,0 +1,88 @@
## Gopkg.toml example (these lines may be deleted)
## "required" lists a set of packages (not projects) that must be included in
## Gopkg.lock. This list is merged with the set of packages imported by the current
## project. Use it when your project needs a package it doesn't explicitly import -
## including "main" packages.
# required = ["github.com/user/thing/cmd/thing"]
## "ignored" lists a set of packages (not projects) that are ignored when
## dep statically analyzes source code. Ignored packages can be in this project,
## or in a dependency.
# ignored = ["github.com/user/project/badpkg"]
## Dependencies define constraints on dependent projects. They are respected by
## dep whether coming from the Gopkg.toml of the current project or a dependency.
# [[dependencies]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
## Recommended: the version constraint to enforce for the project.
## Only one of "branch", "version" or "revision" can be specified.
# version = "1.0.0"
# branch = "master"
# revision = "abc123"
#
## Optional: an alternate location (URL or import path) for the project's source.
# source = "https://github.com/myfork/package.git"
## Overrides have the same structure as [[dependencies]], but supercede all
## [[dependencies]] declarations from all projects. Only the current project's
## [[overrides]] are applied.
##
## Overrides are a sledgehammer. Use them only as a last resort.
# [[overrides]]
## Required: the root import path of the project being constrained.
# name = "github.com/user/project"
#
## Optional: specifying a version constraint override will cause all other
## constraints on this project to be ignored; only the overriden constraint
## need be satisfied.
## Again, only one of "branch", "version" or "revision" can be specified.
# version = "1.0.0"
# branch = "master"
# revision = "abc123"
#
## Optional: specifying an alternate source location as an override will
## enforce that the alternate location is used for that project, regardless of
## what source location any dependent projects specify.
# source = "https://github.com/myfork/package.git"
ignored = ["github.com/treeder/functions", "github.com/treeder/functions/api/version"]
[[dependencies]]
name = "github.com/aws/aws-sdk-go"
version = "^1.8.23"
[[dependencies]]
name = "github.com/giantswarm/semver-bump"
version = "^1.1.1"
[[dependencies]]
branch = "master"
name = "github.com/go-openapi/runtime"
[[dependencies]]
branch = "master"
name = "github.com/go-openapi/strfmt"
[[dependencies]]
branch = "master"
name = "github.com/iron-io/functions_go"
[[dependencies]]
branch = "master"
name = "github.com/jmoiron/jsonq"
[[dependencies]]
name = "github.com/moby/moby"
version = "^1.13.1"
[[dependencies]]
name = "github.com/urfave/cli"
version = "^1.19.1"
[[dependencies]]
branch = "v2"
name = "gopkg.in/yaml.v2"

View File

@@ -10,7 +10,7 @@ docker: vendor
docker push iron/fn
vendor:
dep ensure --update
dep ensure
test:
go test $(go list ./... | grep -v /vendor/)

184
fn/glide.lock generated
View File

@@ -1,184 +0,0 @@
hash: a586a0b85eb753b0b618a3e763123480deb2ba6389496c1f1b897a9305326026
updated: 2016-12-07T11:54:35.937180292-08:00
imports:
- name: github.com/asaskevich/govalidator
version: 7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877
- name: github.com/aws/aws-sdk-go
version: db9509b01e2e00890091ca164aebf0b1ca62eef8
subpackages:
- aws
- aws/awserr
- aws/awsutil
- aws/client
- aws/client/metadata
- aws/corehandlers
- aws/credentials
- aws/credentials/ec2rolecreds
- aws/credentials/endpointcreds
- aws/credentials/stscreds
- aws/defaults
- aws/ec2metadata
- aws/endpoints
- aws/request
- aws/session
- aws/signer/v4
- private/protocol
- private/protocol/json/jsonutil
- private/protocol/jsonrpc
- private/protocol/query
- private/protocol/query/queryutil
- private/protocol/rest
- private/protocol/restjson
- private/protocol/xml/xmlutil
- service/lambda
- service/sts
- name: github.com/Azure/go-ansiterm
version: fa152c58bc15761d0200cb75fe958b89a9d4888e
subpackages:
- winterm
- name: github.com/coreos/go-semver
version: 9474efc580562cce8f761659fbce31b6feb8ce88
subpackages:
- semver
- name: github.com/docker/docker
version: eefbf1ddd3ee4e6b6e6dc7e938e77a96ceb40163
subpackages:
- api/types
- api/types/blkiodev
- api/types/container
- api/types/filters
- api/types/mount
- api/types/network
- api/types/registry
- api/types/strslice
- api/types/swarm
- api/types/versions
- opts
- pkg/archive
- pkg/fileutils
- pkg/homedir
- pkg/idtools
- pkg/ioutils
- pkg/jsonlog
- pkg/jsonmessage
- pkg/longpath
- pkg/pools
- pkg/promise
- pkg/stdcopy
- pkg/system
- pkg/term
- pkg/term/windows
- name: github.com/docker/go-connections
version: 4ccf312bf1d35e5dbda654e57a9be4c3f3cd0366
subpackages:
- nat
- name: github.com/docker/go-units
version: e30f1e79f3cd72542f2026ceec18d3bd67ab859c
- name: github.com/fsouza/go-dockerclient
version: a633c5ee3344bd557a9a22e9b7259cab6447cd22
- name: github.com/giantswarm/semver-bump
version: 7ec6ac8985c24dd50b4942f9a908d13cdfe70f23
subpackages:
- bump
- storage
- name: github.com/go-ini/ini
version: 2ba15ac2dc9cdf88c110ec2dc0ced7fa45f5678c
- name: github.com/go-openapi/analysis
version: 7222828b8ce19afee3c595aef6643b9e42150120
- name: github.com/go-openapi/errors
version: 49fe8b3a0e0d32a617d8d50c67f856ad6e45b28b
- name: github.com/go-openapi/jsonpointer
version: 8d96a2dc61536b690bd36b2e9df0b3c0b62825b2
- name: github.com/go-openapi/jsonreference
version: 36d33bfe519efae5632669801b180bf1a245da3b
- name: github.com/go-openapi/loads
version: 315567415dfd74b651f7a62cabfc82a57ed7b9ad
- name: github.com/go-openapi/runtime
version: 14b161b40ece9dac8e244ab2fde2d209e108c6f5
subpackages:
- client
- name: github.com/go-openapi/spec
version: f7ae86df5bc115a2744343016c789a89f065a4bd
- name: github.com/go-openapi/strfmt
version: 34fc3ba7c0f5fb615fda47a2b4fbd4c641b215f2
- name: github.com/go-openapi/swag
version: 3b6d86cd965820f968760d5d419cb4add096bdd7
- name: github.com/go-openapi/validate
version: 027696d4b54399770f1cdcc6c6daa56975f9e14e
- name: github.com/go-resty/resty
version: 24dc7ba4bc1ef9215048b28e7248f99c42901db5
- name: github.com/hashicorp/go-cleanhttp
version: ad28ea4487f05916463e2423a55166280e8254b5
- name: github.com/iron-io/functions_go
version: 69e4dec8454c3c710045263c2ede76139c141146
subpackages:
- client
- client/apps
- client/routes
- client/tasks
- client/version
- models
- name: github.com/iron-io/iron_go3
version: b50ecf8ff90187fc5fabccd9d028dd461adce4ee
subpackages:
- api
- config
- worker
- name: github.com/treeder/lambda
version: 4a046af3249dd5933a8d328f965e9717c97fef24
subpackages:
- lambda
- name: github.com/jmespath/go-jmespath
version: 3433f3ea46d9f8019119e7dd41274e112a2359a9
- name: github.com/jmoiron/jsonq
version: e874b168d07ecc7808bc950a17998a8aa3141d82
- name: github.com/juju/errgo
version: 08cceb5d0b5331634b9826762a8fd53b29b86ad8
subpackages:
- errors
- name: github.com/mailru/easyjson
version: 159cdb893c982e3d1bc6450322fedd514f9c9de3
subpackages:
- buffer
- jlexer
- jwriter
- name: github.com/Microsoft/go-winio
version: 24a3e3d3fc7451805e09d11e11e95d9a0a4f205e
- name: github.com/mitchellh/mapstructure
version: f3009df150dadf309fdee4a54ed65c124afad715
- name: github.com/opencontainers/runc
version: 8893fa693bf9bf29e5a156369bc51b887df43924
subpackages:
- libcontainer/system
- libcontainer/user
- name: github.com/PuerkitoBio/purell
version: 0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4
- name: github.com/PuerkitoBio/urlesc
version: 5bd2802263f21d8788851d5305584c82a5c75d7e
- name: github.com/satori/go.uuid
version: 879c5887cd475cd7864858769793b2ceb0d44feb
- name: github.com/Sirupsen/logrus
version: d26492970760ca5d33129d2d799e34be5c4782eb
- name: github.com/urfave/cli
version: 0bdeddeeb0f650497d603c4ad7b20cfe685682f6
- name: golang.org/x/net
version: f315505cf3349909cdf013ea56690da34e96a451
subpackages:
- context
- context/ctxhttp
- idna
- publicsuffix
- name: golang.org/x/sys
version: d5645953809d8b4752afb2c3224b1f1ad73dfa70
subpackages:
- unix
- windows
- name: golang.org/x/text
version: 5c6cf4f9a2357d38515014cea8c488ed22bdab90
subpackages:
- transform
- unicode/norm
- width
- name: gopkg.in/yaml.v2
version: a5b47d31c556af34a302ce5d659e6fea44d90de0
testImports: []

View File

@@ -1,23 +0,0 @@
package: github.com/treeder/functions/fn
import:
- package: github.com/aws/aws-sdk-go
subpackages:
- aws
- aws/credentials
- aws/session
- service/lambda
- package: github.com/docker/docker
subpackages:
- pkg/jsonmessage
- package: github.com/giantswarm/semver-bump
subpackages:
- bump
- storage
- package: github.com/iron-io/functions_go
version: f38f2174656467ec3ed404b7294e9ee172573e43
- package: github.com/treeder/lambda
subpackages:
- lambda
- package: github.com/urfave/cli
- package: gopkg.in/yaml.v2
- package: github.com/jmoiron/jsonq

View File

@@ -15,7 +15,7 @@ import (
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
aws_lambda "github.com/aws/aws-sdk-go/service/lambda"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/moby/moby/pkg/jsonmessage"
"github.com/urfave/cli"
yaml "gopkg.in/yaml.v2"
)

26
images/dind/Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM docker:1.13.1-dind
RUN apk update && apk upgrade && apk add --no-cache ca-certificates
COPY entrypoint.sh /usr/local/bin/
COPY dind.sh /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# USAGE: Add a CMD to your own Dockerfile to use this (NOT an ENTRYPOINT, so that this is called)
# CMD ["./runner"]

2
images/dind/README.md Normal file
View File

@@ -0,0 +1,2 @@
This is the base image for all Titan's docker-in-docker images.

1
images/dind/VERSION Normal file
View File

@@ -0,0 +1 @@
0.1.2

19
images/dind/build.sh Executable file
View File

@@ -0,0 +1,19 @@
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
docker build -t treeder/dind:latest .

View File

@@ -0,0 +1,27 @@
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# iron/dind-chaos
FROM docker:1.12-rc-dind
RUN apk update && apk upgrade && apk add --no-cache ca-certificates
COPY entrypoint.sh /usr/local/bin/
COPY chaos.sh /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# USAGE: Add a CMD to your own Dockerfile to use this (NOT an ENTRYPOINT, so that this is called)
# CMD ["./runner"]

View File

@@ -0,0 +1 @@
dind docker to periodically kill docker to test against

31
images/dind/chaos/chaos.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
sleep 600 # 10 minutes
for i in 1..1000; do
pkill -9 dockerd
pkill -9 docker-containerd
# remove pid file since we killed docker hard
rm /var/run/docker.pid
sleep 30
docker daemon \
--host=unix:///var/run/docker.sock \
--host=tcp://0.0.0.0:2375 &
sleep 300 # 5 minutes
done

32
images/dind/chaos/entrypoint.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
# modified from: https://github.com/docker-library/docker/blob/866c3fbd87e8eeed524fdf19ba2d63288ad49cd2/1.11/dind/dockerd-entrypoint.sh
# this will run either overlay or aufs as the docker fs driver, if the OS has both, overlay is preferred.
docker daemon \
--host=unix:///var/run/docker.sock \
--host=tcp://0.0.0.0:2375 &
# wait for daemon to initialize
sleep 10
/usr/local/bin/chaos.sh &
exec "$@"

42
images/dind/dind.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/sh
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
# modified from: https://github.com/docker-library/docker/blob/866c3fbd87e8eeed524fdf19ba2d63288ad49cd2/1.11/dind/dockerd-entrypoint.sh
# this will run either overlay or aufs as the docker fs driver, if the OS has both, overlay is preferred.
# rewrite overlay to use overlay2 (docker 1.12, linux >=4.x required), see https://docs.docker.com/engine/userguide/storagedriver/selectadriver/#overlay-vs-overlay2
fsdriver=$(grep -Eh -w -m1 "overlay|aufs" /proc/filesystems | cut -f2)
if [ $fsdriver == "overlay" ]; then
fsdriver="overlay2"
fi
cmd="dockerd \
--host=unix:///var/run/docker.sock \
--host=tcp://0.0.0.0:2375 \
--storage-driver=$fsdriver"
# nanny and restart on crashes
until eval $cmd; do
echo "Docker crashed with exit code $?. Respawning.." >&2
# if we just restart it won't work, so start it (it wedges up) and
# then kill the wedgie and restart it again and ta da... yea, seriously
pidfile=/var/run/docker/libcontainerd/docker-containerd.pid
kill -9 $(cat $pidfile)
rm $pidfile
sleep 1
done

24
images/dind/entrypoint.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
/usr/local/bin/dind.sh &
# wait for daemon to initialize
sleep 3
exec "$@"

26
images/dind/release.sh Executable file
View File

@@ -0,0 +1,26 @@
# Copyright 2016 Iron.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
./build.sh
docker run --rm -v "$PWD":/app treeder/bump patch
version=`cat VERSION`
echo "version $version"
docker tag treeder/dind:latest treeder/dind:$version
docker push treeder/dind:latest
docker push treeder/dind:$version

760
lock.json
View File

@@ -1,760 +0,0 @@
{
"memo": "c9168e27ae33a08e6c7f8fa593cecff70291be6ce0ce87cda093750764fe3faf",
"projects": [
{
"name": "code.cloudfoundry.org/bytefmt",
"branch": "master",
"revision": "a75017a21993c80187c7fa4f3c1ec22ddd6a8cd5",
"packages": [
"."
]
},
{
"name": "github.com/Azure/go-ansiterm",
"branch": "master",
"revision": "fa152c58bc15761d0200cb75fe958b89a9d4888e",
"packages": [
".",
"winterm"
]
},
{
"name": "github.com/Microsoft/go-winio",
"version": "v0.3.8",
"revision": "fff283ad5116362ca252298cfc9b95828956d85d",
"packages": [
"."
]
},
{
"name": "github.com/Nvveen/Gotty",
"branch": "master",
"revision": "cd527374f1e5bff4938207604a14f2e38a9cf512",
"packages": [
"."
]
},
{
"name": "github.com/PuerkitoBio/purell",
"version": "v1.1.0",
"revision": "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4",
"packages": [
"."
]
},
{
"name": "github.com/PuerkitoBio/urlesc",
"branch": "master",
"revision": "bbf7a2afc14f93e1e0a5c06df524fbd75e5031e5",
"packages": [
"."
]
},
{
"name": "github.com/Sirupsen/logrus",
"branch": "master",
"revision": "10f801ebc38b33738c9d17d50860f484a0988ff5",
"packages": [
".",
"hooks/syslog"
]
},
{
"name": "github.com/amir/raidman",
"branch": "master",
"revision": "c74861fe6a7bb8ede0a010ce4485bdbb4fc4c985",
"packages": [
".",
"proto"
]
},
{
"name": "github.com/asaskevich/govalidator",
"version": "v5",
"revision": "7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877",
"packages": [
"."
]
},
{
"name": "github.com/aws/aws-sdk-go",
"branch": "master",
"revision": "baba9e786eae5ba978f2007f8e718557b29157c8",
"packages": [
"aws",
"aws/awserr",
"aws/awsutil",
"aws/client",
"aws/client/metadata",
"aws/corehandlers",
"aws/credentials",
"aws/credentials/ec2rolecreds",
"aws/credentials/endpointcreds",
"aws/credentials/stscreds",
"aws/defaults",
"aws/ec2metadata",
"aws/endpoints",
"aws/request",
"aws/session",
"aws/signer/v4",
"private/protocol",
"private/protocol/json/jsonutil",
"private/protocol/jsonrpc",
"private/protocol/query",
"private/protocol/query/queryutil",
"private/protocol/rest",
"private/protocol/restjson",
"private/protocol/xml/xmlutil",
"service/lambda",
"service/sts"
]
},
{
"name": "github.com/boltdb/bolt",
"branch": "master",
"revision": "e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd",
"packages": [
"."
]
},
{
"name": "github.com/cactus/go-statsd-client",
"branch": "master",
"revision": "d8eabe07bc70ff9ba6a56836cde99d1ea3d005f7",
"packages": [
"statsd"
]
},
{
"name": "github.com/ccirello/supervisor",
"version": "v0.5.3",
"revision": "3ae4051c50e006498b4b8aee130185a53caab86e",
"packages": [
"."
]
},
{
"name": "github.com/cenkalti/backoff",
"version": "v1.0.0",
"revision": "32cd0c5b3aef12c76ed64aaf678f6c79736be7dc",
"packages": [
"."
]
},
{
"name": "github.com/coreos/go-semver",
"version": "v0.2.0",
"revision": "8ab6407b697782a06568d4b7f1db25550ec2e4c6",
"packages": [
"semver"
]
},
{
"name": "github.com/dghubble/go-twitter",
"branch": "master",
"revision": "08b242f2f25e3108b9dec5a361d1021990018e7c",
"packages": [
"twitter"
]
},
{
"name": "github.com/dghubble/oauth1",
"version": "v0.4.0",
"revision": "70562a5920ad9b6ff03ef697c0f90ae569abbd2b",
"packages": [
"."
]
},
{
"name": "github.com/dghubble/sling",
"version": "v1.1.0",
"revision": "eb56e89ac5088bebb12eef3cb4b293300f43608b",
"packages": [
"."
]
},
{
"name": "github.com/dgrijalva/jwt-go",
"branch": "master",
"revision": "2268707a8f0843315e2004ee4f1d021dc08baedf",
"packages": [
"."
]
},
{
"name": "github.com/docker/distribution",
"version": "v2.6.1",
"revision": "a25b9ef0c9fe242ac04bb20d3a028442b7d266b6",
"packages": [
".",
"context",
"digest",
"manifest",
"manifest/schema1",
"manifest/schema2",
"reference",
"uuid"
]
},
{
"name": "github.com/docker/docker",
"branch": "master",
"revision": "d2ab40e5b99bc2ab0abfea146544a20ce6081942",
"packages": [
"api/types",
"api/types/blkiodev",
"api/types/container",
"api/types/filters",
"api/types/mount",
"api/types/network",
"api/types/registry",
"api/types/strslice",
"api/types/swarm",
"api/types/versions",
"cli/config/configfile",
"opts",
"pkg/archive",
"pkg/fileutils",
"pkg/homedir",
"pkg/idtools",
"pkg/ioutils",
"pkg/jsonlog",
"pkg/jsonmessage",
"pkg/longpath",
"pkg/pools",
"pkg/promise",
"pkg/stdcopy",
"pkg/system",
"pkg/term",
"pkg/term/windows"
]
},
{
"name": "github.com/docker/go-connections",
"version": "v0.2.1",
"revision": "990a1a1a70b0da4c4cb70e117971a4f0babfbf1a",
"packages": [
"nat"
]
},
{
"name": "github.com/docker/go-units",
"version": "v0.3.1",
"revision": "f2d77a61e3c169b43402a0a1e84f06daf29b8190",
"packages": [
"."
]
},
{
"name": "github.com/docker/libtrust",
"branch": "master",
"revision": "aabc10ec26b754e797f9028f4589c5b7bd90dc20",
"packages": [
"."
]
},
{
"name": "github.com/fsnotify/fsnotify",
"version": "v1.4.2",
"revision": "629574ca2a5df945712d3079857300b5e4da0236",
"packages": [
"."
]
},
{
"name": "github.com/fsouza/go-dockerclient",
"branch": "master",
"revision": "e24e809e9db395f1e3c85af1b88f2002023610f5",
"packages": [
"."
]
},
{
"name": "github.com/garyburd/redigo",
"version": "v1.0.0",
"revision": "8873b2f1995f59d4bcdd2b0dc9858e2cb9bf0c13",
"packages": [
"internal",
"redis"
]
},
{
"name": "github.com/giantswarm/semver-bump",
"version": "1.1.1",
"revision": "88e6c9f2fe390c48839eaba32490fd09cb3b581c",
"packages": [
"bump",
"storage"
]
},
{
"name": "github.com/gin-gonic/gin",
"version": "v1.1.4",
"revision": "e2212d40c62a98b388a5eb48ecbdcf88534688ba",
"packages": [
".",
"binding",
"render"
]
},
{
"name": "github.com/go-ini/ini",
"version": "v1.27.0",
"revision": "e7fea39b01aea8d5671f6858f0532f56e8bff3a5",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/analysis",
"branch": "master",
"revision": "d5a75b7d751ca3f11ad5d93cfe97405f2c3f6a47",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/errors",
"branch": "master",
"revision": "fc3f73a224499b047eda7191e5d22e1e9631e86f",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/jsonpointer",
"branch": "master",
"revision": "779f45308c19820f1a69e9a4cd965f496e0da10f",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/jsonreference",
"branch": "master",
"revision": "36d33bfe519efae5632669801b180bf1a245da3b",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/loads",
"branch": "master",
"revision": "6bb6486231e079ea125c0f39994ed3d0c53399ed",
"packages": [
".",
"fmts"
]
},
{
"name": "github.com/go-openapi/runtime",
"branch": "master",
"revision": "e66a4c4406028a04ddafd6002c378ffd3db7e52b",
"packages": [
".",
"client"
]
},
{
"name": "github.com/go-openapi/spec",
"branch": "master",
"revision": "02fb9cd3430ed0581e0ceb4804d5d4b3cc702694",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/strfmt",
"branch": "master",
"revision": "93a31ef21ac23f317792fff78f9539219dd74619",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/swag",
"branch": "master",
"revision": "d5f8ebc3b1c55a4cf6489eeae7354f338cfe299e",
"packages": [
"."
]
},
{
"name": "github.com/go-openapi/validate",
"branch": "master",
"revision": "035dcd74f1f61e83debe1c22950dc53556e7e4b2",
"packages": [
"."
]
},
{
"name": "github.com/go-resty/resty",
"version": "v0.11",
"revision": "c45c7bcc0000d1a9ac1b119b2e6043c6540eedea",
"packages": [
"."
]
},
{
"name": "github.com/go-sql-driver/mysql",
"version": "v1.3",
"revision": "a0583e0143b1624142adab07e0e97fe106d99561",
"packages": [
"."
]
},
{
"name": "github.com/golang/groupcache",
"branch": "master",
"revision": "72d04f9fcdec7d3821820cc4a6f150eae553639a",
"packages": [
"consistenthash",
"singleflight"
]
},
{
"name": "github.com/golang/protobuf",
"branch": "master",
"revision": "2bba0603135d7d7f5cb73b2125beeda19c09f4ef",
"packages": [
"proto"
]
},
{
"name": "github.com/google/btree",
"branch": "master",
"revision": "316fb6d3f031ae8f4d457c6c5186b9e3ded70435",
"packages": [
"."
]
},
{
"name": "github.com/google/go-querystring",
"branch": "master",
"revision": "53e6ce116135b80d037921a7fdd5138cf32d7a8a",
"packages": [
"query"
]
},
{
"name": "github.com/gorilla/context",
"version": "v1.1",
"revision": "1ea25387ff6f684839d82767c1733ff4d4d15d0a",
"packages": [
"."
]
},
{
"name": "github.com/gorilla/mux",
"version": "v1.3.0",
"revision": "392c28fe23e1c45ddba891b0320b3b5df220beea",
"packages": [
"."
]
},
{
"name": "github.com/hashicorp/go-cleanhttp",
"branch": "master",
"revision": "3573b8b52aa7b37b9358d966a898feb387f62437",
"packages": [
"."
]
},
{
"name": "github.com/hashicorp/hcl",
"branch": "master",
"revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
"packages": [
".",
"hcl/ast",
"hcl/parser",
"hcl/scanner",
"hcl/strconv",
"hcl/token",
"json/parser",
"json/scanner",
"json/token"
]
},
{
"name": "github.com/heroku/docker-registry-client",
"branch": "master",
"revision": "95467b6cacee2a06f112a3cf7e47a70fad6000cf",
"packages": [
"registry"
]
},
{
"name": "github.com/iron-io/functions_go",
"branch": "master",
"revision": "69e4dec8454c3c710045263c2ede76139c141146",
"packages": [
".",
"client",
"client/apps",
"client/routes",
"client/tasks",
"client/version",
"models"
]
},
{
"name": "github.com/iron-io/iron_go3",
"branch": "master",
"revision": "830335d420db87fc84cbff7f0d1348a46b499946",
"packages": [
"api",
"config",
"mq"
]
},
{
"name": "github.com/jmespath/go-jmespath",
"version": "0.2.2",
"revision": "3433f3ea46d9f8019119e7dd41274e112a2359a9",
"packages": [
"."
]
},
{
"name": "github.com/jmoiron/jsonq",
"branch": "master",
"revision": "e874b168d07ecc7808bc950a17998a8aa3141d82",
"packages": [
"."
]
},
{
"name": "github.com/juju/errgo",
"branch": "master",
"revision": "08cceb5d0b5331634b9826762a8fd53b29b86ad8",
"packages": [
"errors"
]
},
{
"name": "github.com/lib/pq",
"branch": "master",
"revision": "2704adc878c21e1329f46f6e56a1c387d788ff94",
"packages": [
".",
"oid"
]
},
{
"name": "github.com/magiconair/properties",
"version": "v1.7.2",
"revision": "f917359f079a3759162704eaa8caeec3d01d9f91",
"packages": [
"."
]
},
{
"name": "github.com/mailru/easyjson",
"branch": "master",
"revision": "2af9a745a611440bab0528e5ac19b2805a1c50eb",
"packages": [
"buffer",
"jlexer",
"jwriter"
]
},
{
"name": "github.com/manucorporat/sse",
"branch": "master",
"revision": "ee05b128a739a0fb76c7ebd3ae4810c1de808d6d",
"packages": [
"."
]
},
{
"name": "github.com/mattn/go-isatty",
"version": "v0.0.2",
"revision": "fc9e8d8ef48496124e79ae0df75490096eccf6fe",
"packages": [
"."
]
},
{
"name": "github.com/mitchellh/mapstructure",
"branch": "master",
"revision": "53818660ed4955e899c0bcafa97299a388bd7c8e",
"packages": [
"."
]
},
{
"name": "github.com/opencontainers/runc",
"version": "v0.1.1",
"revision": "baf6536d6259209c3edfa2b22237af82942d3dfa",
"packages": [
"libcontainer/system",
"libcontainer/user"
]
},
{
"name": "github.com/pelletier/go-buffruneio",
"version": "v0.2.0",
"revision": "c37440a7cf42ac63b919c752ca73a85067e05992",
"packages": [
"."
]
},
{
"name": "github.com/pelletier/go-toml",
"version": "v0.5.0",
"revision": "13d49d4606eb801b8f01ae542b4afc4c6ee3d84a",
"packages": [
"."
]
},
{
"name": "github.com/petar/GoLLRB",
"branch": "master",
"revision": "53be0d36a84c2a886ca057d34b6aa4468df9ccb4",
"packages": [
"llrb"
]
},
{
"name": "github.com/pkg/errors",
"version": "v0.8.0",
"revision": "645ef00459ed84a119197bfb8d8205042c6df63d",
"packages": [
"."
]
},
{
"name": "github.com/satori/go.uuid",
"version": "v1.1.0",
"revision": "879c5887cd475cd7864858769793b2ceb0d44feb",
"packages": [
"."
]
},
{
"name": "github.com/spf13/afero",
"branch": "master",
"revision": "9be650865eab0c12963d8753212f4f9c66cdcf12",
"packages": [
".",
"mem"
]
},
{
"name": "github.com/spf13/cast",
"version": "v1.0.0",
"revision": "ce135a4ebeee6cfe9a26c93ee0d37825f26113c7",
"packages": [
"."
]
},
{
"name": "github.com/spf13/jwalterweatherman",
"branch": "master",
"revision": "fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66",
"packages": [
"."
]
},
{
"name": "github.com/spf13/pflag",
"branch": "master",
"revision": "e453343e6260b4a3a89f1f0e10a2fbb07f8d9750",
"packages": [
"."
]
},
{
"name": "github.com/spf13/viper",
"branch": "master",
"revision": "5d46e70da8c0b6f812e0b170b7a985753b5c63cb",
"packages": [
"."
]
},
{
"name": "github.com/urfave/cli",
"version": "v1.19.1",
"revision": "0bdeddeeb0f650497d603c4ad7b20cfe685682f6",
"packages": [
"."
]
},
{
"name": "golang.org/x/crypto",
"branch": "master",
"revision": "9b9c1afcb078c2080cd1fac84be67797a33a32e9",
"packages": [
"bcrypt",
"blowfish"
]
},
{
"name": "golang.org/x/net",
"branch": "master",
"revision": "d1e1b351919c6738fdeb9893d5c998b161464f0c",
"packages": [
"context",
"context/ctxhttp",
"idna",
"proxy",
"publicsuffix"
]
},
{
"name": "golang.org/x/sys",
"branch": "master",
"revision": "f3918c30c5c2cb527c0b071a27c35120a6c0719a",
"packages": [
"unix",
"windows"
]
},
{
"name": "golang.org/x/text",
"branch": "master",
"revision": "f4b4367115ec2de254587813edaa901bc1c723a8",
"packages": [
"internal/gen",
"internal/triegen",
"internal/ucd",
"secure/bidirule",
"transform",
"unicode/bidi",
"unicode/cldr",
"unicode/norm",
"unicode/rangetable",
"width"
]
},
{
"name": "gopkg.in/go-playground/validator.v8",
"version": "v8.18.1",
"revision": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c",
"packages": [
"."
]
},
{
"name": "gopkg.in/mgo.v2",
"branch": "v2",
"revision": "3f83fa5005286a7fe593b055f0d7771a7dce4655",
"packages": [
".",
"bson",
"internal/json",
"internal/sasl",
"internal/scram"
]
},
{
"name": "gopkg.in/yaml.v2",
"branch": "v2",
"revision": "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b",
"packages": [
"."
]
}
]
}

View File

@@ -1,58 +0,0 @@
{
"dependencies": {
"github.com/Sirupsen/logrus": {
"branch": "master"
},
"github.com/aws/aws-sdk-go": {
"branch": "master"
},
"github.com/boltdb/bolt": {
"branch": "master"
},
"github.com/dgrijalva/jwt-go": {
"branch": "master"
},
"github.com/docker/docker": {
"branch": "master"
},
"github.com/fsouza/go-dockerclient": {
"branch": "master"
},
"github.com/gin-gonic/gin": {
"branch": "master"
},
"github.com/go-openapi/errors": {
"branch": "master"
},
"github.com/go-openapi/runtime": {
"branch": "master"
},
"github.com/go-openapi/strfmt": {
"branch": "master"
},
"github.com/go-openapi/swag": {
"branch": "master"
},
"github.com/iron-io/functions_go": {
"branch": "master"
},
"github.com/treeder/iron_go3": {
"branch": "master"
},
"github.com/lib/pq": {
"branch": "master"
},
"github.com/spf13/viper": {
"branch": "master"
},
"golang.org/x/crypto": {
"branch": "master"
},
"gopkg.in/mgo.v2": {
"branch": "v2"
},
"gopkg.in/yaml.v2": {
"branch": "v2"
}
}
}