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": "71462dd1-5d54-438a-8a7b-ef15668d510d",
        "creation_timestamp": "2024-03-21T14:05:21.882813Z",
        "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": [],
        "performance_enhancement_mode": null,
        "default_sriov_interface": {}
    }
}
        

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=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/fleets'
        

curl response:

          HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:21 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "superstore-fleet",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "71462dd1-5d54-438a-8a7b-ef15668d510d",
    "creation_timestamp": "2024-03-21T14:05:21.882813Z",
    "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": [
    ],
    "performance_enhancement_mode": null,
    "default_sriov_interface": {

    }
  }
}