项目作者: shopsys

项目描述 :
Internal scripts for managing GCP instance of SSFW ready for stress testing
高级语言: Shell
项目地址: git://github.com/shopsys/gcp-ssfw-deployer.git
创建时间: 2019-09-24T06:38:48Z
项目社区:https://github.com/shopsys/gcp-ssfw-deployer

开源协议:MIT License

下载


GCP SSFW Deployer

Internal package. Designed to automated deploying scalable ecommerce platform Shopsys Framework (SSFW) into Google Cloud Platform (GCP) for performance and stress tests.

There are scripts for easy managing GCP. Those scripts enables you to:

  • create a single virtual machine and run SSFW via docker-compose (load huge amount of data are loaded into SSFW and set production environment)
  • delete whole instance on GCP

Usage

Deploying a new instance

  1. docker run \
  2. -e PROJECT_ID \
  3. -e GOOGLE_CLOUD_ZONE \
  4. -e INSTANCE_NAME \
  5. -e SERVICE_ACCOUNT_LOGIN \
  6. -e GIT_BRANCH \
  7. -e BUILD_NUMBER \
  8. -v <<path/to/your/srvice-account.json>>:/tmp/infrastructure/google-cloud/service-account.json \
  9. -v "${WORKSPACE}/build-${BUILD_NUMBER}/":"/code/build-${BUILD_NUMBER}/" \
  10. -v "${WORKSPACE}/src":/src \
  11. --rm \
  12. google/cloud-sdk:slim \
  13. /src/deployer.sh

ENV variable explanation:

  • PROJECT_ID - Google Cloud Project ID
  • GOOGLE_CLOUD_ZONE - Google Cloud Zone
  • INSTANCE_NAME - VM instance name in Google Cloud (it is recommended to be unique to prevent conflicts)
  • SERVICE_ACCOUNT_LOGIN - Google Cloud service account username
  • GIT_BRANCH - Specify the branch you want to put under the stress
  • BUILD_NUMBER - Number of current build
  • WORKSPACE - Current workdir

Removing an existing instance

  1. docker run \
  2. -e PROJECT_ID \
  3. -e GOOGLE_CLOUD_ZONE \
  4. -e INSTANCE_NAME \
  5. -v <<path/to/your/srvice-account.json>>:/tmp/infrastructure/google-cloud/service-account.json \
  6. -v "${WORKSPACE}/src":/src \
  7. --rm \
  8. google/cloud-sdk:slim \
  9. /src/destroyer.sh