Quick Start

1. Deploy SDK Server

1.1 Golang command

  • It is necessary to install Golang v1.13 or higher, users can refer to this link to install Golang (opens new window)

  • Under the project root directoryv-cloud-merchant, run go mod tidy to install the dependency.

  • If users aren't able to download the libraries due to network problems, see solutions below:

    • Linux
    # Activate Go Modules feature
    go env -w GO111MODULE=on
    # Configure GOPROXY environment variable, choose one of the following three methods
    
    # 1. Qiniu CDN
    go env -w  GOPROXY=https://goproxy.cn,direct
    
    # 2. Ali Cloud
    go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
    
    # 3. Official
    go env -w  GOPROXY=https://goproxy.io,direct
    
    
    • Confirm Configuration
    $ go env | grep GOPROXY
    GOPROXY="https://goproxy.cn"
    
    • Windows
    # Activate Go Modules feature
    $env:GO111MODULE="on"
     	
    # Configure GOPROXY environment variable, choose one of the following three methods
    
    # 1. Qiniu CDN
    $env:GOPROXY="https://goproxy.cn,direct"
    
    # 2. Ali Cloud
    $env:GOPROXY="https://mirrors.aliyun.com/goproxy/,direct"
    
    # 3. Official
    $env:GOPROXY="https://goproxy.io,direct"
    
    
  • After installing the dependency package, rungo run main.go in the root directory of v-cloud-merchant.

  • If you need to run the program in the background, run nohup go run main.go &.

1.2 Run service using Docker

  • Users need to install the Docker locally in advance. Users can follow tutorial in the link to install Docker (opens new window)

  • After installing Docker, under the root directory of v-cloud-merchant, run docker build -t <YOUR-IMAGE-TAG-NAME> -f ./docker/dockerfile

  • Run the generated image docker run -d -t <YOUR-IMAGE-TAG-NAME>

2. Install Cli client

  • Firstly, clone the code from repository by git clone git@github.com:virtualeconomy/v-cloud-market-cli-provider.git
  • Enter into directory of market-place-cli to start Python virtual environment source ./venv/bin/activate
  • Run the merchant cli client python vcloud.py
  • Run cli client by python vcloud.py --help to view various services
Last Updated: 2/27/2023, 8:08:10 AM