Skip to content
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

[WIP] Enable local testing on ARM / M1 #12

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kubernetes-manifests/adservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: signadot/adservice:latest
image: adservice
ports:
- containerPort: 9555
env:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/cartservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: signadot/cartservice:latest
image: cartservice
ports:
- containerPort: 7070
env:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/checkoutservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
serviceAccountName: default
containers:
- name: server
image: signadot/checkoutservice:latest
image: checkoutservice
ports:
- containerPort: 5050
# readinessProbe:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/currencyservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: signadot/currencyservice:latest
image: currencyservice
ports:
- name: grpc
containerPort: 7000
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/emailservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: signadot/emailservice:latest
image: emailservice
ports:
- containerPort: 8080
env:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
serviceAccountName: default
containers:
- name: server
image: signadot/frontend:latest
image: frontend
ports:
- containerPort: 8080
# readinessProbe:
Expand Down
4 changes: 2 additions & 2 deletions kubernetes-manifests/loadgenerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
restartPolicy: Always
containers:
- name: main
image: signadot/loadgenerator:latest
image: loadgenerator
env:
- name: FRONTEND_ADDR
value: http://frontend
Expand All @@ -29,4 +29,4 @@ spec:
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
memory: 512Mi
2 changes: 1 addition & 1 deletion kubernetes-manifests/paymentservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: signadot/paymentservice:latest
image: paymentservice
ports:
- containerPort: 50051
env:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/productcatalogservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: signadot/productcatalogservice:latest
image: productcatalogservice
ports:
- containerPort: 3550
env:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/recommendationservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: signadot/recommendationservice:latest
image: recommendationservice
ports:
- containerPort: 8080
# readinessProbe:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/shippingservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
serviceAccountName: default
containers:
- name: server
image: signadot/shippingservice:latest
image: shippingservice
ports:
- containerPort: 50051
env:
Expand Down
2 changes: 1 addition & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build:
tagPolicy:
gitCommit: {}
local:
useBuildkit: false
useBuildkit: true
deploy:
kubectl:
manifests:
Expand Down
15 changes: 7 additions & 8 deletions src/cartservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0.103 as builder
WORKDIR /app
COPY cartservice.csproj .
RUN dotnet restore cartservice.csproj -r linux-musl-x64
RUN dotnet restore cartservice.csproj -r linux-arm64
COPY . .
# Fix the issue on Debian 10: https://github.com/dotnet/dotnet-docker/issues/2470
ENV COMPlus_EnableDiagnostics=0
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
RUN dotnet publish cartservice.csproj -p:PublishSingleFile=true -r linux-arm64 --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
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
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0.3-focal-arm64v8
#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
WORKDIR /app
COPY --from=builder /cartservice .
ENV ASPNETCORE_URLS http://*:7070
ENV ASPNETCORE_URLS=http://*:7070
ENTRYPOINT ["/app/cartservice"]
10 changes: 5 additions & 5 deletions src/cartservice/cartservice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.35.0" />
<PackageReference Include="Grpc.HealthCheck" Version="2.35.0" />
<PackageReference Include="OpenTelemetry" Version="1.2.0-rc2" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.2.0-rc2" />
<PackageReference Include="Grpc.AspNetCore" Version="2.44.0" />
<PackageReference Include="Grpc.HealthCheck" Version="2.44.0" />
<PackageReference Include="OpenTelemetry" Version="1.2.0-rc4" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.2.0-rc4" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc9" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc9" />
<PackageReference Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc9" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/loadgenerator/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ click==7.0 # via flask
configargparse==1.2.3 # via locust
flask-basicauth==0.2.0 # via locust
flask==1.1.2 # via flask-basicauth, locust
gevent==20.5.2 # via geventhttpclient, locust
gevent==21.12.0 # via geventhttpclient, locust
geventhttpclient==1.4.2 # via locust
greenlet==0.4.15 # via gevent
greenlet==1.1.2 # via gevent
idna==2.8 # via requests
itsdangerous==1.1.0 # via flask
jinja2==2.11.2 # via flask
Expand Down