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

CLDR-17699 DataDog in Ansible #3797

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ jobs:
-DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: DataDog sourcemap upload
# only on push to main!
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.inputs.git-ref == ''
run: npx --package=@datadog/datadog-ci datadog-ci sourcemaps upload tools/cldr-apps/src/main/webapp/dist/ --minified-path-prefix=/cldr-apps/dist/ --release-version=r${{ github.event.inputs.git-ref }} --service=surveytool
env:
DATADOG_SITE: ${{ secrets.DATADOG_SITE }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
- name: Checkout CLDR archive
run: >
mkdir -v ../cldr-archive && java -jar tools/cldr-code/target/cldr-code.jar checkout-archive
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ jobs:
-DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: DataDog sourcemap upload
run: npx --package=@datadog/datadog-ci datadog-ci sourcemaps upload tools/cldr-apps/src/main/webapp/dist/ --minified-path-prefix=/cldr-apps/dist/ --release-version=r${{ github.event.inputs.git-ref }} --service=surveytool
env:
DATADOG_SITE: ${{ secrets.DATADOG_SITE }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
srl295 marked this conversation as resolved.
Show resolved Hide resolved
- name: Build liberty server
run: >
mvn -s .github/workflows/mvn-settings.xml -B -pl cldr-apps liberty:create liberty:deploy liberty:package -Dinclude=usr --file tools/pom.xml
Expand Down
8 changes: 8 additions & 0 deletions tools/scripts/ansible/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
cldr-smoke.unicode.org
cldr-staging.unicode.org

[staging:vars]
# dd_env is the DataDog environment, staging vs prod
dd_env=staging

[prod]
st.unicode.org

[prod:vars]
# dd_env is the DataDog environment, staging vs prod
dd_env=prod

# CLDR Commit Checker web hosting here
[ccc]
cldr-smoke.unicode.org
Expand Down
21 changes: 15 additions & 6 deletions tools/scripts/ansible/monitoring-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
- hosts: cldr-staging.unicode.org
- hosts:
- cldr-staging.unicode.org
- st.unicode.org
become: yes
vars_files:
- vars/main.yml
- local-vars/local.yml
tasks:
- name: Import the Datadog Agent role from the Datadog collection
import_role:
name: datadog.dd.agent
roles:
- { role: datadog.datadog, become: yes }
vars:
datadog_api_key: "{{ dd_key }}"
datadog_site: "{{ dd_site }}"
datadog_apm_instrumentation_enabled: "host" # docker not installed else 'all'

tasks:
- name: Update datadog.yaml for apm/env
blockinfile:
path: /etc/datadog-agent/datadog.yaml
block: |
# enable apm and set the env
enabled: true
env: {{ dd_env }}
marker: '# {mark} ANSIBLE MANAGED BLOCK'
insertafter: '^apm_config:'
2 changes: 1 addition & 1 deletion tools/scripts/ansible/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- src: derjd.journald
version: 0.0.1
- src: DataDog.datadog
version: 4.20.1
version: 4.21.0
# - src: https://github.com/Naillik13/ansible-role-mysql
# version:

Expand Down
9 changes: 9 additions & 0 deletions tools/scripts/ansible/templates/bootstrap-properties.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
# the full path to the config dir.
# It requires a code update in CLDRConfigImpl.
org.unicode.cldr.util.CLDRConfigImpl.cldrHome="{{ cldr_path }}"

# datadog things
dd.dynamic.instrumentation.enabled=true
dd.logs.injection=true
dd.env={{ dd_env }}

# for DD: use json!
com.ibm.ws.logging.message.format=json
com.ibm.ws.logging.message.source=message,trace,accessLog,ffdc,audit
Loading