【问题标题】:Retrieve IP of the Cloudify Manager from inside Cloudify Application VM从 Cloudify Application VM 内部检索 Cloudify Manager 的 IP
【发布时间】:2015-07-24 10:13:18
【问题描述】:

我正在使用 Cloudify 2.7 和 OpenStack Iceouse。

如何从 Cloudify Application VM 中检索 Cloudify Manager 的 IP?

【问题讨论】:

    标签: cloudify


    【解决方案1】:

    好问题。不幸的是,没有简单的 API 可以得到这个。由于 Cloudify 2 已停产,因此没有添加此类 API 的计划。

    话虽如此,有一个环境变量包含此信息。环境变量名称为:

    LOOKUPLOCATORS
    

    此变量的值格式为:

    <HOST1>:<PORT1>;<HOST2>:<PORT2>
    

    每个主机都是 cloudify 2 管理器。

    【讨论】:

    • 以下简单代码提取一个 CFY 管理器的 IP: def lookuplocator = System.getenv()["LOOKUPLOCATORS"] String cfyMngtIp = lookuplocator.substring(0,lookuplocator.indexOf(':' ))
    猜你喜欢
    • 2022-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多