在Libcloud中部署现有节点

时间:2014-12-07 16:17:28

标签: deployment cloud libcloud

我正在使用libcloud,但遇到了困难:

我可以使用方法deploy_node()将文件/ shell命令部署到云节点。它完美地工作,除了我必须在函数内传递创建节点数据。这意味着我无法部署到现有节点。

例如,现在我可以:

node = driver.deploy_node(name =' myname',size =' s1',image =' i1',deployment =' deployment1&# 39; ...)

但我想要的是:

node = driver.create_node(name =' myname',size =' s1',image =' i1')
node.deploy(deployment =' deployment1)
OR:
driver.deploy(node,deployment =' deployment1')

这非常重要,因为我们可以通过list_nodes()获取libcloud的现有节点,但我们无法通过libcloud独立部署。

如果你们中有人对此事有所了解,请帮助我。

非常感谢!!!

1 个答案:

答案 0 :(得分:2)

If I understand your questions, you would like to perform a configuration action on an existing node that is running (e.g. an AWS instance that is already up and not just instantiated with libcloud). This is not the goal of the deploy.node function in libcloud (see http://libcloud.readthedocs.org/en/latest/compute/deployment.html#deployment). The recommendation would be to use a CM tool that can do interactive operations such as chef, puppet, saltstack, etc.