Created
July 9, 2019 14:02
-
-
Save mhausenblas/ab076a34343d1fcfed77326a690c99e2 to your computer and use it in GitHub Desktop.
Revisions
-
mhausenblas created this gist
Jul 9, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash ################################################################################ # Generate load for the NGINXs services in ECS nginxurls=$(ecs-cli ps --desired-status RUNNING | grep nginx | awk '{ split($3, url, "-") ; print(url[1]) }') while true do printf "Hit " for nginxurl in $nginxurls do curl -s $nginxurl > /dev/null printf "$nginxurl " done printf "\n" sleep 2 done This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/bin/bash ################################################################################ # Generate load for the NGINXs services in EKS # make sure to patch to LB kubectl patch svc nginx -p '{"spec": {"type": "LoadBalancer"}}' # give the LB 3 minutes to be up and running echo "Now waiting for 3min until the load balancer is up ..." sleep 180 echo "Starting to hammer the load balancer:" nginxurl=$(kubectl get svc/nginx -o json | jq .status.loadBalancer.ingress[].hostname -r) while true do printf "Hit " curl -s $nginxurl > /dev/null printf "$nginxurl " printf "\n" sleep 2 done