guide/blueprints/example_yaml/vanilla-bash-netcat-port-parameter.yaml (20 lines of code) (raw):
name: Netcat Example with Parameter
location: localhost
services:
- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
name: Simple Netcat Server
brooklyn.config:
launch.command: |
echo $MESSAGE | nc -l $NETCAT_PORT &
echo $! > $PID_FILE
shell.env:
MESSAGE: $brooklyn:config("message")
NETCAT_PORT: $brooklyn:attributeWhenReady("netcat.port")
brooklyn.parameters:
- name: message
description: a message to send to the caller
default: hello
- name: netcat.port
type: port
description: the port netcat should run on
default: 4321+