Skip to content

Commit 239ebfc

Browse files
author
mrnykterstein
committed
fix kafka: install old kafka for MacOS
Tests: протестировано CI commit_hash:a9530fb6ec264fb44a5a52141359425d557979da
1 parent 28b3e5b commit 239ebfc

File tree

6 files changed

+34
-15
lines changed

6 files changed

+34
-15
lines changed

.github/workflows/ci-conan.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,20 @@ jobs:
4545
4646
sudo apt update
4747
sudo apt install -y postgresql redis mongodb-org mongodb-mongosh
48-
sudo ./scripts/kafka/ubuntu_install_kafka.sh
48+
49+
sudo ./scripts/kafka/install_kafka.sh
50+
4951
./scripts/rabbitmq/ubuntu_install_rabbitmq_server.sh
5052
5153
- name: Install MacOS packages
5254
if: matrix.os == 'macos-latest'
5355
run: |
5456
brew update
5557
brew tap mongodb/brew
56-
brew install clang-format postgresql redis kafka rabbitmq mongodb-community
58+
brew install clang-format postgresql redis rabbitmq mongodb-community
59+
60+
sudo ./scripts/kafka/install_kafka.sh
61+
5762
brew install [email protected]
5863
5964
- name: Install common packages

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
181181
- name: Install Kafka
182182
run: |
183-
sudo ./scripts/kafka/ubuntu_install_kafka.sh
183+
sudo ./scripts/kafka/install_kafka.sh
184184
185185
- name: Install RabbitMQ packages
186186
run: |

.github/workflows/macos.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ jobs:
7171
- name: Install test dependencies
7272
run: |
7373
brew tap mongodb/brew
74-
brew install clickhouse redis kafka mongodb-community rabbitmq
74+
brew install clickhouse redis mongodb-community rabbitmq
75+
76+
./scripts/kafka/install_kafka.sh
7577
7678
- name: Setup ccache
7779
run: |

.mapping.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3869,7 +3869,7 @@
38693869
"scripts/grpc/templates/service.usrv.hpp.jinja":"taxi/uservices/userver/scripts/grpc/templates/service.usrv.hpp.jinja",
38703870
"scripts/grpc/templates/utils.inc.jinja":"taxi/uservices/userver/scripts/grpc/templates/utils.inc.jinja",
38713871
"scripts/human_logs.py":"taxi/uservices/userver/scripts/human_logs.py",
3872-
"scripts/kafka/ubuntu_install_kafka.sh":"taxi/uservices/userver/scripts/kafka/ubuntu_install_kafka.sh",
3872+
"scripts/kafka/install_kafka.sh":"taxi/uservices/userver/scripts/kafka/install_kafka.sh",
38733873
"scripts/migrate_from_legacy_redis_ns.sh":"taxi/uservices/userver/scripts/migrate_from_legacy_redis_ns.sh",
38743874
"scripts/mongo/ubuntu-install-mongodb.sh":"taxi/uservices/userver/scripts/mongo/ubuntu-install-mongodb.sh",
38753875
"scripts/perf-blocking-syscall":"taxi/uservices/userver/scripts/perf-blocking-syscall",

scripts/kafka/install_kafka.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
if [ "$(uname)" = "Darwin" ]; then
4+
brew install openjdk
5+
else
6+
apt install -y default-jre
7+
fi
8+
9+
if [ -z ${KAFKA_PATH+x} ]; then
10+
if [ "$(uname)" = "Darwin" ]; then
11+
export KAFKA_PATH="/opt/homebrew/opt/kafka/libexec"
12+
else
13+
export KAFKA_PATH="/etc/kafka"
14+
fi
15+
fi
16+
17+
curl https://dlcdn.apache.org/kafka/3.8.0/kafka_2.13-3.8.0.tgz -o kafka.tgz
18+
mkdir -p ${KAFKA_PATH}
19+
tar xf kafka.tgz --directory="${KAFKA_PATH}"
20+
cp -r ${KAFKA_PATH}/kafka_2.13-3.8.0/* ${KAFKA_PATH}
21+
rm -rf ${KAFKA_PATH}/kafka_2.13-3.8.0
22+
rm kafka.tgz

scripts/kafka/ubuntu_install_kafka.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)