Skip to content

Commit

Permalink
init beta v1
Browse files Browse the repository at this point in the history
  • Loading branch information
blockloop committed Dec 13, 2018
1 parent 3ba17b5 commit 2a8137d
Show file tree
Hide file tree
Showing 979 changed files with 270,346 additions and 7,761 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EditorConfig is awesome: https://EditorConfig.org

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

[{*.sh,Makefile}]
indent_style = tab

# Matches the exact files either package.json or .travis.yml
[.travis.yml]
indent_style = space
indent_size = 2
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Before opening an issue, make sure there is not a similar issue [already open](https://github.com/digitalocean/do-agent/issues)

## Describe the problem

## Steps to reproduce

## Expected behavior

## System Information
Distribution:

Version:

Metrics-Agent Version:

(paste the output of `do-agent --version`)
32 changes: 3 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test
build
vendor/*

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof

/do-agent
/vendor/*/
target
repos/
sonar-agent.key
39 changes: 31 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
language: go
go:
- 1.7

sudo: required

services:
- docker

addons:
apt:
update: true

matrix:
# fail fast
fast_finish: true
include:
- go: 1.x

before_install:
- go get -u github.com/kardianos/govendor
before_script:
- go get -d ./...
- sudo apt-get install -y shellcheck
- go get -u github.com/golang/dep/...
# coveralls.io deps
- go get golang.org/x/tools/cmd/cover github.com/mattn/goveralls
# install gometalinter
- curl -L https://git.io/vp6lP | sh
# gometalinter installs to ./bin
- export PATH="$GOPATH/bin:$PWD/bin:$PATH"
- dep ensure

install:
- skip

script:
- ./scripts/licensecheck.sh
- govendor sync
- make test build
- make ci
- goveralls -coverprofile=target/.coverprofile -service=travis-ci -repotoken $COVERALLS_API_TOKEN
15 changes: 0 additions & 15 deletions AUTHORS

This file was deleted.

46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
5 changes: 0 additions & 5 deletions Changelog.txt

This file was deleted.

45 changes: 11 additions & 34 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,16 @@
FROM golang:1.9-alpine
FROM ubuntu:18.04
MAINTAINER Insights Engineering <[email protected]>

ENV CGO=0
ENV GOOS=linux
RUN set -x && \
apt-get -qq update && \
apt-get install -y ca-certificates && \
apt-get autoclean

ARG CURRENT_BRANCH
ARG CURRENT_HASH
ARG LAST_RELEASE
ADD target/do-agent-linux-amd64 /bin/do-agent

RUN apk update && \
apk add bash && \
apk add curl && \
apk add git && \
apk add make && \
apk add libc6-compat
RUN mkdir -p /host

COPY . /go/src/github.com/digitalocean/do-agent
VOLUME /host/proc
VOLUME /host/sys

RUN cd /go/src/github.com/digitalocean/do-agent && \
set -x && \
make build RELEASE=${LAST_RELEASE} CURRENT_BRANCH=${CURRENT_BRANCH} CURRENT_HASH=${CURRENT_HASH}

# Copy what is needed to
FROM alpine
ENV DO_AGENT_REPO_PATH /agent/updates
ENV DO_AGENT_PROCFS_ROOT /agent/proc

RUN mkdir -p /agent
RUN mkdir -p /agent/updates
RUN mkdir -p /agent/proc

RUN apk update && \
apk add libc6-compat && \
apk add ca-certificates

COPY --from=0 /go/src/github.com/digitalocean/do-agent/build/do-agent_linux_amd64 /agent
RUN find /agent

CMD /agent/do-agent_linux_amd64
ENTRYPOINT ["/bin/do-agent", "--path.procfs", "/host/proc", "--path.sysfs", "/host/sys"]
Loading

0 comments on commit 2a8137d

Please sign in to comment.