Skip to content
Merged
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ See the [requirements for `cloudera-labs/cloudera.cluster`](https://github.com/w

| Name | Type | Version |
|------|------|---------|
| `community.mysql` | collection | `3.1.0` |
| `community.postgresql` | collection | `1.6.1` |
| `community.mysql` | collection | `3.8.0` |
| `community.postgresql` | collection | `3.3.0` |
| `freeipa.ansible_freeipa` | collection | `1.11.1` |
| `geerlingguy.postgresql` | role | `2.2.0` |
| `geerlingguy.postgresql` | role | `3.3.0` |
| `geerlingguy.mysql` (patched) | role | `master` |

**Terraform**
Expand Down
7 changes: 7 additions & 0 deletions builder/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@
collections:
- source: .
type: dir

roles:
- name: geerlingguy.postgresql
version: 3.5.0

- src: https://github.com/clevesque/ansible-role-mysql
version: master
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace: cloudera
name: exe
version: 2.3.0
version: 2.4.0
readme: README.md
authors: []

Expand Down
8 changes: 4 additions & 4 deletions playbooks/pvc_base_prereqs_ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
gather_facts: no
become: yes
roles:
- role: cloudera.cluster.prereqs.mysql_connector
- role: cloudera.exe.rdbms.client.mysql_connector
when: database_type == 'mysql' or database_type == 'mariadb'
tags:
- mysql_connector
Expand All @@ -142,7 +142,7 @@
gather_facts: no
become: yes
roles:
- role: cloudera.cluster.prereqs.oracle_connector
- role: cloudera.exe.rdbms.client.oracle_connector
when: database_type == 'oracle'
tags:
- oracle_connector
Expand All @@ -153,7 +153,7 @@
gather_facts: no
become: yes
roles:
- role: cloudera.cluster.prereqs.postgresql_connector
- role: cloudera.exe.rdbms.client.postgresql_connector
when: database_type == 'postgresql'
tags:
- postgresql_connector
Expand Down Expand Up @@ -260,7 +260,7 @@
hosts: "{{ target | default('db_server') }}"
become: yes
roles:
- cloudera.cluster.infrastructure.rdbms
- cloudera.exe.rdbms.server
tags:
- database
- default_cluster
Expand Down
12 changes: 6 additions & 6 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

# Copyright 2023 Cloudera, Inc.
# Copyright 2024 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@

roles:
- name: geerlingguy.postgresql
version: 2.2.0
version: 3.5.0

- src: https://github.com/dbeech/ansible-role-mysql
- src: https://github.com/clevesque/ansible-role-mysql
version: master

collections:
Expand All @@ -45,11 +45,11 @@ collections:
- name: ansible.posix
version: 1.3.0
- name: community.crypto
version: 2.2.1
version: 2.17.1
- name: community.mysql
version: 3.1.0
version: 3.8.0
- name: community.postgresql
version: 1.6.1
version: 3.3.0
- name: freeipa.ansible_freeipa
version: 1.11.1
- name: cloud.terraform
Expand Down
22 changes: 22 additions & 0 deletions roles/rdbms/client/mysql_connector/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2023 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---

local_temp_dir: '/tmp'
mysql_connector_url: https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.49.zip
mysql_connector_checksum: md5:5ecd588e13f14de07faa5c67f5caf3f1
mysql_connector_download_dir: "{{ local_temp_dir }}"
mysql_connector_extract_dir: "{{ local_temp_dir }}"
mysql_connector_local_path: "{{ mysql_connector_extract_dir }}/mysql-connector-java-5.1.49/mysql-connector-java-5.1.49-bin.jar"
15 changes: 15 additions & 0 deletions roles/rdbms/client/mysql_connector/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
60 changes: 60 additions & 0 deletions roles/rdbms/client/mysql_connector/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2023 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---

- name: Download MySQL Connector/J
get_url:
url: "{{ mysql_connector_url }}"
dest: "{{ mysql_connector_download_dir }}/mysql-connector-java.zip"
checksum: "{{ mysql_connector_checksum }}"
mode: 0644
become: no
run_once: true
delegate_to: localhost

- name: Create /usr/share/java directory
file:
path: /usr/share/java
state: directory
mode: 0755

- name: Install unzip package
ansible.builtin.package:
lock_timeout: "{{ (ansible_os_family == 'RedHat') | ternary(60, omit) }}"
name: unzip
state: present

- name: Extract MySQL Connector/J zip file
unarchive:
src: "{{ mysql_connector_download_dir }}/mysql-connector-java.zip"
dest: "{{ mysql_connector_extract_dir }}"
exclude:
- src

- name: Copy MySQL Connector/J jar file to correct location
copy:
src: "{{ mysql_connector_local_path }}"
dest: /usr/share/java/mysql-connector-java.jar
remote_src: yes
mode: 0644

## Fix for RHEL8,9
- name: Install Mysql packages for python - PyMySQL
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version >= "8"
shell: /usr/local/bin/pip install PyMySQL --force-reinstall --ignore-installed
ignore_errors: true

Loading