我想在Cloudify上安装一个Docker容器,并用docker-plugin写一个蓝图(最后附上)。
一开始,我通过学习CloudifyDocs完成了蓝图。但是,在安装工作流时,消息发生错误
'install' workflow execution failed: RuntimeError: Workflow failed: Task failed 'docker_plugin.tasks.create_container' -> Missing cloudify_agent.queue runtime information. This most likely means that the Compute node was never started successfully
我认为我的文件出了问题,所以我尝试部署并安装cloudify-nodecellar-docker-example。但IP地址不行,我最终将输入更改为
host_ip: 10.10.1.10
agent_user: vagrant
agent_private_key_path: /home/vagrant/.ssh/id_rsa
,取自Cloudify初学者示例。不幸的是,RuntimeError再次出现了。
现在我失去了我错过的部分。欢迎任何意见!
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/3.4.1/types.yaml
- http://www.getcloudify.org/spec/docker-plugin/1.3.2/plugin.yaml
inputs:
host_ip:
description: >
the ip of the host the application will be deployed on
default: 10.10.1.10
container_port_binding:
description: >
a dict of port bindings for the node container.
default:
6633: 6633
agent_user:
description: >
User name used when SSH-ing into the started machine
agent_private_key_path:
description: >
Path to a private key that resided on the management machine.
SSH-ing into agent machines will be done with this key.
node_templates:
host:
type: cloudify.nodes.Compute
properties:
install_agent: false
ip: { get_input: host_ip }
cloudify_agent:
user: { get_input: agent_user }
key: { get_input: agent_private_key_path }
client:
type: cloudify.docker.Container
properties:
name: ryu
image:
repository: muzixing/ryu
tags: RYU
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: docker.docker_plugin.tasks.create_container
inputs:
params:
stdin_open: true
tty: true
command: /bin/bash
start:
implementation: docker.docker_plugin.tasks.start
inputs:
params:
port_bindings: { get_input: container_port_binding }
relationships:
- type: cloudify.relationships.contained_in
target: host
outputs: #this part may be questionable but seems less important?
endpoint:
value:
ip_address: { get_prperty: [ host , ip ]}
port: { get_input: container_port_binding }
#status:
#value: { "the container is running" }
答案 0 :(得分:0)
后来我解决了这个问题并继续前进。
现在,我想分享我的意见。
Missing runtime information
主要是因为缺乏代理人,负责接收任务。
所以输入install_agent
为true
,麻烦就消失了。