label: Keypair name
description: The name of the stack's keypair
default: keypair_name
+ security_group_name:
+ type: string
+ label: Security Group name
+ description: The name of the stack's security group
+ default: security_group_name
inst1_name:
type: string
label: First VM name
flavor1:
type: OS::Nova::Flavor
properties:
- ram: 4096
- vcpus: 4
- disk: 4
+ ram: 1024
+ vcpus: 2
+ disk: 2
flavor2:
type: OS::Nova::Flavor
properties:
- ram: 4096
- vcpus: 4
- disk: 4
+ ram: 1024
+ vcpus: 2
+ disk: 2
network:
type: OS::Neutron::Net
router: { get_resource: management_router }
subnet: { get_resource: subnet }
+ server_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ description: Add security group rules for server
+ name: { get_param: security_group_name }
+ rules:
+ - remote_ip_prefix: 0.0.0.0/0
+ protocol: tcp
+ port_range_min: 22
+ port_range_max: 22
+ - remote_ip_prefix: 0.0.0.0/0
+ protocol: icmp
+
floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: { get_param: external_net_name }
floating_ip_association:
- type: OS::Nova::FloatingIPAssociation
+ type: OS::Neutron::FloatingIPAssociation
properties:
- floating_ip: { get_resource: floating_ip }
- server_id: {get_resource: vm1}
+ floatingip_id: { get_resource: floating_ip }
+ port_id: {get_resource: port1}
keypair:
type: OS::Nova::KeyPair
name: { get_param: keypair_name }
save_private_key: True
+ port1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: network }
+ security_groups: [{ get_resource: server_security_group }]
+ fixed_ips:
+ - subnet_id: { get_resource: subnet }
+
vm1:
type: OS::Nova::Server
- depends_on: [subnet, keypair, flavor1]
+ depends_on: [subnet, keypair, flavor1, port1]
properties:
name: { get_param: inst1_name }
image: { get_param: image1_name }
flavor: { get_resource: flavor1 }
key_name: {get_resource: keypair}
networks:
- - network: { get_resource: network }
+ - port: { get_resource: port1 }
vm2:
type: OS::Nova::Server
- depends_on: [subnet, flavor2]
+ depends_on: [subnet, keypair, flavor2]
properties:
name: { get_param: inst2_name }
image: { get_param: image2_name }