61 lines
1.6 KiB
YAML
61 lines
1.6 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.resources
|
|
std: io.murano
|
|
|
|
Name: OpsManagerInstance
|
|
|
|
Extends: LinuxInstance
|
|
|
|
Methods:
|
|
.init:
|
|
Body:
|
|
- $.customUserData: null
|
|
|
|
|
|
prepareUserData:
|
|
Body:
|
|
- Return:
|
|
data: $.customUserData
|
|
format: RAW
|
|
|
|
setInitData:
|
|
Arguments:
|
|
- initData:
|
|
Contract: $.notNull()
|
|
Body:
|
|
- $.customUserData:
|
|
str_replace:
|
|
template:
|
|
$initData
|
|
params:
|
|
wc_notify:
|
|
get_attr: ['wait_handle', 'curl_cli']
|
|
|
|
# It used to check if cloud-init finished the work on VM
|
|
- $template:
|
|
resources:
|
|
wait_condition:
|
|
type: 'OS::Heat::WaitCondition'
|
|
properties:
|
|
handle: {get_resource: wait_handle}
|
|
count: 1
|
|
timeout: 600
|
|
|
|
wait_handle:
|
|
type: 'OS::Heat::WaitConditionHandle'
|
|
|
|
- $environment: $.find(std:Environment).require()
|
|
- $environment.stack.updateTemplate($template)
|