From 4c0246bd5e80429c6a5e0271534fc6390de60d97 Mon Sep 17 00:00:00 2001 From: Prasanna Krishna <107837335+NSSPKrishna@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:41:06 +0530 Subject: [PATCH] fix: Amazon linux 2023 logs and infra agent installtargets (#1114) * fix: Amazon linux 2023 logs and infra agent installtargets * test: Updated the AMI * chore: Revised size --- recipes/newrelic/infrastructure/awslinux.yml | 2 +- .../infrastructure/logs/linux-logs.yml | 2 +- .../infra-agent/rhel/awslinux-infra.json | 56 ++++++++-------- .../amazonlinux2018-logs-unsupported.json | 64 +++++++++---------- .../infra-agent/awslinux-infra.json | 30 +++++---- 5 files changed, 79 insertions(+), 75 deletions(-) diff --git a/recipes/newrelic/infrastructure/awslinux.yml b/recipes/newrelic/infrastructure/awslinux.yml index f6b43503a..07bc71033 100644 --- a/recipes/newrelic/infrastructure/awslinux.yml +++ b/recipes/newrelic/infrastructure/awslinux.yml @@ -25,7 +25,7 @@ installTargets: os: linux platform: amazon platformFamily: rhel - platformVersion: "2023" + platformVersion: "(2023\\.*)" keywords: - Infrastructure diff --git a/recipes/newrelic/infrastructure/logs/linux-logs.yml b/recipes/newrelic/infrastructure/logs/linux-logs.yml index 5ed3f356b..bba97fdfe 100644 --- a/recipes/newrelic/infrastructure/logs/linux-logs.yml +++ b/recipes/newrelic/infrastructure/logs/linux-logs.yml @@ -23,7 +23,7 @@ installTargets: - type: host os: linux platform: amazon - platformVersion: "2023" + platformVersion: "(2023\\.*)" kernelArch: x86_64 - type: host os: linux diff --git a/test/definitions-eu/infra-agent/rhel/awslinux-infra.json b/test/definitions-eu/infra-agent/rhel/awslinux-infra.json index 8e6888876..0ad2b7f5d 100644 --- a/test/definitions-eu/infra-agent/rhel/awslinux-infra.json +++ b/test/definitions-eu/infra-agent/rhel/awslinux-infra.json @@ -1,32 +1,34 @@ { - "global_tags": { - "owning_team": "virtuoso", - "Environment": "development", - "Department": "product", - "Product": "virtuoso" - }, + "global_tags": { + "owning_team": "virtuoso", + "Environment": "development", + "Department": "product", + "Product": "virtuoso" + }, - "resources": [{ - "id": "host1", - "provider": "aws", - "ami_name": "amzn-ami-hvm-????.??.*-x86_64-gp2", - "type": "ec2", - "size": "t3.nano" - }], + "resources": [ + { + "id": "host1", + "provider": "aws", + "ami_name": "amzn2-ami-hvm-????.??.*-x86_64-gp2", + "type": "ec2", + "size": "t3.nano" + } + ], - "instrumentations": { - "resources": [ - { - "id": "nr_infra", - "resource_ids": ["host1"], - "provider": "newrelic", - "source_repository": "https://github.com/newrelic/open-install-library", - "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", - "params": { - "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/awslinux.yml", - "validate_output": "Infrastructure Agent\\s+\\(installed\\)" - } + "instrumentations": { + "resources": [ + { + "id": "nr_infra", + "resource_ids": ["host1"], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", + "params": { + "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/awslinux.yml", + "validate_output": "Infrastructure Agent\\s+\\(installed\\)" } - ] - } + } + ] + } } diff --git a/test/definitions/logging/amazonlinux2018-logs-unsupported.json b/test/definitions/logging/amazonlinux2018-logs-unsupported.json index 9ea55cd2b..186d700c8 100644 --- a/test/definitions/logging/amazonlinux2018-logs-unsupported.json +++ b/test/definitions/logging/amazonlinux2018-logs-unsupported.json @@ -1,36 +1,36 @@ { - "global_tags": { - "owning_team": "virtuoso", - "Environment": "development", - "Department": "product", - "Product": "virtuoso" - }, - + "global_tags": { + "owning_team": "virtuoso", + "Environment": "development", + "Department": "product", + "Product": "virtuoso" + }, + + "resources": [ + { + "id": "host1", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "amzn-ami-hvm-2018.03.0.????????.?-x86_64-gp2", + "user_name": "ec2-user" + } + ], + + "instrumentations": { "resources": [ { - "id": "host1", - "provider": "aws", - "type": "ec2", - "size": "t3.nano", - "ami_name": "amzn-ami-hvm-2018.03.0.????????.?-x86_64-gp2", - "user_name": "ec2-user" - } - ], - - "instrumentations": { - "resources": [ - { - "id": "nr_logging_amazon2018", - "resource_ids": ["host1"], - "provider": "newrelic", - "source_repository": "https://github.com/newrelic/open-install-library", - "deploy_script_path": "test/deploy/linux/newrelic-cli/install/roles", - "params": { - "newrelic_cli_option": "-n logs-integration", - "validate_output": "logs-integration\\s+\\(unsupported\\)", - "local_recipes": true - } + "id": "nr_logging_amazon2018", + "resource_ids": ["host1"], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install/roles", + "params": { + "newrelic_cli_option": "-n logs-integration", + "validate_output": "logs-integration\\s+\\(unsupported\\)", + "local_recipes": true } - ] - } - } \ No newline at end of file + } + ] + } +} diff --git a/test/manual/definitions/infra-agent/awslinux-infra.json b/test/manual/definitions/infra-agent/awslinux-infra.json index cbcc3f92f..b5ba4aef3 100644 --- a/test/manual/definitions/infra-agent/awslinux-infra.json +++ b/test/manual/definitions/infra-agent/awslinux-infra.json @@ -1,16 +1,18 @@ { - "global_tags": { - "owning_team": "virtuoso", - "Environment": "development", - "Department": "product", - "Product": "virtuoso" - }, + "global_tags": { + "owning_team": "virtuoso", + "Environment": "development", + "Department": "product", + "Product": "virtuoso" + }, - "resources": [{ - "id": "host1", - "provider": "aws", - "ami_name": "amzn-ami-hvm-????.??.*-x86_64-gp2", - "type": "ec2", - "size": "t3.nano" - }] -} \ No newline at end of file + "resources": [ + { + "id": "host1", + "provider": "aws", + "ami_name": "amzn2-ami-hvm-????.??.*-x86_64-gp2", + "type": "ec2", + "size": "t3.nano" + } + ] +}