-
Notifications
You must be signed in to change notification settings - Fork 8.3k
perf setup update: add grafana, misc fixes #5028
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
Changes from all commits
e823105
38779eb
dfcc7d6
5ac4115
1fb0e08
55124db
079eef3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,8 @@ kind: Service | |
| metadata: | ||
| name: grafana | ||
| namespace: {ISTIO_NAMESPACE} | ||
| annotations: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: this is the wrong place to edit the templates.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes I know, I commented in #5091 - added the other one above, thanks for the pointer
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. This sounds reasonable. We desperately need to untangle this mess. |
||
| auth.istio.io/3000: NONE | ||
| spec: | ||
| ports: | ||
| - port: 3000 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,6 @@ else | |
| fi | ||
| fi | ||
|
|
||
|
|
||
| function update_gcp_opts() { | ||
| export GCP_OPTS="--project $PROJECT --zone $ZONE" | ||
| } | ||
|
|
@@ -101,7 +100,7 @@ function run_on_vm() { | |
|
|
||
| function setup_vm() { | ||
| Execute gcloud compute instances add-tags $VM_NAME $GCP_OPTS --tags https-server | ||
| run_on_vm '(sudo add-apt-repository ppa:gophers/archive > /dev/null && sudo apt-get update > /dev/null && sudo apt-get upgrade --no-install-recommends -y && sudo apt-get install --no-install-recommends -y golang-1.9-go make && mv .bashrc .bashrc.orig && (echo "export PATH=/usr/lib/go-1.9/bin:\$PATH:~/go/bin"; cat .bashrc.orig) > ~/.bashrc ) < /dev/null' | ||
| run_on_vm '(sudo add-apt-repository ppa:gophers/archive > /dev/null && sudo apt-get update > /dev/null && sudo apt-get upgrade --no-install-recommends -y && sudo apt-get install --no-install-recommends -y golang-1.10-go make && mv .bashrc .bashrc.orig && (echo "export PATH=/usr/lib/go-1.9/bin:\$PATH:~/go/bin"; cat .bashrc.orig) > ~/.bashrc ) < /dev/null' | ||
| } | ||
|
|
||
| function setup_vm_firewall() { | ||
|
|
@@ -113,7 +112,7 @@ function delete_vm_firewall() { | |
| } | ||
|
|
||
| function update_fortio_on_vm() { | ||
| run_on_vm 'go get istio.io/fortio && cd go/src/istio.io/fortio && git fetch && git checkout latest_release && go build -o ~/go/bin/fortio -ldflags "-X istio.io/fortio/version.tag=$(git describe --tag --match v\*) -X istio.io/fortio/version.buildInfo=$(git rev-parse HEAD)" . && sudo setcap 'cap_net_bind_service=+ep' `which fortio` && fortio version' | ||
| run_on_vm 'go get istio.io/fortio && cd go/src/istio.io/fortio && git fetch --tags && git checkout latest_release && make submodule-sync && go build -o ~/go/bin/fortio -ldflags "-X istio.io/fortio/version.tag=$(git describe --tag --match v\*) -X istio.io/fortio/version.buildInfo=$(git rev-parse HEAD)" . && sudo setcap 'cap_net_bind_service=+ep' `which fortio` && fortio version' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make submodule-sync ??? I thought this is no longer needed.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is, on fortio I restored this that got broken by the global remove of "submodule-sync" |
||
| } | ||
|
|
||
| function run_fortio_on_vm() { | ||
|
|
@@ -134,6 +133,12 @@ function install_istio() { | |
| Execute sh -c 'sed -e "s/_debug//g" install/kubernetes/istio-auth.yaml | egrep -v -e "- (-v|\"2\")" | kubectl apply -f -' | ||
| } | ||
|
|
||
| function install_istio_addons() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function isn't called, are you sure you meant to add it?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes that's the wip part, I will add it to setup all but need to manually test first, if you have time you could get that branch and give it a shot
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed now |
||
| # Starting in 0.8, prometheus is already in istio-auth.yaml | ||
| # Execute sh -c 'kubectl apply -f install/kubernetes/addons/prometheus.yaml' | ||
| Execute sh -c 'kubectl apply -f install/kubernetes/addons/grafana.yaml' | ||
| } | ||
|
|
||
| # assumes run from istio/ (or release) directory | ||
| function delete_istio() { | ||
| # Use the non debug ingress and remove the -v "2" | ||
|
|
@@ -180,6 +185,33 @@ function get_fortio_k8s_ip() { | |
| echo "+++ In k8s fortio external ip: http://$FORTIO_K8S_IP:8080/fortio/" | ||
| } | ||
|
|
||
| function setup_istio_addons_ingress() { | ||
| cat <<_EOF_ | kubectl apply -n istio-system -f - | ||
| apiVersion: extensions/v1beta1 | ||
| kind: Ingress | ||
| metadata: | ||
| annotations: | ||
| kubernetes.io/ingress.class: istio | ||
| name: istio-ingress | ||
| spec: | ||
| rules: | ||
| - http: | ||
| paths: | ||
| - path: /d/.* | ||
| backend: | ||
| serviceName: grafana | ||
| servicePort: http | ||
| - path: /public/.* | ||
| backend: | ||
| serviceName: grafana | ||
| servicePort: http | ||
| - path: /api/.* | ||
| backend: | ||
| serviceName: grafana | ||
| servicePort: http | ||
| _EOF_ | ||
| } | ||
|
|
||
| # Doesn't work somehow... | ||
| function setup_non_istio_ingress2() { | ||
| cat <<_EOF_ | kubectl apply -n fortio -f - | ||
|
|
@@ -239,13 +271,20 @@ function get_istio_ingress_ip() { | |
| done | ||
|
|
||
| echo "+++ In k8s istio ingress: http://$ISTIO_INGRESS_IP/fortio1/fortio/ and fortio2" | ||
| echo "+++ In k8s grafana: http://$ISTIO_INGRESS_IP/d/1/" | ||
| } | ||
|
|
||
| # Set default QPS to max qps | ||
| if [[ $QPS == "" ]]; then | ||
| if [ -z ${QPS+x} ] || [ $QPS == "" ]; then | ||
| echo "Setting default qps" | ||
| QPS=-1 | ||
| fi | ||
|
|
||
|
|
||
| # Set default run duration to 30s | ||
| if [ -z ${DUR+x} ] || [ $DUR == "" ]; then | ||
| DUR="30s" | ||
| fi | ||
|
|
||
| function get_istio_version() { | ||
| kubectl describe pods -n istio|grep /proxy:|head -1 | awk -F: '{print $3}' | ||
| } | ||
|
|
@@ -279,32 +318,32 @@ function label_escape() { | |
|
|
||
| function run_fortio_test1() { | ||
| echo "Using default loadbalancer, no istio:" | ||
| Execute curl "$VM_URL?json=on&save=on&qps=$QPS&t=30s&c=48&load=Start&url=http://$FORTIO_K8S_IP:8080/echo" | ||
| Execute curl "$VM_URL?json=on&save=on&qps=$QPS&t=$DUR&c=48&load=Start&url=http://$FORTIO_K8S_IP:8080/echo" | ||
| } | ||
| function run_fortio_test2() { | ||
| echo "Using default ingress, no istio:" | ||
| Execute curl "$VM_URL?json=on&save=on&qps=$QPS&t=30s&c=48&load=Start&url=http://$K8S_INGRESS_IP/echo" | ||
| Execute curl "$VM_URL?json=on&save=on&qps=$QPS&t=$DUR&c=48&load=Start&url=http://$K8S_INGRESS_IP/echo" | ||
| } | ||
|
|
||
| function run_fortio_test_istio_ingress1() { | ||
| get_json_file_name "ingress to s1" | ||
| echo "Using istio ingress to fortio1, saving to $FNAME" | ||
| ExecuteEval curl -s "$VM_URL?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=30s\&c=48\&load=Start\&url=http://$ISTIO_INGRESS_IP/fortio1/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| ExecuteEval curl -s "$VM_URL?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=$DUR\&c=48\&load=Start\&url=http://$ISTIO_INGRESS_IP/fortio1/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| } | ||
| function run_fortio_test_istio_ingress2() { | ||
| get_json_file_name "ingress to s2" | ||
| echo "Using istio ingress to fortio2, saving to $FNAME" | ||
| ExecuteEval curl -s "$VM_URL?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=30s\&c=48\&load=Start\&url=http://$ISTIO_INGRESS_IP/fortio2/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| ExecuteEval curl -s "$VM_URL?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=$DUR\&c=48\&load=Start\&url=http://$ISTIO_INGRESS_IP/fortio2/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| } | ||
| function run_fortio_test_istio_1_2() { | ||
| get_json_file_name "s1 to s2" | ||
| echo "Using istio f1 to f2, saving to $FNAME" | ||
| ExecuteEval curl -s "http://$ISTIO_INGRESS_IP/fortio1/fortio/?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=30s\&c=48\&load=Start\&url=http://echosrv2:8080/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| ExecuteEval curl -s "http://$ISTIO_INGRESS_IP/fortio1/fortio/?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=$DUR\&c=48\&load=Start\&url=http://echosrv2:8080/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| } | ||
| function run_fortio_test_istio_2_1() { | ||
| get_json_file_name "s2 to s1" | ||
| echo "Using istio f2 to f1, saving to $FNAME" | ||
| ExecuteEval curl -s "http://$ISTIO_INGRESS_IP/fortio2/fortio/?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=30s\&c=48\&load=Start\&url=http://echosrv1:8080/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| ExecuteEval curl -s "http://$ISTIO_INGRESS_IP/fortio2/fortio/?labels=$LABELS\&json=on\&save=on\&qps=$QPS\&t=$DUR\&c=48\&load=Start\&url=http://echosrv1:8080/echo" \| tee $FNAME.json \| grep ActualQPS | ||
| } | ||
|
|
||
| # Run canonical perf tests. | ||
|
|
@@ -410,6 +449,8 @@ function setup_istio_all() { | |
| install_istio_svc | ||
| install_istio_ingress_rules | ||
| install_istio_cache_busting_rule | ||
| install_istio_addons | ||
| setup_istio_addons_ingress | ||
| } | ||
|
|
||
| function setup_cluster_all() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@douglas-reid : here, PTAL