Skip to content

Commit 8d4714d

Browse files
feat(es-otel): Add es otel nrdot recipies and tests (#1357)
1 parent 6a5b81a commit 8d4714d

8 files changed

Lines changed: 1956 additions & 0 deletions

File tree

recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/debian.yml

Lines changed: 837 additions & 0 deletions
Large diffs are not rendered by default.

recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/rhel.yml

Lines changed: 847 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"global_tags": {
3+
"owning_team": "OHAI",
4+
"Environment": "development",
5+
"Department": "product",
6+
"Product": "OHAI"
7+
},
8+
"resources": [
9+
{
10+
"id": "host1",
11+
"provider": "aws",
12+
"type": "ec2",
13+
"size": "t3.small",
14+
"ami_name": "amzn2-ami-hvm-2.0.*-x86_64-gp2",
15+
"user_name": "ec2-user"
16+
}
17+
],
18+
"services": [
19+
{
20+
"id": "esotel1",
21+
"destinations": [
22+
"host1"
23+
],
24+
"source_repository": "https://github.com/newrelic/open-install-library.git",
25+
"deploy_script_path": "test/deploy/linux/elasticsearch-otel/install/rhel/roles",
26+
"port": 9200
27+
}
28+
],
29+
"instrumentations": {
30+
"resources": [
31+
{
32+
"id": "esotelal2",
33+
"resource_ids": [
34+
"host1"
35+
],
36+
"source_repository": "https://github.com/newrelic/open-install-library.git",
37+
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
38+
"params": {
39+
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/rhel.yml",
40+
"recipe_targeted": "nrdot-collector-elasticsearch",
41+
"validate_output": "NRDOT Elasticsearch\\s+\\(installed\\)",
42+
"env_var": "NEW_RELIC_CLI_SKIP_CORE=1 NR_CLI_ES_CLUSTER_NAME=test-elasticsearch-cluster"
43+
},
44+
"provider": "newrelic"
45+
}
46+
]
47+
}
48+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"global_tags": {
3+
"owning_team": "OHAI",
4+
"Environment": "development",
5+
"Department": "product",
6+
"Product": "OHAI"
7+
},
8+
"resources": [
9+
{
10+
"id": "host1",
11+
"provider": "aws",
12+
"type": "ec2",
13+
"size": "t3.small",
14+
"ami_name": "al2023-ami-2023.*-x86_64",
15+
"user_name": "ec2-user"
16+
}
17+
],
18+
"services": [
19+
{
20+
"id": "esotel1",
21+
"destinations": [
22+
"host1"
23+
],
24+
"source_repository": "https://github.com/newrelic/open-install-library.git",
25+
"deploy_script_path": "test/deploy/linux/elasticsearch-otel/install/rhel/roles",
26+
"port": 9200
27+
}
28+
],
29+
"instrumentations": {
30+
"resources": [
31+
{
32+
"id": "esotelal2023",
33+
"resource_ids": [
34+
"host1"
35+
],
36+
"source_repository": "https://github.com/newrelic/open-install-library.git",
37+
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
38+
"params": {
39+
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/rhel.yml",
40+
"recipe_targeted": "nrdot-collector-elasticsearch",
41+
"validate_output": "NRDOT Elasticsearch\\s+\\(installed\\)",
42+
"env_var": "NEW_RELIC_CLI_SKIP_CORE=1 NR_CLI_ES_CLUSTER_NAME=test-elasticsearch-cluster"
43+
},
44+
"provider": "newrelic"
45+
}
46+
]
47+
}
48+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"global_tags": {
3+
"owning_team": "OHAI",
4+
"Environment": "development",
5+
"Department": "product",
6+
"Product": "OHAI"
7+
},
8+
"resources": [
9+
{
10+
"id": "host1",
11+
"provider": "aws",
12+
"type": "ec2",
13+
"size": "t3.small",
14+
"ami_name": "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*",
15+
"user_name": "ubuntu"
16+
}
17+
],
18+
"services": [
19+
{
20+
"id": "esotel1",
21+
"destinations": [
22+
"host1"
23+
],
24+
"source_repository": "https://github.com/newrelic/open-install-library.git",
25+
"deploy_script_path": "test/deploy/linux/elasticsearch-otel/install/debian/roles",
26+
"port": 9200
27+
}
28+
],
29+
"instrumentations": {
30+
"resources": [
31+
{
32+
"id": "esotelubuntu22",
33+
"resource_ids": [
34+
"host1"
35+
],
36+
"source_repository": "https://github.com/newrelic/open-install-library.git",
37+
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
38+
"params": {
39+
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/debian.yml",
40+
"recipe_targeted": "nrdot-collector-elasticsearch",
41+
"validate_output": "NRDOT Elasticsearch\\s+\\(installed\\)",
42+
"env_var": "NEW_RELIC_CLI_SKIP_CORE=1 NR_CLI_ES_CLUSTER_NAME=test-elasticsearch-cluster"
43+
},
44+
"provider": "newrelic"
45+
}
46+
]
47+
}
48+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"global_tags": {
3+
"owning_team": "OHAI",
4+
"Environment": "development",
5+
"Department": "product",
6+
"Product": "OHAI"
7+
},
8+
"resources": [
9+
{
10+
"id": "host1",
11+
"provider": "aws",
12+
"type": "ec2",
13+
"size": "t3.medium",
14+
"ami_name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-????????",
15+
"user_name": "ubuntu"
16+
}
17+
],
18+
"services": [
19+
{
20+
"id": "esotel1",
21+
"destinations": [
22+
"host1"
23+
],
24+
"source_repository": "https://github.com/newrelic/open-install-library.git",
25+
"deploy_script_path": "test/deploy/linux/elasticsearch-otel/install/debian/roles",
26+
"port": 9200
27+
}
28+
],
29+
"instrumentations": {
30+
"resources": [
31+
{
32+
"id": "esotelubuntu24",
33+
"resource_ids": [
34+
"host1"
35+
],
36+
"source_repository": "https://github.com/newrelic/open-install-library.git",
37+
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
38+
"params": {
39+
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/nrdot/elasticsearch-otel/debian.yml",
40+
"recipe_targeted": "nrdot-collector-elasticsearch",
41+
"validate_output": "NRDOT Elasticsearch\\s+\\(installed\\)",
42+
"env_var": "NEW_RELIC_CLI_SKIP_CORE=1 NR_CLI_ES_CLUSTER_NAME=test-elasticsearch-cluster"
43+
},
44+
"provider": "newrelic"
45+
}
46+
]
47+
}
48+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
- debug:
3+
msg: Install ElasticSearch 7.16+ for NRDOT Testing (Basic - No Auth)
4+
5+
- name: Get latest packages info
6+
shell: "apt update -y"
7+
become: true
8+
9+
- name: Install needed dependencies
10+
shell: "apt -y install gnupg2 apt-transport-https wget curl"
11+
become: true
12+
13+
- name: Import ElasticSearch GPG Key
14+
shell: "wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -"
15+
become: true
16+
17+
- name: Add Elasticsearch 7.x APT repository
18+
shell: sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'
19+
become: true
20+
21+
- name: Refresh packages
22+
shell: "apt update -y"
23+
become: true
24+
25+
- name: Install ElasticSearch
26+
shell: "apt install elasticsearch -y"
27+
become: true
28+
29+
- name: Enable and start ElasticSearch
30+
shell: "systemctl enable elasticsearch && systemctl start elasticsearch"
31+
become: true
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
- debug:
3+
msg: Install ElasticSearch 7.16+ for NRDOT Testing (Basic - No Auth)
4+
5+
- name: Update packages
6+
shell: yum update -y
7+
become: yes
8+
9+
- name: Install java
10+
shell: yum install java-1.8.0-openjdk -y
11+
become: yes
12+
13+
- name: Add gpg key
14+
shell: sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
15+
become: yes
16+
17+
- name: Add Elasticsearch 7.x YUM repository
18+
shell: |
19+
cat > /etc/yum.repos.d/elasticsearch.repo << EOF
20+
[elasticsearch-7.x]
21+
name=Elasticsearch repository for 7.x packages
22+
baseurl=https://artifacts.elastic.co/packages/7.x/yum
23+
gpgcheck=1
24+
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
25+
enabled=1
26+
autorefresh=1
27+
type=rpm-md
28+
EOF
29+
become: true
30+
31+
- name: Install elasticsearch
32+
shell: yum install --enablerepo=elasticsearch-7.x elasticsearch -y
33+
become: true
34+
35+
- name: Create systemd override folder
36+
shell: sudo mkdir -p /etc/systemd/system/elasticsearch.service.d
37+
become: true
38+
39+
- name: Change startup timeout
40+
shell: echo -e "[Service]\nTimeoutStartSec=180" | sudo tee /etc/systemd/system/elasticsearch.service.d/startup-timeout.conf
41+
become: true
42+
43+
- name: Daemon reload
44+
shell: systemctl daemon-reload
45+
become: true
46+
47+
- name: Start elasticsearch
48+
shell: systemctl start elasticsearch
49+
become: true

0 commit comments

Comments
 (0)