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

Add dottrace output as artifact in factory #1063

Closed
alouvion-aneo opened this issue May 5, 2023 · 0 comments
Closed

Add dottrace output as artifact in factory #1063

alouvion-aneo opened this issue May 5, 2023 · 0 comments
Assignees
Milestone

Comments

@alouvion-aneo
Copy link
Contributor

Idea :

is to be able to generate a dottrace result during the build
so if you improve some part of code you can check in the dottrace result before and after to check if you suceed
ex : before / after result
image

how to :

in 2 words :
deploy new docker images with dottrace
update infra to allow disk share + use of new images

Docker :

RUN dotnet tool install --version 2023.1.0-eap10 --global JetBrains.dotTrace.GlobalTools
ENTRYPOINT ["/bin/sh", "-c"]
#CMD ["/.dotnet/tools/dottrace start --framework=NetCore --profiling-type=Sampling --service-input=/data/file.txt --save-to=/data/polling_snapshot.dtp /usr/bin/dotnet ./ArmoniK.Core.Compute.PollingAgent.dll"]
CMD ["
/.dotnet/tools/dottrace start --framework=NetCore --profiling-type=Tracing --service-input=/data/polling_input.txt --save-to=/data/polling_snapshot.dtp /usr/bin/dotnet ./ArmoniK.Core.Compute.PollingAgent.dll"]

infra :

in module armonik computeplane.tf : data drive read_only = true => false
fix pod to 1 (min&max)

scripts :

scripts to build launch etc :
onglets dottrace
#Build Worker
export armonikenv="v2.12"
cd /mnt/c/sources/armonik/$armonikenv/ArmoniK.Extensions.Csharp
docker build -t armonik_worker_dll:dottrace --network host --no-cache -f ./Worker/src/DLLWorker/Dockerfile .

#Build polling dottrace
export armonikenv="v2.12"
cd /mnt/c/sources/armonik/$armonikenv/ArmoniK.Core
docker build -t armonik_pollingagent:dottrace --network host -f Compute/PollingAgent/src/DockerfileDotTrace .
docker build -t armonik_pollingagent:perf --network host -f Compute/PollingAgent/src/Dockerfile .

#Build polling dottrace orig
export armonikenv="v2.12_orig"
cd /mnt/c/sources/armonik/$armonikenv/ArmoniK.Core
docker build -t armonik_pollingagent:dottrace_orig --network host -f Compute/PollingAgent/src/DockerfileDotTrace .

#Dottrace polling
dottrace help service-messages
export armonikenv="v2.12"
cd /mnt/c/sources/armonik/$armonikenv/ArmoniK/infrastructure/quick-deploy/localhost/all/data
echo "##dotTrace["get-snapshot"]" >> polling_input.txt

#Dottrace worker
dottrace help service-messages
cd /mnt/c/sources/armonik/$armonikenv/ArmoniK/infrastructure/quick-deploy/localhost/all/data
echo "##dotTrace["get-snapshot"]" >> worker_input.txt

#Zip build
export armonikenv="v2.12"
cd /mnt/c/sources/armonik/$armonikenv/ArmoniK.Extensions.Csharp/Tests
./endToEndTests.sh
cp /mnt/c/sources/armonik/$armonikenv/ArmoniK.Extensions.Csharp/Tests/ArmoniK.EndToEndTests/packages/ArmoniK.EndToEndTests.Worker-v1.0.0-700.zip /mnt/c/sources/armonik/$armonikenv/ArmoniK/infrastructure/quick-deploy/localhost/all/data/
kubectl delete pods -n armonik -l=service=compute-plane

launch perf run :

CPIP=$(kubectl get svc ingress -n armonik -o jsonpath="{.status.loadBalancer.ingress[0]."ip"}")
CPHOST=$(kubectl get svc ingress -n armonik -o jsonpath="{.status.loadBalancer.ingress[0]."hostname"}")
export CPIP=${CPHOST:-$CPIP}
export CPPort=$(kubectl get svc ingress -n armonik -o custom-columns="PORT:.spec.ports[1].port" --no-headers=true || echo "failure")
export Grpc__Endpoint=http://$CPIP:$CPPort
docker run --rm -e GrpcClient__Endpoint=$Grpc__Endpoint -e HtcMock__NTasks=100 -e HtcMock__TotalCalculationTime=00:00:00.001 -e HtcMock__DataSize=1 -e HtcMock__MemorySize=1 -e HtcMock__SubTasksLevels=5 -e HtcMock__EnableUseLowMem=true -e HtcMock__EnableSmallOutput=true -e HtcMock__EnableFastCompute=true -e HtcMock__Partition=htcmock dockerhubaneo/armonik_core_htcmock_test_client:latest

#force set polling agent image :
export imagename=dockerhubaneo/armonik_pollingagent:0.12.2
export imagename=armonik_pollingagent:dottrace
export imagename=armonik_pollingagent:dottrace_orig
export imagename=armonik_pollingagent:perf
kubectl set image -n armonik deployment compute-plane-default polling-agent=$imagename
kubectl delete pods -n armonik -l=service=compute-plane

@alouvion-aneo alouvion-aneo added this to the v2.14.0 milestone May 5, 2023
@alouvion-aneo alouvion-aneo self-assigned this May 5, 2023
@alouvion-aneo alouvion-aneo changed the title add dottrace output as artifact add dottrace output as artifact in factory May 5, 2023
@alouvion-aneo alouvion-aneo changed the title add dottrace output as artifact in factory Add dottrace output as artifact in factory May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants