Skip to content
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

fix(infra.ci.jio): init script test for ssh AZ agents #5584

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions config/jenkins_infra.ci.jenkins.io.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,20 @@ controller:
#!/bin/bash
set -eux
echo "START CLOUDINIT"
systemctl stop datadog-agent.service
mkdir -p /var/log/datadog /etc/datadog-agent
sed 's/api_key:.*/api_key: ${JENKINS_CI_DATADOG_API_KEY}/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml
sed -i 's/# site:.*/site: datadoghq.com/' /etc/datadog-agent/datadog.yaml
chown -R dd-agent:dd-agent /etc/datadog-agent
chmod 640 /etc/datadog-agent/datadog.yaml
chown -R dd-agent:dd-agent /var/log/datadog
chmod 770 /var/log/datadog
systemctl start datadog-agent.service
# Setup Datadog service
(
systemctl stop datadog-agent.service
mkdir -p /var/log/datadog /etc/datadog-agent
sed 's/api_key:.*/api_key: ${JENKINS_CI_DATADOG_API_KEY}/' /etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml
sed -i 's/# site:.*/site: datadoghq.com/' /etc/datadog-agent/datadog.yaml
chown dd-agent:dd-agent /etc/datadog-agent/datadog.yaml
chmod 640 /etc/datadog-agent/datadog.yaml
chown dd-agent:dd-agent /var/log/datadog
chmod 770 /var/log/datadog
systemctl daemon-reload
jayfranco999 marked this conversation as resolved.
Show resolved Hide resolved
systemctl enable datadog-agent.service
systemctl start datadog-agent.service
) 2>&1 | tee /var/log/agent-init-datadog.log
# Setup Docker Engine
mkdir -p /etc/docker
cat <<EOF >/etc/docker/daemon.json
Expand Down