Skip to content

Commit

Permalink
Replace vagrant setup with docker (closes #53)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Aug 17, 2020
1 parent cab2958 commit 84135c8
Show file tree
Hide file tree
Showing 16 changed files with 319 additions and 113 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ _testmain.go
# This project's binaries
build/
dist/

# Vagrant
.vagrant/
.release.yml.tmp
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sudo: required
language: go
services:
- docker
go:
- 1.13

Expand All @@ -12,7 +15,8 @@ script:
- make goveralls

before_deploy:
- pip install --user release-manager==0.1.0
- sudo pip install pyOpenSSL==16.2.0
- pip install --user release-manager==0.4.1

deploy:
skip_cleanup: true
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all format lint test goveralls release release-dry clean
.PHONY: all format lint test setup setdown goveralls release release-dry clean

# -----------------------------------------------------------------------------
# CONSTANTS
Expand Down Expand Up @@ -95,6 +95,12 @@ lint:
# TESTING
# -----------------------------------------------------------------------------

setup:
docker-compose -f ./integration/docker-compose.yml up -d

setdown:
docker-compose -f ./integration/docker-compose.yml down

test: $(merge_log)
mkdir -p $(coverage_dir)
go get -u golang.org/x/tools/cmd/cover/...
Expand Down
28 changes: 0 additions & 28 deletions Vagrantfile

This file was deleted.

31 changes: 31 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module github.com/snowplow/dataflow-runner

go 1.13

require (
github.com/armon/go-metrics v0.3.4 // indirect
github.com/aws/aws-sdk-go v1.34.5
github.com/elodina/go-avro v0.0.0-20160406082632-0c8185d9a3ba
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/hashicorp/consul/api v1.4.0
github.com/hashicorp/consul/sdk v0.4.0
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/go-hclog v0.14.1 // indirect
github.com/hashicorp/go-immutable-radix v1.2.0 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-version v1.2.1 // indirect
github.com/hashicorp/go.net v0.0.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/serf v0.9.4 // indirect
github.com/mattn/go-colorable v0.1.7 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/gox v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.6.1
golang.org/x/sys v0.0.0-20200817085935-3ff754bf58a9 // indirect
golang.org/x/tools v0.0.0-20200817023811-d00afeaade8f // indirect
gopkg.in/urfave/cli.v1 v1.20.0
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
257 changes: 257 additions & 0 deletions go.sum

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions integration/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3"

services:
consul:
image: consul:1.4.4
container_name: consul-dataflow-runner
restart: always
ports:
- "8502:8500"
- "8602:8600/udp"
logging:
options:
max-size: "1M"
max-file: "10"
environment:
CONSUL_BIND_INTERFACE: eth0
2 changes: 1 addition & 1 deletion src/emr_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"strconv"
"time"

log "github.com/Sirupsen/logrus"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/emr"
"github.com/aws/aws-sdk-go/service/emr/emriface"
log "github.com/sirupsen/logrus"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/job_flow_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"strings"
"time"

log "github.com/Sirupsen/logrus"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/emr"
"github.com/aws/aws-sdk-go/service/emr/emriface"
"github.com/hashicorp/errwrap"
log "github.com/sirupsen/logrus"
)

// JobFlowSteps is used for adding steps to an existing cluster
Expand Down
2 changes: 1 addition & 1 deletion src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"fmt"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"gopkg.in/urfave/cli.v1"
)

Expand Down
3 changes: 0 additions & 3 deletions vagrant/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions vagrant/ansible.hosts

This file was deleted.

14 changes: 0 additions & 14 deletions vagrant/peru.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions vagrant/up.bash

This file was deleted.

4 changes: 0 additions & 4 deletions vagrant/up.guidance

This file was deleted.

3 changes: 0 additions & 3 deletions vagrant/up.playbooks

This file was deleted.

0 comments on commit 84135c8

Please sign in to comment.