Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recommendation API for infrastructure selection #38

Merged

Conversation

yunkon-kim
Copy link
Member

@yunkon-kim yunkon-kim commented Dec 13, 2023

  • Add a function to match source and target
  • Handle infrastructure recommendation requests
  • Assign controller.RecommendInfra handler to the route

(Request body sample - source infrastructure)

{
  "compute": {
    "compute_resource": {
      "cpu": {
        "cache": 0,
        "cores": 1,
        "cpus": 0,
        "model": "string",
        "speed": 0,
        "threads": 0,
        "vendor": "string"
      },
      "memory": {
        "size": 2,
        "speed": 0,
        "type": "string"
      },
      "storage": [
        {
          "driver": "string",
          "model": "string",
          "name": "string",
          "serial": "string",
          "size": 0,
          "vendor": "string"
        }
      ]
    },
    "os": {
      "kernel": {
        "architecture": "string",
        "release": "string",
        "version": "string"
      },
      "node": {
        "hostname": "string",
        "hypervisor": "string",
        "machineid": "string",
        "timezone": "string"
      },
      "os": {
        "architecture": "string",
        "name": "UBUNTU22.04",
        "release": "string",
        "vendor": "string",
        "version": "string"
      }
    }
  }
}

image

(Response body)

{
  "name": "RecommendedInfra01",
  "installMonAgent": "no",
  "label": "DynamicVM",
  "systemLabel": "",
  "description": "Made in CB-TB",
  "vm": [
    {
      "name": "RecommVM01",
      "subGroupSize": "3",
      "label": "DynamicVM",
      "description": "Description",
      "commonSpec": "aws-ap-northeast-2-t2-small",
      "commonImage": "ubuntu22.04",
      "rootDiskType": "default",
      "rootDiskSize": "default",
      "vmUserPassword": "string",
      "connectionName": "string"
    }
  ]
}

References:

(CC. @innodreamer, @niconicodex)

- Add a function to match source and target
- Handle infrastructure recommendation requests
- Assign `controller.RecommendInfra` handler to the route
@yunkon-kim
Copy link
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Dec 13, 2023
@cb-github-robot cb-github-robot merged commit b54cebe into cloud-barista:main Dec 13, 2023
2 checks passed
@yunkon-kim yunkon-kim deleted the add-recommendation-api branch December 20, 2023 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved and will be merged soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants