mex-docs

Mapping Virtual Machines to IaaS Resources

The MobiledgeX platform exposes unique node ID’s for all deployed Cluster Instances (ClusterInsts) via the API. This allows for the mapping of resources within the MobiledgeX platform to resources in the underlying IaaS (VMware, Openstack, Google Compute, AWS, Azure). This can be used by operators to better manage and monitor the resources in use within their cloudlet.

This information is provided in a vms array under the resources array for cluster information. The following values are exposed:

Item Meaning Type Examples
name vm name string “mex-k8s-node-1-mexplat-stage-hamburg-cloudlet-test-mobiledgex”Unique, with actual format IaaS dependent.
type type of vm string “loadbalancer”, “cluster-master”, “cluster-node”
status state of vm string “ACTIVE”, “STOPPED”
infraflavor vm’s IaaS flavor string “m4.small”
ip_addresses external and internal ip addresses array “externalip: X.X.X.X”

Example with mcctl

The mcctl utility can be used to pull this information via the ShowClusterInst argument to the region subcommand:

$ mcctl region  ShowClusterInst region=EU cluster=test01
- key:
   clusterkey:
     name: test01
   cloudletkey:
     organization: TDG
     name: mexplat-stage-hamburg-cloudlet
   organization: MobiledgeX
 flavor:
   name: x1.medium
 liveness: LivenessStatic
 state: Ready
 ipaccess: IpAccessDedicated
 allocatedip: dynamic
 nodeflavor: m4.large
 deployment: kubernetes
 nummasters: 1
 numnodes: 1
 masternodeflavor: m4.large
 resources:
   vms:
   - name: test01.mexplat-stage-hamburg-cloudlet.tdg.mobiledgex.net
     type: rootlb
     status: ACTIVE
     infraflavor: m4.medium
     ipaddresses:
     - externalip: 80.187.132.42
     - externalip: 10.101.44.1
   - name: mex-k8s-node-1-mexplat-stage-hamburg-cloudlet-test01-mobiledgex
     type: cluster-node
     status: ACTIVE
     infraflavor: m4.large
     ipaddresses:
     - externalip: 10.101.44.101
   - name: mex-k8s-master-mexplat-stage-hamburg-cloudlet-test01-mobiledgex
     type: cluster-master
     status: ACTIVE
     infraflavor: m4.large
     ipaddresses:
     - externalip: 10.101.44.10

Example with API

You can also work directly with the API by using the /auth/ctrl/ShowClusterInst route as illustrated below.

POST /auth/ctrl/ShowClusterInst

[
  {
    "key": {
      "clusterkey": {
        "name": "test01"
      },
      "cloudletkey": {
        "organization": "TDG",
        "name": "mexplat-stage-hamburg-cloudlet"
      },
      "organization": "MobiledgeX"
    },
    "flavor": {
      "name": "x1.medium"
    },
    "liveness": "LivenessStatic",
    "state": "Ready",
    "ipaccess": "IpAccessDedicated",
    "allocatedip": "dynamic",
    "nodeflavor": "m4.large",
    "deployment": "kubernetes",
    "nummasters": 1,
    "numnodes": 1,
    "masternodeflavor": "m4.large",
    "resources": {
      "vms": [
        {
          "name": "test01.mexplat-stage-hamburg-cloudlet.tdg.mobiledgex.net",
          "type": "rootlb",
          "status": "ACTIVE",
          "infraflavor": "m4.medium",
          "ipaddresses": [
            {
              "externalip": "80.187.132.42"
            },
            {
              "externalip": "10.101.44.1"
            }
          ]
        },
        {
          "name": "mex-k8s-node-1-mexplat-stage-hamburg-cloudlet-test01-mobiledgex",
          "type": "cluster-node",
          "status": "ACTIVE",
          "infraflavor": "m4.large",
          "ipaddresses": [
            {
              "externalip": "10.101.44.101"
            }
          ]
        },
        {
          "name": "mex-k8s-master-mexplat-stage-hamburg-cloudlet-test01-mobiledgex",
          "type": "cluster-master",
          "status": "ACTIVE",
          "infraflavor": "m4.large",
          "ipaddresses": [
            {
              "externalip": "10.101.44.10"
            }
          ]
        }
      ]
    }
  }
]