-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Master-slave binding via lifecycleActions field, deprecating script (…
…but still retaining)
- Loading branch information
1 parent
ae3411c
commit 94cd643
Showing
3 changed files
with
21 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +0,0 @@ | ||
#! /bin/bash | ||
set -x | ||
|
||
# 获取当前Pod的索引 | ||
INDEX=${HOSTNAME##*-} | ||
echo "index:${INDEX}" | ||
# PIKA配置文件路径 | ||
PIKA_CONF="../data/pika.conf" | ||
|
||
# 确保配置文件存在 | ||
|
||
touch $PIKA_CONF | ||
echo $? | ||
if [ "$INDEX" = "0" ]; then | ||
# 如果是pika-0,配置为主节点 | ||
../pika/bin/pika -c ../data/pika.conf | ||
else | ||
# 如果不是pika-0,配置为从节点 | ||
sed -i "s/#slaveof : master-ip:master-port/slaveof : pika-master-slave-cluster-pika:9221/" $PIKA_CONF | ||
../pika/bin/pika -c ../data/pika.conf | ||
fi | ||
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