Skip to content

Commit

Permalink
Update the AWS Image ID and Add nlb test env for more CSPs
Browse files Browse the repository at this point in the history
  • Loading branch information
powerkimhub committed Jul 19, 2022
1 parent 13d8c26 commit e7e87a1
Show file tree
Hide file tree
Showing 45 changed files with 174 additions and 51 deletions.
6 changes: 3 additions & 3 deletions api-runtime/rest-runtime/admin-web/AdminWeb-CCM.go
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ func makePostVMFunc_js() string {

// curl -sX POST http://localhost:1024/spider/vm -H 'Content-Type: application/json'
// -d '{ "ConnectionName": "'${CONN_CONFIG}'",
// "ReqInfo": { "Name": "vm-01", "ImageName": "ami-090717c950a5c34d3", "VPCName": "vpc-01",
// "ReqInfo": { "Name": "vm-01", "ImageName": "ami-00978328f54e31526", "VPCName": "vpc-01",
// "SubnetName": "subnet-01", "SecurityGroupNames": [ "sg-01" ], "VMSpecName": "t2.micro", "KeyPairName": "keypair-01"} }'

strFunc := `
Expand Down Expand Up @@ -1595,7 +1595,7 @@ func VM(c echo.Context) error {
vmUser := "" // AWS:ec2-user, Azure&GCP:cb-user, Alibaba&Cloudit:root, OpenStack: ubuntu
switch providerName {
case "AWS":
imageName = "ami-090717c950a5c34d3"
imageName = "ami-00978328f54e31526"
specName = "t2.micro"
subnetName = "subnet-01"
sgName = `["sg-01"]`
Expand Down Expand Up @@ -1681,7 +1681,7 @@ func VM(c echo.Context) error {
specName = "spec-1"
vmUser = "cb-user"
default:
imageName = "ami-090717c950a5c34d3"
imageName = "ami-00978328f54e31526"
specName = "t2.micro"
subnetName = "subnet-01"
sgName = `["sg-01"]`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
2 changes: 1 addition & 1 deletion api-runtime/rest-runtime/test/each-test/1.aws-1.vpc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./vpc-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./securitygroup-icmp-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./securitygroup-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./aws-vm-rootdisk-test.sh
2 changes: 1 addition & 1 deletion api-runtime/rest-runtime/test/each-test/1.aws-4.vm.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./vm-test.sh
2 changes: 1 addition & 1 deletion api-runtime/rest-runtime/test/each-test/1.aws-5.delete.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./vm-delete-test.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export GATEWAY_HOST=1.2.3.4
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./gateway_full_test.sh
2 changes: 1 addition & 1 deletion api-runtime/rest-runtime/test/full-test/1.aws-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./full_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./all_delete.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./except_vm_delete.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export GATEWAY_HOST=1.2.3.4
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526

./gateway-image-get-test.sh
2 changes: 1 addition & 1 deletion api-runtime/rest-runtime/test/image-test/1.aws-get-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526

./image-get-test.sh
2 changes: 1 addition & 1 deletion api-runtime/rest-runtime/test/parallel-test/1.aws-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./parallel_test.sh $1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./all_delete.sh $1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./except_vm_delete.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export GATEWAY_HOST=1.2.3.4
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./gateway-spec-get-test.sh
2 changes: 1 addition & 1 deletion api-runtime/rest-runtime/test/spec-test/1.aws-get-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t3.micro

./spec-get-test.sh
2 changes: 1 addition & 1 deletion interface/cli-examples/aws/setup.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONN_CONFIG=aws-oregon-config
IMAGE_NAME=ami-090717c950a5c34d3
IMAGE_NAME=ami-00978328f54e31526
SPEC_NAME=t2.micro
2 changes: 1 addition & 1 deletion test/functional-test-cli/common/aws/setup.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CONN_CONFIG=aws-oregon-config
IMAGE_NAME=ami-090717c950a5c34d3
IMAGE_NAME=ami-00978328f54e31526
SPEC_NAME=t2.micro
2 changes: 1 addition & 1 deletion test/nlb-test-curl/0.prepare-nlb-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ fi
source $1/setup.env

# Create: VPC/Subnet => SG => Key => VM1, VM2
./common/prepare-nlb-test.sh
./common/prepare-nlb-test.sh $1
2 changes: 1 addition & 1 deletion test/nlb-test-curl/8.teardown-nlb-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ fi

source $1/setup.env

./common/teardown-nlb-test.sh
./common/teardown-nlb-test.sh $1
5 changes: 5 additions & 0 deletions test/nlb-test-curl/alibaba/setup.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export CONN_CONFIG=alibaba-beijing-config
export IMAGE_NAME=ubuntu_18_04_x64_20G_alibase_20220322.vhd
export SPEC_NAME=ecs.t5-lc1m2.small

export SLEEP=0
2 changes: 1 addition & 1 deletion test/nlb-test-curl/aws/setup.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export CONN_CONFIG=aws-ohio-config
export IMAGE_NAME=ami-090717c950a5c34d3
export IMAGE_NAME=ami-00978328f54e31526
export SPEC_NAME=t2.micro

export SLEEP=0
8 changes: 8 additions & 0 deletions test/nlb-test-curl/cloudit/setup.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export CONN_CONFIG=cloudit-config01
export IMAGE_NAME=ee441331-0872-49c3-886c-1873a6e32e09
export SPEC_NAME=small-2

export VPC_CIDR=10.0.0.0/16
export SUBNET_CIDR=10.0.8.0/22

export SLEEP=0
8 changes: 4 additions & 4 deletions test/nlb-test-curl/common/create-nlb-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ curl -sX POST http://localhost:1024/spider/nlb -H 'Content-Type: application/jso
"Scope": "REGION",
"Listener": {
"Protocol" : "TCP",
"Port" : "80"
"Port" : "22"
},
"VMGroup": {
"Protocol" : "TCP",
"Port" : "80",
"Port" : "22",
"VMs" : ["vm-01", "vm-02"]
},
"HealthChecker": {
"Protocol" : "TCP",
"Port" : "80",
"Port" : "22",
"Interval" : "10",
"Timeout" : "10",
"Timeout" : "9",
"Threshold" : "3"
}
}
Expand Down
37 changes: 37 additions & 0 deletions test/nlb-test-curl/common/create-nlb-test.sh.22
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

echo "####################################################################"
echo "## NLB Test Scripts for CB-Spider - 2022.06."
echo "## NLB: CreateNLB "
echo "####################################################################"

echo ""


echo "#####---------- CreateNLB ----------####"
curl -sX POST http://localhost:1024/spider/nlb -H 'Content-Type: application/json' -d \
'{
"ConnectionName": "'${CONN_CONFIG}'",
"ReqInfo": {
"Name": "spider-nlb-01",
"VPCName": "vpc-01",
"Type": "PUBLIC",
"Scope": "REGION",
"Listener": {
"Protocol" : "TCP",
"Port" : "22"
},
"VMGroup": {
"Protocol" : "TCP",
"Port" : "22",
"VMs" : ["vm-01", "vm-02"]
},
"HealthChecker": {
"Protocol" : "TCP",
"Port" : "22",
"Interval" : "10",
"Timeout" : "9",
"Threshold" : "3"
}
}
}' | json_pp

37 changes: 37 additions & 0 deletions test/nlb-test-curl/common/create-nlb-test.sh.80
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

echo "####################################################################"
echo "## NLB Test Scripts for CB-Spider - 2022.06."
echo "## NLB: CreateNLB "
echo "####################################################################"

echo ""


echo "#####---------- CreateNLB ----------####"
curl -sX POST http://localhost:1024/spider/nlb -H 'Content-Type: application/json' -d \
'{
"ConnectionName": "'${CONN_CONFIG}'",
"ReqInfo": {
"Name": "spider-nlb-01",
"VPCName": "vpc-01",
"Type": "PUBLIC",
"Scope": "REGION",
"Listener": {
"Protocol" : "TCP",
"Port" : "80"
},
"VMGroup": {
"Protocol" : "TCP",
"Port" : "80",
"VMs" : ["vm-01", "vm-02"]
},
"HealthChecker": {
"Protocol" : "TCP",
"Port" : "80",
"Interval" : "10",
"Timeout" : "9",
"Threshold" : "3"
}
}
}' | json_pp

Loading

0 comments on commit e7e87a1

Please sign in to comment.