From 18121851242d7c4d8136f1525a1ff39fd013a272 Mon Sep 17 00:00:00 2001 From: samuelarogbonlo Date: Mon, 6 Nov 2023 14:26:15 +0100 Subject: [PATCH 1/4] feat: manually installation of new relic Signed-off-by: samuelarogbonlo --- scripts/install-new-relic.sh | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 scripts/install-new-relic.sh diff --git a/scripts/install-new-relic.sh b/scripts/install-new-relic.sh new file mode 100755 index 000000000..a0539103b --- /dev/null +++ b/scripts/install-new-relic.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# This is simple basic script to install new relic infrastruture agent + +set -euo pipefail + +# Setting DEBIAN_FRONTEND to ensure non-interactive operations for APT +export DEBIAN_FRONTEND=noninteractive + + +# Add New Relic's repository +curl -fsSL https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/newrelic-infra.gpg +echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt focal main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list + +# Check if NR_LICENSE_KEY is set, if not ask for it +if [[ -z "${NR_LICENSE_KEY:-}" ]]; then + read -rp "Please enter your NR_LICENSE_KEY: " NR_LICENSE_KEY +fi + +# Update the package list +sudo apt-get update + +# The provided configurations are specific to New Relic. To gain a deeper understanding of these configuration details, you can visit: +# https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings/#offline-time-to-reset +cat >> /etc/newrelic-infra.yml < Date: Mon, 6 Nov 2023 16:09:32 +0100 Subject: [PATCH 2/4] feat: basic script to install new relic infrastruture agent Signed-off-by: samuelarogbonlo --- scripts/install-new-relic.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install-new-relic.sh b/scripts/install-new-relic.sh index a0539103b..ef72e8cf5 100755 --- a/scripts/install-new-relic.sh +++ b/scripts/install-new-relic.sh @@ -1,13 +1,15 @@ #!/bin/bash + # This is simple basic script to install new relic infrastruture agent +# for basic monitoring set-up on ubuntu instances, to use this script all you need +# to setp `export NR_LICENSE_KEY=your NR_LICENSE_KEY` set -euo pipefail # Setting DEBIAN_FRONTEND to ensure non-interactive operations for APT export DEBIAN_FRONTEND=noninteractive - -# Add New Relic's repository +# Add New Relic's apt repository curl -fsSL https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/newrelic-infra.gpg echo "deb https://download.newrelic.com/infrastructure_agent/linux/apt focal main" | sudo tee -a /etc/apt/sources.list.d/newrelic-infra.list From 416830ee3dd17e17a121a83aa35676eb3fdd2b52 Mon Sep 17 00:00:00 2001 From: samuelarogbonlo Date: Mon, 6 Nov 2023 16:59:40 +0100 Subject: [PATCH 3/4] fix spelling Signed-off-by: samuelarogbonlo --- scripts/install-new-relic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-new-relic.sh b/scripts/install-new-relic.sh index ef72e8cf5..055c5058c 100755 --- a/scripts/install-new-relic.sh +++ b/scripts/install-new-relic.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This is simple basic script to install new relic infrastruture agent +# This is simple basic script to install new relic infrastructure agent # for basic monitoring set-up on ubuntu instances, to use this script all you need # to setp `export NR_LICENSE_KEY=your NR_LICENSE_KEY` From 017d40468897415f956d0455e2cf8d0d3719b827 Mon Sep 17 00:00:00 2001 From: samuelarogbonlo Date: Tue, 7 Nov 2023 15:49:46 +0100 Subject: [PATCH 4/4] rewrite simple docs Signed-off-by: samuelarogbonlo --- scripts/install-new-relic.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install-new-relic.sh b/scripts/install-new-relic.sh index 055c5058c..2d2884156 100755 --- a/scripts/install-new-relic.sh +++ b/scripts/install-new-relic.sh @@ -1,8 +1,8 @@ #!/bin/bash -# This is simple basic script to install new relic infrastructure agent -# for basic monitoring set-up on ubuntu instances, to use this script all you need -# to setp `export NR_LICENSE_KEY=your NR_LICENSE_KEY` +# This script offers an easy way to install the New Relic infrastructure agent for +# basic monitoring on Ubuntu systems, without needing administrative privileges. +# To get started, simply set your New Relic license key with the command export NR_LICENSE_KEY=your_license_key_here. set -euo pipefail