Skip to content

Commit

Permalink
Fix the 5.12.0 Source Install (#3281)
Browse files Browse the repository at this point in the history
* fixes source install

* removes integrations dir

* fixes integrations

* fixes the indentation
  • Loading branch information
gmmeyer committed Mar 23, 2017
1 parent 1d67c86 commit 0840245
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions packaging/datadog-agent/source/setup_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ VERSION
if [ "$AGENT_MAJOR_VERSION" -eq "5" -a "$AGENT_MINOR_VERSION" -gt "11" ]; then
print_console "* Downloading integrations from GitHub"
mkdir -p "$DD_HOME/integrations"
mkdir -p "$DD_HOME/agent/checks.d"
mkdir -p "$DD_HOME/agent/conf.d/auto_conf"

$DOWNLOADER "$DD_HOME/integrations.tar.gz" "https://api.github.com/repos/DataDog/integrations-core/tarball/$AGENT_VERSION"
print_done

Expand All @@ -405,12 +408,24 @@ if [ "$AGENT_MAJOR_VERSION" -eq "5" -a "$AGENT_MINOR_VERSION" -gt "11" ]; then
rm -f "$DD_HOME/integrations.tar.gz"
print_done

print_console "* Trying to install integration requirements"
for INT_DIR in "$DD_HOME/integrations/*"; do
if [ -d $INT_DIR ]; then
if [-f "$INT_DIR/requirements.txt" ]; then
"$DD_HOME/agent/utils/pip-allow-failures.sh" "$INT_DIR/requirements.txt"
fi
print_console "* Setting up integrations"
INTEGRATIONS=$(ls $DD_HOME/integrations/)
for INT in $INTEGRATIONS; do
INT_DIR="$DD_HOME/integrations/$INT"
if [ -f "$INT_DIR/requirements.txt" ]; then
"$DD_HOME/agent/utils/pip-allow-failures.sh" "$INT_DIR/requirements.txt"
fi
if [ -f "$INT_DIR/check.py" ]; then
cp "$INT_DIR/check.py" "$DD_HOME/agent/checks.d/$INT.py"
fi
if [ -f "$INT_DIR/conf.yaml.example" ]; then
cp "$INT_DIR/conf.yaml.example" "$DD_HOME/agent/conf.d/$INT.yaml.example"
fi
if [ -f "$INT_DIR/auto_conf.yaml" ]; then
cp "$INT_DIR/auto_conf.yaml" "$DD_HOME/agent/conf.d/auto_conf/$INT.yaml"
fi
if [ -f "$INT_DIR/conf.yaml.default" ]; then
cp "$INT_DIR/conf.yaml.default" "$DD_HOME/agent/conf.d/$INT.yaml.default"
fi
done
print_done
Expand Down

0 comments on commit 0840245

Please sign in to comment.