"Fossies" - the Fresh Open Source Software Archive

Member "murano-8.0.0/meta/io.murano/Classes/resources/WindowsInstance.yaml" (16 Oct 2019, 2262 Bytes) of package /linux/misc/openstack/murano-8.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "WindowsInstance.yaml": 4.0.0_vs_5.0.0.

    1 #  Licensed under the Apache License, Version 2.0 (the "License"); you may
    2 #  not use this file except in compliance with the License. You may obtain
    3 #  a copy of the License at
    4 #
    5 #       http://www.apache.org/licenses/LICENSE-2.0
    6 #
    7 #  Unless required by applicable law or agreed to in writing, software
    8 #  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    9 #  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   10 #  License for the specific language governing permissions and limitations
   11 #  under the License.
   12 
   13 Namespaces:
   14   =: io.murano.resources
   15   std: io.murano
   16   sys: io.murano.system
   17 
   18 Name: WindowsInstance
   19 
   20 Extends: Instance
   21 
   22 Methods:
   23   createDefaultInstanceSecurityGroupRules:
   24     Arguments:
   25       - groupName:
   26           Contract: $.string().notNull()
   27     Body:
   28       - $region: $.getRegion()
   29       - $rules:
   30         - ToPort: 3389
   31           IpProtocol: tcp
   32           FromPort: 3389
   33           External: true
   34       - $region.securityGroupManager.addGroupIngress(
   35           rules => $rules, groupName => $groupName)
   36 
   37   prepareUserData:
   38     Body:
   39       - $region: $.getRegion()
   40       - $rabbitMqParams: $region.getConfig().agentRabbitMq
   41       - $resources: new(sys:Resources)
   42       - $configFile: $resources.string('Agent-v1.template')
   43       - $initScript: $resources.string('windows-init.ps1')
   44       - $configReplacements:
   45           "%RABBITMQ_HOST%": $rabbitMqParams.host
   46           "%RABBITMQ_PORT%": $rabbitMqParams.port
   47           "%RABBITMQ_USER%": $rabbitMqParams.login
   48           "%RABBITMQ_PASSWORD%": $rabbitMqParams.password
   49           "%RABBITMQ_VHOST%": $rabbitMqParams.virtual_host
   50           "%RABBITMQ_SSL%": str($rabbitMqParams.ssl).toLower()
   51           "%RABBITMQ_INPUT_QUEUE%": $.agent.queueName()
   52           "%RESULT_QUEUE%": $region.agentListener.queueName()
   53           "%SIGNING_KEY%": $.agent.signingKey('')
   54       - $scriptReplacements:
   55           "%AGENT_CONFIG_BASE64%": base64encode($configFile.replace($configReplacements))
   56           "%INTERNAL_HOSTNAME%": $.name
   57           "%MURANO_SERVER_ADDRESS%": coalesce(config(file_server), $rabbitMqParams.host)
   58           "%CA_ROOT_CERT_BASE64%": ""
   59       - Return:
   60           data: $initScript.replace($scriptReplacements)
   61           format: HEAT_CFNTOOLS