Skip to content

Commit

Permalink
Update packages (GoogleCloudPlatform#518)
Browse files Browse the repository at this point in the history
* dotnet/aspnetcore v5.0.4

* Grpc.AspNetCore - 2.36

* adservice - update gradle and other packages

* cartservice - Dockerfile scoped in src folder

* install-dependencies - dotnet-sdk-5.0

* cartservice - Dockerfile scoped to src folder

* adservice - add missing io.opencensus:opencensus-contrib-grpc-metrics

* RpcViews.registerAllGrpcViews()

* currencyservice - update packages

* emailservice - update packages

* loadgenerator - update packages

* jinja2 2.11.3

* google-api-core[grpc] 1.26.2

* grpcVersion 1.36.1

* paymentservice - update packages

* adservice - grpcVersion 1.32.1

* recommendationservice - update packages

* generate package-lock.json depending on package.json

* fix typo

* paymentservice - update package-lock.json depending on package.json
  • Loading branch information
mathieu-benoit authored Apr 1, 2021
1 parent 1167a58 commit 727987e
Show file tree
Hide file tree
Showing 21 changed files with 2,027 additions and 2,349 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1
sudo apt-get install -y dotnet-sdk-5.0
echo "✅ dotnet installed"

# install kubectl
Expand Down
4 changes: 2 additions & 2 deletions docs/memorystore.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ sed -i "s/value: \"redis-cart:6379\"/value: \"${REDIS_IP}\"/g" ./release/updated

In addition, in the `./release/updated-manifests.yaml` file you need also to manually remove the `Deployment` and `Service` sections of the `redis-cart` which are not needed anymore.

4. Apply all the updated manifests.
5. Apply all the updated manifests.

```sh
kubectl apply -f ./release/updated-manifests.yaml
```

5. **Wait for the Pods to be ready.**
6. **Wait for the Pods to be ready.**

```
kubectl get pods
Expand Down
2 changes: 1 addition & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ build:
- image: currencyservice
context: src/currencyservice
- image: cartservice
context: src/cartservice
context: src/cartservice/src
- image: frontend
context: src/frontend
- image: loadgenerator
Expand Down
19 changes: 10 additions & 9 deletions src/adservice/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'com.google.protobuf' version '0.8.11'
id 'com.github.sherter.google-java-format' version '0.8'
id 'com.google.protobuf' version '0.8.14'
id 'com.github.sherter.google-java-format' version '0.9'
id 'idea'
id 'application'
}
Expand All @@ -14,10 +14,10 @@ description = 'Ad Service'
group = "adservice"
version = "0.1.0-SNAPSHOT"

def opencensusVersion = "0.25.0"
def grpcVersion = "1.26.0"
def jacksonVersion = "2.10.2"
def protocVersion = "3.11.4"
def opencensusVersion = "0.27.0"
def grpcVersion = "1.32.1"
def jacksonVersion = "2.12.1"
def protocVersion = "3.12.3"

tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -33,8 +33,9 @@ dependencies {
if (speed) {
implementation fileTree(dir: offlineCompile, include: '*.jar')
} else {
implementation "com.google.api.grpc:proto-google-common-protos:1.17.0",
implementation "com.google.api.grpc:proto-google-common-protos:1.18.1",
"io.opencensus:opencensus-api:${opencensusVersion}",
"io.opencensus:opencensus-contrib-grpc-metrics:${opencensusVersion}",
"io.opencensus:opencensus-contrib-grpc-util:${opencensusVersion}",
"io.opencensus:opencensus-exporter-trace-jaeger:${opencensusVersion}",
"io.opencensus:opencensus-exporter-stats-stackdriver:${opencensusVersion}",
Expand All @@ -44,13 +45,13 @@ dependencies {
"io.grpc:grpc-stub:${grpcVersion}",
"io.grpc:grpc-netty:${grpcVersion}",
"io.grpc:grpc-services:${grpcVersion}",
"org.apache.logging.log4j:log4j-core:2.13.0"
"org.apache.logging.log4j:log4j-core:2.13.3"

runtimeOnly "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}",
"com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}",
"io.opencensus:opencensus-contrib-log-correlation-log4j2:${opencensusVersion}",
"io.opencensus:opencensus-impl:${opencensusVersion}",
"io.netty:netty-tcnative-boringssl-static:2.0.26.Final"
"io.netty:netty-tcnative-boringssl-static:2.0.34.Final"
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/adservice/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 1 addition & 8 deletions src/adservice/src/main/java/hipstershop/AdService.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,7 @@ private static void initJaeger() {
/** Main launches the server from the command line. */
public static void main(String[] args) throws IOException, InterruptedException {
// Registers all RPC views.
/*
[TODO:rghetia] replace registerAllViews with registerAllGrpcViews. registerAllGrpcViews
registers new views using new measures however current grpc version records against old
measures. When new version of grpc (0.19) is release revert back to new. After reverting back
to new the new measure will not provide any tags (like method). This will create some
discrepencies when compared grpc measurements in Go services.
*/
RpcViews.registerAllViews();
RpcViews.registerAllGrpcViews();

new Thread(
() -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
**/*.sh
**/*.bat
tests/
**/bin/
**/obj/
**/out/
Expand Down
10 changes: 5 additions & 5 deletions src/cartservice/Dockerfile → src/cartservice/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
# limitations under the License.

# https://mcr.microsoft.com/v2/dotnet/sdk/tags/list
FROM mcr.microsoft.com/dotnet/sdk:5.0.103 as builder
FROM mcr.microsoft.com/dotnet/sdk:5.0.201 as builder
WORKDIR /app
COPY src/cartservice.csproj src/
RUN dotnet restore src/cartservice.csproj -r linux-musl-x64
COPY cartservice.csproj .
RUN dotnet restore cartservice.csproj -r linux-musl-x64
COPY . .
# Fix the issue on Debian 10: https://github.com/dotnet/dotnet-docker/issues/2470
ENV COMPlus_EnableDiagnostics=0
RUN dotnet publish src/cartservice.csproj -p:PublishSingleFile=true -r linux-musl-x64 --self-contained true -p:PublishTrimmed=True -p:TrimMode=Link -c release -o /cartservice --no-restore
RUN dotnet publish cartservice.csproj -p:PublishSingleFile=true -r linux-musl-x64 --self-contained true -p:PublishTrimmed=True -p:TrimMode=Link -c release -o /cartservice --no-restore

# https://mcr.microsoft.com/v2/dotnet/runtime-deps/tags/list
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0.3-alpine3.12-amd64
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0.4-alpine3.12-amd64
RUN GRPC_HEALTH_PROBE_VERSION=v0.3.6 && \
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
Expand Down
4 changes: 2 additions & 2 deletions src/cartservice/src/cartservice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.35.0" />
<PackageReference Include="Grpc.HealthCheck" Version="2.35.0" />
<PackageReference Include="Grpc.AspNetCore" Version="2.36.0" />
<PackageReference Include="Grpc.HealthCheck" Version="2.36.4" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
</ItemGroup>

Expand Down
Loading

0 comments on commit 727987e

Please sign in to comment.