简体   繁体   English

在Libcloud中部署现有节点

[英]Deploy the existing node in Libcloud

I'm working with libcloud but meet the difficulty: 我正在使用libcloud,但遇到困难:

I can use the method deploy_node() to deploy file/shell command to the cloud node. 我可以使用方法deploy_node()将文件/ shell命令部署到云节点。 It work perfectly except that I have to pass the create node data inside the function. 除了必须在函数内部传递创建节点数据外,它的运行效果非常好。 That means I cannot deploy to the existing node. 这意味着我无法部署到现有节点。

For example, now I can : 例如,现在我可以:

node = driver.deploy_node(name='myname', size='s1', image='i1', deployment='deployment1'...) 节点= driver.deploy_node(name ='myname',size ='s1',image ='i1',deployment ='deployment1'...)

But what I want: 但是我想要的是:

node = driver.create_node(name='myname', size='s1', image='i1') 节点= driver.create_node(name ='myname',size ='s1',image ='i1')
node.deploy(deployment = 'deployment1) node.deploy(deployment ='deployment1)
OR: 要么:
driver.deploy(node, deployment = 'deployment1') driver.deploy(节点,部署='deployment1')

This is quite important because we can get the existing node with libcloud via list_nodes() but we cannot deploy via libcloud independently. 这一点非常重要,因为我们可以通过list_nodes()获得带有libcloud的现有节点,但是不能独立通过libcloud进行部署。

If anyone of you have idea with this matter, please help me. 如果您对这个问题有任何想法,请帮助我。

Thank you very much!!! 非常感谢你!!!

If I understand your questions, you would like to perform a configuration action on an existing node that is running (eg an AWS instance that is already up and not just instantiated with libcloud). 如果我理解您的问题,您想在正在运行的现有节点上执行配置操作(例如,已经启动并且不仅仅使用libcloud实例化的AWS实例)。 This is not the goal of the deploy.node function in libcloud (see http://libcloud.readthedocs.org/en/latest/compute/deployment.html#deployment ). 这不是libcloud中deploy.node函数的目标(请参阅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. 建议使用能够执行交互式操作的CM工具,例如厨师,木偶,盐堆等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM