cloud-barista / cb-tumblebug

Cloud-Barista Multi-Cloud Infra Management Framework
Apache License 2.0
48 stars 51 forks source link
ai benchmarking cb-tumblebug cloud cloud-barista cloud-computing csp go hacktoberfest iaas kubernetes llm multi-cloud multicloud orchestration vm

CB-Tumblebug (Multi-Cloud Infra Management) πŸ‘‹

Go Report Card Top Language GitHub go.mod Go version Repo Size GoDoc Codebase Swagger API Doc

License Release Version Pre Release Version Build Slack

All Contributors

CB-TB? ✨

CB-Tumblebug (CB-TB for short) is a system for managing multi-cloud infrastructure consisting of resources from multiple cloud service providers. (Cloud-Barista)


Note: Ongoing Development of CB-Tumblebug ``` CB-TB has not reached version 1.0 yet. We welcome any new suggestions, issues, opinions, and contributors! Please note that the functionalities of Cloud-Barista are not yet stable or secure. Be cautious if you plan to use the current release in a production environment. If you encounter any difficulties using Cloud-Barista, please let us know by opening an issue or joining the Cloud-Barista Slack. ```
Note: Localization and Globalization of CB-Tumblebug ``` As an open-source project initiated by Korean members, we aim to encourage participation from Korean contributors during the initial stages of this project. Therefore, the CB-TB repository will accept the use of the Korean language in its early stages. However, we hope this project will thrive regardless of contributors' countries in the long run. To facilitate this, the maintainers recommend using English at least for the titles of Issues, Pull Requests, and Commits, while accommodating local languages in the contents. ```

Popular Use Case 🌟


Index πŸ”—

  1. Prerequisites
  2. How to Run
  3. How to Use
  4. How to Build
  5. How to Contribute

Prerequisites 🌍

Envionment


Dependency

Open source packages used in this project


How to Run πŸš€

(1) Download CB-Tumblebug


(2) Run CB-TB and All Related Components


(3) Initialize CB-Tumblebug to configure Multi-Cloud info

To provisioning multi-cloud infrastructures with CB-TB, it is necessary to register the connection information (credentials) for clouds, as well as commonly used images and specifications.


(4) Shutting down and Version Upgrade


How to Use CB-TB Features 🌟

  1. Using CB-TB MapUI (recommended)
  2. Using CB-TB REST API (recommended)
  3. Using CB-TB Test Scripts

Using CB-TB MapUI


Using CB-TB REST API


Using CB-TB Scripts

src/testclient/scripts/ provides Bash shell-based scripts that simplify and automate the MCI (MC-Infra) provisioning procedures, which require complex steps.

[Note] Details - Step 1: [Setup Test Environment](#setup-test-environment) - Step 2: [Integrated Tests](#integrated-tests) #### Setup Test Environment 1. Go to [`src/testclient/scripts/`](https://github.com/cloud-barista/cb-tumblebug/tree/main/src/testclient/scripts) 2. Configure [`conf.env`](https://github.com/cloud-barista/cb-tumblebug/blob/main/src/testclient/scripts/conf.env) - Provide basic test information such as CB-Spider and CB-TB server endpoints, cloud regions, test image names, test spec names, etc. - Much information for various cloud types has already been investigated and input, so it can be used without modification. (However, check for charges based on the specified spec) - How to modify test VM image: [`IMAGE_NAME[$IX,$IY]=ami-061eb2b23f9f8839c`](https://github.com/cloud-barista/cb-tumblebug/blob/553c4884943916b3287ec17501c6f639e8667897/src/testclient/scripts/conf.env#L49) - How to modify test VM spec: [`SPEC_NAME[$IX,$IY]=m4.4xlarge`](https://github.com/cloud-barista/cb-tumblebug/blob/553c4884943916b3287ec17501c6f639e8667897/src/testclient/scripts/conf.env#L50) 3. Configure [`testSet.env`](https://github.com/cloud-barista/cb-tumblebug/blob/main/src/testclient/scripts/testSet.env) - Set the cloud and region configurations to be used for MCI provisioning in a file (you can change the existing `testSet.env` or copy and use it) - Specify the types of CSPs to combine - Change the number in [NumCSP=](https://github.com/cloud-barista/cb-tumblebug/blob/553c4884943916b3287ec17501c6f639e8667897/src/testclient/scripts/testSet.env#L9) to specify the total number of CSPs to combine - Specify the types of CSPs to combine by rearranging the lines in [L15-L24](https://github.com/cloud-barista/cb-tumblebug/blob/553c4884943916b3287ec17501c6f639e8667897/src/testclient/scripts/testSet.env#L15) (use up to the number specified in NumCSP) - Example: To combine aws and alibaba, change [NumCSP=2](https://github.com/cloud-barista/cb-tumblebug/blob/553c4884943916b3287ec17501c6f639e8667897/src/testclient/scripts/testSet.env#L9) and rearrange `IndexAWS=$((++IX))`, `IndexAlibaba=$((++IX))` - Specify the regions of the CSPs to combine - Go to each CSP setting item [`# AWS (Total: 21 Regions)`](https://github.com/cloud-barista/cb-tumblebug/blob/553c4884943916b3287ec17501c6f639e8667897/src/testclient/scripts/testSet.env#L44) - Specify the number of regions to configure in `NumRegion[$IndexAWS]=2` (in the example, it is set to 2) - Set the desired regions by rearranging the lines of the region list (if `NumRegion[$IndexAWS]=2`, the top 2 listed regions will be selected) - **Be aware!** - Be aware that creating VMs on public CSPs such as AWS, GCP, Azure, etc. may incur charges. - With the default setting of [`testSet.env`](https://github.com/cloud-barista/cb-tumblebug/blob/main/src/testclient/scripts/testSet.env), TestClouds (`TestCloud01`, `TestCloud02`, `TestCloud03`) will be used to create mock VMs. - `TestCloud01`, `TestCloud02`, `TestCloud03` are not real CSPs. They are used for testing purposes (do not support SSH into VM). - Anyway, please be aware of cloud usage costs when using public CSPs. #### Integrated Tests - You can test the entire process at once by executing `create-all.sh` and `clean-all.sh` included in `src/testclient/scripts/sequentialFullTest/` ```bash └── sequentialFullTest # Automatic testing from cloud information registration to NS creation, Resource creation, and MCI creation β”œβ”€β”€ check-test-config.sh # Check the multi-cloud infrastructure configuration specified in the current testSet β”œβ”€β”€ create-all.sh # Automatic testing from cloud information registration to NS creation, Resource creation, and MCI creation β”œβ”€β”€ gen-sshKey.sh # Generate SSH key files to access MCI β”œβ”€β”€ command-mci.sh # Execute remote commands on the created MCI (multiple VMs) β”œβ”€β”€ deploy-nginx-mci.sh # Automatically deploy Nginx on the created MCI (multiple VMs) β”œβ”€β”€ create-mci-for-df.sh # Create MCI for hosting CB-Dragonfly β”œβ”€β”€ deploy-dragonfly-docker.sh # Automatically deploy CB-Dragonfly on MCI and set up the environment β”œβ”€β”€ clean-all.sh # Delete all objects in reverse order of creation β”œβ”€β”€ create-k8scluster-only.sh # Create a K8s cluster for the multi-cloud infrastructure specified in the testSet β”œβ”€β”€ get-k8scluster.sh # Get K8s cluster information for the multi-cloud infrastructure specified in the testSet β”œβ”€β”€ clean-k8scluster-only.sh # Delete the K8s cluster for the multi-cloud infrastructure specified in the testSet β”œβ”€β”€ force-clean-k8scluster-only.sh # Force delete the K8s cluster for the multi-cloud infrastructure specified in the testSet if deletion fails β”œβ”€β”€ add-k8snodegroup.sh # Add a new K8s node group to the created K8s cluster β”œβ”€β”€ remove-k8snodegroup.sh # Delete the newly created K8s node group in the K8s cluster β”œβ”€β”€ set-k8snodegroup-autoscaling.sh # Change the autoscaling setting of the created K8s node group to off β”œβ”€β”€ change-k8snodegroup-autoscalesize.sh # Change the autoscale size of the created K8s node group β”œβ”€β”€ deploy-weavescope-to-k8scluster.sh # Deploy weavescope to the created K8s cluster └── executionStatus # Logs of the tests performed (information is added when testAll is executed and removed when cleanAll is executed. You can check the ongoing tasks) ``` - MCI Creation Test - `./create-all.sh -n shson -f ../testSetCustom.env` # Create MCI with the cloud combination configured in ../testSetCustom.env - Automatically proceed with the process to check the MCI creation configuration specified in `../testSetCustom.env` - Example of execution result ```bash Table: All VMs in the MCI : cb-shson ID Status PublicIP PrivateIP CloudType CloudRegion CreatedTime -- ------ -------- --------- --------- ----------- ----------- aws-ap-southeast-1-0 Running xx.250.xx.73 192.168.2.180 aws ap-southeast-1 2021-09-17 14:59:30 aws-ca-central-1-0 Running x.97.xx.230 192.168.4.98 aws ca-central-1 2021-09-17 14:59:58 gcp-asia-east1-0 Running xx.229.xxx.26 192.168.3.2 gcp asia-east1 2021-09-17 14:59:42 [DATE: 17/09/2021 15:00:00] [ElapsedTime: 49s (0m:49s)] [Command: ./create-mci-only.sh all 1 shson ../testSetCustom.env 1] [Executed Command List] [Resource:aws-ap-southeast-1(28s)] create-resource-ns-cloud.sh (Resource) aws 1 shson ../testSetCustom.env [Resource:aws-ca-central-1(34s)] create-resource-ns-cloud.sh (Resource) aws 2 shson ../testSetCustom.env [Resource:gcp-asia-east1(93s)] create-resource-ns-cloud.sh (Resource) gcp 1 shson ../testSetCustom.env [MCI:cb-shsonvm4(19s+More)] create-mci-only.sh (MCI) all 1 shson ../testSetCustom.env [DATE: 17/09/2021 15:00:00] [ElapsedTime: 149s (2m:29s)] [Command: ./create-all.sh -n shson -f ../testSetCustom.env -x 1] ``` - MCI Removal Test (Use the input parameters used in creation for deletion) - `./clean-all.sh -n shson -f ../testSetCustom.env` # Perform removal of created resources according to `../testSetCustom.env` - **Be aware!** - If you created MCI (VMs) for testing in public clouds, the VMs may incur charges. - You need to terminate MCI by using `clean-all` to avoid unexpected billing. - Anyway, please be aware of cloud usage costs when using public CSPs. - Generate MCI SSH access keys and access each VM - `./gen-sshKey.sh -n shson -f ../testSetCustom.env` # Return access keys for all VMs configured in MCI - Example of execution result ```bash ... [GENERATED PRIVATE KEY (PEM, PPK)] [MCI INFO: mc-shson] [VMIP]: 13.212.254.59 [MCIID]: mc-shson [VMID]: aws-ap-southeast-1-0 ./sshkey-tmp/aws-ap-southeast-1-shson.pem ./sshkey-tmp/aws-ap-southeast-1-shson.ppk ... [SSH COMMAND EXAMPLE] [VMIP]: 13.212.254.59 [MCIID]: mc-shson [VMID]: aws-ap-southeast-1-0 ssh -i ./sshkey-tmp/aws-ap-southeast-1-shson.pem cb-user@13.212.254.59 -o StrictHostKeyChecking=no ... [VMIP]: 35.182.30.37 [MCIID]: mc-shson [VMID]: aws-ca-central-1-0 ssh -i ./sshkey-tmp/aws-ca-central-1-shson.pem cb-user@35.182.30.37 -o StrictHostKeyChecking=no ``` - Verify MCI via SSH remote command execution - `./command-mci.sh -n shson -f ../testSetCustom.env` # Execute IP and hostname retrieval for all VMs in MCI - K8s Cluster Test (WIP: Stability work in progress for each CSP) ```bash ./create-resource-ns-cloud.sh -n tb -f ../testSet.env` # Create Resource required for K8s cluster creation ./create-k8scluster-only.sh -n tb -f ../testSet.env -x 1 -z 1` # Create K8s cluster (-x maximum number of nodes, -z additional name for K8s node group and K8s cluster) ./get-k8scluster.sh -n tb -f ../testSet.env -z 1` # Get K8s cluster information ./add-k8snodegroup.sh -n tb -f ../testSet.env -x 1 -z 1` # Add a new K8s node group to the K8s cluster ./change-k8snodegroup-autoscalesize.sh -n tb -f ../testSet.env -x 1 -z 1` # Change the autoscale size of the specified K8s node group ./deploy-weavescope-to-k8scluster.sh -n tb -f ../testSet.env -y n` # Deploy weavescope to the created K8s cluster ./set-k8snodegroup-autoscaling.sh -n tb -f ../testSet.env -z 1` # Change the autoscaling setting of the new K8s node group to off ./remove-k8snodegroup.sh -n tb -f ../testSet.env -z 1` # Delete the newly created K8s node group ./clean-k8scluster-only.sh -n tb -f ../testSet.env -z 1` # Delete the created K8s cluster ./force-clean-k8scluster-only.sh -n tb -f ../testSet.env -z 1` # Force delete the created K8s cluster if deletion fails ./clean-resource-ns-cloud.h -n tb -f ../testSet.env` # Delete the created Resource ```

Multi-Cloud Infrastructure Use Cases

Deploying an MCI Xonotic (3D FPS) Game Server

Distributed Deployment of MCI Weave Scope Cluster Monitoring

Deploying MCI Jitsi Video Conferencing

Automatic Configuration of MCI Ansible Execution Environment


How to Build πŸ› οΈ

(1) Setup Prerequisites


(2) Build and Run CB-Tumblebug

(2-1) Option 1: Run CB-Tumblebug with Docker Compose (Recommended)

(2-2) Option 2: Run CB-Tumblebug from the Makefile


How to Contribute πŸ™

CB-TB welcomes improvements from both new and experienced contributors!

Check out CONTRIBUTING.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Seokho Son
Seokho Son

🚧 πŸ€” πŸ’» πŸ‘€
Jihoon Seo
Jihoon Seo

🚧 πŸ€” πŸ’» πŸ‘€
Yunkon (Alvin) Kim
Yunkon (Alvin) Kim

πŸ€” πŸ’» πŸ‘€ 🚧
jmleefree
jmleefree

πŸ’» πŸ‘€
ByoungSeob Kim
ByoungSeob Kim

πŸ€”
Sooyoung Kim
Sooyoung Kim

πŸ› πŸ€”
KANG DONG JAE
KANG DONG JAE

πŸ€”
Youngwoo-Jung
Youngwoo-Jung

πŸ€”
Sean Oh
Sean Oh

πŸ€”
MZC-CSC
MZC-CSC

πŸ› πŸ€”
Eunsang
Eunsang

πŸ““
hyokyungk
hyokyungk

πŸ““
pjini
pjini

πŸ““
sunmi
sunmi

πŸ““
sglim
sglim

πŸ“– πŸ’»
jangh-lee
jangh-lee

πŸ“– πŸ’»
μ΄λ„ν›ˆ
μ΄λ„ν›ˆ

πŸ“– πŸ’»
Park Beomsu
Park Beomsu

πŸ’»
Hassan Alsamahi
Hassan Alsamahi

πŸ’»
Taegeon An
Taegeon An

πŸ’»
INHYO
INHYO

πŸ’»
Modney
Modney

πŸ“– πŸ’»
Seongbin Bernie Cho
Seongbin Bernie Cho

πŸ’» πŸ“–
Gibaek Nam
Gibaek Nam

πŸ’»
Abidin Durdu
Abidin Durdu

πŸ’»
soyeon Park
soyeon Park

πŸ’»
Jayita Pramanik
Jayita Pramanik

πŸ“–
Mukul Kolpe
Mukul Kolpe

πŸ“–
EmmanuelMarianMat
EmmanuelMarianMat

πŸ’»
Carlos Felix
Carlos Felix

πŸ’»
Stuart Gilbert
Stuart Gilbert

πŸ’»
Ketan Deshmukh
Ketan Deshmukh

πŸ’»
TrΓ­ona Barrow
TrΓ­ona Barrow

πŸ’»
BamButz
BamButz

πŸ’»
dogfootman
dogfootman

πŸ““
Okhee Lee
Okhee Lee

πŸ““
joowon
joowon

πŸ““
Sanghong Kim
Sanghong Kim

πŸ’»
Rohit Rajput
Rohit Rajput

πŸ’»
Arshad
Arshad

πŸ’»
Jongwoo Han
Jongwoo Han

πŸ’»
Yoo Jae-Sung
Yoo Jae-Sung

πŸ““
Minhyeok LEE
Minhyeok LEE

πŸ‘€
SungWoongz
SungWoongz

πŸ““
Gabriel lima
Gabriel lima

πŸ’»
Tharun K
Tharun K

πŸ’»
Shehzad
Shehzad

πŸ’»


License

FOSSA Status