cm-damselfly

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0

README

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

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

Note - Install the stable version of Go. For example, install 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 and related components
cd [DAMSELFLY_ROOT]
sudo docker compose up
  • With the -d option runs the container in the background
cd [DAMSELFLY_ROOT]
sudo docker compose up -d
  • Stop CM-Damselfly
sudo docker compose down cm-damselfly
Default API URL and File Path

Directories

Path Synopsis
Package api Code generated by swaggo/swag.
Package api Code generated by swaggo/swag.
cmd
cm-damselfly command
pkg
api/rest
Package server is to handle REST API
Package server is to handle REST API
lkvstore
Local Key-Value Store based on sync.Map and file I/O
Local Key-Value Store based on sync.Map and file I/O

Jump to

Keyboard shortcuts

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