[Openstack] OpenStack RC file from within heat

Davíð Örn Jóhannsson davidoj at siminn.is
Fri Feb 19 11:41:22 UTC 2016


My issue is that I need to be able to get information on the tenant name which requires me to have access to the api since it is not exposed with meta-data and in order to login to the api I need the RC file which includes the tenant name, bit of a chicken and an egg problem.


Putting the RC file in Git or something is not wise and this is a part of an automation project and is supposed to be reusable for all OS projects where I need to uniquely name resources based on which project/tenant it is run in.


I know that Juno has the project_id meta-data but we are still on kilo


________________________________
Frá: Pavlo Shchelokovskyy <pshchelokovskyy at mirantis.com>
Sent: 19. febrúar 2016 11:34
Til: Davíð Örn Jóhannsson; openstack at lists.openstack.org
Efni: Re: [Openstack] OpenStack RC file from within heat

Davio,

yes, you could do that, but for local files only from CLI, not Horizon. You could use a "str_replace" and "get_file" functions.

As an example, here https://github.com/pshchelo/stackdev/blob/master/templates/autoscaling/asg.yaml#L33-L45
I am dropping a local file through the Nova's user data to the VM.

Though I must stress that passing real user cloud credentials inside VM is a security risk, VMs by default should be better considered as vulnerable.

Best regards,

On Fri, Feb 19, 2016 at 1:08 PM Davíð Örn Jóhannsson <davidoj at siminn.is<mailto:davidoj at siminn.is>> wrote:

?Is it possible to gain access to OpenStack RC file from within a heat template, in order to place it on a host during cloud init?

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
--
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160219/23694423/attachment.html>


More information about the Openstack mailing list