Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 51 additions & 44 deletions docs/error-codes.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion recipes/newrelic/infrastructure/agent-control/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ install:
fi
fi
vars:
NEW_RELIC_AGENT_VERSION: "0.33.0"
NEW_RELIC_AGENT_VERSION: "0.34.0"
silent: true

# If configured to do so, migrate the newrelic-infra configuration for usage with New Relic Agent Control
Expand Down
2 changes: 1 addition & 1 deletion recipes/newrelic/infrastructure/agent-control/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ install:
DISTRO_VERSION:
sh: |
rpm -E %{rhel}
NEW_RELIC_AGENT_VERSION: "0.33.0"
NEW_RELIC_AGENT_VERSION: "0.34.0"
silent: true

# If configured to do so, migrate the newrelic-infra configuration for usage with New Relic Agent Control
Expand Down
2 changes: 1 addition & 1 deletion recipes/newrelic/infrastructure/agent-control/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ install:
vars:
SLES_VERSION:
sh: awk -F= '/VERSION_ID/ {print $2}' /etc/os-release
NEW_RELIC_AGENT_VERSION: "0.33.0"
NEW_RELIC_AGENT_VERSION: "0.34.0"
silent: true

# If configured to do so, migrate the newrelic-infra configuration for usage with New Relic Agent Control
Expand Down
6 changes: 5 additions & 1 deletion recipes/newrelic/infrastructure/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ install:
add_gpg_key:
cmds:
- |
curl -s {{.NEW_RELIC_DOWNLOAD_URL}}infrastructure_agent/keys/newrelic_apt_key_current.gpg | apt-key add -
# Remove the key from the legacy keyring if it exists
sudo rm -f /etc/apt/trusted.gpg.d/newrelic-infra.gpg 2>/dev/null
sudo rm -f /etc/apt/trusted.gpg 2>/dev/null
# Add the key to the correct directory
curl -s {{.NEW_RELIC_DOWNLOAD_URL}}infrastructure_agent/keys/newrelic_apt_key_current.gpg | sudo gpg --dearmor --batch --yes -o /etc/apt/trusted.gpg.d/newrelic-infra.gpg
silent: true

add_nr_source:
Expand Down
6 changes: 5 additions & 1 deletion recipes/newrelic/infrastructure/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ install:
add_gpg_key:
cmds:
- |
curl -s {{.NEW_RELIC_DOWNLOAD_URL}}infrastructure_agent/keys/newrelic_apt_key_current.gpg | apt-key add -
# Remove the key from the legacy keyring if it exists
sudo rm -f /etc/apt/trusted.gpg.d/newrelic-infra.gpg 2>/dev/null
sudo rm -f /etc/apt/trusted.gpg 2>/dev/null
# Add the key to the correct directory
curl -s {{.NEW_RELIC_DOWNLOAD_URL}}infrastructure_agent/keys/newrelic_apt_key_current.gpg | sudo gpg --dearmor --batch --yes -o /etc/apt/trusted.gpg.d/newrelic-infra.gpg
silent: true

add_nr_source:
Expand Down
6 changes: 3 additions & 3 deletions recipes/newrelic/infrastructure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ install:

$uninstallIds = New-Object System.Collections.ArrayList
foreach ($key in $allKeys) {
$keyData = Get-Item -Path HKLM:\$key
$escapedKey = $key -replace '\[', '`[' -replace '\]', '`]'
$keyData = Get-Item -Path "HKLM:\$escapedKey"
$name = $keyData.GetValue("DisplayName")
if ($name -and $name -match $Match) {
$keyId = Split-Path $key -Leaf
Expand All @@ -131,8 +132,7 @@ install:
}
}
catch {
Write-Host -ForegroundColor Red "We detected you may be running an anti-virus software preventing our installation to continue. Please check your anti-virus software to allow Powershell execution while running this installation."
exit 131;
throw $_.Exception
}
'

Expand Down
2 changes: 1 addition & 1 deletion test/definitions/ohi/linux/cassandra-debian.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"services": [{
"id": "cassandra1",
"destinations": ["host1"],
"source_repository": "https://github.com/newrelic/open-install-library.git",
"source_repository": "-b fix/cassandra-debian https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/cassandra/install/debian/roles",
"port": 9042,
"params":{
Expand Down
2 changes: 1 addition & 1 deletion test/definitions/ohi/linux/consul-debian.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"services": [{
"id": "haproxy1",
"destinations": ["host1"],
"source_repository": "https://github.com/newrelic/open-install-library.git",
"source_repository": "-b fix/debian-tests https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/consul/install/debian/roles",
"port": 8500,
"params":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
ansible.builtin.apt:
name: cassandra
update_cache: yes
become: true
become: true
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- dirmngr
- gnupg
- software-properties-common
- wget
- openjdk-11-jdk
update_cache: true
become: true

Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,28 @@
state: latest
become: yes

- name: Add official HashiCorp GPG Key
shell: curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
become: true
- name: Download HashiCorp GPG key
shell: |
curl -fsSL https://apt.releases.hashicorp.com/gpg -o /tmp/hashicorp.asc
args:
creates: /tmp/hashicorp.asc
become: yes

- name: Add official HashiCorp Linux Repository
shell: apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
become: true
- name: Add HashiCorp GPG key to APT keyring
shell: |
gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg /tmp/hashicorp.asc
args:
creates: /usr/share/keyrings/hashicorp-archive-keyring.gpg
become: yes

- name: Add HashiCorp APT repository
vars:
compatible_version: bookworm
apt_repository:
repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ compatible_version }} main"
state: present
filename: hashicorp
become: yes

- block:
- name: Create consul config directory
Expand Down
36 changes: 36 additions & 0 deletions test/deploy/linux/docker/install/roles/prepare/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,39 @@

when: ansible_pkg_mgr == 'apt'
become: yes

########################################
# Amazon Linux 2023 support for Docker installation
########################################
- block:
# Update the system packages
- name: Update all system packages
dnf:
name: "*"
state: latest

# Install Docker
- name: Install Docker
dnf:
name: docker
state: present

# Start and enable Docker service
- name: Start and enable Docker service
systemd:
name: docker
state: started
enabled: yes

# Add the ec2-user to the docker group
- name: Add ec2-user to the docker group
user:
name: ec2-user
groups: docker
append: yes

- debug:
msg: "Docker installation completed successfully."

when: ansible_distribution == 'Amazon' and ansible_distribution_version == '2023'
become: yes
42 changes: 42 additions & 0 deletions test/deploy/linux/java/javaGradleApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Wed Feb 26 16:02:18 IST 2025
gradle.version=8.4
Empty file.
2 changes: 1 addition & 1 deletion test/deploy/linux/java/javaGradleApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tasks.register('curlSelf') {
}
}
tasks.named('war') {
archiveFileName = 'javaGradleApp.war'
archiveFileName = 'javaGradleApp.war'
}
test {
useJUnitPlatform()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Feb 26 16:04:01 IST 2025
#Tue Mar 11 14:08:24 IST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
System.out.println("Hello, World!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- debug:
msg: Install Node.js, Create Dockerfile, and setup Node.js application
# import the nodeJs sample application tasks
- import_tasks: ../../../../nodejs/redhat/roles/configure/tasks/main.yml

#copy Docker file to remote
- name: Copy node application to remote
ansible.builtin.copy:
src: ../../../../templates/Dockerfile
dest: /home/ec2-user/myNodeApp/Dockerfile
mode: '0777'
become: true
92 changes: 45 additions & 47 deletions test/deploy/linux/nodejs/redhat/roles/configure/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,51 @@
---
- debug:
msg: Install Nodejs and docker

- name: update yum packages
shell: yum update -y
msg: Install Node.js and setup Node.js application

#copy node appllication to remote
- name: Copy node application to remote
ansible.builtin.copy:
src: ../../../../templates/myNodeApp
dest: /home/ec2-user
mode: '0777'
become: true

- name: install docker
shell: yum install docker
# Install Node.js using NodeSource
- name: Install Node.js using NodeSource
become: yes
shell: curl -sL https://rpm.nodesource.com/setup_18.x | bash -
args:
executable: /bin/bash

- name: Install Node.js
become: yes
yum:
name: nodejs
state: present

- name: Verify Node.js installation
command: node -v
register: node_version
become_user: "{{ ansible_user }}"

- name: Print Node.js version
debug:
msg: "Node.js version installed: {{ node_version.stdout }}"

# Ensure the correct permissions for the myNodeApp directory
- name: Ensure the correct permissions for the myNodeApp directory
file:
path: /home/ec2-user/myNodeApp
state: directory
owner: ec2-user
group: ec2-user
mode: '0755'
become: true

- name: RHEL - Start docker service
shell: "service docker start"

# - name: RHEL - Granting permissions to docker from ec2-user
# shell: "usermod -a -G docker ec2-user"

# - name: Install Node.js
# shell: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# become: true

# - name: load nvm
# shell: source ~/.bashrc

# - name: install node.js 20.5.1
# shell: nvm install 20.5.1

# - name: set node.js version 20.5.1 as default
# shell: nvm alias default 20.5.1

# - name: Create node.js app directory
# file:
# path: /home/ec2-user/myNodeApp
# state: directory

# - name: Copy files to myNodeApp directory
# synchronize:
# src: "{{ item }}"
# dest: /home/ec2-user/myNodeApp
# mode: push
# with_fileglob:
# - "../../../../templates/*"
# become: true

# - name: create package.json
# shell: cd /home/ec2-user/myNodeApp && npm init -y
# become: true

# - name: install express
# shell: cd /home/ec2-user/myNodeApp && npm install express
# become: true

# install npm dependencies
- name: Install npm dependencies
shell: npm install
args:
chdir: "/home/{{ ansible_user }}/myNodeApp"
become: yes
become_user: "{{ ansible_user }}"
Loading
Loading