From 08de8321b739a8a22235c0c1406f752cf2f98a8d Mon Sep 17 00:00:00 2001 From: hershd23 Date: Fri, 10 Feb 2023 23:36:29 +0530 Subject: [PATCH] Fixed app onboard for linkerd and pattern apply Signed-off-by: hershd23 --- .github/workflows/scripts/istio_deploy.sh | 25 +++++++++++++++------ .github/workflows/scripts/linkerd_deploy.sh | 6 +++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/scripts/istio_deploy.sh b/.github/workflows/scripts/istio_deploy.sh index 9a832e8..116774a 100644 --- a/.github/workflows/scripts/istio_deploy.sh +++ b/.github/workflows/scripts/istio_deploy.sh @@ -16,21 +16,32 @@ fi sleep 200 kubectl get pods -n meshery echo "Meshery has been installed." -#mesheryctl system login --provider None -echo "Deploying meshery istio adapter..." -echo | mesheryctl mesh deploy adapter meshery-istio:10000 --namespace "istio-system" --token "./.github/workflows/auth.json" -sleep 200 -echo "Onboarding application... Standby for few minutes..." -mesheryctl pattern apply -f "https://raw.githubusercontent.com/service-mesh-patterns/service-mesh-patterns/master/samples/bookInfoPattern.yaml" --token "./.github/workflows/auth.json" +mesheryctl system login --provider None +# echo "Deploying meshery istio adapter..." +# echo | mesheryctl mesh deploy adapter meshery-istio:10000 --namespace "istio-system" --token "./.github/workflows/auth.json" +# sleep 200 +# echo "Onboarding application... Standby for few minutes..." +# mesheryctl pattern apply -f "https://raw.githubusercontent.com/service-mesh-patterns/service-mesh-patterns/master/samples/bookInfoPattern.yaml" --token "./.github/workflows/auth.json" + +curl -fsL http://raw.githubusercontent.com/service-mesh-patterns/service-mesh-patterns/master/samples/minimalistiobookinfo.yaml --output minimalistiobookinfo.yaml + +# Change profile to default +yq e -i '.services.istioinstallation.settings.profile = "default"' minimalistiobookinfo.yaml +cat minimalistiobookinfo.yaml +mesheryctl pattern apply -f "./minimalistiobookinfo.yaml" --token "./.github/workflows/auth.json" # Wait for the application to be ready -sleep 100 +sleep 300 # Get the gateway URL and export it and # Expose the service inside the cluster export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}') export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}') export INGRESS_HOST=$(minikube ip) +kubectl -n istio-system get service +kubectl -n default get service +kubectl get namespace +echo "INGRESS_PORT : $INGRESS_PORT , $SECURE_INGRESS_PORT" export GATEWAY_URL=http://$INGRESS_HOST:$INGRESS_PORT minikube tunnel &> /dev/null & diff --git a/.github/workflows/scripts/linkerd_deploy.sh b/.github/workflows/scripts/linkerd_deploy.sh index 4e18765..f8ecd89 100644 --- a/.github/workflows/scripts/linkerd_deploy.sh +++ b/.github/workflows/scripts/linkerd_deploy.sh @@ -21,16 +21,18 @@ echo "Meshery has been installed." kubectl get pods -n meshery echo "Deploying meshery linkerd adapter..." -#mesheryctl system login --provider None +mesheryctl system login --provider None echo | mesheryctl mesh deploy adapter meshery-linkerd:10001 --token "./.github/workflows/auth.json" sleep 200 echo "Onboarding application... Standby for few minutes..." #mesheryctl app onboard -f "./emojivoto.yml" -s "Kubernetes Manifest" --token "./.github/workflows/auth.json" -mesheryctl pattern apply -f "./emojivoto.yml" --token "./.github/workflows/auth.json" +mesheryctl app onboard -f "./emojivoto.yml" --token "./.github/workflows/auth.json" # Wait for the application to be ready sleep 100 +kubectl get namespace + echo "Service Mesh: $MESH_NAME - $SERVICE_MESH" echo "Endpoint URL: http://localhost:8080"