aboutsummaryrefslogtreecommitdiffstats
path: root/heat/HeatTemplate.yaml
blob: 4b0aa7aa4ce4dd99952e9eb0f32c15241249512e (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
heat_template_version: 2014-10-16
outputs:
  description: this
  instance_ip_1:
    description: IP address of the instance
    value:
      get_attr:
      - floating_ip_1
      - floating_ip_address
  instance_ip_2:
    description: IP address of the instance
    value:
      get_attr:
      - floating_ip_2
      - floating_ip_address
parameters:
  availability_zone:
    default: compute1
    description: The AvailZone.
    type: string
  private_net_name:
    default: private_network
    type: string
  public_network:
    default: provider_network
    description: Public
    label: Publi_N_ID
    type: string
resources:
  demo1_security_Group:
    properties:
      name: demo1_security_Group
      rules:
      - port_range_max: 22
        port_range_min: 22
        protocol: tcp
      - protocol: icmp
    type: OS::Neutron::SecurityGroup
  floating_ip_1:
    properties:
      floating_network:
        get_param: public_network
    type: OS::Neutron::FloatingIP
  floating_ip_2:
    properties:
      floating_network:
        get_param: public_network
    type: OS::Neutron::FloatingIP
  floating_ip_assoc_1:
    properties:
      floatingip_id:
        get_resource: floating_ip_1
      port_id:
        get_resource: public_port_1
    type: OS::Neutron::FloatingIPAssociation
  floating_ip_assoc_2:
    properties:
      floatingip_id:
        get_resource: floating_ip_2
      port_id:
        get_resource: public_port_2
    type: OS::Neutron::FloatingIPAssociation
  my_instance_1:
    properties:
      availability_zone: nova
      flavor: m1.small
      image: Cirros
      networks:
      - port:
          get_resource: public_port_1
    type: OS::Nova::Server
  my_instance_2:
    properties:
      availability_zone: nova
      flavor: m1.small
      image: Cirros
      networks:
      - port:
          get_resource: public_port_2
    type: OS::Nova::Server
  private_network:
    type: OS::Neutron::Net
  private_subnet:
    properties:
      cidr: 10.10.17.0/24
      dns_nameservers: [ "8.8.8.8" ]
      network_id:  { get_resource: private_network }
    type: OS::Neutron::Subnet
  public_port_1:
    properties:
      fixed_ips:
      - subnet_id:
          get_resource: private_subnet
      network:
        get_resource: private_network
      security_groups:
      - get_resource: demo1_security_Group
    type: OS::Neutron::Port
  public_port_2:
    properties:
      fixed_ips:
      - subnet_id:
          get_resource: private_subnet
      network:
        get_resource: private_network
      security_groups:
      - get_resource: demo1_security_Group
    type: OS::Neutron::Port
  router_1:
    properties:
      external_gateway_info:
        network: { get_param: public_network  }
    type: OS::Neutron::Router
  router_interface:
    properties:
      router_id: { get_resource: router_1 } 
      subnet: { get_resource: private_subnet }
    type: OS::Neutron::RouterInterface
outputs:
    description: 'none'