cm-beetle

module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0

README

Computing Infrastructure Migration

This repository provides computing infrastructure migration features. This is a sub-system on Cloud-Barista platform and utilizes CB-Tumblebug to depoly a multi-cloud infra as a target computing infrastructure.

Overview

Computing Infrastructure Migration framework (codename: cm-beetle) is going to support:

  • migration execution and control from source to target computing infrastructure, and
  • recommendation of optimal configuration of target cloud infrastructure.

Execution and development environment

  • Operating system (OS):
    • Ubuntu 20.04
  • Languages:
    • Go: 1.19
    • Python: 3.8.10
  • Container runtime:
    • Docker: 20.10.12

How to run CM-Beetle

Source code based installation and execution
Configure build environment
  1. Install dependencies
# Ensure that your system is up to date
sudo apt update -y

# Ensure that you have installed the dependencies, 
# such as `ca-certificates`, `curl`, and `gnupg` packages.
sudo apt install make gcc git
  1. Install Go

To install Go v1.19+, see Go all releases and Download and install

Example - Go 1.19 installtion

# Get Go archive
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz

# Remove any previous Go installation and
# Extract the archive into /usr/local/
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz

# Append /usr/local/go/bin to .bashrc
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc

# Apply the .bashrc changes
source ~/.bashrc

# Verify the installation
echo $GOPATH
go version
Download source code
  1. Clone CM-Beetle repository
git clone https://github.com/cloud-barista/cm-beetle.git ${HOME}/cm-beetle
Build CM-Beetle
cd ${HOME}/cm-beetle/pkg
make

(Optional) Update Swagger API document

cd ${HOME}/cm-beetle/pkg
make swag
Run CM-Beetle binary
cd ${HOME}/cm-beetle/pkg
make run
Health-check CM-Beetle
curl http://localhost:8056/beetle/health

# Output if it's running successfully
# {"message":"CM-Beetle API server is running"}
Container based execution

Check a tag of CM-Beetle container image in cloudbaristaorg/cm-beetle

Run CM-Beetle container
docker run -p 8056:8056 \
--name cm-beetle \
cloudbaristaorg/cm-beetle:latest
Health-check CM-Beetle
curl http://localhost:8056/beetle/health

# Output if it's running successfully
# {"message":"CM-Beetle API server is running"}

Directories

Path Synopsis
cmd
beetle command
Package main is the starting point of CM-Beetle
Package main is the starting point of CM-Beetle
deepdiffgo module
pkg
Package main is the starting point of CM-Beetle
Package main is the starting point of CM-Beetle
api/rest/docs
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
api/rest/server
Package server is to handle REST API
Package server is to handle REST API
api/rest/server/common
Package common is to handle REST API for common funcitonalities
Package common is to handle REST API for common funcitonalities
api/rest/server/migration
Package migration is to handle REST API for migration
Package migration is to handle REST API for migration
api/rest/server/recommendation
Package common is to handle REST API for common funcitonalities
Package common is to handle REST API for common funcitonalities
core/common
Package common is to include common methods for managing multi-cloud infra
Package common is to include common methods for managing multi-cloud infra
core/migration
Package migration is to privision targat multi-cloud infra for migration
Package migration is to privision targat multi-cloud infra for migration
transx module

Jump to

Keyboard shortcuts

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