summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/rapid-openstack-server.yaml
blob: f1b52743ac4847f6c11b14a6247ff0ca724111d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
heat_template_version: 2014-10-16

description: single server resource used by resource groups.

parameters:
  PROX_public_net:
    type: string
  PROX_mgmt_net_id:
    type: string
  PROX_data_net_id:
    type: string
  PROX_server_name:
    type: string
  PROX_availability_zone:
    type: string
  PROX_security_group:
    type: string
  PROX_image:
    type: string
  PROX_key:
    type: string
  PROX_config:
    type: string

resources:
  PROX_instance:
    type: OS::Nova::Server
    properties:
      name: { get_param: PROX_server_name }
      availability_zone : {get_param: PROX_availability_zone}
      flavor: {get_resource: PROX_flavor}
      image: {get_param: PROX_image}
      key_name: {get_param: PROX_key}
      networks:
        - port: {get_resource: mgmt_port }
        - port: {get_resource: data_port }
      user_data: {get_param: PROX_config}    
      user_data_format: RAW

  PROX_flavor:
    type: OS::Nova::Flavor
    properties:
      ram: 4096
      vcpus: 4
      disk: 80
      extra_specs: {"hw:mem_page_size": "large","hw:cpu_policy": "dedicated","hw:cpu_thread_policy":"isolate"}

  mgmt_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: PROX_mgmt_net_id }
      security_groups:
        - {get_param: PROX_security_group}

  floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network: {get_param: PROX_public_net}
      port_id: {get_resource: mgmt_port}

  data_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: PROX_data_net_id }
      security_groups:
        - {get_param: PROX_security_group}

outputs:
  name:
    description: Name of the PROX instance
    value: {get_attr: [PROX_instance, name]}
  mngmt_ip:
    description: Management IP of the VM
    value: {get_attr: [floating_ip, floating_ip_address ]}
  data_plane_ip:
    description: List of DataPlane IPs of the VM
    value:
        - {get_attr: [data_port, fixed_ips, 0, ip_address]}
  data_plane_mac:
    description: List of DataPlane MACs of the VM
    value:
        - {get_attr: [data_port, mac_address]}