Skip to content

Commit

Permalink
fix(cassandra): Pointing to the right inventory source
Browse files Browse the repository at this point in the history
  • Loading branch information
NSSPKrishna authored and mbruzina committed Nov 2, 2023
1 parent a0f054e commit f9f2c37
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
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

0 comments on commit f9f2c37

Please sign in to comment.