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
3 changes: 3 additions & 0 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ PSMDB40_VER="4.0.28-23"
PSMDB42_VER="4.2.22-22"
PSMDB44_VER="4.4.16-16"
PSMDB50_VER="5.0.13-11"
PSMDB60_VER="6.0.0-0"
PSMDB70_VER="7.0.0-0"
PSMDB80_VER="8.0.0-0"
PS56_VER="5.6.51-91.0"
PS56_REV="b59139e"
PS57_VER="5.7.44-56"
Expand Down
4 changes: 2 additions & 2 deletions molecule/pbm/install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
install_repo: "{{ lookup('env', 'install_repo') }}"
when: lookup('env', 'install_repo') == "main"

- name: include tasks for PSMDB 4.0,4.2,4.4,5.0 install
- name: include tasks for PSMDB 4.0,4.2,4.4,5.0,6.0,7.0,8.0 install
include_tasks: install_psmdb_full.yml
when: lookup('env', 'psmdb_to_test') == "psmdb-40" or lookup('env', 'psmdb_to_test') == "psmdb-42" or lookup('env', 'psmdb_to_test') == "psmdb-44" or lookup('env', 'psmdb_to_test') == "psmdb-50"
when: lookup('env', 'psmdb_to_test') == "psmdb-40" or lookup('env', 'psmdb_to_test') == "psmdb-42" or lookup('env', 'psmdb_to_test') == "psmdb-44" or lookup('env', 'psmdb_to_test') == "psmdb-50" or lookup('env', 'psmdb_to_test') == "psmdb-60" or lookup('env', 'psmdb_to_test') == "psmdb-70" or lookup('env', 'psmdb_to_test') == "psmdb-80"

- name: include tasks for PSMDB 3.6 install
include_tasks: install_psmdb_36_full.yml
Expand Down
4 changes: 2 additions & 2 deletions molecule/pbm/upgrade/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
install_repo: "{{ lookup('env', 'install_repo') }}"
when: lookup('env', 'install_repo') == "main"

- name: include tasks for PSMDB 4.0,4.2,4.4,5.0 install
- name: include tasks for PSMDB 4.0,4.2,4.4,5.0,6.0,7.0,8.0 install
include_tasks: install_psmdb_full.yml
when: lookup('env', 'psmdb_to_test') == "psmdb-40" or lookup('env', 'psmdb_to_test') == "psmdb-42" or lookup('env', 'psmdb_to_test') == "psmdb-44" or lookup('env', 'psmdb_to_test') == "psmdb-50"
when: lookup('env', 'psmdb_to_test') == "psmdb-40" or lookup('env', 'psmdb_to_test') == "psmdb-42" or lookup('env', 'psmdb_to_test') == "psmdb-44" or lookup('env', 'psmdb_to_test') == "psmdb-50" or lookup('env', 'psmdb_to_test') == "psmdb-70" or lookup('env', 'psmdb_to_test') == "psmdb-80"

- name: include tasks for PSMDB 3.6 install
include_tasks: install_psmdb_36_full.yml
Expand Down
8 changes: 7 additions & 1 deletion package_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ elif [ $1 = "psmdb44" ]; then
version=${PSMDB44_VER}
elif [ $1 = "psmdb50" ]; then
version=${PSMDB50_VER}
elif [ $1 = "psmdb60" ]; then
version=${PSMDB60_VER}
elif [ $1 = "psmdb70" ]; then
version=${PSMDB70_VER}
elif [ $1 = "psmdb80" ]; then
version=${PSMDB80_VER}
elif [ $1 = "pmm" ]; then
version=${PMM_VER}
elif [ $1 = "pbm" ]; then
Expand Down Expand Up @@ -429,7 +435,7 @@ elif [ "${product}" = "psmdb30" -o "${product}" = "psmdb32" -o "${product}" = "p
fi
done
else
if [ "${product}" = "psmdb40" -o "${product}" = "psmdb42" -o "${product}" = "psmdb44" ]; then
if [ "${product}" = "psmdb40" -o "${product}" = "psmdb42" -o "${product}" = "psmdb44" -o "${product}" = "psmdb50" -o "${product}" = "psmdb60" -o "${product}" = "psmdb70" -o "${product}" = "psmdb80" ]; then
psmdb_name="percona-server-mongodb"
else
psmdb_name=""
Expand Down
2 changes: 1 addition & 1 deletion playbooks/pmm2-client_integration_auth_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
loop:
- { service_name: '{{ mysql_service_name }}', metric: 'mysql_up 1' }

### start PSMDB 4.4
### start PSMDB 4.4/5.0/6.0/7.0/8.0
- set_fact:
mongo_service_name: "mongodb_{{ instance_ip }}_{{ ansible_distribution }}_{{ ansible_distribution_major_version }}"
mongo_socket_service_name: "mongodb_socket_{{ instance_ip }}_{{ ansible_distribution }}_{{ ansible_distribution_major_version }}"
Expand Down
20 changes: 18 additions & 2 deletions playbooks/pt_with_products.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# This playbook does following:
#
# installs latest version of Percona-Server-57 (ps57), Percona-Server-80 (ps80), Percona-XtraDB-Cluster-57 (pxc57), Percona-XtraDB-Cluster-80 (pxc80), MysqL server 57 (upstream57), MySQL server 80 (upstream80), Percona Server for MongoDB 44 (psmdb44), Percona Server for MongoDB 50 (psmdb50).
# installs latest version of Percona-Server-57 (ps57), Percona-Server-80 (ps80), Percona-XtraDB-Cluster-57 (pxc57), Percona-XtraDB-Cluster-80 (pxc80), MysqL server 57 (upstream57), MySQL server 80 (upstream80), Percona Server for MongoDB 44 (psmdb44), Percona Server for MongoDB 50 (psmdb50), Percona Server for MongoDB 60 (psmdb60), Percona Server for MongoDB 70 (psmdb70), Percona Server for MongoDB 80 (psmdb80).
# enables Percona pt repository
# installs latest version of Percona-Toolkit (pt) and runs one of the pt (pt-mysql-summary or pt-psmdb-summary)

Expand All @@ -28,13 +28,21 @@
include_tasks: ../tasks/install_and_run_ps80.yml
when: lookup('env', 'install_with') == "ps80"

- name: include tasks for installing and setup ps80
include_tasks: ../tasks/install_and_run_ps84.yml
when: lookup('env', 'install_with') == "ps84"

- name: include tasks for installing and setup pxc57
include_tasks: ../tasks/install_and_run_pxc57.yml
when: lookup('env', 'install_with') == "pxc57"

- name: include tasks for installing and setup pxc80
include_tasks: ../tasks/install_and_run_pxc80.yml
when: lookup('env', 'install_with') == "pxc80"

- name: include tasks for installing and setup pxc80
include_tasks: ../tasks/install_and_run_pxc84.yml
when: lookup('env', 'install_with') == "pxc84"

- name: include tasks for installing and setup upstream57
include_tasks: ../tasks/install_and_run_upstream57.yml
Expand All @@ -56,6 +64,14 @@
include_tasks: ../tasks/install_and_run_psmdb.yml
when: lookup('env', 'install_with') == "psmdb60"

- name: include tasks for installing and setup psmdb 70
include_tasks: ../tasks/install_and_run_psmdb.yml
when: lookup('env', 'install_with') == "psmdb70"

- name: include tasks for installing and setup psmdb 80
include_tasks: ../tasks/install_and_run_psmdb.yml
when: lookup('env', 'install_with') == "psmdb80"

# Enable only pt repo to install pt
- name: include tasks for enabling pt testing repo
include_tasks: ../tasks/enable_only_repo_for_pt.yml
Expand Down Expand Up @@ -95,4 +111,4 @@
when: lookup('env', 'install_with') is match('(pxc|ps|upstream)(57|80)$')

- name: remove pt packages
include_tasks: ../tasks/remove_pt.yml
include_tasks: ../tasks/remove_pt.yml
2 changes: 1 addition & 1 deletion repo_tests/install_psmdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
when: ansible_os_family == "Debian"

#
# Install PSMDB 4.0 packages
# Install PSMDB 4.0/4.2/4.4/5.0/6.0/7.0/8.0 packages
#
- name: Install psmdb packages in debian
apt:
Expand Down
38 changes: 38 additions & 0 deletions tasks/Install_and_run_ps84.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This task enables Percona-Server-84 (ps84) main repository, installs and starts percona-server.

# Enable ps84 main repo and install ps84
- name: include tasks for enabling ps84 main repo
include_tasks: ../tasks/enable_ps84_main_repo.yml

- name: include tasks for installing ps84 packages
vars:
packages: percona-server-server
include_tasks:
file: ../tasks/install_ps84.yml
apply:
environment:
PERCONA_TELEMETRY_URL: "https://check-dev.percona.com/v1/telemetry/GenericReport"

# Start mysql service
- name: start mysql service on Debian
service:
name: mysql
state: started
when: ansible_os_family == "Debian"

- name: start mysql service on CentOS
systemd:
name: mysql
state: started
when: ansible_os_family == "RedHat"

# On Centos ps is started with random root password. Change ps root password and create cnf with new client password on centos.
- name: set root password on CentOS
command: ../setpass_57.sh
when: ansible_os_family == "RedHat"

- name: copy .my.cnf with credentials on CentOS
template: src=../templates/my_57.j2
dest=/root/.my.cnf
mode=0640 owner=root group=root
when: ansible_os_family == "RedHat"
14 changes: 13 additions & 1 deletion tasks/install_and_run_psmdb.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This task enables Percona Server for MongoDB 44 (psmdb44) and MongoDB 50 (psmdb50) main repository, installs and starts modgodb.
# This task enables Percona Server for MongoDB 44 (psmdb44), MongoDB 50 (psmdb50), MongoDB 60 (psmdb60), MongoDB 70 (psmdb70), and MongoDB 80 (psmdb80) main repository, installs and starts modgodb.

# Enable psmdb repo and install psmdb
- name: include tasks for enabling psmdb 44 repo
Expand All @@ -19,6 +19,18 @@
psmdb_repo: "psmdb-60 release"
when: lookup('env', 'install_with') == "psmdb60"

- name: include tasks for enabling psmdb 70 repo
include_tasks: ../tasks/enable_psmdb_repo.yml
vars:
psmdb_repo: "psmdb-70 release"
when: lookup('env', 'install_with') == "psmdb70"

- name: include tasks for enabling psmdb 80 repo
include_tasks: ../tasks/enable_psmdb_repo.yml
vars:
psmdb_repo: "psmdb-80 release"
when: lookup('env', 'install_with') == "psmdb80"

- name: include tasks for installing psmdb packages
vars:
packages: percona-server-mongodb
Expand Down
98 changes: 98 additions & 0 deletions tasks/install_and_run_pxc84.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# This task enables Percona XtraDB Cluster 84 (pxc84) main repository, installs and bootstraps one node of Percona XtraDB Cluster-84.

# Enable pxc main repo and install pxc packages
- name: include tasks for enabling pxc 84 repo
include_tasks: ../tasks/enable_pxc84_main_repo.yml

- name: install PXC 8 deb packages
apt:
name: "{{ packages }}"
update_cache: yes
vars:
packages:
- percona-xtradb-cluster-full
when: ansible_os_family == "Debian"
environment:
PERCONA_TELEMETRY_URL: "https://check-dev.percona.com/v1/telemetry/GenericReport"

- name: install PXC 8 rpm packages
yum:
name: "{{ packages }}"
state: latest
vars:
packages:
- percona-xtradb-cluster-full
when:
- ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"]
- ansible_facts['distribution_major_version'] | int <= 7
environment:
PERCONA_TELEMETRY_URL: "https://check-dev.percona.com/v1/telemetry/GenericReport"

- name: install PXC 8 rpm packages
dnf:
name: "{{ packages }}"
state: latest
vars:
packages:
- percona-xtradb-cluster-full
when:
- ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"]
- ansible_facts['distribution_major_version'] | int >= 8
environment:
PERCONA_TELEMETRY_URL: "https://check-dev.percona.com/v1/telemetry/GenericReport"

# Define node IP for PXC config (Used by Debian distros)
- debug:
var: ansible_all_ipv4_addresses

- set_fact:
man_ip: "{{ item }}"
with_items: "{{ ansible_all_ipv4_addresses }}"
when: "item.startswith('10.')"

- name: output IP used to bootstrap pxc node by deb packages
debug:
var: man_ip

# Stop mysql service and bootstrap pxc node
- name: stop mysql service with service command except OL9
command: service mysql stop
when: (ansible_os_family == "Debian") or (ansible_os_family == "RedHat" and ansible_distribution_major_version != "9")

- name: stop mysql service with systemctl command OL9
command: systemctl stop mysql
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "9"

- name: copy pxc config on centos
template: src=../templates/my_rpm_80.j2
dest=/etc/my.cnf
when: ansible_os_family == "RedHat"

- name: copy pxc config on debian/ubuntu
template: src=../templates/my_8.j2
dest=/etc/mysql/my.cnf
mode=0640 owner=mysql group=root
when: ansible_os_family == "Debian"

- name: copy pxc certs
copy:
src: ../support-files/certs/
dest: /etc/mysql/certs/

# bootstrap the pxc node
- name: bootstrap cluster
systemd:
name: mysql@bootstrap.service
state: started

# On Centos ps is started with random root password. Change ps root password and create cnf with new client password on centos.
- name: set root password on centos
command: ../setpass_57.sh
when: ansible_os_family == "RedHat"

- name: copy .my.cnf with credentials on centos
template: src=../templates/my_57.j2
dest=/root/.my.cnf
mode=0640 owner=root group=root
when: ansible_os_family == "RedHat"

8 changes: 7 additions & 1 deletion version_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ elif [ "$1" = "psmdb44" ]; then
version=${PSMDB44_VER}
elif [ "$1" = "psmdb50" ]; then
version=${PSMDB50_VER}
elif [ "$1" = "psmdb60" ]; then
version=${PSMDB60_VER}
elif [ "$1" = "psmdb70" ]; then
version=${PSMDB70_VER}
elif [ "$1" = "psmdb80" ]; then
version=${PSMDB80_VER}
else
echo "Illegal product selected!"
exit 1
Expand Down Expand Up @@ -345,7 +351,7 @@ elif [ ${product} = "pbm" ]; then
echo "${product} revision is correct and ${revision}" >> "${log}"
fi

elif [ ${product} = "psmdb34" -o ${product} = "psmdb36" -o ${product} = "psmdb40" -o ${product} = "psmdb42" -o ${product} = "psmdb44" ]; then
elif [ ${product} = "psmdb34" -o ${product} = "psmdb36" -o ${product} = "psmdb40" -o ${product} = "psmdb42" -o ${product} = "psmdb44" -o ${product} = "psmdb50" -o ${product} = "psmdb60" -o ${product} = "psmdb70" -o ${product} = "psmdb80" ]; then
##PSMDB-544
declare -A new_bin_version=(["3.6"]="21" ["4.0"]="22" ["4.2"]="11" ["4.4"]="2")
ver="${version%-*}"; major_ver="${ver%.*}"; minor_ver="${ver##*.}"
Expand Down