-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate rdbms roles from cloudera.cluster (#181)
* Migrate rdbms roles from cloudera.cluster collection * Add functions for RHEL9 * Test RHEL8 & 9 - Mariadb 10.6, Postgresql 14, MySQL 8.0; still untested - RHEL7, Debian * Remove MySQL 5.7 support * Fixe MySQL 8 AppStream module Errors from cloudera-labs/cloudera.cluster#186 * Update dependencies to support RHEL9 (geerlingguy.postgres 3.5.0, geerlingguy.mysql [patched], community.crypto: 2.17.1, community.mysql: 3.8.0, community.postgresql: 3.3.0) * Update ansible-builder requirements Signed-off-by: Chuck Levesque <[email protected]>
- Loading branch information
Showing
39 changed files
with
1,205 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
Oops, something went wrong.