Skip to content

Commit

Permalink
Fixed app onboard for linkerd and pattern apply
Browse files Browse the repository at this point in the history
Signed-off-by: hershd23 <[email protected]>
  • Loading branch information
hershd23 committed Feb 10, 2023
1 parent d8db463 commit 08de832
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/scripts/istio_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/scripts/linkerd_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 08de832

Please sign in to comment.