0

I have setup a cloud test bed using OpenStack. I used the 3 node architecture. The IP assigned to each node is as given below

Compute Node : 192.168.9.19/24 Network Node : 192.168.9.10/24 Controller Node : 192.168.9.2/24

The link of instance created is like this :

http://controller:6080/vnc_auto.html?token=2af0b9d8-0f83-42b9-ba64-e784227c119b&title=hadoop14%28f53c0d89-9f08-4900-8f95-abfbcfae8165%29

At first this instance was accessible only when I substitutes controller:8090 with 192.168.9.2:8090. I solved this by setting a local DNS server and resolving 192.168.9.2 to controller.local. Now instead of substituting the IP it works when I substitute controller.local.

Is there any other way to do it?? Also how can I access this instance from another subnet other than 192.168.9.0/24, without specifying the IP.

1 Answers1

0

If I understood your question correctly, yes there is another way, you don't need to set up a DNS server!

On the machine that you would like to access the link, perform the operations below:

  1. Open /etc/hosts file with a text editor.
  2. Add this entry: 192.168.9.2 controller
  3. Save the file, and that's it.

I suggest you to do these on all your nodes so that you can use these hostnames on your OpenStack configuration files instead of their IPs. This would also save you from tons of modifications if you have to make a change on the subnet IPs.

So for example your /etc/hosts files on your nodes should look like these:

#controller
192.168.9.2     controller

#network
192.168.9.10    network

#compute
192.168.9.19    compute
McMutton
  • 905
  • 13
  • 25
  • 1
    I had done this and it works fine. But I want this to work for anyone who has the link. They person need not know how to set the above details. – user2392616 Jun 04 '16 at 06:45
  • I see. The problem here is that "controller" does not correspond to any domain so anyone who has the link has to add this entry to their hosts file of their OS. Another option would be to create the link with the IP and not the domain name. In order to do this, you should edit `novncproxy_base_url` value in nova.conf file (default: `/etc/nova/nova.conf)` in your compute node. For example: `novncproxy_base_url = http://192.168.9.2:6080/vnc_auto.html`. Please note that whenever the IP of your controller node changes, you would have to re-modify novncproxy_base_url value as well. – McMutton Jun 07 '16 at 16:04