Created
November 10, 2015 00:03
-
-
Save karlkfi/0e3170dff4e5d6e9e951 to your computer and use it in GitHub Desktop.
Populate Oinker with oinks
This file contains 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 characters
#!/usr/bin/env bash | |
set -e | |
set -o nounset | |
KUBE_UI=$(dcos kubectl cluster-info | grep "KubeUI" | cut -d " " -f 5 | sed -e 's,/api,/service/kubernetes/api,') | |
KUBE_UI=$(echo $KUBE_UI | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g') | |
#echo $KUBE_UI | |
OINKER=$(echo $KUBE_UI | sed -e 's/kube-system/default/' | sed -e 's/kube-ui/oinker/') | |
#echo $OINKER | |
for i in $(seq 1 50); do | |
data="handle=MrNumber$(($i % 5))&content=yadda-yadda-yadda-${i}" | |
echo "POST: ${data}" | |
wget -O- \ | |
--post-data="${data}" \ | |
"${OINKER}/oink" &> /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assumes you have Oinker deployed on Kubernetes on Mesos in DCOS.
Assumes dcos-cli is already installed and the kubectl plugin is available.