Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra fix - inventory_source #992

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion recipes/newrelic/infrastructure/ohi/cassandra/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ install:
HOSTNAME: {{.NR_CLI_DB_HOSTNAME}}
CONFIG_PATH: /etc/cassandra/cassandra.yaml
REMOTE_MONITORING: true
inventory_source: config/redis
inventory_source: config/cassandra
interval: 60
EOT

Expand Down
2 changes: 1 addition & 1 deletion recipes/newrelic/infrastructure/ohi/cassandra/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ install:
HOSTNAME: {{.NR_CLI_DB_HOSTNAME}}
CONFIG_PATH: /etc/cassandra/cassandra.yaml
REMOTE_MONITORING: true
inventory_source: config/redis
inventory_source: config/cassandra
interval: 60
EOT

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 @@ -42,4 +42,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@
become: yes

- name: install java
shell: sudo apt install adoptopenjdk-8-hotspot -y
shell: apt install adoptopenjdk-8-hotspot -y
become: yes

- name: install curl
shell: apt install curl -y
become: yes

- name: add cassandra keys
shell: wget -q -O - https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
shell: curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add -
become: yes

- name: add cassandra repo
shell: sudo sh -c 'echo "deb https://www.apache.org/dist/cassandra/debian 311x main" > /etc/apt/sources.list.d/cassandra.list'
shell: sudo sh -c 'echo "deb https://debian.cassandra.apache.org 30x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list'
become: yes

- name: update packages
Expand All @@ -61,7 +65,7 @@
become: yes

- name: Ensure Cassandra is ready to accept query
shell: cqlsh localhost 9042 -ucassandra -pcassandra -e "SELECT dateof(now()) FROM system.local ;"
shell: cqlsh localhost 9042 -u cassandra -p cassandra -e "SELECT dateof(now()) FROM system.local ;"
register: output
retries: 20
delay: 15
Expand All @@ -72,7 +76,7 @@
when: output is failed

- name: Create newrelic login
shell: cqlsh localhost 9042 -ucassandra -pcassandra -e "CREATE USER newrelic WITH PASSWORD 'Virtuoso4all!';"
shell: cqlsh localhost 9042 -u cassandra -p cassandra -e "CREATE USER newrelic WITH PASSWORD 'Virtuoso4all!';"
become: yes
when: create_newrelic_user|bool

Expand Down