Created
December 15, 2017 22:07
-
-
Save ldemailly/a9dbd7545c8721b9f5536002434ebb71 to your computer and use it in GitHub Desktop.
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 characters
$ PROJECT=istio-perf2 tools/setup_perf_cluster.sh | |
tools/setup_perf_cluster.sh is Executed, (Tools in tools) (can also be sourced interactively)... | |
In case of errors, retry at the failed step (readyness checks missing) | |
Obtaining latest ubuntu xenial image name... (takes a few seconds)... | |
Creating VM_NAME=fortio-vm using VM_IMAGE=https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20171212 | |
### Running: gcloud compute instances create fortio-vm --project istio-perf2 --zone us-east4-b --machine-type n1-highcpu-2 --image https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20171212 | |
Created [https://www.googleapis.com/compute/v1/projects/istio-perf2/zones/us-east4-b/instances/fortio-vm]. | |
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS | |
fortio-vm us-east4-b n1-highcpu-2 10.150.0.2 35.194.72.246 RUNNING | |
Updates are available for some Cloud SDK components. To install them, | |
please run: | |
$ gcloud components update | |
Waiting a bit for the VM to come up... | |
### Running: gcloud compute instances add-tags fortio-vm --project istio-perf2 --zone us-east4-b --tags http-server,allow-8080 | |
Updated [https://www.googleapis.com/compute/v1/projects/istio-perf2/zones/us-east4-b/instances/fortio-vm]. | |
*** Remote run: "(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.8-go && mv .bashrc .bashrc.orig && (echo "export PATH=/usr/lib/go-1.8/bin:\$PATH:~/go/bin"; cat .bashrc.orig) > ~/.bashrc ) < /dev/null" | |
### Running: gcloud compute ssh fortio-vm --project istio-perf2 --zone us-east4-b --command (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.8-go && mv .bashrc .bashrc.orig && (echo "export PATH=/usr/lib/go-1.8/bin:\$PATH:~/go/bin"; cat .bashrc.orig) > ~/.bashrc ) < /dev/null | |
Updating project ssh metadata... | |
................Updated [https://www.googleapis.com/compute/v1/projects/istio-perf2]. | |
done. | |
Waiting for SSH key to propagate. | |
Warning: Permanently added 'compute.1566299881299638939' (ECDSA) to the list of known hosts. | |
gpg: keyring `/tmp/tmp96a83q3j/secring.gpg' created | |
gpg: keyring `/tmp/tmp96a83q3j/pubring.gpg' created | |
gpg: requesting key 9AD198E9 from hkp server keyserver.ubuntu.com | |
gpg: /tmp/tmp96a83q3j/trustdb.gpg: trustdb created | |
gpg: key 9AD198E9: public key "Launchpad PPA for The Go Language Gophers" imported | |
gpg: Total number processed: 1 | |
gpg: imported: 1 (RSA: 1) | |
Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
Calculating upgrade... | |
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
The following additional packages will be installed: | |
golang-1.8-src | |
Suggested packages: | |
bzr mercurial subversion | |
Recommended packages: | |
g++ gcc golang-1.8-race-detector-runtime libc6-dev pkg-config | |
The following NEW packages will be installed: | |
golang-1.8-go golang-1.8-src | |
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | |
Need to get 30.5 MB of archives. | |
After this operation, 166 MB of additional disk space will be used. | |
Get:1 http://ppa.launchpad.net/gophers/archive/ubuntu xenial/main amd64 golang-1.8-src amd64 1.8.3-0ubuntu1~ppa0~ubuntu16.04.1 [8,152 kB] | |
Get:2 http://ppa.launchpad.net/gophers/archive/ubuntu xenial/main amd64 golang-1.8-go amd64 1.8.3-0ubuntu1~ppa0~ubuntu16.04.1 [22.3 MB] | |
debconf: unable to initialize frontend: Dialog | |
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) | |
debconf: falling back to frontend: Readline | |
debconf: unable to initialize frontend: Readline | |
debconf: (This frontend requires a controlling tty.) | |
debconf: falling back to frontend: Teletype | |
dpkg-preconfigure: unable to re-open stdin: | |
Fetched 30.5 MB in 42s (717 kB/s) | |
Selecting previously unselected package golang-1.8-src. | |
(Reading database ... 67782 files and directories currently installed.) | |
Preparing to unpack .../golang-1.8-src_1.8.3-0ubuntu1~ppa0~ubuntu16.04.1_amd64.deb ... | |
Unpacking golang-1.8-src (1.8.3-0ubuntu1~ppa0~ubuntu16.04.1) ... | |
Selecting previously unselected package golang-1.8-go. | |
Preparing to unpack .../golang-1.8-go_1.8.3-0ubuntu1~ppa0~ubuntu16.04.1_amd64.deb ... | |
Unpacking golang-1.8-go (1.8.3-0ubuntu1~ppa0~ubuntu16.04.1) ... | |
Setting up golang-1.8-src (1.8.3-0ubuntu1~ppa0~ubuntu16.04.1) ... | |
Setting up golang-1.8-go (1.8.3-0ubuntu1~ppa0~ubuntu16.04.1) ... | |
### Running: gcloud compute --project=istio-perf2 firewall-rules create default-allow-http --network=default --action=ALLOW --rules=tcp:80 --source-ranges=0.0.0.0/0 --target-tags=http-server | |
Creating firewall... | |
...........Created [https://www.googleapis.com/compute/v1/projects/istio-perf2/global/firewalls/default-allow-http]. | |
done. | |
NAME NETWORK DIRECTION PRIORITY ALLOW DENY | |
default-allow-http default INGRESS 1000 tcp:80 | |
### Running: gcloud compute --project istio-perf2 firewall-rules create allow-8080 --direction=INGRESS --action=ALLOW --rules=tcp:8080 --target-tags=port8080 | |
Creating firewall... | |
...........Created [https://www.googleapis.com/compute/v1/projects/istio-perf2/global/firewalls/allow-8080]. | |
done. | |
NAME NETWORK DIRECTION PRIORITY ALLOW DENY | |
allow-8080 default INGRESS 1000 tcp:8080 | |
*** Remote run: "go get -u istio.io/fortio && sudo setcap cap_net_bind_service=+ep `which fortio`" | |
### Running: gcloud compute ssh fortio-vm --project istio-perf2 --zone us-east4-b --command go get -u istio.io/fortio && sudo setcap cap_net_bind_service=+ep `which fortio` | |
*** Remote run: "pkill fortio; nohup fortio server -http-port 80 > ~/fortio.log 2>&1 &" | |
### Running: gcloud compute ssh fortio-vm --project istio-perf2 --zone us-east4-b --command pkill fortio; nohup fortio server -http-port 80 > ~/fortio.log 2>&1 & | |
Setting up CLUSTER_NAME=istio-perf for PROJECT=istio-perf2 in ZONE=us-east4-b, NUM_NODES=6 * MACHINE_TYPE=n1-highcpu-2 | |
### Running: gcloud container clusters create istio-perf --project istio-perf2 --zone us-east4-b --machine-type=n1-highcpu-2 --num-nodes=6 --no-enable-legacy-authorization | |
Creating cluster istio-perf... | |
.................................................................................................................................................................................................done. | |
Created [https://container.googleapis.com/v1/projects/istio-perf2/zones/us-east4-b/clusters/istio-perf]. | |
kubeconfig entry generated for istio-perf. | |
NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS | |
istio-perf us-east4-b 1.7.8-gke.0 35.188.239.52 n1-highcpu-2 1.7.8-gke.0 6 RUNNING | |
### Running: gcloud container clusters get-credentials istio-perf --project istio-perf2 --zone us-east4-b | |
Fetching cluster endpoint and auth data. | |
kubeconfig entry generated for istio-perf. | |
### Running: kubectl create namespace fortio | |
namespace "fortio" created | |
### Running: kubectl -n fortio run fortio1 --image=istio/fortio --port=8080 | |
deployment "fortio1" created | |
### Running: kubectl -n fortio expose deployment fortio1 --target-port=8080 --type=LoadBalancer | |
service "fortio1" exposed | |
### Running: kubectl -n fortio run fortio2 --image=istio/fortio --port=8080 | |
deployment "fortio2" created | |
### Running: kubectl -n fortio expose deployment fortio2 --target-port=8080 | |
service "fortio2" exposed | |
ingress "fortio-ingress" created | |
### Running: sh -c sed -e "s/_debug//g" install/kubernetes/istio-auth.yaml | egrep -v -e "- (-v|\"2\")" | kubectl apply -f - | |
namespace "istio-system" created | |
clusterrole "istio-pilot-istio-system" created | |
clusterrole "istio-initializer-istio-system" created | |
clusterrole "istio-mixer-istio-system" created | |
clusterrole "istio-ca-istio-system" created | |
clusterrole "istio-sidecar-istio-system" created | |
clusterrolebinding "istio-pilot-admin-role-binding-istio-system" created | |
clusterrolebinding "istio-initializer-admin-role-binding-istio-system" created | |
clusterrolebinding "istio-ca-role-binding-istio-system" created | |
clusterrolebinding "istio-ingress-admin-role-binding-istio-system" created | |
clusterrolebinding "istio-sidecar-role-binding-istio-system" created | |
clusterrolebinding "istio-mixer-admin-role-binding-istio-system" created | |
configmap "istio-mixer" created | |
service "istio-mixer" created | |
serviceaccount "istio-mixer-service-account" created | |
deployment "istio-mixer" created | |
customresourcedefinition "rules.config.istio.io" created | |
customresourcedefinition "attributemanifests.config.istio.io" created | |
customresourcedefinition "deniers.config.istio.io" created | |
customresourcedefinition "listcheckers.config.istio.io" created | |
customresourcedefinition "kuberneteses.config.istio.io" created | |
customresourcedefinition "kubernetesenvs.config.istio.io" created | |
customresourcedefinition "memquotas.config.istio.io" created | |
customresourcedefinition "noops.config.istio.io" created | |
customresourcedefinition "prometheuses.config.istio.io" created | |
customresourcedefinition "stackdrivers.config.istio.io" created | |
customresourcedefinition "statsds.config.istio.io" created | |
customresourcedefinition "stdios.config.istio.io" created | |
customresourcedefinition "servicecontrols.config.istio.io" created | |
customresourcedefinition "checknothings.config.istio.io" created | |
customresourcedefinition "listentries.config.istio.io" created | |
customresourcedefinition "logentries.config.istio.io" created | |
customresourcedefinition "metrics.config.istio.io" created | |
customresourcedefinition "quotas.config.istio.io" created | |
customresourcedefinition "reportnothings.config.istio.io" created | |
attributemanifest "istioproxy" created | |
attributemanifest "kubernetes" created | |
stdio "handler" created | |
logentry "accesslog" created | |
rule "stdio" created | |
metric "requestcount" created | |
metric "requestduration" created | |
metric "requestsize" created | |
metric "responsesize" created | |
metric "tcpbytesent" created | |
metric "tcpbytereceived" created | |
prometheus "handler" created | |
rule "promhttp" created | |
rule "promtcp" created | |
kubernetesenv "handler" created | |
rule "kubeattrgenrulerule" created | |
kubernetes "attributes" created | |
configmap "istio" created | |
customresourcedefinition "destinationpolicies.config.istio.io" created | |
customresourcedefinition "egressrules.config.istio.io" created | |
customresourcedefinition "routerules.config.istio.io" created | |
service "istio-pilot" created | |
serviceaccount "istio-pilot-service-account" created | |
deployment "istio-pilot" created | |
service "istio-ingress" created | |
serviceaccount "istio-ingress-service-account" created | |
deployment "istio-ingress" created | |
serviceaccount "istio-ca-service-account" created | |
deployment "istio-ca" created | |
### Running: kubectl create namespace istio | |
namespace "istio" created | |
### Running: sh -c istioctl kube-inject --debug=false -n istio -f tools/perf_k8svcs.yaml > tools/perf_k8svcs_istio.yaml | |
### Running: kubectl apply -n istio -f tools/perf_k8svcs_istio.yaml | |
service "echosrv1" created | |
deployment "echo-svc-deployment1" created | |
service "echosrv2" created | |
deployment "echo-svc-deployment2" created | |
ingress "istio-ingress" created | |
### Running: istioctl create -n istio -f tools/perf_istio_rules.yaml | |
Created config route-rule/istio/fortio1-redir at revision 857 | |
Created config route-rule/istio/fortio2-redir at revision 858 | |
### Running: gcloud compute --project=istio-perf2 firewall-rules create default-allow-http --network=default --action=ALLOW --rules=tcp:80 --source-ranges=0.0.0.0/0 --target-tags=http-server | |
Creating firewall... | |
failed. | |
ERROR: (gcloud.compute.firewall-rules.create) Could not fetch resource: | |
- The resource 'projects/istio-perf2/global/firewalls/default-allow-http' already exists | |
### Running: gcloud compute --project istio-perf2 firewall-rules create allow-8080 --direction=INGRESS --action=ALLOW --rules=tcp:8080 --target-tags=port8080 | |
Creating firewall... | |
failed. | |
ERROR: (gcloud.compute.firewall-rules.create) Could not fetch resource: | |
- The resource 'projects/istio-perf2/global/firewalls/allow-8080' already exists | |
+++ VM Ip is 35.194.72.246 - visit http://35.194.72.246/fortio/ | |
+++ In k8s fortio external ip: http://:8080/fortio/ | |
+++ In k8s non istio ingress: http:///fortio/ | |
+++ In k8s istio ingress: http:///fortio1/fortio/ and fortio2 | |
Using default loadbalancer, no istio: | |
### Running: curl http://35.194.72.246/fortio/?json=on&qps=-1&t=30s&c=48&load=Start&url=http://:8080/echo | |
Aborting because unable to create client 0 for http://:8080/echo | |
Using default ingress, no istio: | |
### Running: curl http://35.194.72.246/fortio/?json=on&qps=-1&t=30s&c=48&load=Start&url=http:///echo | |
Aborting because unable to create client 0 for http:///echo | |
Using istio ingress: | |
### Running: curl http://35.194.72.246/fortio/?json=on&qps=-1&t=30s&c=48&load=Start&url=http:///fortio1/echo | |
Aborting because unable to create client 0 for http:///fortio1/echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment