Skip to content

cloud-barista/cm-mayfly

Repository files navigation

CM-Mayfly

The Operation Tool for Cloud-Migrator System Runtime

[NOTE]
CM-Mayfly is currently under development.
So, we do not recommend using the current release in production.
Please note that the functionalities of CM-Mayfly are not stable and secure yet.
If you have any difficulties in using CM-Mayfly, please let us know.
(Open an issue or Join the Cloud-Migrator Slack)

CM-Mayfly Overview

This management tool provides and is expected to provide the following features:

  • Builds and controls the infrastructure of the Cloud-Migrator system.
  • Monitors the execution status of the sub-framework.
  • Provides the ability to call REST APIs offered by the sub-framework.
  • Kubernetes (k8s) will be supported in the future.

CM-Mayfly Execution and Development Environment

  • Ubuntu 20.04 or later
    • Tested by Ubuntu 20.04
  • Golang 1.23 or later
    • Tested by go version go version go1.23.1 linux/amd64
  • Docker Compose v2.21 or later
    • Tested by Docker version 24.0.7, build afdd53b and Docker Compose version v2.21.0

Pre-Install

How to build mayfly binary file from souce code

Build a binary for mayfly using Makerfile

$ git clone https://github.com/cloud-barista/cm-mayfly.git
$ cd cm-mayfly

Choose one of the commands below for the target OS you want to build for.
$ cm-mayfly$ make
$ cm-mayfly$ make win
$ cm-mayfly$ make mac
$ cm-mayfly$ make linux-arm
$ cm-mayfly$ make win86
$ cm-mayfly$ make mac-arm

How to delete mayfly all binary files

cm-mayfly$ make clean

How to use CM-Mayfly

For now, it supports docker / rest / api sub-commands.

Use the -h option at the end of the sub-command requiring assistance, or executing 'mayfly' without any options will display the help manual.

$ ./mayfly -h

The mayfly is a tool to operate Cloud-Migrator system.

Usage:
  mayfly [command]

Available Commands:
  api         Call the Cloud-Migrator system's Open APIs as services and actions
  help        Help about any command
  infra       Installing and managing cloud-migrator's infrastructure
  rest        rest api call

Flags:
  -h, --help   help for mayfly

Use "mayfly [command] --help" for more information about a command.

For more detailed explanations, see the articles below.

How to Build a Cloud-Migrator Infrastructure

A quick guide on how to easily build a Cloud-Migrator infrastructure.
If you need a more detailed explanation, check out the article below.

1. Download cm-mayfly

$ git clone https://github.com/cloud-barista/cm-mayfly.git
$ cd cm-mayfly

2. Prerequisites

Some subsystems require initial setup for configuration.

mc-datamanager

The mc-data-manager subsystem requires authentication information to use CSP. Currently, only the configuration method using the profile.json file is supported. Therefore, if you wish to use mc-data-manager, make sure to register the CSP-specific authentication information in the ./conf/docker/conf/mc-data-manger/data/var/run/data-manager/profile/profile.json file before setting up the infrastructure.

If necessary, you can also modify the contents of the profile.json file after the infrastructure has been set up.

3. Building a Docker-based infrastructure

$ ./cm-mayfly infra run

4. Checking the subsystem running status

$ ./cm-mayfly infra info