I want to run a docker container of RYU controller in cloudify ways. I have written a blueprint file with which I can create relevant deployment and finally start the docker container.
The problem is, the controller (within the docker container) needs to implement a script to function but I don't know how to modify the blueprint file for automatically running the script. Every time, I have to type docker exec CONTAINER ryu-manager /path/simple_switch.py
for the goal.
So does anyone know where the command should be put in the blueprint. I tried to include it 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 an error of unexpected parameter.
Thanks for your time and any opinions would be appreciated~
Or let me put in this way, if anyone knows, which part in the cloudify blueprint matches docker exec
?