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

Update libraries included in the load tester to newer versions #1063

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

rajatvig
Copy link
Contributor

No description provided.

Signed-off-by: Rajat Vig <rvig@etsy.com>
@rajatvig
Copy link
Contributor Author

@stefanprodan Does this look good?

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajatvig can you please run make loadtester-build and post the result in the PR body. Thanks!

Signed-off-by: Rajat Vig <rvig@etsy.com>
@rajatvig
Copy link
Contributor Author

rajatvig commented Dec 1, 2021

Had to change the Dockerfile for load tester to fix the ghz URI and use a pre-compiled version of wrk as it was not compiling on Alpine even on HEAD.

The build logs - the docker used the cached builds but the image was created

CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./bin/loadtester ./cmd/loadtester/*
docker build -t ghcr.io/fluxcd/flagger-loadtester:0.19.0 . -f Dockerfile.loadtester
#2 [internal] load .dockerignore
#2 sha256:04750550f0ba08685c2b5cf537ef1e343b57410ef2c38ef2fb546841923d8142
#2 transferring context: 2B 0.0s done
#2 DONE 0.0s

#1 [internal] load build definition from Dockerfile.loadtester
#1 sha256:a9f7a7dcc9e4d7991e79968df135cc58191c608b12341b3e48dd3312e314e2af
#1 transferring dockerfile: 48B 0.1s done
#1 DONE 0.1s

#4 [internal] load metadata for docker.io/library/alpine:3.15.0
#4 sha256:9d36868e58b77074919c1f6dd8ecbf271305693dde61ddb7af9be784bdb35178
#4 ...

#5 [auth] library/bash:pull token for registry-1.docker.io
#5 sha256:282b2668273b03e80ab9d660c83c9caf4f8976c51c9a285bf730304392404e5a
#5 DONE 0.0s

#6 [auth] library/alpine:pull token for registry-1.docker.io
#6 sha256:8d0367ed2773b361cdeb9f357ad8c76f7076632674d8ce45c8d93b20c951077d
#6 DONE 0.0s

#3 [internal] load metadata for docker.io/library/bash:5.0
#3 sha256:3549d94204fc0d656b116f894371f5ae9815a7546984d2b250cc7e9366a3abeb
#3 DONE 3.4s

#4 [internal] load metadata for docker.io/library/alpine:3.15.0
#4 sha256:9d36868e58b77074919c1f6dd8ecbf271305693dde61ddb7af9be784bdb35178
#4 DONE 3.4s

#7 [stage-1  1/19] FROM docker.io/library/bash:5.0@sha256:05f48dae9fda044861cc137d50beb61e95845335924bb50214b506f1e6742464
#7 sha256:c8cec8d56563dfc2dc46deca6cc19a34f699ff9221ead66df407355241a69702
#7 DONE 0.0s

#30 [internal] load build context
#30 sha256:a5349c8651179e8832cd609a192c120fa3ffe87da96b60c2015030fe5242e27d
#30 DONE 0.0s

#13 [build 1/8] FROM docker.io/library/alpine:3.15.0@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300
#13 sha256:eee3df2db1159160ce3e4b8241dc80e280037eb56431db89e45570753190ea45
#13 DONE 0.0s

#37 [auth] bats/bats:pull token for registry-1.docker.io
#37 sha256:89e018da8bc4cd1b37a99e759d9a9e4a657396df3c5c859031a7b5db20f9382a
#37 DONE 0.0s

#10 FROM docker.io/bats/bats:v1.1.0
#10 sha256:a64482dd48ef11bfb62a6481bd69771621a33307b3a6a31403b300bcdba854c2
#10 resolve docker.io/bats/bats:v1.1.0
#10 ...

#28 https://raw.githubusercontent.com/grpc/grpc-proto/master/grpc/health/v1/health.proto
#28 sha256:00343a4aad74dbf915b5d3ce156b049f8a6e99a1ace6ead2120f9645fb915ceb
#28 DONE 0.4s

#10 FROM docker.io/bats/bats:v1.1.0
#10 sha256:a64482dd48ef11bfb62a6481bd69771621a33307b3a6a31403b300bcdba854c2
#10 resolve docker.io/bats/bats:v1.1.0 0.7s done
#10 DONE 0.7s

#30 [internal] load build context
#30 sha256:a5349c8651179e8832cd609a192c120fa3ffe87da96b60c2015030fe5242e27d
#30 transferring context: 23.04MB 0.7s done
#30 DONE 0.7s

#27 [stage-1 12/19] COPY --from=build /tmp/helm-tiller /tmp/helm-tiller
#27 sha256:58decfd0588361b8f38e6910d4de16b63c6c9d0aa3fd94a52af8110c4283f060
#27 CACHED

#31 [stage-1 14/19] COPY ./bin/loadtester .
#31 sha256:d2aa88359d60559103c570a7e4205c6d36306d9d20db47cc68b2c9e8f65df627
#31 CACHED

#9 [stage-1  3/19] WORKDIR /home/app
#9 sha256:021fe32f1bc6679c356122b1b10d9b96b4d10411ae6fbd3f500b3cbbf4641561
#9 CACHED

#26 [stage-1 11/19] COPY --from=build /usr/local/bin/grpc_health_probe /usr/local/bin/
#26 sha256:5151c098f3eec0f44a8e3eb0f8730fe16417b69967262826d4de1146f281224e
#26 CACHED

#11 [stage-1  4/19] COPY --from=bats/bats:v1.1.0 /opt/bats/ /opt/bats/
#11 sha256:2fe1e4310ae7753146666bfaed42818414c9e2f3c46b030f4c621f384b66e6b2
#11 CACHED

#23 [stage-1  8/19] COPY --from=build /usr/local/bin/tiller /usr/local/bin/
#23 sha256:c8ed7742e7b45d83cc67a5fc36da7ff33d9cde07f4104daa083126c2c877cedb
#23 CACHED

#12 [stage-1  5/19] RUN ln -s /opt/bats/bin/bats /usr/local/bin/
#12 sha256:efbe799402553c5d435e7e535b1f6bf723a460122a0583ee918021509faf7e55
#12 CACHED

#22 [stage-1  7/19] COPY --from=build /usr/local/bin/helm /usr/local/bin/
#22 sha256:312a160bc18a93d5b2c5bde1666ff1ff86e55603eaafef520fe5a15eb7d46cd7
#22 CACHED

#29 [stage-1 13/19] ADD https://raw.githubusercontent.com/grpc/grpc-proto/master/grpc/health/v1/health.proto /tmp/ghz/health.proto
#29 sha256:6a16b0e00fd207026dc9e9db01ea9a363a6b78ea8153156e081655556b53543f
#29 CACHED

#14 [build 2/8] RUN apk --no-cache add alpine-sdk perl curl
#14 sha256:0fdcaf8de57e2f341b2d0bca684cef66264255045bbd2ec7076f06b75da5e42c
#14 CACHED

#34 [stage-1 17/19] RUN hey -n 1 -c 1 https://flagger.app > /dev/null && echo $? | grep 0
#34 sha256:51c096ad9e7809b1b6c02c94e86564fdc75aa5a6c327c92f372b6f00a51f8717
#34 CACHED

#8 [stage-1  2/19] RUN addgroup -S app && adduser -S -g app app && apk --no-cache add ca-certificates curl jq libgcc wrk
#8 sha256:df8a5cf5ec1d9e559094288700eda21ebd02a50c3f1d11aba3db6415d587af18
#8 CACHED

#18 [build 6/8] RUN GRPC_HEALTH_PROBE_VERSION=v0.4.6 && wget -qO /usr/local/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 /usr/local/bin/grpc_health_probe
#18 sha256:340439a8ea2f28551e402052521e936e554676928ebd917d90877701548929e8
#18 CACHED

#32 [stage-1 15/19] RUN chown -R app:app ./
#32 sha256:e9d204eb3442cc8bbfb2ff16b2f3932d9155fc88a21128f30e08700fd19fd361
#32 CACHED

#25 [stage-1 10/19] COPY --from=build /usr/local/bin/helmv3 /usr/local/bin/
#25 sha256:408fbe358176881c39f63fdf196c464490c21ffd34c21cd7c09ef34cf72c6ead
#25 CACHED

#17 [build 5/8] RUN HELM3_VERSION=3.7.1 && curl -sSL "https://get.helm.sh/helm-v${HELM3_VERSION}-linux-amd64.tar.gz" | tar xvz && chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helmv3
#17 sha256:d5a4a11d3224be8c96a6ecf4c508b8433485c8915de11642a3e3dff57cd23c5d
#17 CACHED

#21 [stage-1  6/19] COPY --from=build /usr/local/bin/hey /usr/local/bin/
#21 sha256:720bf70c24a1691bb3fd4eec540950d5d4319da22464299573c471566fe9f9d5
#21 CACHED

#19 [build 7/8] RUN GHZ_VERSION=0.105.0 && curl -sSL "https://github.com/bojand/ghz/releases/download/v${GHZ_VERSION}/ghz-linux-x86_64.tar.gz" | tar xz -C /tmp && mv /tmp/ghz /usr/local/bin && chmod +x /usr/local/bin/ghz
#19 sha256:0a9040a65402a83bf1bc3014ca172df824767b652583959605b1acd6597d805a
#19 CACHED

#20 [build 8/8] RUN HELM_TILLER_VERSION=0.9.3 && curl -sSL "https://github.com/rimusz/helm-tiller/archive/v${HELM_TILLER_VERSION}.tar.gz" | tar xz -C /tmp && mv /tmp/helm-tiller-${HELM_TILLER_VERSION} /tmp/helm-tiller
#20 sha256:c90f76b80254a37a1e896b2d67781f8b2620b0cc4e15c768792c821833290954
#20 CACHED

#35 [stage-1 18/19] RUN wrk -d 1s -c 1 -t 1 https://flagger.app > /dev/null && echo $? | grep 0
#35 sha256:cb3638869086dae5dce709504ebe1cebf7167097ce3e9d0b32d34874b8e9edfb
#35 CACHED

#24 [stage-1  9/19] COPY --from=build /usr/local/bin/ghz /usr/local/bin/
#24 sha256:63b7340d2ae7e582b20e0542157dff92e9150f1f0529a03c755d20288520a977
#24 CACHED

#15 [build 3/8] RUN curl -sSLo hey "https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64" && chmod +x hey && mv hey /usr/local/bin/hey
#15 sha256:3f0b82d717cb13369cb903cbc5674569b0cc66a1b06beaa4bbd6e4c0d12f1b3b
#15 CACHED

#16 [build 4/8] RUN HELM2_VERSION=2.16.8 && curl -sSL "https://get.helm.sh/helm-v${HELM2_VERSION}-linux-amd64.tar.gz" | tar xvz && chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helm && chmod +x linux-amd64/tiller && mv linux-amd64/tiller /usr/local/bin/tiller
#16 sha256:c48d8d2fc2dabc6778f81dbb389a492d7b51d9dc2ac9d3afb107c30b0f74bc7f
#16 CACHED

#33 [stage-1 16/19] RUN chown -R app:app /tmp/ghz
#33 sha256:02d46da8a2c21b3ec097820033c7faebe68af646d2d9fd0cfd52dcc2e34961d1
#33 CACHED

#36 [stage-1 19/19] RUN helm init --stable-repo-url=https://charts.helm.sh/stable --client-only && helm plugin install /tmp/helm-tiller
#36 sha256:38c68e71f29ad399bb4e1cf2ffba74a92b3c2bc2cd92a9bb66303d3e23c8b8be
#36 CACHED

#38 exporting to image
#38 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
#38 exporting layers done
#38 writing image sha256:3a86ea73394fb18b2b1ae9d5706d77ca3ee2a5dc4c73c513688bab848f73614f done
#38 naming to ghcr.io/fluxcd/flagger-loadtester:0.19.0 done
#38 DONE 0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

Signed-off-by: Rajat Vig <rvig@etsy.com>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @rajatvig 🏅

@stefanprodan stefanprodan merged commit aef1d79 into fluxcd:main Dec 1, 2021
@rajatvig rajatvig deleted the UpdateLoadTester branch December 1, 2021 14:47
@rajatvig
Copy link
Contributor Author

rajatvig commented Dec 1, 2021

Is there a process to publish the new image for flagger-loadtester?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants