[Tomcat] Use simple software configuration

Change-Id: I85c345cc8c8c5368d9217b6dac59780767a5838d
Partially-Implements: bp refactor-apps-scripts
This commit is contained in:
Dmytro Dovbii 2016-04-01 14:36:14 +03:00
parent 3b51222b09
commit 5d8802d02f
3 changed files with 5 additions and 36 deletions

View File

@ -15,7 +15,7 @@ Namespaces:
std: io.murano
res: io.murano.resources
sys: io.murano.system
conf: io.murano.configuration
Name: Tomcat
@ -50,15 +50,15 @@ Methods:
External: true
- $._environment.securityGroupManager.addGroupIngress($securityGroupIngress)
- $.instance.deploy()
- $resources: new(sys:Resources)
# Deploy Apache Tomcat
- $template: $resources.yaml('DeployTomcat.template')
- $._environment.reporter.report($this, 'Instance is created. Deploying Tomcat')
- $.instance.agent.call($template, $resources)
- $file: sys:Resources.string('deployTomcat.sh')
- conf:Linux.runCommand($.instance.agent, $file)
- If: $.instance.assignFloatingIp
Then:
- $address: $.instance.floatingIpAddress
Else:
- $address: $.instance.ipAddresses[0]
- $address: $.instance.ipAddresses.first()
- $._environment.reporter.report($this, 'Tomcat is available at http://{0}:{1}'.format($address, 8080))
- $.setAttr(deployed, true)

View File

@ -1,31 +0,0 @@
# 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.
FormatVersion: 2.0.0
Version: 1.0.0
Name: Deploy Tomcat
Parameters:
appName: $appName
Body: |
deploy(args.appName)
Scripts:
deploy:
Type: Application
Version: 1.0.0
EntryPoint: deployTomcat.sh
Files: []
Options:
captureStdout: false
captureStderr: true