how to edit blueprint for automatically running a command in docker container run by cloudify -
i want run docker container of ryu controller in cloudify ways. have written blueprint file can create relevant deployment , start docker container.
the problem is, controller (within docker container) needs implement script function don't know how modify blueprint file automatically running script. every time, have type docker exec container ryu-manager /path/simple_switch.py
goal.
so know command should put in blueprint. tried include in
interfaces: cloudify.interfaces.lifecycle: create: implementation: docker.docker_plugin.tasks.create_container inputs: params: ports: - { get_input: docker_port } stdin_open: true tty: true command: /bin/bash start: implementation: docker.docker_plugin.tasks.start inputs: params: port_bindings: { get_input: container_port_binding } command: docker exec ryu ryu-manager /ryu/ryu/app/simple_switch.py # here ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
but received error of unexpected parameter.
thanks time , opinions appreciated~
or let me put in way, if knows, part in cloudify blueprint matches docker exec
?
i use cloudify lot , use docker lot. docker plugin kind of "nice have", not necessary. can run commands "docker exec" , "docker run" inside of the cloudify script plugin , same result, , not need figure out different interface working docker.
for example if have cloudify blueprint (simplified):
yaml node_templates: my_app: type: cloudify.nodes.softwarecomponent interfaces: cloudify.interfaces.lifecycle: create: implementation: scripts/create.sh start: implementation: scripts/start.sh relationships: - type: cloudify.relationships.depends_on target: vm
i can call such scripts:
scripts/create.sh:
docker run -d ryu
scripts/start.sh
docker exec -it ryu ryu-manager /ryu/ryu/app/simple_switch.py
Comments
Post a Comment