Automation Assembler
의 네트워크, 보안 그룹 및 로드 밸런서 리소스 예

Automation Assembler
클라우드 템플릿에서 네트워킹, 보안 및 로드 밸런서 리소스와 설정을 사용할 수 있습니다.
클라우드 템플릿 코드 옵션의 요약은 vRealize Automation 리소스 유형 스키마를 참조하십시오.
이러한 예에서는 기본 클라우드 템플릿 설계 내의 네트워크, 보안 및 로드 밸런서 리소스를 보여줍니다.

네트워크

리소스 시나리오
예제 클라우드 템플릿 설계 코드
DHCP IP 할당을 사용하여 여러 NIC가
vSphere
NSX
네트워크에 연결된
vSphere
시스템
resources: demo-machine: type: Cloud.vSphere.Machine properties: image: ubuntu flavor: small networks: - network: ${resource["demo-vSphere-Network"].id} deviceIndex: 0 - network: ${resource["demo-NSX-Network"].id} deviceIndex: 1 demo-vSphere-Network: type: Cloud.vSphere.Network properties: networkType: existing demo-NSX-Network: type: Cloud.NSX.Network properties: networkType: outbound
vlanIds
속성을 사용하여 VLAN 3개(123, 456 및 7)의 어레이를 지정하는
NSX
전용 네트워크
formatVersion: 1 inputs: {} resources: Cloud_Machine_1: type: Cloud.Machine properties: image: test flavor: test networks: - network: '${resource.Cloud_NSX_Network_1.id}' Cloud_NSX_Network_1: type: Cloud.NSX.Network properties: networkType: private vlanIds: - 123 - 456 - 7
Azure VM 배포를 위한 정적 IP 주소가 있는 전용 네트워크 추가
formatVersion: 1 inputs: {} resources: Cloud_Azure_Machine_1: type: Cloud.Machine properties: image: photon flavor: Standard_B1ls networks: - network: '${resource.Cloud_Network_1.id}' assignment: static address: 10.0.0.45 assignPublicIpAddress: false Cloud_Network_1: type: Cloud.Network properties: networkType: existing
VMware Aria Automation
IPAM에서 정적 IP 할당을 사용할 수 있습니다(
VMware Aria Automation
에서 제공되는 내부 또는 VMware Marketplace에서 사용 가능한 Infloblox 플러그인 중 하나와 같은
VMware Aria Automation
IPAM SDK 기반 외부). VMware Aria Automation 클라우드 템플릿의 네트워크 리소스에 대한 자세한 내용
주의 사항
섹션에 설명된 대로
assignment: static
의 다른 용도는 지원되지 않습니다.
resources: demo_vm: type: Cloud.vSphere.Machine properties: image: 'photon' cpuCount: 1 totalMemoryMB: 1024 networks: - network: ${resource.demo_nw.id} assignment: static demo_nw: type: Cloud.vSphere.Network properties: networkType: existing
기존 배포를 위한
Cloud.NSX.NAT
리소스에서 NAT 및 DNAT 포트 포워딩 규칙을 추가하거나 편집합니다.
resources: gw: type: Cloud.NSX.Gateway properties: networks: - ${resource.akout.id} nat: type: Cloud.NSX.Nat properties: networks: - ${resource.akout.id} natRules: - translatedInstance: ${resource.centos.networks[0].id} index: 0 protocol: TCP kind: NAT44 type: DNAT sourceIPs: any sourcePorts: 80 translatedPorts: 8080 destinationPorts: 8080 description: edit - translatedInstance: ${resource.centos.networks[0].id} index: 1 protocol: TCP kind: NAT44 type: DNAT sourceIPs: any sourcePorts: 90 translatedPorts: 9090 destinationPorts: 9090 description: add gateway: ${resource.gw.id} centos: type: Cloud.vSphere.Machine properties: image: WebTinyCentOS65x86 flavor: small customizationSpec: Linux networks: - network: ${resource.akout.id} assignment: static akout: type: Cloud.NSX.Network properties: networkType: outbound constraints: - tag: nsxt-nat-1-M2
공용 IP 대신 내부 IP를 사용하는 공용 클라우드 시스템. 이 예에서는 특정 네트워크 ID를 사용합니다.
참고:
networks:
설정에서
network:
옵션을 사용하여 대상 네트워크 ID를 지정합니다.
networks:
설정의
name:
옵션은 폐기되었으며 사용하면 안 됩니다.
resources: wf_proxy: type: Cloud.Machine properties: image: ubuntu 16.04 flavor: small constraints: - tag: 'platform:vsphere'
networks:
- network: '${resource.wf_net.id}'
assignPublicIpAddress: false
NSX
네트워크 리소스 유형을 사용하여 라우팅된 네트워크.
Cloud_NSX_Network_1: type: Cloud.NSX.Network properties: networkType: routed
클라우드 템플릿의 시스템 NIC 리소스에 태그를 추가합니다.
formatVersion: 1 inputs: {} resources: Cloud_Machine_1: type: Cloud.vSphere.Machine properties: flavor: small image: ubuntu networks: - name: '${resource.Cloud_Network_1.name}' deviceIndex: 0 tags: - key: 'nic0' value: null - key: internal value: true - name: '${resource.Cloud_Network_2.name}' deviceIndex: 1 tags: - key: 'nic1' value: null - key: internal value: false
아웃바운드 네트워크에 대한
NSX-T
논리적 스위치에 태그를 지정합니다.
태그 지정은
NSX-T
VMware Cloud on AWS
에 대해 지원됩니다.
이 시나리오에 대한 자세한 내용은 커뮤니티 블로그 게시물 Creating Tags in NSX를 참조하십시오.
Cloud_NSX_Network_1: type: Cloud.NSX.Network properties: networkType: outbound tags: - key: app value: opencart

보안 그룹

리소스 시나리오
예제 클라우드 템플릿 설계 코드
시스템 NIC에 제약 조건 태그가 적용된 기존 보안 그룹입니다.
기존 보안 그룹을 사용하려면
securityGroupType
속성에
existing
을 입력합니다.
태그 제약 조건을 사용하여 기존 보안 그룹을 할당하기 위해
Cloud.SecurityGroup
리소스에 태그를 할당할 수 있습니다. 태그가 포함되지 않은 보안 그룹은 클라우드 템플릿 설계에서 사용할 수 없습니다.
securityGroupType: existing
보안 그룹 리소스에 대해 제약 조건 태그를 설정해야 합니다. 이러한 제약 조건은 기존 보안 그룹에 설정된 태그와 일치해야 합니다.
securityGroupType: new
보안 그룹 리소스에 대해 제약 조건 태그를 설정할 수 없습니다.
formatVersion: 1 inputs: {} resources: allowSsh_sg:
type: Cloud.SecurityGroup
properties:
securityGroupType: existing
constraints:
- tag: allowSsh
compute: type: Cloud.Machine properties: image: centos flavor: small networks: - network: '${resource.prod-net.id}' securityGroups: - '${resource.allowSsh_sg.id}' prod-net: type: Cloud.Network properties: networkType: existing
Allow
Deny
액세스 옵션을 설명하는 2개의 방화벽 규칙이 포함된 주문형 보안 그룹입니다.
resources: Cloud_SecurityGroup_1:
type: Cloud.SecurityGroup
properties:
securityGroupType: new
rules: - ports: 5000 source: 'fc00:10:
000
:
000
:
000
:56ff:fe89:48b4'
access: Allow
direction: inbound
name: allow_5000
protocol: TCP - ports: 7000 source: 'fc00:10:
000
:
000
:
000
:56ff:fe89:48b4'
access: Deny
direction: inbound
name: deny_7000
protocol: TCP Cloud_vSphere_Machine_1: type: Cloud.vSphere.Machine properties: image: photon cpuCount: 1 totalMemoryMB: 256 networks: - network: '${resource.Cloud_Network_1.id}' assignIPv6Address: true assignment: static securityGroups: - '${resource.Cloud_SecurityGroup_1.id}' Cloud_Network_1: type: Cloud.Network properties: networkType: existing
다음을 포함하여 2개의 보안 그룹이 있는 복잡한 클라우드 템플릿:
  • 기존 보안 그룹 1개
  • 여러 방화벽 규칙 예가 있는 주문형 보안 그룹 1개
  • vSphere
    시스템 1개
  • 기존 네트워크 1개
이 샘플은 다양한 조합의 프로토콜 및 포트, 서비스, IP CIDR(소스 및 대상으로), IP 범위(소스 또는 대상으로)를 비롯해 임의, IPv6 및 (::/0)에 대한 옵션을 설명합니다.
시스템 NIC의 경우 연결된 네트워크 및 보안 그룹을 지정할 수 있습니다. NIC 인덱스 또는 IP 주소를 지정할 수도 있습니다.
formatVersion: 1 inputs: {} resources: DEMO_ESG :
existing security group - security group 1)
type: Cloud.SecurityGroup
properties: constraints: - tag: BlockAll
securityGroupType: existing
(
designation of existing for security group 1
) DEMO_ODSG: (
on-demand security group - security group 2)
)
type: Cloud.SecurityGroup
properties:
rules:
(
multiple firewall rules in this section
) -
name: IN-ANY
(
rule 1
) source: any service: any direction: inbound
access: Deny
- name: IN-SSH
(
rule 2
) source: any service: SSH direction: inbound
access: Allow
- name: IN-SSH-IP
(
rule 3
) source: 33.33.33.1-33.33.33.250 protocol: TCP ports: 223 direction: inbound
access: Allow
- name: IPv-6-ANY-SOURCE
(
rule 4
) source: '::/0' protocol: TCP ports: 223 direction: inbound
access: Allow
- name: IN-SSH-IP
(
rule 5
) source: 44.44.44.1/24 protocol: UDP ports: 22-25 direction: inbound
access: Allow
- name: IN-EXISTING-SG
(
rule 6
)
source: '${resource["DEMO_ESG"].id}'
protocol: ICMPv6 direction: inbound
access: Allow
- name: OUT-ANY
(
rule 7
) destination: any service: any direction: outbound
access: Deny
- name: OUT-TCP-IPv6
(
rule 8
) destination: '2001:0db8:85a3::8a2e:0370:7334/64' protocol: TCP ports: 22 direction: outbound
access: Allow
- name: IPv6-ANY-DESTINATION
(
rule 9
) destination: '::/0' protocol: UDP ports: 23 direction: outbound
access: Allow
- name: OUT-UDP-SERVICE
(
rule 10
) destination: any service: NTP direction: outbound
access: Allow
securityGroupType: new
(
designation of on-demand for security group 2
) DEMO_VC_MACHINE: (
machine resource
)
type: Cloud.vSphere.Machine
properties: image: PHOTON cpuCount: 1 totalMemoryMB: 1024
networks:
(
Machine network NICs
)
- network: '${resource.DEMO_NW.id}' securityGroups: - '${resource.DEMO_ODSG.id}' - '${resource.DEMO_ESG.id}'
DEMO_NETWORK: (
network resource
)
type: Cloud.vSphere.Network
properties:
networkType: existing
constraints: - tag: nsx62

로드 밸런서

리소스 시나리오
예제 클라우드 템플릿 설계 코드
로드 밸런서 로깅 수준, 알고리즘 및 크기를 지정합니다.
로깅 수준, 알고리즘 및 크기의 사용을 보여 주는 샘플 NSX 로드 밸런서:
resources: Cloud_LoadBalancer_1:
type: Cloud.NSX.LoadBalancer
properties: name: myapp-lb network: '${appnet-public.name}' instances: '${wordpress.id}' routes: - protocol: HTTP port: '80'
loggingLevel: CRITICAL
algorithm: LEAST_CONNECTION
type: MEDIUM
로드 밸런서를 명명된 시스템 또는 명명된 시스템 NIC와 연결합니다.
machine ID
또는
machine network ID
를 지정하여 시스템을 로드 밸런서 풀에 추가할 수 있습니다. 인스턴스 속성은 시스템(
machine by ID
)및 NIC(
machine by network ID
)를 모두 지원합니다.
첫 번째 예에서 배포는
machine by ID
설정을 사용하여 시스템이 네트워크에 배포된 경우 시스템을 로드 밸런싱합니다.
두 번째 예에서 배포는
machine by network ID
설정을 사용하여 시스템이 명명된 시스템 NIC에 배포된 경우에만 시스템을 로드 밸런싱합니다.
세 번째 예에서는 동일한
instances
옵션에 사용되는 두 설정을 보여 줍니다.
instances
속성을 사용하여 시스템 ID 또는 시스템 네트워크 ID를 정의할 수 있습니다.
  • 시스템 ID
    Cloud_LoadBalancer_1: type: Cloud.LoadBalancer properties: network: '${resource.Cloud_Network_1.id}' instances: '${resource.Cloud_Machine_1.id}'
  • 시스템 네트워크 ID
    Cloud_LoadBalancer_1: type: Cloud.LoadBalancer properties: network: '${resource.Cloud_Network_1.id}' instances: '${resource.Cloud_Machine_1.networks[0].id}'
  • 로드 밸런서 포함을 위해 지정된 시스템 하나와 로드 밸런서 포함을 위해 지정된 다른 시스템 NIC:
    instances: - resource.Cloud_Machine_1.id - resource.Cloud_Machine_2.networks[2].id
NSX
로드 밸런서에 상태 점검 설정을 추가합니다. 추가 옵션에는
httpMethod
,
requestBody
responseBody
가 포함됩니다.
myapp-lb:
type: Cloud.NSX.LoadBalancer
properties: name: myapp-lb network: '${appnet-public.name}' instances: '${wordpress.id}' routes: - protocol: HTTP port: '80' algorithm: ROUND_ROBIN instanceProtocol: HTTP instancePort: '80'
healthCheckConfiguration:
protocol: HTTP
port: '80'
urlPath: /mywordpresssite/wp-admin/install.php
intervalSeconds: 60
timeoutSeconds: 10
unhealthyThreshold: 10
healthyThreshold: 2
connectionLimit: '50' connectionRateLimit: '50' maxConnections: '500' minConnections: '' internetFacing: true{code}
원 암(one arm) 로드 밸런서가 있는 주문형 네트워크입니다.
inputs: {} resources: mp-existing: type: Cloud.Network properties: name: mp-existing networkType: existing mp-wordpress: type: Cloud.vSphere.Machine properties: name: wordpress count: 2 flavor: small image: tiny customizationSpec: Linux networks: - network: '${resource["mp-private"].id}' mp-private: type: Cloud.NSX.Network properties: name: mp-private networkType: private constraints: - tag: nsxt mp-wordpress-lb: type: Cloud.LoadBalancer properties: name: wordpress-lb internetFacing: false network: '${resource.mp-existing.id}' instances: '${resource["mp-wordpress"].id}' routes: - protocol: HTTP port: '80' instanceProtocol: HTTP instancePort: '80' healthCheckConfiguration: protocol: HTTP port: '80' urlPath: /index.pl intervalSeconds: 60 timeoutSeconds: 30 unhealthyThreshold: 5 healthyThreshold: 2
로드 밸런서가 있는 기존 네트워크입니다.
formatVersion: 1 inputs: count: type: integer default: 1 resources: ubuntu-vm: type: Cloud.Machine properties: name: ubuntu flavor: small image: tiny count: '${input.count}' networks: - network: '${resource.Cloud_NSX_Network_1.id}' Provider_LoadBalancer_1: type: Cloud.LoadBalancer properties: name: OC-LB routes: - protocol: HTTP port: '80' instanceProtocol: HTTP instancePort: '80' healthCheckConfiguration: protocol: HTTP port: '80' urlPath: /index.html intervalSeconds: 60 timeoutSeconds: 5 unhealthyThreshold: 5 healthyThreshold: 2 network: '${resource.Cloud_NSX_Network_1.id}' internetFacing: false instances: '${resource["ubuntu-vm"].id}' Cloud_NSX_Network_1: type: Cloud.NSX.Network properties: networkType: existing constraints: - tag: nsxt24prod

자세히 알아보기

관련 정보는 다음 VMware 블로그에서 확인할 수 있습니다.