How to attach a floating IP using the present environement

asked 2018-08-17 06:12:35 -0600

dubis gravatar image


I'm newbie on openstack heat file. I did search but I didn't find relevant answer to my question. Here my template heat yaml file :

heat_template_version: newton

description: Simple template to deploy a single compute instance with an attached volume

resources:   my_instance:
    type: OS::Nova::Server
      name: instance-name
      flavor: std.cpu1ram1
        - device_name: vda
          image: DMZPRO-RHEL-7.4
          volume_size: 30
          delete_on_termination: true
        - network: network-name.admin-network
        - security_group: []

security-group:    type: OS::Neutron::SecurityGroup properties: rules:

    type: OS::Cinder::Volume
      size: 10

      type: OS::Cinder::VolumeAttachment
        instance_uuid:  { get_resource: my_instance }
        volume_id: { get_resource: my_volume }
        mountpoint: /dev/vdb

This heat file works but I don't know how to attach floating IP to "my_instance". I'm able to do it inside Horizon and it's working without PB. Under Horizon interface, I've to choose "Router_dmz" as a pool which creates and allows floating IP. As I understood the floating IP address should associated to "network-name.admin-network". I read many documentation, and I don't know if I've to use the OS:Neutron::FloatingIPAssociation resources or OS::Nova::FloatingIPAssociation. I tried on my side and I've not issue.

Thanks for your help.

edit retag flag offensive close merge delete