Skip to content

Commit 1907ca7

Browse files
committed
openssl 111 support fofr scenario
1 parent 8f38060 commit 1907ca7

File tree

3 files changed

+66
-5
lines changed

3 files changed

+66
-5
lines changed

scenarios/tls.benchmarks.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
statsEnabled: false
3535
arguments: "--urls https://{{serverAddress}}:{{serverPort}} --mTLS {{mTLS}} --certValidationConsoleEnabled {{certValidationConsoleEnabled}} --statsEnabled {{statsEnabled}} --tlsRenegotiation {{tlsRenegotiation}}"
3636

37-
linuxDockerKestrelServer:
37+
dockerLinuxKestrelServer:
3838
sources:
3939
dockerKestrel:
4040
repository: https://github.com/deaglegross/benchmarks.git
4141
branchOrCommit: dmkorolev/idna/openssl-versioning
42-
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile
42+
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.default
4343
dockerImageName: kestrel
4444
dockerContextDirectory: dockerKestrel/src/BenchmarksApps/TLS/Kestrel
4545
port: 8080
@@ -50,7 +50,7 @@ jobs:
5050
mTLS: false
5151
tlsRenegotiation: false
5252
certValidationConsoleEnabled: false
53-
statsEnabled: false
53+
statsEnabled: false
5454

5555
scenarios:
5656

@@ -152,9 +152,25 @@ scenarios:
152152
certPwd: testPassword
153153

154154
# Kestrel in Docker
155-
tls-handshakes-linux-docker:
155+
tls-handshakes-docker-openssl-default:
156+
application:
157+
job: linuxDockerKestrelServer
158+
variables:
159+
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.default
160+
load:
161+
job: httpclient
162+
variables:
163+
path: /hello-world
164+
serverPort: 8080
165+
presetHeaders: connectionclose
166+
connections: 32
167+
serverScheme: https
168+
169+
tls-handshakes-docker-openssl-111:
156170
application:
157171
job: linuxDockerKestrelServer
172+
variables:
173+
dockerFile: dockerKestrel/src/BenchmarksApps/TLS/Kestrel/Dockerfile.openssl111
158174
load:
159175
job: httpclient
160176
variables:

src/BenchmarksApps/TLS/Kestrel/Dockerfile renamed to src/BenchmarksApps/TLS/Kestrel/Dockerfile.default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This stage is used when running from VS in fast mode (Default for Debug configuration)
22
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
3-
USER $APP_UID
3+
USER root
44
WORKDIR /app
55
EXPOSE 8080
66
EXPOSE 8081
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This stage is used when running from VS in fast mode (Default for Debug configuration)
2+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
3+
USER root
4+
WORKDIR /app
5+
EXPOSE 8080
6+
EXPOSE 8081
7+
8+
# install wget to download openssl
9+
RUN apt-get update && apt-get install -y wget
10+
# install perl as openssl dependency
11+
RUN apt-get update && apt-get install -y perl
12+
# install build-essential to get make and other build tools
13+
RUN apt-get update && apt-get install -y build-essential
14+
15+
# install openssl 1.1.1
16+
RUN wget -O - https://www.openssl.org/source/openssl-1.1.1w.tar.gz | tar zxf -; \
17+
cd openssl-1.1.1w; \
18+
./config; \
19+
make install_sw; \
20+
ldconfig
21+
22+
# Update PATH to prioritize the newly installed OpenSSL 1.1.1
23+
ENV PATH="/usr/local/bin:$PATH"
24+
25+
# This stage is used to build the service project
26+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
27+
ARG BUILD_CONFIGURATION=Release
28+
WORKDIR /src
29+
COPY ["Kestrel.csproj", "."]
30+
RUN dotnet restore "./Kestrel.csproj"
31+
COPY . .
32+
WORKDIR "/src/."
33+
RUN dotnet build "./Kestrel.csproj" -c $BUILD_CONFIGURATION -o /app/build
34+
35+
# This stage is used to publish the service project to be copied to the final stage
36+
FROM build AS publish
37+
ARG BUILD_CONFIGURATION=Release
38+
RUN dotnet publish "./Kestrel.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
39+
40+
# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
41+
FROM base AS final
42+
WORKDIR /app
43+
COPY --from=publish /app/publish .
44+
45+
ENTRYPOINT [ "dotnet", "Kestrel.dll" ]

0 commit comments

Comments
 (0)