Skip to content

Commit 0883727

Browse files
Modernize .NET APM agent install testing for Linuxes (#1388)
Co-authored-by: pranav-new-relic <pnandula@newrelic.com>
1 parent 725c3ac commit 0883727

16 files changed

Lines changed: 416 additions & 44 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ node_modules
66
.DS_Store
77
recipes/.prettierrc
88
*.war
9+
docs/superpowers/

recipes/newrelic/apm/dotNet/linux-systemd.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,11 @@ install:
169169
add_gnupg2_if_required:
170170
cmds:
171171
- |
172-
if [ $(({{.DEBIAN_VERSION}})) -ge 10 ]; then
173-
sudo apt-get install gnupg2 -y
172+
IS_YUM_INSTALLED=$(which yum 2>&1 || true)
173+
if [[ -z "$IS_YUM_INSTALLED" ]]; then
174+
if [ $(({{.DEBIAN_VERSION}})) -ge 10 ]; then
175+
sudo apt-get install gnupg2 -y
176+
fi
174177
fi
175178
vars:
176179
DEBIAN_VERSION:

test/definitions-eu/apm/dotNet/linux/ubuntu20-apache-aspnetcore.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88

99
"resources": [{
10-
"id": "ubuntuapachenetcore1",
10+
"id": "ubuntu20-eu",
1111
"provider": "aws",
1212
"type": "ec2",
1313
"size": "t3.micro",
@@ -17,21 +17,21 @@
1717

1818
"services": [{
1919
"id": "aspnetcore",
20-
"destinations": ["ubuntuapachenetcore1"],
20+
"destinations": ["ubuntu20-eu"],
2121
"source_repository": "https://github.com/newrelic/open-install-library.git",
2222
"deploy_script_path": "test/deploy/linux/dotNet/install/ubuntu20/roles",
2323
"port": 9999
2424
},
2525
{
2626
"id": "apache1",
27-
"destinations": ["ubuntuapachenetcore1"],
27+
"destinations": ["ubuntu20-eu"],
2828
"source_repository": "https://github.com/newrelic/open-install-library.git",
2929
"deploy_script_path": "test/deploy/linux/apache/install/debian/roles",
3030
"port": 80
3131
},
3232
{
3333
"id": "dotnet1",
34-
"destinations": ["ubuntuapachenetcore1"],
34+
"destinations": ["ubuntu20-eu"],
3535
"source_repository": "https://github.com/newrelic/open-install-library.git",
3636
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
3737
"port": 8080,
@@ -41,7 +41,7 @@
4141
},
4242
{
4343
"id": "dotnet2",
44-
"destinations": ["ubuntuapachenetcore1"],
44+
"destinations": ["ubuntu20-eu"],
4545
"source_repository": "https://github.com/newrelic/open-install-library.git",
4646
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
4747
"port": 8081
@@ -51,7 +51,7 @@
5151
"resources": [
5252
{
5353
"id": "cli1",
54-
"resource_ids": ["ubuntuapachenetcore1"],
54+
"resource_ids": ["ubuntu20-eu"],
5555
"provider": "newrelic",
5656
"source_repository": "https://github.com/newrelic/open-install-library.git",
5757
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"global_tags": {
3+
"owning_team": "virtuoso",
4+
"Environment": "development",
5+
"Department": "product",
6+
"Product": "virtuoso"
7+
},
8+
9+
"resources": [{
10+
"id": "ubuntu24-eu",
11+
"provider": "aws",
12+
"type": "ec2",
13+
"size": "t3.micro",
14+
"ami_name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-????????",
15+
"user_name": "ubuntu"
16+
}],
17+
18+
"services": [{
19+
"id": "aspnetcore",
20+
"destinations": ["ubuntu24-eu"],
21+
"source_repository": "https://github.com/newrelic/open-install-library.git",
22+
"deploy_script_path": "test/deploy/linux/dotNet/install/ubuntu24/roles",
23+
"port": 9999
24+
},
25+
{
26+
"id": "apache1",
27+
"destinations": ["ubuntu24-eu"],
28+
"source_repository": "https://github.com/newrelic/open-install-library.git",
29+
"deploy_script_path": "test/deploy/linux/apache/install/debian/roles",
30+
"port": 80
31+
},
32+
{
33+
"id": "dotnet1",
34+
"destinations": ["ubuntu24-eu"],
35+
"source_repository": "https://github.com/newrelic/open-install-library.git",
36+
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
37+
"port": 8080,
38+
"params": {
39+
"is_selfcontained": "true",
40+
"dotnet_app_name": "net10webapp",
41+
"web_app_url": "https://test-repo-production.s3.us-west-2.amazonaws.com/install/dotnet/testapps/selfcontained-net10webapplication.zip"
42+
}
43+
},
44+
{
45+
"id": "dotnet2",
46+
"destinations": ["ubuntu24-eu"],
47+
"source_repository": "https://github.com/newrelic/open-install-library.git",
48+
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
49+
"port": 8081,
50+
"params": {
51+
"dotnet_app_name": "net10webapp",
52+
"web_app_url": "https://test-repo-production.s3.us-west-2.amazonaws.com/install/dotnet/testapps/frameworkdependent-net10webapplication.zip"
53+
}
54+
}],
55+
56+
"instrumentations": {
57+
"resources": [
58+
{
59+
"id": "cli1",
60+
"resource_ids": ["ubuntu24-eu"],
61+
"provider": "newrelic",
62+
"source_repository": "https://github.com/newrelic/open-install-library.git",
63+
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
64+
"params": {
65+
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/ubuntu.yml,https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/apm/dotNet/linux-systemd.yml",
66+
"validate_output": ".NET Agent\\s+\\(installed\\)"
67+
}
68+
}
69+
]
70+
}
71+
}

test/definitions-jp/apm/dotNet/linux/ubuntu20-apache-aspnetcore.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88

99
"resources": [{
10-
"id": "ubuntuapachenetcore1",
10+
"id": "ubuntu20-jp",
1111
"provider": "aws",
1212
"type": "ec2",
1313
"size": "t3.micro",
@@ -17,21 +17,21 @@
1717

1818
"services": [{
1919
"id": "aspnetcore",
20-
"destinations": ["ubuntuapachenetcore1"],
20+
"destinations": ["ubuntu20-jp"],
2121
"source_repository": "https://github.com/newrelic/open-install-library.git",
2222
"deploy_script_path": "test/deploy/linux/dotNet/install/ubuntu20/roles",
2323
"port": 9999
2424
},
2525
{
2626
"id": "apache1",
27-
"destinations": ["ubuntuapachenetcore1"],
27+
"destinations": ["ubuntu20-jp"],
2828
"source_repository": "https://github.com/newrelic/open-install-library.git",
2929
"deploy_script_path": "test/deploy/linux/apache/install/debian/roles",
3030
"port": 80
3131
},
3232
{
3333
"id": "dotnet1",
34-
"destinations": ["ubuntuapachenetcore1"],
34+
"destinations": ["ubuntu20-jp"],
3535
"source_repository": "https://github.com/newrelic/open-install-library.git",
3636
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
3737
"port": 8080,
@@ -41,7 +41,7 @@
4141
},
4242
{
4343
"id": "dotnet2",
44-
"destinations": ["ubuntuapachenetcore1"],
44+
"destinations": ["ubuntu20-jp"],
4545
"source_repository": "https://github.com/newrelic/open-install-library.git",
4646
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
4747
"port": 8081
@@ -51,7 +51,7 @@
5151
"resources": [
5252
{
5353
"id": "cli1",
54-
"resource_ids": ["ubuntuapachenetcore1"],
54+
"resource_ids": ["ubuntu20-jp"],
5555
"provider": "newrelic",
5656
"source_repository": "https://github.com/newrelic/open-install-library.git",
5757
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"global_tags": {
3+
"owning_team": "virtuoso",
4+
"Environment": "development",
5+
"Department": "product",
6+
"Product": "virtuoso"
7+
},
8+
9+
"resources": [{
10+
"id": "ubuntu24-jp",
11+
"provider": "aws",
12+
"type": "ec2",
13+
"size": "t3.micro",
14+
"ami_name": "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-????????",
15+
"user_name": "ubuntu"
16+
}],
17+
18+
"services": [{
19+
"id": "aspnetcore",
20+
"destinations": ["ubuntu24-jp"],
21+
"source_repository": "https://github.com/newrelic/open-install-library.git",
22+
"deploy_script_path": "test/deploy/linux/dotNet/install/ubuntu24/roles",
23+
"port": 9999
24+
},
25+
{
26+
"id": "apache1",
27+
"destinations": ["ubuntu24-jp"],
28+
"source_repository": "https://github.com/newrelic/open-install-library.git",
29+
"deploy_script_path": "test/deploy/linux/apache/install/debian/roles",
30+
"port": 80
31+
},
32+
{
33+
"id": "dotnet1",
34+
"destinations": ["ubuntu24-jp"],
35+
"source_repository": "https://github.com/newrelic/open-install-library.git",
36+
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
37+
"port": 8080,
38+
"params": {
39+
"is_selfcontained": "true",
40+
"dotnet_app_name": "net10webapp",
41+
"web_app_url": "https://test-repo-production.s3.us-west-2.amazonaws.com/install/dotnet/testapps/selfcontained-net10webapplication.zip"
42+
}
43+
},
44+
{
45+
"id": "dotnet2",
46+
"destinations": ["ubuntu24-jp"],
47+
"source_repository": "https://github.com/newrelic/open-install-library.git",
48+
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/debian/roles",
49+
"port": 8081,
50+
"params": {
51+
"dotnet_app_name": "net10webapp",
52+
"web_app_url": "https://test-repo-production.s3.us-west-2.amazonaws.com/install/dotnet/testapps/frameworkdependent-net10webapplication.zip"
53+
}
54+
}],
55+
56+
"instrumentations": {
57+
"resources": [
58+
{
59+
"id": "cli1",
60+
"resource_ids": ["ubuntu24-jp"],
61+
"provider": "newrelic",
62+
"source_repository": "https://github.com/newrelic/open-install-library.git",
63+
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
64+
"params": {
65+
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/ubuntu.yml,https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/apm/dotNet/linux-systemd.yml",
66+
"validate_output": ".NET Agent\\s+\\(installed\\)"
67+
}
68+
}
69+
]
70+
}
71+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"global_tags": {
3+
"owning_team": "virtuoso",
4+
"Environment": "development",
5+
"Department": "product",
6+
"Product": "virtuoso"
7+
},
8+
9+
"resources": [{
10+
"id": "al2023",
11+
"provider": "aws",
12+
"type": "ec2",
13+
"size": "t3.micro",
14+
"ami_name": "al2023-ami-2023.*-x86_64",
15+
"user_name": "ec2-user"
16+
}],
17+
18+
"services": [{
19+
"id": "aspnetcore",
20+
"destinations": ["al2023"],
21+
"source_repository": "https://github.com/newrelic/open-install-library.git",
22+
"deploy_script_path": "test/deploy/linux/dotNet/install/al2023/roles",
23+
"port": 9999
24+
},
25+
{
26+
"id": "apache1",
27+
"destinations": ["al2023"],
28+
"source_repository": "https://github.com/newrelic/open-install-library.git",
29+
"deploy_script_path": "test/deploy/linux/apache/install/rhel/roles",
30+
"port": 80
31+
},
32+
{
33+
"id": "dotnet1",
34+
"destinations": ["al2023"],
35+
"source_repository": "https://github.com/newrelic/open-install-library.git",
36+
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles",
37+
"port": 8080,
38+
"params": {
39+
"is_selfcontained": "true",
40+
"dotnet_app_name": "net10webapp",
41+
"web_app_url": "https://test-repo-production.s3.us-west-2.amazonaws.com/install/dotnet/testapps/selfcontained-net10webapplication.zip"
42+
}
43+
},
44+
{
45+
"id": "dotnet2",
46+
"destinations": ["al2023"],
47+
"source_repository": "https://github.com/newrelic/open-install-library.git",
48+
"deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles",
49+
"port": 8081,
50+
"params": {
51+
"dotnet_app_name": "net10webapp",
52+
"dotnet_exe": "/usr/bin/dotnet",
53+
"web_app_url": "https://test-repo-production.s3.us-west-2.amazonaws.com/install/dotnet/testapps/frameworkdependent-net10webapplication.zip"
54+
}
55+
}],
56+
57+
"instrumentations": {
58+
"resources": [
59+
{
60+
"id": "cli1",
61+
"resource_ids": ["al2023"],
62+
"provider": "newrelic",
63+
"source_repository": "https://github.com/newrelic/open-install-library.git",
64+
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
65+
"params": {
66+
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/awslinux.yml,https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/apm/dotNet/linux-systemd.yml",
67+
"validate_output": ".NET Agent\\s+\\(installed\\)"
68+
}
69+
}
70+
]
71+
}
72+
}

0 commit comments

Comments
 (0)