Skip to content

Commit

Permalink
Add features and API for compute infrastructure recommendation as the…
Browse files Browse the repository at this point in the history
… initial version
  • Loading branch information
cb-github-robot authored May 30, 2024
2 parents 581dd28 + 3eec733 commit a5f3c85
Show file tree
Hide file tree
Showing 29 changed files with 3,265 additions and 3,467 deletions.
879 changes: 220 additions & 659 deletions api/docs.go

Large diffs are not rendered by default.

879 changes: 220 additions & 659 deletions api/swagger.json

Large diffs are not rendered by default.

598 changes: 155 additions & 443 deletions api/swagger.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions cmd/cm-beetle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ func main() {
}
log.Debug().Msgf("port number: %s", *port)

common.SpiderRestUrl = common.NVL(os.Getenv("SPIDER_REST_URL"), "http://localhost:1024/spider")
common.DragonflyRestUrl = common.NVL(os.Getenv("DRAGONFLY_REST_URL"), "http://localhost:9090/dragonfly")
// common.SpiderRestUrl = common.NVL(os.Getenv("SPIDER_REST_URL"), "http://localhost:1024/spider")
// common.DragonflyRestUrl = common.NVL(os.Getenv("DRAGONFLY_REST_URL"), "http://localhost:9090/dragonfly")
common.TumblebugRestUrl = common.NVL(os.Getenv("TUMBLEBUG_REST_URL"), "http://localhost:1323/tumblebug")
common.DBUrl = common.NVL(os.Getenv("DB_URL"), "localhost:3306")
common.DBDatabase = common.NVL(os.Getenv("DB_DATABASE"), "cb_beetle")
common.DBUser = common.NVL(os.Getenv("DB_USER"), "cb_beetle")
Expand Down
6 changes: 3 additions & 3 deletions conf/log_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ cblog:
loglevel: error # If loopcheck is true, You can set this online.

## true | false
logfile: true
logfile: true

## Config for File Output ##
logfileinfo:
filename: $BEETLE_ROOT/log/cblogs.log
filename: $CMBEETLE_ROOT/log/cblogs.log
maxsize: 10 # megabytes
maxbackups: 50
maxage: 31 # days
maxage: 31 # days
4 changes: 2 additions & 2 deletions conf/setup.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export CBSTORE_ROOT=$CMBEETLE_ROOT
export CBLOG_ROOT=$CMBEETLE_ROOT
#export CBSPIDER_CALLMETHOD=REST
#export CBSPIDER_REST_URL=http://localhost:1024/spider
#export CBTUMBLEBUG_CALLMETHOD=REST
#export CBTUMBLEBUG_REST_URL=http://localhost:1323/tumblebug
export CBTUMBLEBUG_CALLMETHOD=REST
export CBTUMBLEBUG_REST_URL=http://localhost:1323/tumblebug

## Logger configuration
# Set log file path (default logfile path: ./cm-beetle.log)
Expand Down
98 changes: 63 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,80 +1,108 @@
module github.com/cloud-barista/cm-beetle

go 1.21

toolchain go1.21.4
go 1.22.3

require (
github.com/cloud-barista/cb-store v0.7.1
github.com/cloud-barista/cm-honeybee v0.0.0-20231212101859-53110c631d7f
github.com/docker/docker v24.0.9+incompatible
github.com/fsnotify/fsnotify v1.6.0
github.com/go-playground/validator/v10 v10.16.0
github.com/cloud-barista/cb-store v0.8.0
github.com/cloud-barista/cb-tumblebug v0.8.12
github.com/cloud-barista/cm-honeybee/agent v0.0.0-20240522171320-cb61f875f480
github.com/docker/docker v26.1.3+incompatible
github.com/fsnotify/fsnotify v1.7.0
github.com/go-playground/validator/v10 v10.17.0
github.com/go-resty/resty/v2 v2.11.0
github.com/labstack/echo/v4 v4.11.3
github.com/libvirt/libvirt-go-xml v7.4.0+incompatible
github.com/mattn/go-sqlite3 v1.14.17
github.com/labstack/echo/v4 v4.12.0
github.com/mattn/go-sqlite3 v1.14.19
github.com/rs/xid v1.5.0
github.com/rs/zerolog v1.31.0
github.com/rs/zerolog v1.32.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/viper v1.16.0
github.com/swaggo/echo-swagger v1.4.0
github.com/swaggo/swag v1.16.1
github.com/spf13/viper v1.18.2
github.com/swaggo/echo-swagger v1.4.1
github.com/swaggo/swag v1.16.3
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v2 v2.4.0
xorm.io/xorm v1.3.4
xorm.io/xorm v1.3.6
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/NeowayLabs/drm v0.0.0-20190824133025-4939fc0ad345 // indirect
github.com/docker/go-connections v0.4.1-0.20231110212414-fa09c952e3ea // indirect
github.com/bwmarrin/snowflake v0.3.0 // indirect
github.com/cloud-barista/cb-log v0.8.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/spec v0.20.7 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jollaman999/utils v1.0.10 // indirect
github.com/jedib0t/go-pretty/v6 v6.5.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/labstack/gommon v0.4.1 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/snowzach/rotatefilehook v0.0.0-20220211133110-53752135082d // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/swaggo/files/v2 v2.0.0 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
github.com/xujiajun/mmap-go v1.0.1 // indirect
github.com/xujiajun/nutsdb v0.11.1 // indirect
github.com/xujiajun/utils v0.0.0-20220904132955-5f7c5b914235 // indirect
go.etcd.io/etcd/api/v3 v3.5.11 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.11 // indirect
go.etcd.io/etcd/client/v3 v3.5.11 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/tools v0.21.0 // indirect
google.golang.org/genproto v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect
xorm.io/builder v0.3.13 // indirect
)
Loading

0 comments on commit a5f3c85

Please sign in to comment.