diff --git a/meta/io.murano/Classes/resources/LinuxInstance.yaml b/meta/io.murano/Classes/resources/LinuxInstance.yaml index bb4c4b7e..0b3e666c 100644 --- a/meta/io.murano/Classes/resources/LinuxInstance.yaml +++ b/meta/io.murano/Classes/resources/LinuxInstance.yaml @@ -12,10 +12,11 @@ Workflow: - groupName: Contract: $.string().notNull() Body: + - $environment: $.find(std:Environment).require() - $rules: - ToPort: 22 IpProtocol: tcp FromPort: 22 External: true - - $.environment.securityGroupManager.addGroupIngress( + - $environment.securityGroupManager.addGroupIngress( rules => $rules, groupName => $groupName) diff --git a/meta/io.murano/Classes/resources/LinuxMuranoInstance.yaml b/meta/io.murano/Classes/resources/LinuxMuranoInstance.yaml index 68b7d4dc..04561f0e 100644 --- a/meta/io.murano/Classes/resources/LinuxMuranoInstance.yaml +++ b/meta/io.murano/Classes/resources/LinuxMuranoInstance.yaml @@ -1,5 +1,6 @@ Namespaces: =: io.murano.resources + sys: io.murano.system std: io.murano Name: LinuxMuranoInstance @@ -10,8 +11,10 @@ Extends: Workflow: prepareUserData: Body: - - $configFile: $.resources.string('Agent-v2.template') - - $initScript: $.resources.string('linux-init.sh') + - $environment: $.find(std:Environment).require() + - $resources: new(sys:Resources) + - $configFile: $resources.string('Agent-v2.template') + - $initScript: $resources.string('linux-init.sh') - $configReplacements: "%RABBITMQ_HOST%": config(rabbitmq, host) "%RABBITMQ_PORT%": config(rabbitmq, port) @@ -20,7 +23,7 @@ Workflow: "%RABBITMQ_VHOST%": config(rabbitmq, virtual_host) "%RABBITMQ_SSL%": str(config(rabbitmq, ssl)).toLower() "%RABBITMQ_INPUT_QUEUE%": $.agent.queueName() - "%RESULT_QUEUE%": $.environment.agentListener.queueName() + "%RESULT_QUEUE%": $environment.agentListener.queueName() - $scriptReplacements: "%AGENT_CONFIG_BASE64%": base64encode($configFile.replace($configReplacements)) "%INTERNAL_HOSTNAME%": $.name diff --git a/meta/io.murano/Classes/resources/WindowsInstance.yaml b/meta/io.murano/Classes/resources/WindowsInstance.yaml index edc6e21d..e4d66393 100644 --- a/meta/io.murano/Classes/resources/WindowsInstance.yaml +++ b/meta/io.murano/Classes/resources/WindowsInstance.yaml @@ -12,18 +12,21 @@ Workflow: - groupName: Contract: $.string().notNull() Body: + - $environment: $.find(std:Environment).require() - $rules: - ToPort: 3389 IpProtocol: tcp FromPort: 3389 External: true - - $.environment.securityGroupManager.addGroupIngress( + - $environment.securityGroupManager.addGroupIngress( rules => $rules, groupName => $groupName) prepareUserData: Body: - - $configFile: $.resources.string('Agent-v1.template') - - $initScript: $.resources.string('windows-init.ps1') + - $resources: new(sys:Resources) + - $environment: $.find(std:Environment).require() + - $configFile: $resources.string('Agent-v1.template') + - $initScript: $resources.string('windows-init.ps1') - $configReplacements: "%RABBITMQ_HOST%": config(rabbitmq, host) "%RABBITMQ_PORT%": config(rabbitmq, port) @@ -32,7 +35,7 @@ Workflow: "%RABBITMQ_VHOST%": config(rabbitmq, virtual_host) "%RABBITMQ_SSL%": str(config(rabbitmq, ssl)).toLower() "%RABBITMQ_INPUT_QUEUE%": $.agent.queueName() - "%RESULT_QUEUE%": $.environment.agentListener.queueName() + "%RESULT_QUEUE%": $environment.agentListener.queueName() - $scriptReplacements: "%AGENT_CONFIG_BASE64%": base64encode($configFile.replace($configReplacements)) "%INTERNAL_HOSTNAME%": $.name