[Openstack] Floating IP association using Heat
Jose Manuel Ferrer Mosteiro
jmferrer.paradigmatecnologico at gmail.com
Mon Jun 12 12:45:50 UTC 2017
Some times I forget to setting the security groups ...
# Security group that allows all from all sources
elasticsearch_security_group:
type: OS::Neutron::SecurityGroup
properties:
name: elasticsearch_security_group
rules:
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
port_range_min: 9200
port_range_max: 9200
- remote_ip_prefix: { get_param: cidr }
protocol: tcp
port_range_min: 9300
port_range_max: 9300
- remote_ip_prefix: 0.0.0.0/0
protocol: icmp
# create server ports (ip addresses)
# needed to configure ansible inventory and /etc/hosts
elasticsearch_01_server_port:
type: OS::Neutron::Port
properties:
network: { get_resource: elasticsearch_private_net }
security_groups:
- { get_resource: elasticsearch_security_group }
fixed_ips:
- subnet_id: { get_resource: elasticsearch_private_subnet }
# elasticsearch_01_server
elasticsearch_01_server_public:
type: OS::Neutron::FloatingIP
properties:
floating_network_id: { get_param: public_net_id }
port_id: { get_resource: elasticsearch_01_server_port }
elasticsearch_01_server:
type: OS::Nova::Server
properties:
name: { get_param: elasticsearch_01_hostname }
key_name: { get_param: key_name }
image: { get_param: image_id }
flavor: { get_param: instance_flavor }
networks:
- port: { get_resource: elasticsearch_01_server_port }
availability_zone: { get_param: elasticsearch_01_availability_zone
}
--
Jose Manuel Ferrer Mosteiro
Devops / Sysdev @ Paradigma Digital
__ _ _
/ / _ __ __ _ _ __ __ _ __| (_) __ _ _ __ ___ __ _
| | | '_ \ / _` | '__/ _` |/ _` | |/ _` | '_ ` _ \ / _` |
< < | |_) | (_| | | | (_| | (_| | | (_| | | | | | | (_| |
| | | .__/ \__,_|_| \__,_|\__,_|_|\__, |_| |_| |_|\__,_|
\_\ |_| |___/
http://www.paradigmadigital.com/
Vía de las dos Castillas, 33, Ática 4, 2ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: 91 352 59 42 // @paradigmate
El 2017-06-12 12:53, D. Davide Lamanna escribió:
> Hi all,
>
> I'm using "association" resource in a heat template, like that:
>
> association:
> type: OS::Nova::FloatingIPAssociation
> properties:
> floating_ip: { get_param: foo_floating_ip }
> server_id: { get_resource: bar_instance }
>
> With:
>
> bar_instance:
> type: OS::Nova::Server
> properties:
> key_name: { get_param: key_name }
> image: { get_param: image_id }
> flavor: { get_param: instance_type }
> networks:
> - port: { get_resource: bar_instance_port }
>
> foo_floating_ip:
> type: string
> label: Foo Floating IP
> description: Floating IP to be associated to the Foo Instance
> default: fd06c9c0-dcf7-4881-9bae-aafc1b8a8cf7
>
> Where:
>
> fd06c9c0-dcf7-4881-9bae-aafc1b8a8cf7
>
> is the ID of the Floating IP I want to associate to my instance.
>
> The stack gets created fine. The dashboard says that the association of
> the floating IP is exactly what I planned, i.e. the instance gets the
> Floating IP I wanted. But ssh connection gets refused!
>
> Then, if I deassociate by hand the floating IP associated by Heat and
> reassociate by hand the same Floating IP, everything works fine. So it
> seems like Heat associates the Floating IP, but it is not actually
> possible to connect to it. Whereas it works if you do it by hand
> afterwards.
>
> Any clue?
>
> Cheers,
> Dave
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
More information about the Openstack
mailing list