Skip to content

Commit d499120

Browse files
PMM-13758: change yum for dnf (#151)
1 parent 524cb5e commit d499120

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

pmm_psmdb-pbm_setup/Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CMD ["/usr/sbin/init"]
2121
RUN set -ex; \
2222
export GNUPGHOME="$(mktemp -d)"; \
2323
export PERCONA_TELEMETRY_URL="https://check-dev.percona.com/v1/telemetry/GenericReport"; \
24-
yum install -y gnupg2; \
24+
dnf install -y gnupg2; \
2525
if [ $PSMDB_VERSION != "latest" ]; then export PSMDB_REPO="$(echo "${PSMDB_VERSION}" | awk -F '.' '{print "psmdb-"$1$2}')" ; else export PSMDB_REPO=psmdb-80 ; fi ; \
2626
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 4D1BB29D63D98E422B2113B19334A25F8507EFA5 99DB70FAE1D7CE227FB6488205B555B38483C65D 94E279EB8D8F25B21810ADF121EA45AB2F86D6A1; \
2727
gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \
@@ -36,41 +36,41 @@ RUN set -ex; \
3636
percona-release enable pbm ${REPO} && \
3737
percona-release enable ${PSMDB_REPO} ${REPO} && \
3838
percona-release enable pmm3-client ${PMM_REPO} && \
39-
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
40-
yum update --refresh -y && \
39+
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
40+
dnf update --refresh -y && \
4141
if [[ $PSMDB_VERSION == "latest" || "$PSMDB_VERSION" =~ ^[0-9]\.[0-9]$ ]] ; then \
42-
yum -y install percona-server-mongodb \
42+
dnf -y install percona-server-mongodb \
4343
percona-server-mongodb-tools \
4444
percona-server-mongodb-server \
4545
percona-server-mongodb-mongos ; \
4646
else \
47-
yum -y install percona-server-mongodb-${PSMDB_VERSION}.el9 \
47+
dnf -y install percona-server-mongodb-${PSMDB_VERSION}.el9 \
4848
percona-server-mongodb-tools-${PSMDB_VERSION}.el9 \
4949
percona-server-mongodb-server-${PSMDB_VERSION}.el9 \
5050
percona-server-mongodb-mongos-${PSMDB_VERSION}.el9 ; \
5151
fi && \
5252
if [ "$PBM_VERSION" == "latest" ]; then \
53-
yum -y install percona-backup-mongodb ; \
53+
dnf -y install percona-backup-mongodb ; \
5454
else \
55-
yum -y install percona-backup-mongodb-${PBM_VERSION}.el9 ; \
55+
dnf -y install percona-backup-mongodb-${PBM_VERSION}.el9 ; \
5656
fi
5757

5858
RUN if [[ "$PMM_CLIENT_VERSION" == http* ]]; then \
59-
yum -y install pmm-client && \
59+
dnf -y install pmm-client && \
6060
curl -Lf -o /tmp/pmm-client.tar.gz $PMM_CLIENT_VERSION && \
6161
cd /tmp && tar -xvf pmm-client.tar.gz --transform 's,^/*[^/]*,/pmm-client,S' && \
6262
cd /tmp/pmm-client && ./install_tarball && cd ../ && rm -rf pmm* ;\
6363
elif [[ "$PMM_CLIENT_VERSION" =~ 3-dev-latest|latest ]]; then \
64-
yum -y install pmm-client ; \
64+
dnf -y install pmm-client ; \
6565
elif [[ "$PMM_CLIENT_VERSION" = "pmm3-rc" ]]; then \
6666
percona-release enable pmm3-client testing && \
67-
yum update --refresh -y && \
68-
yum -y install pmm-client ; \
67+
dnf update --refresh -y && \
68+
dnf -y install pmm-client ; \
6969
else \
7070
if [[ "$PMM_CLIENT_VERSION" =~ ^([3-9])\.([1-9][0-9]*)\.([0-9]+)$ ]]; then \
71-
yum -y install pmm-client-${PMM_CLIENT_VERSION}-7.el9 ; \
71+
dnf -y install pmm-client-${PMM_CLIENT_VERSION}-7.el9 ; \
7272
else \
73-
yum -y install pmm-client-${PMM_CLIENT_VERSION}-6.el9 ; \
73+
dnf -y install pmm-client-${PMM_CLIENT_VERSION}-6.el9 ; \
7474
fi \
7575
fi && \
7676
sed 's/Type=forking/#Type=forking/' -i /usr/lib/systemd/system/mongod.service && \
@@ -80,7 +80,7 @@ RUN if [[ "$PMM_CLIENT_VERSION" == http* ]]; then \
8080
systemctl enable pmm-agent && \
8181
curl -Lf -o /tmp/mgodatagen.tar.gz https://github.com/feliixx/mgodatagen/releases/download/v0.11.2/mgodatagen_0.11.2_Linux_x86_64.tar.gz && \
8282
tar -xf /tmp/mgodatagen.tar.gz -C /usr/bin && \
83-
yum clean all; \
83+
dnf clean all; \
8484
rm -rf /var/cache/dnf /var/cache/yum /data/db && mkdir -p /data/db;
8585

8686
COPY conf/sysconfig/mongod /etc/sysconfig/

pmm_qa/pxc_proxysql_setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export number_of_nodes=$1
33
export pxc_version=$2
44
export query_source=$3
55

6-
sudo yum install -y socat
6+
sudo dnf install -y socat
77
wget https://github.com/Percona-QA/percona-qa/master/pxc-tests/pxc-startup.sh
88
sed -i 's/log-output=none/log-output=file/g' pxc-startup.sh
99
## bug https://bugs.mysql.com/bug.php?id=90553 workaround
@@ -12,7 +12,7 @@ sed -i 's+${MID} --datadir+${MID} --socket=\\${node}/socket.sock --port=\\${RBAS
1212
## Download right PXC version
1313
if [ "$pxc_version" == "5.7" ]; then
1414
wget https://downloads.percona.com/downloads/Percona-XtraDB-Cluster-57/Percona-XtraDB-Cluster-5.7.34-31.51/binary/tarball/Percona-XtraDB-Cluster-5.7.34-rel37-51.1.Linux.x86_64.glibc2.12-minimal.tar.gz
15-
sudo yum install -y percona-xtrabackup-24
15+
sudo dnf install -y percona-xtrabackup-24
1616
fi
1717
if [ "$pxc_version" == "8.0" ]; then
1818
sed -i 's+wsrep_node_incoming_address=$ADDR+wsrep_node_incoming_address=$ADDR:$RBASE1+g' pxc-startup.sh
@@ -31,7 +31,7 @@ touch sysbench_run_node1_read_write.txt
3131
touch sysbench_run_node1_read_only.txt
3232

3333
## Install proxysql2
34-
sudo yum install -y proxysql2
34+
sudo dnf install -y proxysql2
3535

3636
### enable slow log
3737
if [ "$query_source" == "slowlog" ]; then

pmm_qa/tasks/set_unique_service_name.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
when: ansible_facts['os_family'] == 'Debian'
99

1010
- name: Install jq on RHEL/CentOS/Alma/Rocky
11-
yum:
11+
dnf:
1212
name: jq
1313
state: present
1414
when: ansible_facts['os_family'] == 'RedHat'

0 commit comments

Comments
 (0)