From d5ebc5dcdbee8c50bc57488af82f002c14e79006 Mon Sep 17 00:00:00 2001 From: Ryan Thorn Date: Thu, 13 Jul 2023 09:17:44 -0700 Subject: [PATCH 1/3] chore(e2e): Extend yum lock t/o for failing deploy scripts --- .../rhel/roles/configure/tasks/main.yml | 16 +++++++++--- .../install/rhel/roles/prepare/tasks/main.yml | 2 ++ .../rhel/roles/configure/tasks/main.yml | 25 ++++++------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/test/deploy/linux/apache/deploy-application/dotNet/rhel/roles/configure/tasks/main.yml b/test/deploy/linux/apache/deploy-application/dotNet/rhel/roles/configure/tasks/main.yml index 1ca54bd25..631a4e4fe 100644 --- a/test/deploy/linux/apache/deploy-application/dotNet/rhel/roles/configure/tasks/main.yml +++ b/test/deploy/linux/apache/deploy-application/dotNet/rhel/roles/configure/tasks/main.yml @@ -1,9 +1,17 @@ --- - name: Update packages - shell: yum update -y + ansible.builtin.yum: + name: '*' + state: latest + lock_timeout: 180 become: true -- name: Install depends - shell: yum install libicu unzip -y - become: true \ No newline at end of file +- name: Install dependencies + ansible.builtin.yum: + name: + - libicu + - unzip + state: latest + lock_timeout: 180 + become: true diff --git a/test/deploy/linux/dotNet/install/rhel/roles/prepare/tasks/main.yml b/test/deploy/linux/dotNet/install/rhel/roles/prepare/tasks/main.yml index a628f0b22..9e618cfc6 100644 --- a/test/deploy/linux/dotNet/install/rhel/roles/prepare/tasks/main.yml +++ b/test/deploy/linux/dotNet/install/rhel/roles/prepare/tasks/main.yml @@ -8,6 +8,7 @@ ansible.builtin.yum: name: https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm state: present + lock_timeout: 180 become: true - name: Install .NET SDK 7.0 and ASP.NET Core 7.0 runtime @@ -16,4 +17,5 @@ - dotnet-sdk-7.0 - aspnetcore-runtime-7.0 state: latest + lock_timeout: 180 become: true diff --git a/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml b/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml index a5cf3e42c..d5af04966 100644 --- a/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml +++ b/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml @@ -2,10 +2,6 @@ - debug: msg: Install MySQL -- name: Set MySQL RPM file - set_fact: - mysql_rpm_file: mysql80-community-release-el7-7.noarch.rpm - - name: Set default create_newrelic_user (default not create) set_fact: create_newrelic_user: "false" @@ -20,19 +16,9 @@ shell: "amazon-linux-extras install epel -y" become: true -- name: Install wget - yum: - name: "wget" - state: latest - become: true - -- name: Download MySQL repository - shell: "wget https://dev.mysql.com/get/{{ mysql_rpm_file }}" - become: true - - name: Add MySQL Repository - yum: - name: "{{ mysql_rpm_file }}" + ansible.builtin.yum: + name: "https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm" state: present lock_timeout: 180 become: true @@ -41,8 +27,11 @@ shell: "rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022" become: true -- name: Install the MySQL - shell: "yum install mysql-community-server -y" +- name: Install MySQL + ansible.builtin.yum: + name: mysql-community-server + state: present + lock_timeout: 180 become: true - name: Install systemctl From 9a691473c26fc88f5eca5afad97ebea45081b8b5 Mon Sep 17 00:00:00 2001 From: Ryan Thorn Date: Thu, 13 Jul 2023 09:23:48 -0700 Subject: [PATCH 2/3] trigger validation --- .../apm/dotNet/linux/linux2-aspnetcore5.json | 10 +++++----- test/definitions/smoke/linux2-aspnetcore5.json | 12 ++++++------ test/definitions/smoke/mysql-rhel.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/definitions/apm/dotNet/linux/linux2-aspnetcore5.json b/test/definitions/apm/dotNet/linux/linux2-aspnetcore5.json index 6c37cdceb..25bd112bf 100644 --- a/test/definitions/apm/dotNet/linux/linux2-aspnetcore5.json +++ b/test/definitions/apm/dotNet/linux/linux2-aspnetcore5.json @@ -7,7 +7,7 @@ }, "resources": [ { - "id": "linux2host1", + "id": "host1", "provider": "aws", "type": "ec2", "size": "t3.micro", @@ -19,7 +19,7 @@ { "id": "aspnetcore", "destinations": [ - "linux2host1" + "host1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/dotNet/install/rhel/roles", @@ -28,7 +28,7 @@ { "id": "apache1", "destinations": [ - "linux2host1" + "host1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/apache/install/rhel/roles", @@ -37,7 +37,7 @@ { "id": "dotnet1", "destinations": [ - "linux2host1" + "host1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles", @@ -49,7 +49,7 @@ { "id": "dotnet2", "destinations": [ - "linux2host1" + "host1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles", diff --git a/test/definitions/smoke/linux2-aspnetcore5.json b/test/definitions/smoke/linux2-aspnetcore5.json index 4cc571d88..d88682c08 100644 --- a/test/definitions/smoke/linux2-aspnetcore5.json +++ b/test/definitions/smoke/linux2-aspnetcore5.json @@ -7,7 +7,7 @@ }, "resources": [ { - "id": "linux2host1", + "id": "smokehost1", "provider": "aws", "type": "ec2", "size": "t3.micro", @@ -19,7 +19,7 @@ { "id": "aspnetcore", "destinations": [ - "linux2host1" + "smokehost1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/dotNet/install/rhel/roles", @@ -28,7 +28,7 @@ { "id": "apache1", "destinations": [ - "linux2host1" + "smokehost1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/apache/install/rhel/roles", @@ -37,7 +37,7 @@ { "id": "dotnet1", "destinations": [ - "linux2host1" + "smokehost1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles", @@ -51,7 +51,7 @@ { "id": "dotnet2", "destinations": [ - "linux2host1" + "smokehost1" ], "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles", @@ -66,7 +66,7 @@ { "id": "cli1", "resource_ids": [ - "linux2host1" + "smokehost1" ], "provider": "newrelic", "source_repository": "https://github.com/newrelic/open-install-library.git", diff --git a/test/definitions/smoke/mysql-rhel.json b/test/definitions/smoke/mysql-rhel.json index 1b93a9277..f3165c9f0 100644 --- a/test/definitions/smoke/mysql-rhel.json +++ b/test/definitions/smoke/mysql-rhel.json @@ -46,4 +46,4 @@ } ] } -} \ No newline at end of file +} From 8b36f4a6d64a980f86cf8d280eca377cb24d32f2 Mon Sep 17 00:00:00 2001 From: Ryan Thorn Date: Thu, 13 Jul 2023 10:39:08 -0700 Subject: [PATCH 3/3] restore rpm install --- .../install/rhel/roles/configure/tasks/main.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml b/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml index d5af04966..9dbc0fb4c 100644 --- a/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml +++ b/test/deploy/linux/mysql/install/rhel/roles/configure/tasks/main.yml @@ -2,6 +2,10 @@ - debug: msg: Install MySQL +- name: Set MySQL RPM file + set_fact: + mysql_rpm_file: mysql80-community-release-el7-7.noarch.rpm + - name: Set default create_newrelic_user (default not create) set_fact: create_newrelic_user: "false" @@ -16,9 +20,19 @@ shell: "amazon-linux-extras install epel -y" become: true +- name: Install wget + yum: + name: "wget" + state: latest + become: true + +- name: Download MySQL repository + shell: "wget https://dev.mysql.com/get/{{ mysql_rpm_file }}" + become: true + - name: Add MySQL Repository ansible.builtin.yum: - name: "https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm" + name: "{{ mysql_rpm_file }}" state: present lock_timeout: 180 become: true