ves-io-schema-views-aws_vpc_site-API-Create

Examples of creating awsvpcsite

Usecase:

Create vpc-site1

Request using vesctl:

vesctl configuration create aws_vpc_site -i aws_vpc_site.yaml

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

metadata:
  name: vpc-site1
  namespace: system
spec:
  awsCred:
    name: unit-creds-views-aws-test
    namespace: system
  awsRegion: eu-west-3
  logsStreamingDisabled: {}
  nodesPerAz: 0
  os:
    defaultOsVersion: {}
  sw:
    defaultSwVersion: {}
  voltstackCluster:
    awsCertifiedHw: aws-byol-voltstack-combo
    azNodes:
    - awsAzName: eu-west-3a
      localSubnet:
        subnetParam:
          ipv4: 192.168.1.0/24
    - awsAzName: eu-west-3b
      localSubnet:
        subnetParam:
          ipv4: 192.168.2.0/24
    - awsAzName: eu-west-3c
      localSubnet:
        subnetParam:
          ipv4: 192.168.3.0/24
    noForwardProxy: null
    noGlobalNetwork: null
    noK8sCluster: {}
    noNetworkPolicy: null
    noOutsideStaticRoutes: null
    storageClassList:
      storageClasses:
      - openebsEnterprise:
          replication: 3
          storageClassSize: 10
        storageClassName: maya-storage-class
  vpc:
    newVpc:
      nameTag: aws-vpc-unit-test
      primaryIpv4: 192.168.0.0/16

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: vpc-site1
  namespace: system
spec:
  awsCred:
    name: unit-creds-views-aws-test
    namespace: system
    tenant: acmecorp
  awsRegion: eu-west-3
  logsStreamingDisabled: {}
  nodesPerAz: 0
  vipParamsPerAz: []
  voltstackCluster:
    awsCertifiedHw: aws-byol-voltstack-combo
    azNodes:
    - awsAzName: eu-west-3a
      localSubnet:
        subnetParam:
          ipv4: 192.168.1.0/24
    - awsAzName: eu-west-3b
      localSubnet:
        subnetParam:
          ipv4: 192.168.2.0/24
    - awsAzName: eu-west-3c
      localSubnet:
        subnetParam:
          ipv4: 192.168.3.0/24
    noK8sCluster: {}
    storageClassList:
      storageClasses:
      - openebsEnterprise:
          replication: 3
          storageClassSize: 10
        storageClassName: maya-storage-class
  vpc:
    newVpc:
      nameTag: aws-vpc-unit-test
      primaryIpv4: 192.168.0.0/16
systemMetadata:
  creationTimestamp: "2021-08-25T09:04:22.060118582Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: a5a264dc-b96b-4b8b-9bc5-5d4721379e8b

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"vpc-site1","namespace":"system"},"spec":{"vpc":{"newVpc":{"nameTag":"aws-vpc-unit-test","primaryIpv4":"192.168.0.0/16"}},"voltstackCluster":{"awsCertifiedHw":"aws-byol-voltstack-combo","azNodes":[{"awsAzName":"eu-west-3a","localSubnet":{"subnetParam":{"ipv4":"192.168.1.0/24"}}},{"awsAzName":"eu-west-3b","localSubnet":{"subnetParam":{"ipv4":"192.168.2.0/24"}}},{"awsAzName":"eu-west-3c","localSubnet":{"subnetParam":{"ipv4":"192.168.3.0/24"}}}],"noNetworkPolicy":null,"noForwardProxy":null,"noOutsideStaticRoutes":null,"noGlobalNetwork":null,"storageClassList":{"storageClasses":[{"storageClassName":"maya-storage-class","openebsEnterprise":{"replication":3,"storageClassSize":10}}]},"noK8sCluster":{}},"awsCred":{"namespace":"system","name":"unit-creds-views-aws-test"},"awsRegion":"eu-west-3","logsStreamingDisabled":{},"sw":{"defaultSwVersion":{}},"os":{"defaultOsVersion":{}},"nodesPerAz":0}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/aws_vpc_sites'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:04:22 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "vpc-site1",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "a5a264dc-b96b-4b8b-9bc5-5d4721379e8b",
    "creation_timestamp": "2021-08-25T09:04:22.060118582Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "vpc": {
      "new_vpc": {
        "name_tag": "aws-vpc-unit-test",
        "primary_ipv4": "192.168.0.0/16",
        "allocate_ipv6": false
      }
    },
    "voltstack_cluster": {
      "aws_certified_hw": "aws-byol-voltstack-combo",
      "az_nodes": [
        {
          "aws_az_name": "eu-west-3a",
          "local_subnet": {
            "subnet_param": {
              "ipv4": "192.168.1.0/24",
              "ipv6": ""
            }
          },
          "disk_size": 0
        },
        {
          "aws_az_name": "eu-west-3b",
          "local_subnet": {
            "subnet_param": {
              "ipv4": "192.168.2.0/24",
              "ipv6": ""
            }
          },
          "disk_size": 0
        },
        {
          "aws_az_name": "eu-west-3c",
          "local_subnet": {
            "subnet_param": {
              "ipv4": "192.168.3.0/24",
              "ipv6": ""
            }
          },
          "disk_size": 0
        }
      ],
      "storage_class_list": {
        "storage_classes": [
          {
            "storage_class_name": "maya-storage-class",
            "default_storage_class": false,
            "openebs_enterprise": {
              "replication": 3,
              "storage_class_size": 10
            }
          }
        ]
      },
      "allowed_vip_port": null,
      "no_k8s_cluster": {

      }
    },
    "aws_cred": {
      "tenant": "acmecorp",
      "namespace": "system",
      "name": "unit-creds-views-aws-test"
    },
    "instance_type": "",
    "disk_size": 0,
    "volterra_software_version": "",
    "operating_system_version": "",
    "aws_region": "eu-west-3",
    "ssh_key": "",
    "address": "",
    "coordinates": null,
    "logs_streaming_disabled": {

    },
    "site_state": "ONLINE",
    "vip_params_per_az": [
    ],
    "user_modification_timestamp": null,
    "nodes_per_az": 0
  }
}