Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

[Blocked] Online Boutique v0.8.0 with gRPC probes #3

Closed
wants to merge 2 commits into from

Conversation

mathieu-benoit
Copy link
Owner

@mathieu-benoit mathieu-benoit commented Jul 10, 2023

Online Boutique v0.8.0 with gRPC probes.

Blocked for now as grpc health probes are not yet supported in Humanitec.

If deploying this version of Online Boutique:

FIRST_WORKLOAD="adservice"
COMBINED_DELTA=$(score-humanitec delta --app ${ONLINEBOUTIQUE_APP} --env ${ENVIRONMENT} --org ${HUMANITEC_ORG} --token ${HUMANITEC_TOKEN} --retry -f samples/onlineboutique/${FIRST_WORKLOAD}/score.yaml --extensions samples/onlineboutique/${FIRST_WORKLOAD}/humanitec.score.yaml | jq -r .id)
WORKLOADS="cartservice checkoutservice currencyservice emailservice frontend loadgenerator paymentservice productcatalogservice recommendationservice shippingservice"
for w in ${WORKLOADS}; do \
    COMBINED_DELTA=$(score-humanitec delta \
        --app ${ONLINEBOUTIQUE_APP} \
        --env ${ENVIRONMENT} \
        --org ${HUMANITEC_ORG} \
        --token ${HUMANITEC_TOKEN} \
        --delta ${COMBINED_DELTA} \
        --retry \
        -f samples/onlineboutique/$w/score.yaml \
        --extensions samples/onlineboutique/$w/humanitec.score.yaml \
        | jq -r .id); \
done
humctl deploy delta ${COMBINED_DELTA} ${ENVIRONMENT} \
    --context /orgs/${HUMANITEC_ORG}/apps/${ONLINEBOUTIQUE_APP}

Getting this error:

Workload based on default-module workload profile.
Deployment set validation error
deployment set validation error: validation failed

We can successfully deploy this version of Online Boutique (without any livenessProbe nor readinessProbe, if doing this instead (do not deploy the humanitec.score.yaml for the gRPC services):

FIRST_WORKLOAD="frontend"
COMBINED_DELTA=$(score-humanitec delta --app ${ONLINEBOUTIQUE_APP} --env ${ENVIRONMENT} --org ${HUMANITEC_ORG} --token ${HUMANITEC_TOKEN} --retry -f samples/onlineboutique/${FIRST_WORKLOAD}/score.yaml --extensions samples/onlineboutique/${FIRST_WORKLOAD}/humanitec.score.yaml | jq -r .id)
WORKLOADS="adservice cartservice checkoutservice currencyservice emailservice loadgenerator paymentservice productcatalogservice recommendationservice shippingservice"
for w in ${WORKLOADS}; do \
    COMBINED_DELTA=$(score-humanitec delta \
        --app ${ONLINEBOUTIQUE_APP} \
        --env ${ENVIRONMENT} \
        --org ${HUMANITEC_ORG} \
        --token ${HUMANITEC_TOKEN} \
        --delta ${COMBINED_DELTA} \
        --retry \
        -f samples/onlineboutique/$w/score.yaml \
        | jq -r .id); \
done
humctl deploy delta ${COMBINED_DELTA} ${ENVIRONMENT} \
    --context /orgs/${HUMANITEC_ORG}/apps/${ONLINEBOUTIQUE_APP}

@mathieu-benoit mathieu-benoit self-assigned this Jul 10, 2023
@mathieu-benoit mathieu-benoit added the bug Something isn't working label Jul 10, 2023
@mathieu-benoit mathieu-benoit changed the title Online Boutique v0.8.0 with gRPC probes [Blocked] Online Boutique v0.8.0 with gRPC probes Jul 10, 2023
@github-actions
Copy link

Deployment Complete for PR-3! 🎉

View in Humanitec

Deployment ID: cc9a83c48c0db8f4bf3b9180353a77e5a81c73d2

Domains:

frontend: haneabshireparker.newapp.io

Deployment diff

Deployment diff:

{
  "modules": {
    "add": null,
    "remove": [],
    "update": {
      "frontend": [
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/frontend/image",
          "value": "gcr.io/google-samples/microservices-demo/frontend:v0.8.0"
        },
        {
          "from": "",
          "op": "add",
          "path": "/spec/containers/frontend/variables/FRONTEND_MESSAGE",
          "value": ""
        },
        {
          "from": "",
          "op": "add",
          "path": "/spec/containers/frontend/variables/CYMBAL_BRANDING",
          "value": "false"
        }
      ]
    }
  },
  "shared": null
}
Score Output

Score Output:

{
  "id": "cc9a83c48c0db8f4bf3b9180353a77e5a81c73d2",
  "metadata": {
    "env_id": "pr-3-frontend",
    "name": "Auto-generated (SCORE)",
    "url": "https://app.humanitec.io/orgs/my-trial/apps/onlineboutique/envs/pr-3-frontend/draft/cc9a83c48c0db8f4bf3b9180353a77e5a81c73d2",
    "created_by": "s-9d271151-e949-4548-81ed-e7c652fecbb8",
    "created_at": "2023-08-16T16:27:48.123903415Z",
    "last_modified_at": "2023-08-16T16:27:48.123903415Z"
  },
  "modules": {
    "add": {
      "frontend": {
        "externals": {
          "dns": {
            "type": "dns"
          }
        },
        "profile": "humanitec/default-module",
        "spec": {
          "containers": {
            "frontend": {
              "id": "frontend",
              "image": "gcr.io/google-samples/microservices-demo/frontend:v0.8.0",
              "liveness_probe": {
                "headers": {
                  "Cookie": "shop_session-id=x-liveness-probe"
                },
                "path": "/_healthz",
                "port": 8080,
                "type": "http"
              },
              "readiness_probe": {
                "headers": {
                  "Cookie": "shop_session-id=x-readiness-probe"
                },
                "path": "/_healthz",
                "port": 8080,
                "type": "http"
              },
              "variables": {
                "AD_SERVICE_ADDR": "${modules.adservice.service.name}:9555",
                "CART_SERVICE_ADDR": "${modules.cartservice.service.name}:7070",
                "CHECKOUT_SERVICE_ADDR": "${modules.checkoutservice.service.name}:5050",
                "CURRENCY_SERVICE_ADDR": "${modules.currencyservice.service.name}:7000",
                "CYMBAL_BRANDING": "false",
                "ENABLE_PROFILER": "0",
                "FRONTEND_MESSAGE": "",
                "PAYMENT_SERVICE_ADDR": "${modules.paymentservice.service.name}:50051",
                "PORT": "8080",
                "PRODUCT_CATALOG_SERVICE_ADDR": "${modules.productcatalogservice.service.name}:3550",
                "RECOMMENDATION_SERVICE_ADDR": "${modules.recommendationservice.service.name}:8080",
                "SHIPPING_SERVICE_ADDR": "${modules.shippingservice.service.name}:50051"
              }
            }
          },
          "ingress": {
            "rules": {
              "externals.dns": {
                "http": {
                  "/": {
                    "port": 80,
                    "type": "prefix"
                  }
                }
              }
            }
          },
          "service": {
            "ports": {
              "grpc": {
                "container_port": 8080,
                "protocol": "TCP",
                "service_port": 80
              }
            }
          }
        }
      }
    }
  }
}

@mathieu-benoit
Copy link
Owner Author

Will be taken into account by #13

@mathieu-benoit mathieu-benoit deleted the grpc-probes branch August 16, 2023 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant