Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton for Jaeger_demo #62

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
62 changes: 61 additions & 1 deletion common_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,55 @@ function clone_repos() {
echo
}

function clone_jaeger() {
app_name=$1
echo
echo "#######################################"
echo "1. Cloning ${app_name} git repos"
if [ ! -d ${app_name} ]; then
git clone [email protected]:kruize/${app_name}.git 2>/dev/null
if [ $? -ne 0 ]; then
git clone https://github.com/kruize/${app_name}.git 2>/dev/null
fi
check_err "ERROR: git clone of kruize/${app_name} failed."
fi

git clone [email protected]:kruize/jaeger-demos.git
if [ $? -ne 0 ]; then
git clone https://github.com/kruize/jaeger-demos.git
fi
check_err "ERROR: git clone of Jaeger_demo_application failed."

echo "done"
echo "#######################################"
echo
}

###########################################
# Jaeger Install
###########################################
function Jaeger_demo_install() {
echo
echo "#######################################"
echo "5. Installing Jaeger_demo into cluster"
pushd jaeger-demos >/dev/null
kubectl apply -f kubernetes-resources
check_err "ERROR: Jaeger_Demo app failed to start, exiting"
popd >/dev/null
echo "#######################################"
echo
}

###########################################
# Cleanup git Repos
###########################################
function delete_jaeger_repos() {
app_name=$1
echo "1. Deleting ${app_name} git repos"
rm -rf ${app_name} jaeger-demos
}


###########################################
# Cleanup git Repos
###########################################
Expand Down Expand Up @@ -190,12 +239,23 @@ function benchmarks_install() {
echo
}

###########################################
# Expose Jaeger port
###########################################
function expose_jaeger() {
echo "Port forwarding Jaeger"
echo "Info: Prometheus accessible at http://localhost:9090"
kubectl port-forward svc/jaeger 16686:16686 &
}



###########################################
# Expose Prometheus port
###########################################
function expose_prometheus() {
kubectl_cmd="kubectl -n monitoring"
echo "8. Port forwarding Prometheus"
echo "8. Port forwarding Jaeger"
echo "Info: Prometheus accessible at http://localhost:9090"
${kubectl_cmd} port-forward prometheus-k8s-1 9090:9090
}
Expand Down
Loading