Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 43 additions & 50 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,101 +1,94 @@
# Git
# Git & VCS
.git
.gitignore
.gitattributes

# Documentation
*.md
!README.md
docs/
!docs/api-development-guide.md
.github/

# IDE and Editor
# IDE & Editor
.idea/
.vscode/
*.swp
*.swo
*~

# OS Files
.DS_Store
Thumbs.db

# Logs
*.log
log/
*.history

# Test files
*_test.go
**/*_test.go
cmd/test-cli/
!cmd/cm-beetle/

# Build artifacts (already compiled)
# Build Artifacts & Binaries
*.exe
*.exe~
*.dll
*.so
*.dylib
*.test
*.out

# Binaries (exclude compiled artifacts, but source code is needed for build)
pkg/src
pkg/cm-beetle
pkg/cm-beetle-arm
pkg/cli/tbctl
pkg/cli/cli
cmd/cm-beetle/cm-beetle
cmd/test-cli/test-cli

# Database and runtime files
*.db
meta_db/
db/

# Container volumes
container-volume/

# Temporal directories (used for local development with replace directives)
# Keep commented: cb-tumblebug/
# Keep commented: cm-model/

# Config files (use template inside container)
conf/*
!conf/template-*

# Ensure required directories are included
!api/
!scripts/
!transx/
!analyzer/
!deepdiffgo/
!pkg/
# Test Files & Artifacts
*_test.go
**/*_test.go
cmd/test-cli/
!cmd/cm-beetle/

# Python
# Python & Virtual Env
.venv/
__pycache__/
*.py[cod]
*$py.class

# Credentials and secrets
# Database & Runtime Data
*.db
meta_db/
db/

# Configuration & Secrets
*.pem
*.ppk
*.key
*credentials*
auth-config.json
conf/*
!conf/template-*

# Container Volumes & Temp Dirs
container-volume/
# Keep commented: cb-tumblebug/
# Keep commented: cm-model/

# Deployment files
# Documentation
*.md
!README.md
docs/
!docs/api-development-guide.md
.github/

# Deployment & Docker
deployments/
Dockerfile*
docker-compose*.yaml
.dockerignore

# Backup files
backup_*
# Backup Files
*_backup
*~
*.bak
*.tmp

# OS files
.DS_Store
Thumbs.db
# Docker Build Context (Allowlist)
!api/
!scripts/
!transx/
!analyzer/
!deepdiffgo/
!pkg/
!cmd/cm-beetle/
105 changes: 49 additions & 56 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,86 +1,79 @@
# Binaries for programs and plugins
# Git & VCS
# (Empty or specific git ignores if any)

# IDE & Editor
.idea/
.vscode/

# OS Files
.DS_Store
Thumbs.db

# Logs
*.log
log/
*.history

# Build Artifacts & Binaries
*.exe
*.exe~
*.dll
*.so
*.dylib

# Keys
*.pem
*.ppk
*.key

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# File DB
*.db

# vendor dir
vendor/

# Binaries
pkg/src
pkg/cm-beetle
pkg/cm-beetle-arm
pkg/cli/tbctl
pkg/cli/cli
cmd/cm-beetle/cm-beetle

# TEST CLI (binary, backup files, auth config, etc.)
# Test Files & Artifacts
*.test
*.out
cmd/test-cli/test-cli
cmd/test-cli/testdata/backup_*
cmd/test-cli/testdata/auth-config.json

# transx
transx/examples/object-storage/main
transx/examples/object-storage/config-*
!transx/examples/object-storage/template-config-*
transx/examples/mariadb-migration/main

# AutoGenerated DB data directory
meta_db/

# Temporal directory for container volumes
container-volume/

# Temporal directory for building container image with local changes (e.g., cb-tumblebug, cm-model)
cb-tumblebug/
cm-model/

# Config file for test
pkg/testclient/scripts/sequentialFullTest/executionStatus*
pkg/testclient/scripts/sequentialFullTest/ansibleAutoConf/*
pkg/testclient/scripts/credentials*

# Swagger docs for REST APIs
# api/docs.go
# api/swagger.json
# api/swagger.yaml
# Python & Virtual Env
.venv/

# Config file for CM-Beetle
# Database & Runtime Data
*.db
meta_db/
pkg/benchmarking.csv
pkg/rttmap.csv

# Configuration & Secrets
*.pem
*.ppk
*.key
!conf/
conf/*
!conf/template-*
conf/credentials.conf

# Runtime files
pkg/benchmarking.csv
pkg/rttmap.csv
# Container Volumes & Temp Dirs
container-volume/
cb-tumblebug/
cm-model/

# Files generated by IDE
.idea/
.vscode/
# Documentation
# api/docs.go
# api/swagger.json
# api/swagger.yaml

*.log
log/
*.history
# Deployment & Docker
# (None in original gitignore)

# Files generated by Python virtual environment
.venv/
# Backup Files
*_backup

# Files generated by system_info.py
# Specific Project Excludes
transx/examples/object-storage/main
transx/examples/object-storage/config-*
!transx/examples/object-storage/template-config-*
transx/examples/mariadb-migration/main
system_info.yaml
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ WORKDIR /go/src/github.com/cloud-barista/cm-beetle
# 4. [On shell] Run `make compose`
# 5. !Importance! After building/testing, make sure to restore(remove/comment) the changes by step 1-3.
# COPY cb-tumblebug /go/src/github.com/cloud-barista/cb-tumblebug

# Keep this for cm-model contributors
# you can use the following guide.
# For example, this is useful when you are developing cm-beetle and cm-model at the same time.
# 1. [On go.mod] Add `replace github.com/cloud-barista/cm-model => ../cm-model`
# 2. [On shell] Copy cm-model by `rsync -av --exclude container-volume/ --exclude .git/ ../cm-model/ ./cm-model`
# 3. [On Dockerfile] Add `COPY cm-model /go/src/github.com/cloud-barista/cm-model`
# 4. [On shell] Run `make compose`
# COPY cm-model /go/src/github.com/cloud-barista/cm-model

# Copy dependency files to the container
Expand Down
46 changes: 43 additions & 3 deletions api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,7 @@ const docTemplate = `{
"[Recommendation] Infrastructure"
],
"summary": "Recommend multiple VM infrastructure candidates for cloud migration",
"operationId": "RecommendVmInfra",
"operationId": "RecommendVmInfraCandidates",
"parameters": [
{
"description": "Specify the your infrastructure to be migrated",
Expand Down Expand Up @@ -3304,12 +3304,24 @@ const docTemplate = `{
"cloudmodel.ImageInfo": {
"type": "object",
"properties": {
"commandHistory": {
"description": "CommandHistory stores the status and history of remote commands executed on this VM",
"type": "array",
"items": {
"$ref": "#/definitions/cloudmodel.ImageSourceCommandHistory"
}
},
"connectionName": {
"type": "string"
},
"creationDate": {
"type": "string"
},
"cspImageId": {
"description": "CspImageId is resource identifier managed by CSP",
"type": "string",
"example": "ami-0d399fba46a30a310"
},
"cspImageName": {
"type": "string",
"example": "csp-06eb41e14121c550a"
Expand Down Expand Up @@ -3411,6 +3423,20 @@ const docTemplate = `{
"type": "string"
}
},
"resourceType": {
"description": "ResourceType is the type of the resource",
"type": "string"
},
"sourceCspImageName": {
"description": "SourceCspImageName is the name of the source CSP image from which this image was created",
"type": "string",
"example": "csp-06eb41e14121c550a"
},
"sourceVmUid": {
"description": "SourceVmUid is the UID of the source VM from which this image was created",
"type": "string",
"example": "wef12awefadf1221edcf"
},
"systemLabel": {
"type": "string",
"example": "Managed by CB-Tumblebug"
Expand All @@ -3421,6 +3447,21 @@ const docTemplate = `{
}
}
},
"cloudmodel.ImageSourceCommandHistory": {
"type": "object",
"properties": {
"commandExecuted": {
"description": "CommandExecuted is the actual SSH command executed on the VM (may be adjusted)",
"type": "string",
"example": "ls -la"
},
"index": {
"description": "Index is sequential identifier for this command execution (1, 2, 3, ...)",
"type": "integer",
"example": 1
}
}
},
"cloudmodel.ImageStatus": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -5610,7 +5651,6 @@ const docTemplate = `{
"type": "object",
"required": [
"imageId",
"name",
"specId"
],
"properties": {
Expand Down Expand Up @@ -5651,7 +5691,7 @@ const docTemplate = `{
"example": "1"
},
"name": {
"description": "K8sCluster name if it is not empty.",
"description": "K8sCluster name if it is not empty. Optional when used with namePrefix in multi-cluster creation.",
"type": "string",
"example": "k8scluster01"
},
Expand Down
Loading