OpenStack: Auto assign floating IP
It can be really handy to auto assign floating IP addresses to every new instance.
First create a dedicated pool:
$ sudo nova-manage floating create --pool pool_auto_assign --ip_range 172.17.1.32/27
Then modify your nova.conf with those flags:
default_floating_pool = pool_auto_assign floating_range = 172.17.1.32/27 auto_assign_floating_ip = True
You may also want to increase the floating IPs quota:
quota_floating_ips = 50
Then restart nova-network:
$ sudo service nova-network restart
Finally run a new instance :)
You will only see this in the Instances & Volumes page:
W Nothing in the Access & Security, this page will remain empty.
But you can use the
nova-manage command to check which IP is assigned to which tenant:
$ sudo nova-manage floating list | egrep -v ^None
In my opinion, this behavior is only wanted when you run OpenStack for your own purpose, for your private Cloud. True Cloud IaaS providers don’t really need to enable this feature.