-
Notifications
You must be signed in to change notification settings - Fork 0
/
kafka-install.sh
executable file
·37 lines (28 loc) · 1.08 KB
/
kafka-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Copyright (c) 2023 Ho Kim ([email protected]). All rights reserved.
# Use of this source code is governed by a GPL-3-style license that can be
# found in the LICENSE file.
# Prehibit errors
set -e -o pipefail
###########################################################
# Configuration #
###########################################################
# Configure default environment variables
OPENARK_HOME_DEFAULT="${HOME}/Library/ipis-dev-env/netai-cloud"
# Set environment variables
OPENARK_HOME="${OPENARK_HOME:-$OPENARK_HOME_DEFAULT}"
###########################################################
# Main Function #
###########################################################
for cluster_name in $("$(dirname "$0")/ceph-ls.sh"); do
echo -n "* ${cluster_name}: "
kubectl config use-context "${cluster_name}"
# Install NATS
pushd "${OPENARK_HOME}/templates/messengers/kafka/"
./install.sh
popd
done
# Cleanup
kubectl config use-context 'default'
# Done
exec echo 'Finished!'