-
Notifications
You must be signed in to change notification settings - Fork 0
/
datadog_rh8.2.sh
51 lines (45 loc) · 1.89 KB
/
datadog_rh8.2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ----------------------------------------------------------------------------
#
# Package : Datadog-Agent
# Version : 7.21.0
# Source repo : https://github.com/DataDog/datadog-agent.git
# Tested on : RHEL 8.2
# Script License : Apache License, Version 2 or later
# Maintainer : Sachin Itagi <[email protected]>
#
# Disclaimer: This script has been tested in root mode on given
# ========== platform using the mentioned version of the package.
# It may not work as expected with newer versions of the
# package and/or distribution. In such case, please
# contact "Maintainer" of this script.
#
# ----------------------------------------------------------------------------
#!/bin/bash
WORKDIR=`pwd`
# Install all dependencies
yum install -y wget git python36 python36-devel python38 python38-devel openssl openssl-devel make gcc gcc-c++ diffutils
wget https://dl.google.com/go/go1.13.5.linux-ppc64le.tar.gz
tar -C /usr/local -xzf go1.13.5.linux-ppc64le.tar.gz
rm -rf go1.13.5.linux-ppc64le.tar.gz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=/root/go
go version
python3 -m pip install --upgrade pip
# Compile and Install cmake
wget http://www.cmake.org/files/v3.16/cmake-3.16.4.tar.gz
tar xzf cmake-3.16.4.tar.gz
rm -rf cmake-3.16.4.tar.gz
cd cmake-3.16.4
./bootstrap
make
make install
cmake --version
# Clone datadog-agent, build and execute unit tests
git clone https://github.com/DataDog/datadog-agent.git $GOPATH/src/github.com/DataDog/datadog-agent
cd $GOPATH/src/github.com/DataDog/datadog-agent
export PATH=$PATH:/$GOPATH/bin
pip install -r requirements.txt
invoke deps
invoke agent.build --build-exclude=systemd
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
invoke -e test --build-exclude=systemd --python-runtimes 3 --coverage --race --profile --fail-on-fmt --cpus 3