diff --git a/test/definitions/apm/dotNet/linux/linux2-aspnetcore5.json b/test/definitions/apm/dotNet/linux/linux2-aspnetcore5.json new file mode 100644 index 000000000..6c37cdceb --- /dev/null +++ b/test/definitions/apm/dotNet/linux/linux2-aspnetcore5.json @@ -0,0 +1,59 @@ +{ + "global_tags": { + "owning_team": "virtuoso", + "Environment": "development", + "Department": "product", + "Product": "virtuoso" + }, + "resources": [ + { + "id": "linux2host1", + "provider": "aws", + "type": "ec2", + "size": "t3.micro", + "ami_name": "amzn2-ami-hvm-2.0.????????.?-x86_64-gp2", + "user_name": "ec2-user" + } + ], + "services": [ + { + "id": "aspnetcore", + "destinations": [ + "linux2host1" + ], + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/dotNet/install/rhel/roles", + "port": 9999 + }, + { + "id": "apache1", + "destinations": [ + "linux2host1" + ], + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/apache/install/rhel/roles", + "port": 80 + }, + { + "id": "dotnet1", + "destinations": [ + "linux2host1" + ], + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles", + "port": 8080, + "params": { + "is_selfcontained": "true" + } + }, + { + "id": "dotnet2", + "destinations": [ + "linux2host1" + ], + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/apache/deploy-application/dotNet/rhel/roles", + "port": 8081 + } + ] +} 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 d249d2704..d31295676 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 @@ -2,32 +2,16 @@ - debug: msg: Install .NET -- name: Set default .NET version to install - set_fact: - dotnet_version: "5.0" - when: dotnet_version is undefined +# https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos#centos-linux-7 -- name: Install .NET SDK (defaults to false) - set_fact: - install_sdk: "false" - when: install_sdk is undefined - -- name: Download and prepare install script - shell: | - curl https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o ~/dotnet-install.sh - chmod 777 ~/dotnet-install.sh - become: true - -- name: Install ASP.NET Core {{ dotnet_version }} Runtime - shell: ~/dotnet-install.sh -c {{ dotnet_version }} --runtime aspnetcore --install-dir /opt/dotnet - when: install_sdk|bool == False - become: true - -- name: Install .NET {{ dotnet_version }} SDK - shell: ~/dotnet-install.sh -c {{ dotnet_version }} --install-dir /opt/dotnet - when: install_sdk|bool +- name: Install Centos 7 RPM + ansible.builtin.shell: rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm become: true -- name: Setup .NET path - shell: ln /opt/dotnet/dotnet /usr/local/bin/dotnet +- name: Install .NET SDK 7.0 and ASP.NET Core 7.0 runtime + ansible.builtin.yum: + name: + - dotnet-sdk-7.0 + - aspnetcore-runtime-7.0 + state: latest become: true diff --git a/test/manual/definitions/apm/dotNet/linux/linux2-aspnetcore5.json b/test/manual/definitions/apm/dotNet/linux/linux2-aspnetcore5.json index 1def05f5f..6c37cdceb 100644 --- a/test/manual/definitions/apm/dotNet/linux/linux2-aspnetcore5.json +++ b/test/manual/definitions/apm/dotNet/linux/linux2-aspnetcore5.json @@ -56,4 +56,4 @@ "port": 8081 } ] -} \ No newline at end of file +}