forked from GoogleCloudPlatform/microservices-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
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
sync updated for demo #1
Open
toschneck
wants to merge
44
commits into
loodse:master
Choose a base branch
from
toschneck:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Decouple frontend health checks from GET /, which relies on other services to be reachable. See GoogleCloudPlatform#34. Closes GoogleCloudPlatform#34. Signed-off-by: Ahmet Alp Balkan <[email protected]>
Signed-off-by: Ahmet Alp Balkan <[email protected]>
add changes from upstream
merge loodse updates * Adjustment of the image prefixes * Move load testing module to separate skaffold profile `loadtest` * Updated documentation
@guusvw my updates for the demo at the google roadshow |
also converted line endings for recommendationservice/requirements.txt from dos to unix.
Signed-off-by: Ahmet Alp Balkan <[email protected]>
* Move Node healthchecks to gRPC * gitignore proto files * Switch to standard health RPC * Fix lint * Update client.js * Add protos back + update them * node services: fix & run genproto.sh this gets currencyservice to work but paymentservice is still crashing in the docker container. Signed-off-by: Ahmet Alp Balkan <[email protected]> * Fix docker breaking * update dockerfiles with released health probe Signed-off-by: Ahmet Alp Balkan <[email protected]>
Also locked grpc-go to =1.14 exact version. See grpc/grpc-go#2314 and grpc/grpc-go#2313 for reference
…tform#44) * Introducing super basic health check for cart service - Generated C# proto implementation for grpc health check - Moved all C# protos to a dedicated folder - Implemented basic health checking to ping CartStore (which is Redis in default implementation) - Base plumbing for health checks * Introducing super basic health check for cart service - Generated C# proto implementation for grpc health check - Moved all C# protos to a dedicated folder - Implemented basic health checking to ping CartStore (which is Redis in default implementation) - Base plumbing for health checks * Changing Ping health probe to call Redis Cache Ping method
Reduces docker image size for cartservice from ~2.36 GB to ~157 MB Fixes Issue GoogleCloudPlatform#36 ![image-size](https://user-images.githubusercontent.com/7820716/45908973-37a31e00-bdb4-11e8-92d3-d84acfb1c10f.png)
…latform#48) * log: change log format to JSON payload for better log in Stackdriver change the log format in Go written service from text payload to JSON payload using 3rd party logging library (logrus). https://cloud.google.com/logging/docs/structured-logging https://github.com/sirupsen/logrus/blob/33a1e118e113c7d1dd24a80f80670864cd598519/json_formatter.go#L40-L49 Effected services are frontend, productcatalogservice, checkoutservice, and shippinservice. Also change target container registry and locust scenario for testing. * revert kubernetes manifests to point to the original container registry URLs * revert skaffold.yaml to point to the original registry * loadgenerator: revert locust settings
Reduce docker image for emailservice to ~240 MB (down from ~ 1.31 GB) Main application (`email_server.py`) now runs as python 2.7. Before we had both Python 2.7 and Python 3 installed in the image. Switched to using `python:2.7-alpine3.8` as the base image, and used multi-stage dockerfiles to keep dependencies minimal. Fixes GoogleCloudPlatform#49 From my shell: ``` $ docker build -t emailservice:dev . && docker run -it emailservice:dev Sending build context to Docker daemon 97.28kB Step 1/17 : FROM python:2.7-alpine3.8 as base ---> b2bc7255b42c Step 2/17 : FROM base as builder ---> b2bc7255b42c Step 3/17 : RUN apk add --update --no-cache gcc linux-headers make musl-dev python-dev g++ cairo-dev cairo openssl-dev gobject-introspection-dev ---> Using cache ---> 6daf3d9fe49a Step 4/17 : ENV GRPC_PYTHON_VERSION 1.15.0 ---> Using cache ---> 3e33d97d9580 Step 5/17 : RUN python -m pip install --upgrade pip ---> Using cache ---> e8fa3879c282 Step 6/17 : RUN pip install grpcio==${GRPC_PYTHON_VERSION} grpcio-tools==${GRPC_PYTHON_VERSION} ---> Using cache ---> c6fba7743eed Step 7/17 : COPY requirements.txt . ---> Using cache ---> 1f6b0a444980 Step 8/17 : RUN pip install -r requirements.txt ---> Using cache ---> 8cc0a7af6aa8 Step 9/17 : FROM base as final ---> b2bc7255b42c Step 10/17 : RUN GRPC_HEALTH_PROBE_VERSION=v0.1.0-alpha.1 && wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && chmod +x /bin/grpc_health_probe ---> Using cache ---> e954a0384081 Step 11/17 : ENV PYTHONUNBUFFERED=0 ---> Using cache ---> 64ece3d72a66 Step 12/17 : WORKDIR /email_server ---> Using cache ---> 27b34dc14492 Step 13/17 : COPY --from=builder /usr/local/lib/python2.7/ /usr/local/lib/python2.7/ ---> Using cache ---> 60035ec8dfd4 Step 14/17 : RUN apk add --no-cache libstdc++ ---> Using cache ---> 920be90c126e Step 15/17 : COPY . . ---> Using cache ---> 9541bed2d7a0 Step 16/17 : EXPOSE 8080 ---> Using cache ---> 48fbeaa852b9 Step 17/17 : ENTRYPOINT [ "python", "email_server.py" ] ---> Using cache ---> ff317770992d Successfully built ff317770992d Successfully tagged emailservice:dev starting the email service in dummy mode. listening on port: 8080 ```
Reduce loadgenerator's image size from ~972MB to ~117MB * Changed loadgen.sh to execute with `/bin/sh` as opposed to `/bin/bash` * Changed dockerfile to a multi stage build * Changed base image to `python:3-alpine` as opposed to `python:3.6`
Reduced docker image size to ~153MB (was ~781MB). * Uses alpine linux and multi stage builds. * Changed `CMD` to `ENTRYPOINT`
Signed-off-by: Ahmet Alp Balkan <[email protected]>
Upgrading grpc-java fixed an error that I encountered when I tried modifying the adservice to write logs to Stackdriver with google-cloud-logging ("`com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Credentials require channel with PRIVACY_AND_INTEGRITY security level. Observed security level: NONE`").
) - Use the method provided in HealthBase - Use the same version of GrpcHealth as Grpc core. Fixes GoogleCloudPlatform#50.
This field can be used as the context keys to look up relevant ads in the ad service. /cc @rghetia I also ran the genproto.sh scripts for the Java and Go services and included those changes in the second commit. I encountered an issue when I ran genproto.sh for the recommendation service, and I'm still looking into it.
The ad service now returns ads matching the categories of the product that is currently displayed. Changes in this commit: - List all products' categories in products.json. - Pass the current product's categories from the frontend to the ad service when looking up ads. - Store a statically initialized multimap from product category to ad in the ad service. - Return all ads matching the given categories when handling an ads request. The ad service continues to return random ads when no categories are given or no ads match the categories.
…oogleCloudPlatform#59) This commit enables OpenCensus log correlation using opencensus-contrib-log-correlation-log4j2 (https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2). The library inserts the trace ID, span ID, and sampling decision into every Log4j log event. This commit includes other changes to make the tracing data available in the logs, in a format that can be interpreted by the Stackdriver Logging agent: - Convert all adservice log statements from java.util.logging to Log4j. - Specify a JSON format for Log4j output. This is related to issue GoogleCloudPlatform#47. - Add the trace ID, span ID, and sampling decision to the JSON format. Trace ID and span ID use special keys that the Stackdriver Logging agent uses to populate the tracing data fields in the LogEntry uploaded to Stackdriver (https://cloud.google.com/logging/docs/agent/configuration#special_fields_in_structured_payloads). However, Stackdriver won't be able to link the traces and log entries until fluent-plugin-google-cloud can automatically format the trace ID with the format expected by Stackdriver (GoogleCloudPlatform/fluent-plugin-google-cloud#239, GoogleCloudPlatform/fluent-plugin-google-cloud#260). This commit also upgrades OpenCensus to 0.16.1 in order to use opencensus-contrib-log-correlation-log4j2.
…oogleCloudPlatform#66) change the log format in Python and Node.js services. Effected services are currencyservice, emailservice, paymentservice, and recommendationservice. Loadgenerator is left as is because of the diffculty to change the log format and log target in locust. ref. GoogleCloudPlatform#47
* adservice: Reduced docker image size to ~165MB (down from ~886MB) by switching to alpine and using multi stage builds * adservice: Changed install of glibc in builder to not require untrusted packages * adservice: Refactored Dockerfile to be a multi stage build. The 'build' step runs from openjdk:8-slim, but the final image is alpine based. We can get away from this since java runs in a vm & the architecture of the images doesn't change between biuld steps
…using alpine as a base image. (GoogleCloudPlatform#70)
Upgrade skaffold version + manifest.
Signed-off-by: Ahmet Alp Balkan <[email protected]>
Signed-off-by: Ahmet Alp Balkan <[email protected]>
…services-demo into GoogleCloudPlatform-master
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
details see https://github.com/toschneck/microservices-demo/pulls/2