ves-io-schema-views-voltstack_site-API-Create

Examples of creating voltstack_site

Usecase:

Create voltstack site with bond device, network interfaces, storage device and storage class

Request using vesctl:

vesctl configuration create voltstack_site -i voltstack_site.yaml

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

metadata:
  name: cluster-1
  namespace: system
spec:
  bondDeviceList:
    bondDevices:
    - activeBackup: {}
      devices:
      - eth1
      - eth2
      linkPollingInterval: 501
      linkUpDelay: 200
      name: bond0
    - activeBackup: {}
      devices:
      - em0
      - em1
      linkPollingInterval: 501
      linkUpDelay: 200
      name: bond2
  customNetworkConfig:
    defaultConfig: {}
    interfaceList:
      interfaces:
      - defaultInterface:
          cluster: {}
          device: eth0
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          untagged: {}
      - ethernetInterface:
          cluster: {}
          device: bond0
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          vlanId: 400
    noForwardProxy: {}
    noGlobalNetwork: {}
    noNetworkPolicy: {}
  customStorageConfig:
    noStaticRoutes: {}
    storageClassList:
      storageClasses:
      - openebsEnterprise:
          protocol: iscsi
          replication: 3
        storageDevice: dev0
    storageDeviceList:
      storageDevices:
      - advancedAdvancedParameters:
          k: v
        openebsEnterprise:
          mayastorPools:
          - node: master-0
            poolDiskDevices:
            - dev/sda
            poolName: pool-0-master-0
        storageDevice: dev0
    storageInterfaceList:
      storageInterfaces:
      - description: Storage Network Bond
        labels:
          abc: xyz
        storageInterface:
          cluster: {}
          device: bond2
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          vlanId: 200
  disableGpu: {}
  masterNodes:
  - master0
  - master1
  - master2
  volterraCertifiedHw: dell-edger640-series-voltstack-combo
  workerNodes:
  - worker0
  - worker1
  - worker2

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: cluster-1
  namespace: system
spec:
  bondDeviceList:
    bondDevices:
    - activeBackup: {}
      devices:
      - eth1
      - eth2
      linkPollingInterval: 501
      linkUpDelay: 200
      name: bond0
    - activeBackup: {}
      devices:
      - em0
      - em1
      linkPollingInterval: 501
      linkUpDelay: 200
      name: bond2
  customNetworkConfig:
    defaultConfig: {}
    interfaceList:
      interfaces:
      - defaultInterface:
          cluster: {}
          device: eth0
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          untagged: {}
        labels: {}
      - ethernetInterface:
          cluster: {}
          device: bond0
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          vlanId: 400
        labels: {}
    noForwardProxy: {}
    noGlobalNetwork: {}
    noNetworkPolicy: {}
  customStorageConfig:
    noStaticRoutes: {}
    storageClassList:
      storageClasses:
      - advancedStorageParameters: {}
        openebsEnterprise:
          protocol: iscsi
          replication: 3
        storageDevice: dev0
    storageDeviceList:
      storageDevices:
      - advancedAdvancedParameters:
          k: v
        openebsEnterprise:
          mayastorPools:
          - node: master-0
            poolDiskDevices:
            - dev/sda
            poolName: pool-0-master-0
        storageDevice: dev0
    storageInterfaceList:
      storageInterfaces:
      - description: Storage Network Bond
        labels:
          abc: xyz
        storageInterface:
          cluster: {}
          device: bond2
          dhcpClient: {}
          notPrimary: {}
          siteLocalNetwork: {}
          vlanId: 200
  disableGpu: {}
  masterNodes:
  - master0
  - master1
  - master2
  volterraCertifiedHw: dell-edger640-series-voltstack-combo
  workerNodes:
  - worker0
  - worker1
  - worker2
systemMetadata:
  creationTimestamp: "2020-11-24T10:47:39.667124600Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 2e3a7e96-d986-4035-a1f6-becbc88000d2

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"cluster-1","namespace":"system"},"spec":{"volterraCertifiedHw":"dell-edger640-series-voltstack-combo","masterNodes":["master0","master1","master2"],"workerNodes":["worker0","worker1","worker2"],"bondDeviceList":{"bondDevices":[{"name":"bond0","devices":["eth1","eth2"],"activeBackup":{},"linkPollingInterval":501,"linkUpDelay":200},{"name":"bond2","devices":["em0","em1"],"activeBackup":{},"linkPollingInterval":501,"linkUpDelay":200}]},"customNetworkConfig":{"defaultConfig":{},"interfaceList":{"interfaces":[{"defaultInterface":{"device":"eth0","cluster":{},"untagged":{},"dhcpClient":{},"siteLocalNetwork":{},"notPrimary":{}}},{"ethernetInterface":{"device":"bond0","cluster":{},"vlanId":400,"dhcpClient":{},"siteLocalNetwork":{},"notPrimary":{}}}]},"noNetworkPolicy":{},"noForwardProxy":{},"noGlobalNetwork":{}},"customStorageConfig":{"storageInterfaceList":{"storageInterfaces":[{"description":"Storage Network Bond","labels":{"abc":"xyz"},"storageInterface":{"device":"bond2","cluster":{},"vlanId":200,"dhcpClient":{},"siteLocalNetwork":{},"notPrimary":{}}}]},"storageDeviceList":{"storageDevices":[{"storageDevice":"dev0","openebsEnterprise":{"mayastorPools":[{"poolName":"pool-0-master-0","node":"master-0","poolDiskDevices":["dev/sda"]}]},"advancedAdvancedParameters":{"k":"v"}}]},"storageClassList":{"storageClasses":[{"storageDevice":"dev0","openebsEnterprise":{"protocol":"iscsi","replication":3}}]},"noStaticRoutes":{}},"disableGpu":{}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build186851157_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/voltstack_sites'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Tue, 24 Nov 2020 10:47:39 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "cluster-1",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "2e3a7e96-d986-4035-a1f6-becbc88000d2",
    "creation_timestamp": "2020-11-24T10:47:39.667124600Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "volterra_certified_hw": "dell-edger640-series-voltstack-combo",
    "master_nodes": [
      "master0",
      "master1",
      "master2"
    ],
    "worker_nodes": [
      "worker0",
      "worker1",
      "worker2"
    ],
    "volterra_software_version": "",
    "operating_system_version": "",
    "bond_device_list": {
      "bond_devices": [
        {
          "name": "bond0",
          "devices": [
            "eth1",
            "eth2"
          ],
          "active_backup": {

          },
          "link_polling_interval": 501,
          "link_up_delay": 200
        },
        {
          "name": "bond2",
          "devices": [
            "em0",
            "em1"
          ],
          "active_backup": {

          },
          "link_polling_interval": 501,
          "link_up_delay": 200
        }
      ]
    },
    "custom_network_config": {
      "default_config": {

      },
      "interface_list": {
        "interfaces": [
          {
            "description": "",
            "labels": {
            },
            "default_interface": {
              "device": "eth0",
              "cluster": {

              },
              "untagged": {

              },
              "dhcp_client": {

              },
              "site_local_network": {

              },
              "mtu": 0,
              "priority": 0,
              "not_primary": {

              }
            }
          },
          {
            "description": "",
            "labels": {
            },
            "ethernet_interface": {
              "device": "bond0",
              "cluster": {

              },
              "vlan_id": 400,
              "dhcp_client": {

              },
              "site_local_network": {

              },
              "mtu": 0,
              "priority": 0,
              "not_primary": {

              }
            }
          }
        ]
      },
      "no_network_policy": {

      },
      "no_forward_proxy": {

      },
      "no_global_network": {

      },
      "outside_vip": "",
      "outside_nameserver": "",
      "bgp_router_id": "",
      "bgp_peer_address": "",
      "vip_vrrp_mode": "VIP_VRRP_INVALID",
      "site_to_site_tunnel_ip": "",
      "tunnel_dead_timeout": 0
    },
    "custom_storage_config": {
      "storage_interface_list": {
        "storage_interfaces": [
          {
            "description": "Storage Network Bond",
            "labels": {
              "abc": "xyz"
            },
            "storage_interface": {
              "device": "bond2",
              "cluster": {

              },
              "vlan_id": 200,
              "dhcp_client": {

              },
              "site_local_network": {

              },
              "mtu": 0,
              "priority": 0,
              "not_primary": {

              }
            }
          }
        ]
      },
      "storage_device_list": {
        "storage_devices": [
          {
            "storage_device": "dev0",
            "openebs_enterprise": {
              "mayastor_pools": [
                {
                  "pool_name": "pool-0-master-0",
                  "node": "master-0",
                  "pool_disk_devices": [
                    "dev/sda"
                  ]
                }
              ]
            },
            "advanced_advanced_parameters": {
              "k": "v"
            }
          }
        ]
      },
      "storage_class_list": {
        "storage_classes": [
          {
            "storage_device": "dev0",
            "description": "",
            "default_storage_class": false,
            "openebs_enterprise": {
              "protocol": "iscsi",
              "replication": 3
            },
            "advanced_storage_parameters": {
            },
            "storage_class_name": ""
          }
        ]
      },
      "no_static_routes": {

      }
    },
    "disable_gpu": {

    },
    "address": "",
    "coordinates": null
  }
}