API 호출을 사용하여 North-South 서비스 VM을 업그레이드합니다.

사전 요구 사항

프로시저

  1. 다음 API를 사용하여 North-South 서비스 배포의 페이로드를 검색합니다.
    GET https://<nsx-manager>/api/v1/serviceinsertion/services/<ns_service_id>
    {
    "functionalities": [
    "NG_FW"
    ],
    "implementations": [
    "NORTH_SOUTH"
    ],
    "attachment_point": [
    "TIER1_LR",
    "TIER0_LR"
    ],
    "transports": [
    "L2_BRIDGE"
    ],
    "on_failure_policy": "BLOCK",
    "service_deployment_spec": {
    "deployment_template": [
    {
    "name": "NS_DepTemp",
    "attributes": [
    {
    "key": "LicenseKey",
    "display_name": "License",
    "attribute_type": "STRING",
    "read_only": false
    }
    ]
    }
    ],
    "deployment_specs": [
    {
    "name": "NS_DepSpec",
    "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/NorthSouth/v1/PA-VM-NST-8.1.3-c15.ovf",
    "min_host_version": "6.5",
    "host_type": "ESXI",
    "service_form_factor": "MEDIUM",
    "svm_version": "1.0"
    }
    ],
    "nic_metadata_list": [
    {
    "interface_label": "eth",
    "interface_index": 2,
    "interface_type": "DATA2"
    },
    {
    "interface_label": "eth",
    "interface_index": 0,
    "interface_type": "MANAGEMENT",
    "user_configurable": true
    },
    {
    "interface_label": "eth",
    "interface_index": 1,
    "interface_type": "DATA1"
    },
    {
    "interface_label": "eth",
    "interface_index": 4,
    "interface_type": "HA2"
    },
    {
    "interface_label": "eth",
    "interface_index": 3,
    "interface_type": "HA1"
    }
    ]
    },
    "vendor_id": "ABC_Service",
    "resource_type": "ServiceDefinition",
    "id": "9ea92ea7-a6b0-4640-9c28-5b364713e8c0",
    "display_name": "NS Service_automation",
    "description": "This service is inserted at T0 & T1 router and it provides advanced security",
    "_create_user": "admin",
    "_create_time": 1614099580424,
    "_last_modified_user": "admin",
    "_last_modified_time": 1614099580424,
    "_system_owned": false,
    "_protection": "NOT_PROTECTED",
    "_revision": 0
    }
  2. 서비스 배포 규격을 업데이트합니다. 이 호출에서 배포 규격이 NS_Deployment_Specfication_11NS_Deployment_Specfication_12로 업데이트됩니다.
    PUT https://<nsx-manager>/api/v1/serviceinsertion/services/<ns_service_id>
    {
    "functionalities": [
    "NG_FW"
    ],
    "implementations": [
    "NORTH_SOUTH"
    ],
    "attachment_point": [
    "TIER1_LR",
    "TIER0_LR"
    ],
    "transports": [
    "L2_BRIDGE"
    ],
    "on_failure_policy": "BLOCK",
    "service_deployment_spec": {
    "deployment_template": [
    {
    "name": "NS_DepTemp",
    "attributes": [
    {
    "key": "LicenseKey",
    "display_name": "License",
    "attribute_type": "STRING",
    "read_only": false
    }
    ]
    }
    ],
    "deployment_specs": [
    {
    "name": "NS_Deployment_Specfication_11",
    "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/NorthSouth/v1/PA-VM-NST-8.1.3-c15.ovf",
    "host_type": "ESXI"
    },
    
    {
    "name": "NS_Deployment_Specfication_12",
    "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/NorthSouth/v1/PA-VM-NST-8.1.3-c15.ovf",
    "host_type": "ESXI"
    }
    ],
    "nic_metadata_list": [
    {
    "interface_label": "eth",
    "interface_index": 2,
    "interface_type": "DATA2"
    },
    {
    "interface_label": "eth",
    "interface_index": 0,
    "interface_type": "MANAGEMENT",
    "user_configurable": true
    },
    {
    "interface_label": "eth",
    "interface_index": 1,
    "interface_type": "DATA1"
    },
    {
    "interface_label": "eth",
    "interface_index": 4,
    "interface_type": "HA2"
    },
    {
    "interface_label": "eth",
    "interface_index": 3,
    "interface_type": "HA1"
    }
    ]
    },
    "vendor_id": "ABC_Service",
    "resource_type": "ServiceDefinition",
    "id": "9ea92ea7-a6b0-4640-9c28-5b364713e8c0",
    "display_name": "NS Service_automation",
    "description": "This service is inserted at T0 & T1 router and it provides advanced security",
    "_create_user": "admin",
    "_create_time": 1614099580424,
    "_last_modified_user": "admin",
    "_last_modified_time": 1614099580424,
    "_system_owned": false,
    "_protection": "NOT_PROTECTED",
    "_revision": 0
    }
  3. Tier-0 서비스 인스턴스 배포 규격 이름을 NS_Deployment_Specfication_12로 업데이트합니다. 규격을 업데이트하려면 GET 호출(이전 단계)에서 반환된 응답을 사용하고 다음 PATCH 호출에서 deployment_spec_name: NS_Deployment_Specfication_12를 사용하여 동일한 응답을 공급합니다. NSX는 Tier-0 서비스 VM을 업그레이드합니다.
    PATCH https://<nsx-manager>/policy/api/v1/infra/tier-0s/<tier0_LR_id>/locale-services/<tier0_localeservice_id>/service-instances/<tier0_serviceinstance_id>
    {
    "context_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca",
    "compute_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca:domain-c16",
    "storage_id": "datastore-13",
    "primary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT",
    "primary_interface_mgmt_ip": "10.161.154.2",
    "secondary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT",
    "secondary_interface_mgmt_ip": "10.161.154.3",
    "deployment_spec_name": "NS_Deployment_Specfication_12",
    "failure_policy": "BLOCK",
    "deployment_template_name": "NS_DepTemp",
    "attributes": [
    {
    "key": "LicenseKey",
    "display_name": "License",
    "value": "adklfjakldfjlkajfkl",
    "attribute_type": "STRING",
    "read_only": false
    }
    ],
    "resource_type": "PolicyServiceInstance",
    "id": "PAN-1",
    "display_name": "PAN-1",
    "path": "/infra/tier-0s/Tier0-LR-1/locale-services/tier0localservices/service-instances/PAN-1",
    "relative_path": "PAN-1",
    "parent_path": "/infra/tier-0s/Tier0-LR-1/locale-services/tier0localservices",
    "unique_id": "5500a8e4-255b-4131-9da2-9a9a2be21b32",
    "marked_for_delete": false,
    "overridden": false,
    "partner_service_name": "NS Service_automation",
    "deployment_mode": "ACTIVE_STANDBY",
    "transport_type": "L2_BRIDGE",
    "_create_user": "admin",
    "_create_time": 1614099590522,
    "_last_modified_user": "admin",
    "_last_modified_time": 1614099590527,
    "_system_owned": false,
    "_protection": "NOT_PROTECTED",
    "_revision": 0
    }
  4. Tier-1 논리적 라우터 1의 서비스 인스턴스 배포 규격을 NS_Deployment_Specfication_12로 업데이트합니다. 이를 위해 GET 호출에서 반환된 응답을 사용하고 deployment_spec_name: NS_Deployment_Specfication_12를 사용하여 PATCH 호출에 동일한 응답을 공급합니다. NSX는 Tier-1 게이트웨이 서비스 VM을 업그레이드합니다.
    PATCH https://<nsx-manager>/policy/api/v1/infra/tier-1s/<tier1_LR_id>/locale-services/<tier1_LR1_localeservice_id>/service-instances/<tier1_LR1_serviceinstance_id>
    {
    "context_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca",
    "compute_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca:domain-c16",
    "storage_id": "datastore-13",
    "primary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT",
    "primary_interface_mgmt_ip": "10.161.154.4",
    "secondary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT",
    "secondary_interface_mgmt_ip": "10.161.154.5",
    "deployment_spec_name": "NS_Deployment_Specfication_12",
    "failure_policy": "BLOCK",
    "deployment_template_name": "NS_DepTemp",
    "attributes": [
    {
    "key": "LicenseKey",
    "display_name": "License",
    "value": "adklfjakldfjlkajfkl",
    "attribute_type": "STRING",
    "read_only": false
    }
    ],
    "resource_type": "PolicyServiceInstance",
    "id": "PAN-1-tier-1",
    "display_name": "PAN-1-tier-1",
    "path": "/infra/tier-1s/TIER-1-LR-1/locale-services/1-policyconnectivity-1284/service-instances/PAN-1-tier-1",
    "relative_path": "PAN-1-tier-1",
    "parent_path": "/infra/tier-1s/TIER-1-LR-1/locale-services/1-policyconnectivity-1284",
    "unique_id": "4bd48611-3257-4895-8295-c49fdfa644b3",
    "marked_for_delete": false,
    "overridden": false,
    "partner_service_name": "NS Service_automation",
    "deployment_mode": "ACTIVE_STANDBY",
    "transport_type": "L2_BRIDGE",
    "_create_user": "admin",
    "_create_time": 1614099595487,
    "_last_modified_user": "admin",
    "_last_modified_time": 1614099595489,
    "_system_owned": false,
    "_protection": "NOT_PROTECTED",
    "_revision": 0
    }
  5. Tier-1 논리적 라우터 2의 서비스 인스턴스 배포 규격을 NS_Deployment_Specfication_12로 업데이트합니다. 배포 규격을 업데이트하려면 GET 호출(이전 단계)에서 반환된 응답을 사용하고 다음 PATCH 호출에서 deployment_spec_name: NS_Deployment_Specfication_12를 사용하여 동일한 응답을 붙여넣습니다. NSX는 Tier-1 논리적 라우터 2 서비스 VM을 업그레이드합니다.
    PATCH https://<nsx-manager>/policy/api/v1/infra/tier-1s/<tier1_LR2_id>/locale-services/<tier1_LR2_localeservice_id>/service-instances/<tier1_LR2_serviceinstance_id>
    {
    "context_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca",
    "compute_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca:domain-c16",
    "storage_id": "datastore-13",
    "primary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT",
    "primary_interface_mgmt_ip": "10.161.154.6",
    "secondary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT",
    "secondary_interface_mgmt_ip": "10.161.154.7",
    "deployment_spec_name": "NS_Deployment_Specfication_12",
    "failure_policy": "BLOCK",
    "deployment_template_name": "NS_DepTemp",
    "attributes": [
    {
    "key": "LicenseKey",
    "display_name": "License",
    "value": "adklfjakldfjlkajfkl",
    "attribute_type": "STRING",
    "read_only": false
    }
    ],
    "resource_type": "PolicyServiceInstance",
    "id": "PAN-2-tier-1",
    "display_name": "PAN-2-tier-1",
    "path": "/infra/tier-1s/TIER-1-LR-2/locale-services/2-policyconnectivity-1359/service-instances/PAN-2-tier-1",
    "relative_path": "PAN-2-tier-1",
    "parent_path": "/infra/tier-1s/TIER-1-LR-2/locale-services/2-policyconnectivity-1359",
    "unique_id": "eb9e61e7-edc3-4c29-93cc-d3c4eeb4a6c7",
    "marked_for_delete": false,
    "overridden": false,
    "partner_service_name": "NS Service_automation",
    "deployment_mode": "ACTIVE_STANDBY",
    "transport_type": "L2_BRIDGE",
    "_create_user": "admin",
    "_create_time": 1614099599703,
    "_last_modified_user": "admin",
    "_last_modified_time": 1614099599705,
    "_system_owned": false,
    "_protection": "NOT_PROTECTED",
    "_revision": 0
    }

결과

NSX는 North-South 서비스 VM을 업그레이드합니다.