carosio/influxdb-dist

Name: influxdb-dist

Owner: CAROS.io

Description: influxdb mirror with vendored dependencies ("all inclusive")

Created: 2015-11-13 08:04:42.0

Updated: 2016-04-16 20:36:50.0

Pushed: 2016-04-16 20:37:11.0

Homepage: null

Size: 4700

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

influxdb-dist

This repository holds a mirror of the influxdb repository from https://github.com/influxdb/influxdb with the difference that all required dependencies are already present in this repository. (This is what we also call “vendoring”.)

reasoning

go get -d fetches a moving target which is very bad for reproducable building. For our build-efforts in CAROS we use this mirror instead of running go get. This allows a build-process without prior download stage as well as caching the required downloading.

approach

The approach for creating the files in this repository is to fetch the desired version from influxdb repository (as tar-ball or via git) and put it in a directory $top/src/github.com/influxdb then with GOPATH set to $top a go get is used like this:

et -d -v github.com/influxdb/influxdb/cmd/influx
et -d -v github.com/influxdb/influxdb/cmd/influxd
et -d -v github.com/influxdb/influxdb/cmd/influx_stress
et -d -v github.com/influxdb/influxdb/cmd/influx_inspect

Now all required dependencies (for building the targets above) are present including their .git directories for repository meta-data which we actually do not need. But we might need to know the exact versions later, so we remove the .git repositories but keep the information about remotes and revisions:

end patches for more elegant ways of doing this, please!)
x in **/.git


 $( dirname $x )
t remote -v > .gitreference
git log -n1 |head -1 ) >> .gitreference 

 -rf $x

ea, this was actually a one-liner, but that is quite unreadable)

After that building works without further downloads:

nstall -v github.com/influxdb/influxdb/cmd/influx
nstall -v github.com/influxdb/influxdb/cmd/influxd
nstall -v github.com/influxdb/influxdb/cmd/influx_stress
nstall -v github.com/influxdb/influxdb/cmd/influx_inspect

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.