AliTestConfig

package
v0.0.0-...-8fc61e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceHandler

func GetResourceHandler(handlerType string) (interface{}, error)

handlerType : resources폴더의 xxxHandler.go에서 Handler이전까지의 문자열 (예) ImageHandler.go -> "Image"

Types

type Config

type Config struct {
	Ali struct {
		AliAccessKeyID     string `yaml:"ali_access_key_id"`
		AliSecretAccessKey string `yaml:"ali_secret_access_key"`
		Region             string `yaml:"region"`
		Zone               string `yaml:"zone"`

		ImageID string `yaml:"image_id"`

		VmID         string `yaml:"ec2_instance_id"`
		BaseName     string `yaml:"base_name"`
		InstanceType string `yaml:"instance_type"`
		KeyName      string `yaml:"key_name"`
		MinCount     int64  `yaml:"min_count"`
		MaxCount     int64  `yaml:"max_count"`

		SubnetID        string `yaml:"subnet_id"`
		SecurityGroupID string `yaml:"security_group_id"`

		PublicIP string `yaml:"public_ip"`
	} `yaml:"ali"`
}

Region : 사용할 리전명 (ex) ap-northeast-2 ImageID : VM 생성에 사용할 AMI ID (ex) ami-047f7b46bd6dd5d84 BaseName : 다중 VM 생성 시 사용할 Prefix이름 ("BaseName" + "_" + "숫자" 형식으로 VM을 생성 함.) (ex) mcloud-barista VmID : 라이프 사이트클을 테스트할 EC2 인스턴스ID InstanceType : VM 생성시 사용할 인스턴스 타입 (ex) t2.micro KeyName : VM 생성시 사용할 키페어 이름 (ex) mcloud-barista-keypair MinCount : MaxCount : SubnetId : VM이 생성될 VPC의 SubnetId (ex) subnet-cf9ccf83 SecurityGroupID : 생성할 VM에 적용할 보안그룹 ID (ex) sg-0df1c209ea1915e4b

func ReadConfigFile

func ReadConfigFile() Config

환경 설정 파일 읽기 환경변수 CBSPIDER_PATH 설정 후 해당 폴더 하위에 /config/config.yaml 파일 생성해야 함.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL