ves-io-schema-fleet-API-Create

Examples of creating fleet

Usecase:

Create a fleet of all superstore sites. Each store nodes with two interface, inside and outside. Connect inside network

Request using vesctl:

vesctl configuration create fleet -i fleet.yaml

where file fleet.yaml has following contents (fleet.CreateRequest):

RequestJSON:

{"metadata":{"name":"superstore-fleet","namespace":"system"},"spec":{"fleet_label":"superstore-fleet","volterra_software_version":"2019-build-9981","network_connectors":[{"kind":"network_connector","tenant":"acmecorp","namespace":"system","name":"connect-in-out"}],"network_firewall":[{"kind":"network_firewall","tenant":"acmecorp","namespace":"system","name":"superstore-firewall"}],"interface_list":{"interfaces":[{"tenant":"acmecorp","namespace":"system","name":"int-eth0"},{"tenant":"acmecorp","namespace":"system","name":"int-eth1"}]},"no_bond_devices":{},"no_storage_interfaces":{},"no_storage_device":{},"default_storage_class":{},"no_dc_cluster_group":{},"disable_gpu":{},"no_storage_static_routes":{},"logs_streaming_disabled":{},"allow_all_usb":{},"disable_vm":{}}} `

vesctl yaml response:

ResponseJSON:

  "metadata": {
    "name": "superstore-fleet",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "963994ca-cd96-4a4a-8b3d-8510260ba207",
    "creation_timestamp": "2022-07-28T12:10:06.329250674Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null,
    "labels": {
    }
  },
  "spec": {
    "fleet_label": "superstore-fleet",
    "volterra_software_version": "2019-build-9981",
    "network_connectors": [
      {
        "kind": "network_connector",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "system",
        "name": "connect-in-out"
      }
    ],
    "network_firewall": [
      {
        "kind": "network_firewall",
        "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
        "tenant": "acmecorp",
        "namespace": "system",
        "name": "superstore-firewall"
      }
    ],
    "operating_system_version": "",
    "outside_virtual_network": [
    ],
    "inside_virtual_network": [
    ],
    "no_bond_devices": {

    },
    "no_storage_interfaces": {

    },
    "no_storage_device": {

    },
    "default_storage_class": {

    },
    "no_dc_cluster_group": {

    },
    "disable_gpu": {

    },
    "no_storage_static_routes": {

    },
    "enable_default_fleet_config_download": false,
    "logs_streaming_disabled": {

    },
    "allow_all_usb": {

    },
    "disable_vm": {

    },
    "blocked_services": [
    ]
  }
}```
`

Request using curl:

    


curl -X 'POST' -d '{"metadata":{"name":"superstore-fleet","namespace":"system"},"spec":{"fleet_label":"superstore-fleet","volterra_software_version":"2019-build-9981","network_connectors":[{"kind":"network_connector","tenant":"acmecorp","namespace":"system","name":"connect-in-out"}],"network_firewall":[{"kind":"network_firewall","tenant":"acmecorp","namespace":"system","name":"superstore-firewall"}],"interface_list":{"interfaces":[{"tenant":"acmecorp","namespace":"system","name":"int-eth0"},{"tenant":"acmecorp","namespace":"system","name":"int-eth1"}]},"no_bond_devices":{},"no_storage_interfaces":{},"no_storage_device":{},"default_storage_class":{},"no_dc_cluster_group":{},"disable_gpu":{},"no_storage_static_routes":{},"logs_streaming_disabled":{},"allow_all_usb":{},"disable_vm":{}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/fleets'



curl response:

	


HTTP/1.1 200 OK Content-Type: application/json Date: Thu, 28 Jul 2022 12:10:06 GMT Vary: Accept-Encoding

{ "metadata": { "name": "superstore-fleet", "namespace": "system", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "963994ca-cd96-4a4a-8b3d-8510260ba207", "creation_timestamp": "2022-07-28T12:10:06.329250674Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [ ], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": { } }, "spec": { "fleet_label": "superstore-fleet", "volterra_software_version": "2019-build-9981", "network_connectors": [ { "kind": "network_connector", "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff", "tenant": "acmecorp", "namespace": "system", "name": "connect-in-out" } ], "network_firewall": [ { "kind": "network_firewall", "uid": "ffffffff-ffff-ffff-ffff-ffffffffffff", "tenant": "acmecorp", "namespace": "system", "name": "superstore-firewall" } ], "operating_system_version": "", "outside_virtual_network": [ ], "inside_virtual_network": [ ], "no_bond_devices": {

},
"no_storage_interfaces": {

},
"no_storage_device": {

},
"default_storage_class": {

},
"no_dc_cluster_group": {

},
"disable_gpu": {

},
"no_storage_static_routes": {

},
"enable_default_fleet_config_download": false,
"logs_streaming_disabled": {

},
"allow_all_usb": {

},
"disable_vm": {

},
"blocked_services": [
]

} }