murano-apps/HDPSandbox/package/Classes/HDPSandbox.yaml

45 lines
1.3 KiB
YAML

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
Namespaces:
=: io.murano.apps.linux
std: io.murano
res: io.murano.resources
Name: HDPSandbox
Extends: std:Application
Properties:
instance:
Contract: $.class(res:Instance).notNull()
Methods:
.init:
Body:
- $._environment: $.find(std:Environment).require()
deploy:
Body:
- $._environment.reporter.report($this, 'Creating VM')
- $securityGroupIngress:
- FromPort: 1
ToPort: 65535
IpProtocol: tcp
External: true
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
- $.instance.deploy()
- $msg: 'HDP Sandbox is installed and running at http://'
- $ep: $.instance.floatingIpAddress + ':8888'
- $._environment.reporter.report($this, $msg + $ep)