murano/meta/io.murano/Classes/Environment.yaml

38 lines
793 B
YAML

Namespaces:
=: io.murano
sys: io.murano.system
Name: Environment
Properties:
name:
Contract: $.string().notNull()
applications:
Contract: [$.class(Application).owned().notNull()]
agentListener:
Contract: $.class(sys:AgentListener)
Type: Runtime
stack:
Contract: $.class(sys:HeatStack)
Type: Runtime
instanceNotifier:
Contract: $.class(sys:InstanceNotifier)
Type: Runtime
Workflow:
initialize:
Body:
- $this.agentListener: new(sys:AgentListener, name => $.name)
- $this.stack: new(sys:HeatStack, name => $.name)
- $this.instanceNotifier: new(sys:InstanceNotifier, environment => $this)
deploy:
Body:
- $.agentListener.start()
- $.applications.pselect($.deploy())
- $.agentListener.stop()