kubectl
. We will be doing that later)You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions here
Install Docker. Instructions here
Install Google Cloud SDK. Instructions here. This installs the gcloud
tool
Install kubectl
, Kubernetes command line tool using gcloud
. i.e
$ gcloud components update kubectl
You cannot perform this action because this Cloud SDK installation is managed by an external package manager. If you would like to get the latest version, please see our main download page at: https://developers.google.com/cloud/sdk/ ERROR: (gcloud.components.update) The component manager is disabled for this installation
-- If so, you will have to manually install Cloud SDK by doing the following
$ # The following installs latest Cloud SDK and updates the PATH $ # (Accept the default values when prompted) $ curl https://sdk.cloud.google.com | bash $ exec -l $SHELL $ # Set the defaults. Pick the default GCE credentials when prompted (The service account $ # name will have a name similar to: "xxx-compute@developer.gserviceaccount.com") $ gcloud init
Install Google python client apis:
‘$ sudo pip install --upgrade google-api-python-client’
$ sudo apt-get install python-pip
(or $ easy_install -U pip
) if you do not have pipInstall the requests
Python package if you don’t have it already by doing sudo pip install requests
. More details regarding requests
package are here
Set the gcloud
defaults: See the instructions here under "Set gcloud defaults" section)
kubectl
command to use. I.e $ gcloud container clusters get-credentials CLUSTER_NAME
The stress tests are launched by the following script (path is relative to GRPC root directory) : tools/run_tests/stress_test/run_stress_tests_on_gke.py
You can find out more details by using the --help
flag.
<grpc_root_dir>$ tools/run_tests/stress_test/run_on_gke.py --help
Example
$ # Change to the grpc root directory $ cd $GRPC_ROOT $ tools/run_tests/stress_test/run_on_gke.py --project_id=sree-gce --config_file=tools/run_tests/stress_test/configs/opt.json
The above runs the stress test on GKE under the project
sree-gce
in the default cluster (that you set bygcloud
command earlier). The test settings (like number of client instances, servers, the parmeters to pass, test cases etc) are all loaded from the config file$GRPC_ROOT/tools/run_tests/stress_test/opt.json