Skip to content
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

[wiki]How to set up test environment #94

Closed
sonyafenge opened this issue Jul 20, 2022 · 1 comment
Closed

[wiki]How to set up test environment #94

sonyafenge opened this issue Jul 20, 2022 · 1 comment

Comments

@sonyafenge
Copy link
Collaborator

sonyafenge commented Jul 20, 2022

Pre-rerequisites: GCP config

  1. run "gcloud version" to ensure your Google Cloud SDK is updated (suggested Google Cloud SDK 298.0.0 and up), Please refer to https://cloud.google.com/sdk/docs/downloads-apt-get or https://cloud.google.com/sdk/docs/downloads-versioned-archives to upgrade your google cloud SDK

Pre-rerequisites: build prepare

git clone https://github.com/CentaurusInfra/global-resource-service.git
cd global-resource-service

setup test env

if there is only one zone for server or simulator or client, only support zone us-central1-a per limitation of managed instance group image

export GRS_INSTANCE_PREFIX=[yourname]-grs
export SIM_NUM=5 CLIENT_NUM=3 SERVER_NUM=1 
export SERVER_ZONE=us-central1-a   
export SIM_ZONE=us-central1-a,us-west1-c,us-west2-a,us-west4-a,us-west3-c
export CLIENT_ZONE=us-west3-b,us-east4-b,us-west2-c
./hack/test-setup.sh

teardown test env

./hack/test-teardown.sh

Notets

  1. By default, this script is using machine: sonya-grs-test-template as client image; machine: sonya-grs-resourcemanagement as server image. Any update for git or config, please follow the steps below:

run the command below, which will delete all existing image and regenerate image, and then run ./hack/test-setup.sh

Please ensure the source image machine is stopped before regenerate image, otherwise, template image will fail to create.

export SERVERIMAGE_AUTO_DELETE=true SIMIMAGE_AUTO_DELETE=true CLIENTIMAGE_AUTO_DELETE=true
./hack/test-teardown.sh
  1. if the number of zone for any of SIM, CLIENT, SERVER equal to 1, only supports "us-central1-a" per limit of source image machine zone.
@yb01
Copy link
Collaborator

yb01 commented Aug 8, 2022

in md doc

@yb01 yb01 closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants