我想在云上安装一个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
,它取自云的初学者示例。不幸的是,Runtimeerr再次出现。
现在,我错过了哪一部分。任何意见都受到欢迎!
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" }
以后我解决了这个问题并继续前进。现在,我想分享我的意见。 Missing runtime information
主要是缺乏代理人,负责接收任务。
因此,输入install_agent
为true
,麻烦已经消失了。