CB-Tumblebug is a sub-Framework of the Cloud-Barista Multi-Cloud Project.
10K+
A sub-system of Cloud-Barista Platform to Deploy and Manage Multi-Cloud Infrastructure.
[NOTE] Development stage of CB-Tumblebug (CB-Tumblebug 개발 단계)
CB-Tumblebug is currently under development. (the latest release is v0.3.0)
So, we do not recommend using the current release in production.
Please note that the functionalities of CB-Tumblebug are not stable and secure yet.
If you have any difficulties in using CB-Tumblebug, please let us know.
(Open an issue or Join the cloud-barista Slack)
[NOTE] Localization and Globalization of CB-Tumblebug (CB-Tumblebug의 현지화 및 세계화)
As an opensource project initiated by Korean members,
we would like to promote participation of Korean contributors during initial stage of this project.
So, CB-Tumblebug Repo will accept use of Korean language in its early stages.
On the other hand, we hope this project flourishes regardless of contributor's country eventually.
So, the maintainers recommend using English at least for the title of Issues, Pull Requests, and Commits,
while CB-Tumblebug Repo accommodates local languages in the contents of them.
CB-Tumblebug은 한국에서 시작된 오픈 소스 프로젝트로서
프로젝트의 초기 단계에는 한국 기여자들의 참여를 촉진하고자 합니다.
따라서 초기 단계의 CB-Tumblebug는 한국어 사용을 받아 들일 것입니다.
다른 한편으로, 이 프로젝트가 국가에 관계없이 번성하기를 희망합니다.
따라서 개발 히스토리 관리를 위해 이슈, 풀 요청, 커밋 등의
제목에 대해서는 영어 사용을 권장하며, 내용에 대한 한국어 사용은 수용할 것입니다.
# docker run -p 1323:1323 \
-v /root/go/src/github.com/cloud-barista/cb-tumblebug/meta_db:/app/meta_db \
--name cb-tumblebug \
cloudbaristaorg/cb-tumblebug:v0.3.x-yyyymmdd
Go 설치 & Git 설치
환경 변수 설정
CB-Tumblebug 소스 다운로드 (Git clone CB-Tumblebug)
의존 라이브러리 다운로드
CB-Tumblebug 빌드 (make) 및 실행 (make run)
cb-tumblebug/src/ 에서 수행Swagger API 문서 업데이트 필요시 ~/go/bin/swag init 실행
cb-tumblebug/src/docs/swagger.yaml 에 생성됨https://github.com/cloud-barista/cb-operator 를 통해 Cloud-Barista 전체 FW를 통합 실행할 수 있음
$ git clone https://github.com/cloud-barista/cb-operator.git
$ cd cb-operator/src
cb-operator/src$ make
cb-operator/src$ ./operator
Git 설치
# apt update# apt install gitGo 설치
wget https://golang.org/dl/go1.14.15.linux-amd64.tar.gztar -C /usr/local -xzf go1.14.15.linux-amd64.tar.gz.bashrc 파일 하단에 다음을 추가export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
export GOPATH=$HOME/go
.bashrc 에 기재한 내용을 적용하기 위해, 다음 중 하나를 수행
source ~/.bashrc, . ~/.bashrcCB-Tumblebug 소스 다운로드
# go get -v github.com/cloud-barista/cb-tumblebugCB-Tumblebug 실행에 필요한 환경변수 설정
source setup.env 실행으로 시스템에 반영# cd ~/go/src/github.com/cloud-barista/cb-tumblebug/src
# export GO111MODULE=on
# ./make
# ./make run (또는 # go run *.go)
[NOTE]
“panic: /debug/requests is already registered.
You may have two independent copies of golang.org/x/net/trace in your binary,
trying to maintain separate state.
This may involve a vendored copy of golang.org/x/net/trace.”
에러 발생 시, 다음을 실행하여 해결
# rm -rf $GOPATH/src/go.etcd.io/etcd/vendor/golang.org/x/net/trace
# ./make
└── sequentialFullTest # Cloud 정보 등록, NS 생성, MCIR 생성, MCIS 생성까지 한번에 자동 테스트
├── testAll-mcis-mcir-ns-cloud.sh # Cloud 정보 등록, NS 생성, MCIR 생성, MCIS 생성까지 한번에 자동 테스트
├── gen-sshKey.sh # 수행이 진행된 테스트 로그 (MCIS에 접속 가능한 SSH키 파일 생성)
├── command-mcis.sh # 생성된 MCIS(다중VM)에 원격 명령 수행
├── deploy-nginx-mcis.sh # 생성된 MCIS(다중VM)에 Nginx 자동 배포
├── create-mcis-for-df.sh # CB-Dragonfly 호스팅을 위한 MCIS 생성
├── deploy-dragonfly-docker.sh # MCIS에 CB-Dragonfly 자동 배포 및 환경 자동 설정
├── cleanAll-mcis-mcir-ns-cloud.sh # 모든 오브젝트를 생성의 역순으로 삭제
└── executionStatus # 수행이 진행된 테스트 로그 (testAll 수행시 정보가 추가되며, cleanAll 수행시 정보가 제거됨. 진행중인 작업 확인 가능)
~/go/src/github.com/cloud-barista/cb-tumblebug/test/official/sequentialFullTest$ ./testAll-mcis-mcir-ns-cloud.sh aws 1 shson
####################################################################
## Create MCIS from Zero Base
####################################################################
[Test for AWS]
####################################################################
## 0. Create Cloud Connction Config
####################################################################
[Test for AWS]
{
"ProviderName" : "AWS",
"DriverLibFileName" : "aws-driver-v1.0.so",
"DriverName" : "aws-driver01"
}
..........
"RegionName" : "aws-us-east-1"
}
{
"CredentialName" : "aws-credential01",
"RegionName" : "aws-us-east-1",
"DriverName" : "aws-driver01",
"ConfigName" : "aws-us-east-1",
"ProviderName" : "AWS"
}
####################################################################
## 0. Namespace: Create
####################################################################
{
"message" : "The namespace NS-01 already exists."
}
####################################################################
## 1. vpc: Create
####################################################################
[Test for AWS]
{
"subnetInfoList" : [
{
"IId" : {
"SystemId" : "subnet-0ab25b7090afa97b7",
"NameId" : "aws-us-east-1-shson"
},
................
"status" : "",
"name" : "aws-us-east-1-shson",
"keyValueList" : null,
"connectionName" : "aws-us-east-1",
"cspVNetId" : "vpc-0e3004f28e8a89057"
}
Dozing for 10 : 1 2 3 4 5 6 7 8 9 10 (Back to work)
####################################################################
## 2. SecurityGroup: Create
####################################################################
[Test for AWS]
{
"keyValueList" : [
{
"Value" : "aws-us-east-1-shson-delimiter-aws-us-east-1-shson",
"Key" : "GroupName"
},
{
"Key" : "VpcID",
...........
"name" : "aws-us-east-1-shson",
"description" : "test description",
"cspSecurityGroupId" : "sg-033e4b7c42671873c",
"id" : "aws-us-east-1-shson"
}
Dozing for 10 : 1 2 3 4 5 6 7 8 9 10 (Back to work)
####################################################################
## 3. sshKey: Create
####################################################################
[Test for AWS]
{
"name" : "aws-us-east-1-shson",
"fingerprint" : "d2:1a:a0:6d:b3:f7:8e:b7:44:9f:13:9c:d6:e3:a8:c3:58:8c:de:27",
..............
"id" : "aws-us-east-1-shson",
"description" : "",
"privateKey" : "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAopGlO3dUrB4AMcBr4XZg0OVrveecA9Hv0/a9GmxgXU5dx42YV4DwW7oq/+Dq\nPaCSXvGGtdVHuL0hoOKdGYOx89qzi+nUgNQup+pKLbQw4aU2gVbV1/3/ejt7tYRUeWNU9c4b7m7E\nfs3A0xgfmak90eoQen+TJYhkfdWcSwkmJSH61bEFRbdeyijEODCu0TAGDrtRZzdCRUzbA/N7FjsC\ns0a1C...LpszE9J0bfhLOqgmkYNGSw4oR+gPRIsipUK6SzaRH7nFnOSw=\n-----END RSA PRIVATE KEY-----",
"username" : ""
}
####################################################################
## 4. image: Register
####################################################################
[Test for AWS]
{
"keyValueList" : [
{
"Key" : "",
"Value" : ""
},
{
"Value" : "",
"Key" : ""
}
],
"description" : "Canonical, Ubuntu, 18.04 LTS, amd64 bionic",
"cspImageName" : "",
"connectionName" : "aws-us-east-1",
"status" : "",
"creationDate" : "",
"cspImageId" : "ami-085925f297f89fce1",
"name" : "aws-us-east-1-shson",
"guestOS" : "Ubuntu",
"id" : "aws-us-east-1-shson"
}
####################################################################
## 5. spec: Register
####################################################################
[Test for AWS]
{
"mem_MiB" : "1024",
"max_num_storage" : "",
........
"mem_GiB" : "1",
"id" : "aws-us-east-1-shson",
"num_core" : "",
"cspSpecName" : "t2.micro",
"storage_GiB" : "",
"ebs_bw_Mbps" : "",
"connectionName" : "aws-us-east-1",
"net_bw_Gbps" : "",
"gpu_model" : "",
"cost_per_hour" : "",
"name" : "aws-us-east-1-shson"
}
####################################################################
## 6. vm: Create MCIS
####################################################################
[Test for AWS]
{
"targetAction" : "Create",
"status" : "Running-(3/3)",
"id" : "aws-us-east-1-shson",
"name" : "aws-us-east-1-shson",
"description" : "Tumblebug Demo",
"targetStatus" : "Running",
"placement_algo" : "",
"vm" : [
{
"vmUserId" : "",
"targetStatus" : "None",
"subnet_id" : "aws-us-east-1-shson",
"location" : {
"nativeRegion" : "us-east-1",
"cloudType" : "aws",
"latitude" : "38.1300",
"briefAddr" : "Virginia",
"longitude" : "-78.4500"
},
"vm_access_id" : "",
"region" : {
"Region" : "us-east-1",
"Zone" : "us-east-1f"
},
"image_id" : "aws-us-east-1-shson",
"privateDNS" : "ip-192-168-1-108.ec2.internal",
"vmBootDisk" : "/dev/sda1",
"status" : "Running",
"security_group_ids" : [
"aws-us-east-1-shson"
],
"vm_access_passwd" : "",
.........
"VMUserId" : "",
"SecurityGroupIIds" : [
{
"SystemId" : "sg-033e4b7c42671873c",
"NameId" : "aws-us-east-1-shson"
}
],
"VMBootDisk" : "/dev/sda1",
"PrivateDNS" : "ip-192-168-1-108.ec2.internal",
"StartTime" : "2020-05-30T18:33:42Z",
"VMBlockDisk" : "/dev/sda1",
"ImageIId" : {
"SystemId" : "ami-085925f297f89fce1",
"NameId" : "ami-085925f297f89fce1"
}
},
"publicIP" : "35.173.215.4",
"name" : "aws-us-east-1-shson-01",
"id" : "aws-us-east-1-shson-01",
"vnet_id" : "aws-us-east-1-shson",
"ssh_key_id" : "aws-us-east-1-shson",
"privateIP" : "192.168.1.108",
"config_name" : "aws-us-east-1",
"vmBlockDisk" : "/dev/sda1",
"targetAction" : "None",
"description" : "description",
"spec_id" : "aws-us-east-1-shson",
"publicDNS" : "",
"vmUserPasswd" : ""
},
{
"vmBlockDisk" : "/dev/sda1",
"targetAction" : "None",
"description" : "description",
"spec_id" : "aws-us-east-1-shson",
"vmUserPasswd" : "",
..........
}
]
}
Dozing for 1 : 1 (Back to work)
####################################################################
## 6. VM: Status MCIS
####################################################################
[Test for AWS]
{
"targetStatus" : "None",
"id" : "aws-us-east-1-shson",
"targetAction" : "None",
"vm" : [
{
"public_ip" : "35.173.215.4",
"native_status" : "Running",
"csp_vm_id" : "aws-us-east-1-shson-01",
"name" : "aws-us-east-1-shson-01",
"status" : "Running",
"targetAction" : "None",
"targetStatus" : "None",
"id" : "aws-us-east-1-shson-01"
},
{
"name" : "aws-us-east-1-shson-02",
"status" : "Running",
"targetAction" : "None",
"targetStatus" : "None",
"id" : "aws-us-east-1-shson-02",
"public_ip" : "18.206.13.233",
"csp_vm_id" : "aws-us-east-1-shson-02",
"native_status" : "Running"
},
{
"targetAction" : "None",
"id" : "aws-us-east-1-shson-03",
"targetStatus" : "None",
"name" : "aws-us-east-1-shson-03",
"status" : "Running",
"csp_vm_id" : "aws-us-east-1-shson-03",
"native_status" : "Running",
"public_ip" : "18.232.53.134"
}
],
"status" : "Running-(3/3)",
"name" : "aws-us-east-1-shson"
}
[Logging to notify latest command history]
[Executed Command List]
[CMD] testAll-mcis-mcir-ns-cloud.sh gcp 1 shson
[CMD] testAll-mcis-mcir-ns-cloud.sh alibaba 1 shson
[CMD] testAll-mcis-mcir-ns-cloud.sh aws 1 shson
마지막의 [Executed Command List] 에는 수행한 커맨드의 히스토리가 포함됨. (cat ./executionStatus 를 통해 다시 확인 가능)
~/go/src/github.com/cloud-barista/cb-tumblebug/test/official/sequentialFullTest$ ./deploy-nginx-mcis.sh aws 1 shson
####################################################################
## Command (SSH) to MCIS
####################################################################
[Test for AWS]
{
"result_array" : [
{
"vm_ip" : "35.173.215.4",
"vm_id" : "aws-us-east-1-shson-01",
"result" : "WebServer is ready. Access http://35.173.215.4",
"mcis_id" : "aws-us-east-1-shson"
},
{
"vm_ip" : "18.206.13.233",
"vm_id" : "aws-us-east-1-shson-02",
"result" : "WebServer is ready. Access http://18.206.13.233",
"mcis_id" : "aws-us-east-1-shson"
},
{
"mcis_id" : "aws-us-east-1-shson",
"result" : "WebServer is ready. Access http://18.232.53.134",
"vm_id" : "aws-us-east-1-shson-03",
"vm_ip" : "18.232.53.134"
}
]
}
~/go/src/github.com/cloud-barista/cb-tumblebug/test/official$ tree
.
├── 1.configureSpider
│ ├── get-cloud.sh
│ ├── list-cloud.sh
│ ├── register-cloud.sh
│ └── unregister-cloud.sh
├── 2.configureTumblebug
│ ├── check-ns.sh
│ ├── create-ns.sh
│ ├── delete-all-config.sh
│ ├── delete-all-ns.sh
│ ├── delete-ns.sh
│ ├── get-config.sh
│ ├── get-ns.sh
│ ├── list-config.sh
│ ├── list-ns.sh
│ └── update-config.sh
├── 3.vNet
│ ├── create-vNet.sh
│ ├── delete-vNet.sh
│ ├── get-vNet.sh
│ ├── list-vNet.sh
│ └── spider-get-vNet.sh
├── 4.securityGroup
│ ├── create-securityGroup.sh
│ ├── delete-securityGroup.sh
│ ├── get-securityGroup.sh
│ ├── list-securityGroup.sh
│ └── spider-get-securityGroup.sh
├── 5.sshKey
│ ├── create-sshKey.sh
│ ├── delete-sshKey.sh
│ ├── force-delete-sshKey.sh
│ ├── get-sshKey.sh
│ ├── list-sshKey.sh
│ ├── spider-delete-sshKey.sh
│ └── spider-get-sshKey.sh
├── 6.image
│ ├── fetch-images.sh
│ ├── get-image.sh
│ ├── list-image.sh
│ ├── lookupImageList.sh
│ ├── lookupImage.sh
│ ├── registerImageWithId.sh
│ ├── registerImageWithInfo.sh
│ ├── spider-get-imagelist.sh
│ ├── spider-get-image.sh
│ ├── test-search-image.sh
│ ├── unregister-all-images.sh
│ └── unregister-image.sh
├── 7.spec
│ ├── fetch-specs.sh
│ ├── filter-specs.sh
│ ├── get-spec.sh
│ ├── list-spec.sh
│ ├── lookupSpecList.sh
│ ├── lookupSpec.sh
│ ├── range-filter-specs.sh
│ ├── register-spec.sh
│ ├── spider-get-speclist.sh
│ ├── spider-get-spec.sh
│ ├── test-sort-specs.sh
│ ├── test-update-spec.sh
│ ├── unregister-all-specs.sh
│ └── unregister-spec.sh
├── 8.mcis
│ ├── add-vm-to-mcis.sh
│ ├── create-mcis-no-agent.sh
│ ├── create-mcis-policy.sh
│ ├── create-mcis.sh
│ ├── create-single-vm-mcis.sh
│ ├── delete-mcis-policy-all.sh
│ ├── delete-mcis-policy.sh
│ ├── get-mcis-policy.sh
│ ├── get-mcis.sh
│ ├── just-terminate-mcis.sh
│ ├── list-mcis-policy.sh
│ ├── list-mcis.sh
│ ├── list-mcis-status.sh
│ ├── reboot-mcis.sh
│ ├── resume-mcis.sh
│ ├── spider-create-vm.sh
│ ├── spider-delete-vm.sh
│ ├── spider-get-vm.sh
│ ├── spider-get-vmstatus.sh
│ ├── status-mcis.sh
│ ├── suspend-mcis.sh
│ └── terminate-and-delete-mcis.sh
├── 9.monitoring
│ ├── get-monitoring-data.sh
│ └── install-agent.sh
├── conf.env
├── credentials.conf
├── credentials.conf.example
├── misc
│ ├── get-conn-config.sh
│ ├── get-region.sh
│ ├── list-conn-config.sh
│ └── list-region.sh
├── README.md
└── sequentialFullTest
├── cb-demo-support
├── cleanAll-mcis-mcir-ns-cloud.sh
├── command-mcis-custom.sh
├── command-mcis.sh
├── create-mcis-for-df.sh
├── deploy-dragonfly-docker.sh
├── deploy-loadMaker-to-mcis.sh
├── deploy-nginx-mcis.sh
├── deploy-nginx-mcis-vm-withGivenName.sh
├── deploy-nginx-mcis-with-loadmaker.sh
├── deploy-spider-docker.sh
├── deploy-tumblebug.sh
├── executionStatus
├── expand-mcis.sh
├── gen-sshKey.sh
├── gen-sshKey-withGivenMcisName.sh
├── sshkey-tmp
│ ├── gcp-asia-east1-shson6.pem
│ └── gcp-asia-east1-shson6.ppk
├── testAll-mcis-mcir-ns-cloud.sh
├── test-cloud.sh
├── test-mcir-ns-cloud.sh
└── test-ns-cloud.sh
Thanks goes to these wonderful people (emoji key):
Content type
Image
Digest
sha256:1000c1062…
Size
71 MB
Last updated
4 days ago
docker pull cloudbaristaorg/cb-tumblebug