Issue link: https://read.uberflip.com/i/1334488
Chapter 10 211 Getting ready To begin with, ensure you are logged in to the OpenStack API server. We will also be using the client machine, so log in to your client that is running euca2ools or Nova Client. How to do it... To ensure each of the instances gets a public (floating) IP address assigned to it when it is launched, carry out the following steps: 1. While on our OpenStack API host, run the following command to list any floating ranges we have assigned: sudo nova-manage floating list An example of the output when listing the floating IPs is shown as follows, truncated for brevity: None 172.16.1.1 None nova eth1 None 172.16.1.2 None nova eth1 … 2. The values indicate we have a floating range available for use. Rather than using client tools to assign addresses to instances, a flag in our /etc/nova/nova.conf file ensures our instances are always allocated an address: --auto_assign_floating_ip 3. With this added to our nova.conf configuration file, we restart our nova-network and nova-compute services, to pick up the change: sudo restart nova-network sudo restart nova-network 4. When an instance spawns, it will automatically be assigned a public floating IP address that we can instantly use to gain access. How it works... Instances aren't instantly accessible outside of the OpenStack host unless a public IP address is assigned to them. Configuring our OpenStack environment so that each instance is assigned an address on launch makes the instances instantly accessible. www.it-ebooks.info

