Skip to content

cloud-barista/cm-damselfly

Repository files navigation

Computing Infrastructure Migration Model

This repository provides computing infrastructure migration features. This is a sub-system of Cloud-Barista platform, and intended to deploy a multi-cloud infra as a target computing infrastructure.

Overview

As a Cloud Computing Infrastructure Migration Framework (codename: cm-damselply) is going to support:

  • Target cloud computing infra migration model (Defined using the JSON format and Go Structure.)
  • Migration model management test codes for target cloud computing infra

Execution and development environment

  • Operating system (OS):
    • Ubuntu 22.04
  • Languages:
    • Go 1.23.0

How to run CM-Damselfly

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

NOTE : Install the stable version of Go. For example, Go v1.23.0

# Set Go version
GO_VERSION=1.23.0

# Get Go archive
wget https://go.dev/dl/go${GO_VERSION}.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 go${GO_VERSION}.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 the source code

# Clone CM-Damselfly repository
git clone https://github.com/cloud-barista/cm-damselfly.git ${HOME}/cm-damselfly

Build and Run with docker compose

  • Open ubuntu firewall TCP 8088 port on the system to access to the API(If need)
sudo ufw allow 8088/tcp
  • Ensure that Docker and Docker Compose are installed on your system
docker --version
docker compose version
  • Run CM-Damselfly container and related components
cd [DAMSELFLY_ROOT]
sudo docker compose up
  • With the -d option runs the container in the background (in detached mode)
cd [DAMSELFLY_ROOT]
sudo docker compose up -d
  • Build the current Damselfly source code into a container image
cd [DAMSELFLY_ROOT]
sudo docker compose up -d --build
  • Stop CM-Damselfly
sudo docker compose down cm-damselfly
  • The easiest way to run the container
cd [DAMSELFLY_ROOT]
sudo make compose-up

Default REST API URL and DB/log file path

Versions of packages applied to the released Damselfly

cm-damselfly cm-model
(OnpremInfraModel)
cb-tumblebug
(CloudInfraModel)
v0.2.0 v0.0.3 v0.9.16
v0.2.1 v0.0.3 v0.10.0
v0.2.2 v0.0.3 v0.10.0
v0.3.0 v0.0.3 v0.10.3

CM-Damselfly REST API user guide