<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>If you use dhcp_domain in nova it will be applied to all projects, IP ranges can be created per project or shared with other projects.</div>
<div><br>
</div>
<div>>> or do I simply change the OS's hostname config and the nova-api & horizon dashboard will pick that up ?   </div>
<div>No, I do not think this will happen</div>
<div><br>
</div>
<div>Hostnames do not uniquely identify instances, it is the uuid.</div>
<div><br>
</div>
<div>As far as I know, If you want to custom define hostname and domain per instance it would be worth looking into cloud-init and user data using APIs, from horizon you can use “Post-Creation” tab during launch instance wizard and provide a customization script.</div>
<div><br>
</div>
<div>Good luck</div>
<div><br>
</div>
<div>Ali</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Alex Leonhardt <<a href="mailto:aleonhardt.py@gmail.com">aleonhardt.py@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, August 15, 2014 at 7:08 AM<br>
<span style="font-weight:bold">To: </span>Ahmed Ali <<a href="mailto:ahmeali@cisco.com">ahmeali@cisco.com</a>><br>
<span style="font-weight:bold">Cc: </span>Abel Lopez <<a href="mailto:alopgeek@gmail.com">alopgeek@gmail.com</a>>, openstack-operators <<a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Openstack-operators] how can I make a new VM use the project name as sub-domain ?<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi, 
<div><br>
</div>
<div>sorry still not quite what I'm after ... so, when I use the Horizon Dashboard (or the nova api client) I can create a VM that will then get a name allocated based on what I named it, or, what I chose as a prefix if I want to provision 2 or more instances
 (uuidgen is used i guess).</div>
<div><br>
</div>
<div>as I will have the same domain + the same IP ranges set for all projects, there will eventually be 2 hosts would get the exact same name, if I were to put something in place that'll automatically update my DNS - how can I change nova/horizon to add a ".$project_name"
 to a VM's name, or do I simply change the OS's hostname config and the nova-api & horizon dashboard will pick that up ? </div>
<div><br>
</div>
<div>Alex</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 14 August 2014 23:59, Ahmed Ali (ahmeali) <span dir="ltr">
<<a href="mailto:ahmeali@cisco.com" target="_blank">ahmeali@cisco.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Try to look into changing dhcp_domain in nova.conf to make it work, but will be for all instances.</div>
<div><span style="font-family: Verdana, Geneva, sans-serif; font-size: 13.63636302947998px;"><br>
</span></div>
<div><span style="font-family: Verdana, Geneva, sans-serif; font-size: 13.63636302947998px;">dhcp_domain = <domain>   </span></div>
<div><span style="font-family: Verdana, Geneva, sans-serif; font-size: 13.63636302947998px;">Note: <domain> is the domain name to use for building the hostnames</span></div>
<div><br>
</div>
<div>Or look into cloud-init to customize FQDN per instance, see <a href="http://docs.openstack.org/user-guide/content/user-data.html" target="_blank">http://docs.openstack.org/user-guide/content/user-data.html</a> </div>
<div><br>
</div>
<div>Hope this is what you are looking for.</div>
<div><br>
</div>
<div>Ali</div>
<div><br>
</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Alex Leonhardt <<a href="mailto:aleonhardt.py@gmail.com" target="_blank">aleonhardt.py@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, August 14, 2014 at 3:08 PM<br>
<span style="font-weight:bold">To: </span>Abel Lopez <<a href="mailto:alopgeek@gmail.com" target="_blank">alopgeek@gmail.com</a>><br>
<span style="font-weight:bold">Cc: </span>openstack-operators <<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Openstack-operators] how can I make a new VM use the project name as sub-domain ?<br>
</div>
<div>
<div class="h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi Abel,
<div><br>
</div>
<div>Yep - I know - but question is, will the OS hostname automatically update the hostname displayed by Horizon when people are using the Dashboard ? Or, if not, how can I convince whatever is creating the VM ( nova-api ? ) to set the hostname as I require
 ? </div>
<div><br>
</div>
<div>Alex</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 14 August 2014 20:47, Abel Lopez <span dir="ltr"><<a href="mailto:alopgeek@gmail.com" target="_blank">alopgeek@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You can also pass user-data on Horizon, it's one of the window tabs in the launch instance dialog. 
<div>
<div><span></span><br>
<br>
On Thursday, August 14, 2014, Alex Leonhardt <<a href="mailto:aleonhardt.py@gmail.com" target="_blank">aleonhardt.py@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Thanks!
<div><br>
</div>
<div>What about the openstack dashboard - will it update the VM's hostname based on the OS's hostname that's set ? </div>
<div><br>
</div>
<div>Alex</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 14 August 2014 20:08, Abel Lopez <span dir="ltr"><<a>alopgeek@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Some examples on using user-data
<div><br>
</div>
<div><a href="http://docs.openstack.org/user-guide/content/user-data.html" target="_blank">http://docs.openstack.org/user-guide/content/user-data.html</a></div>
<div><br>
<div>
<div>
<div>On Aug 14, 2014, at 11:48 AM, Alex Leonhardt <<a>aleonhardt.py@gmail.com</a>> wrote:</div>
<br>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">hi all,
<div><br>
</div>
<div>am running openstack in a flat-network with just 1 IP range / network and would like to have the VMs' named after the project, e.g.:</div>
<div><br>
</div>
<div>project name: dev</div>
<div><br>
</div>
<div>host name: redis1</div>
<div>domain: <a href="http://acme.com/" target="_blank">acme.com</a></div>
<div><br>
</div>
<div>resulting name: <a href="http://redis1.dev.acme.com/" target="_blank">redis1.dev.acme.com</a></div>
<div><br>
</div>
<div>at the moment i'd just get a result of <a href="http://redis1.acme.com/" target="_blank">
redis1.acme.com</a> - but do want/need the sub-domains as </div>
<div><br>
</div>
<div>project: dev </div>
<div>and</div>
<div>project: internal</div>
<div>and</div>
<div>project: frontend</div>
<div>etc.</div>
<div><br>
</div>
<div>may use the same name for things they work on ... how is this accomplished ? Or where do I have to look at (in the code) to try and make this a default ? </div>
<div><br>
</div>
<div>Thanks a lot!</div>
<div>Alex</div>
<div><br>
</div>
</div>
</div>
</div>
<div>_______________________________________________<br>
OpenStack-operators mailing list<br>
<a>OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span>
</body>
</html>