Add Tomcat application server
Change-Id: If7e0a417fb9b184389f6717c7d37c3cc1b485d1f
This commit is contained in:
parent
e100c4b16f
commit
4f7567ab62
50
io.murano.apps.apache.Tomcat/Classes/Tomcat.yaml
Normal file
50
io.murano.apps.apache.Tomcat/Classes/Tomcat.yaml
Normal file
@ -0,0 +1,50 @@
|
||||
Namespaces:
|
||||
=: io.murano.apps.apache
|
||||
std: io.murano
|
||||
res: io.murano.resources
|
||||
sys: io.murano.system
|
||||
|
||||
|
||||
Name: Tomcat
|
||||
|
||||
Extends: std:Application
|
||||
|
||||
Properties:
|
||||
name:
|
||||
Contract: $.string().notNull()
|
||||
|
||||
instance:
|
||||
Contract: $.class(res:Instance).notNull()
|
||||
|
||||
Methods:
|
||||
initialize:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
- If: not $.getAttr(deployed, false)
|
||||
Then:
|
||||
- $._environment.reporter.report($this, 'Creating VM for Tomcat ')
|
||||
- $securityGroupIngress:
|
||||
- ToPort: 80
|
||||
FromPort: 80
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 8080
|
||||
FromPort: 8080
|
||||
IpProtocol: tcp
|
||||
External: true
|
||||
- ToPort: 443
|
||||
FromPort: 443
|
||||
IpProtocol: tcp
|
||||
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)
|
||||
- $._environment.reporter.report($this, 'Tomcat is installed')
|
||||
- $.setAttr(deployed, true)
|
19
io.murano.apps.apache.Tomcat/Resources/DeployTomcat.template
Normal file
19
io.murano.apps.apache.Tomcat/Resources/DeployTomcat.template
Normal file
@ -0,0 +1,19 @@
|
||||
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
|
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
sudo apt-get update
|
||||
sudo apt-get -y -q install tomcat7
|
||||
sudo iptables -I INPUT 1 -p tcp -m tcp --dport 8080 -j ACCEPT -m comment --comment "by murano, Tomcat"
|
74
io.murano.apps.apache.Tomcat/UI/ui.yaml
Normal file
74
io.murano.apps.apache.Tomcat/UI/ui.yaml
Normal file
@ -0,0 +1,74 @@
|
||||
Version: 2
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: io.murano.apps.apache.Tomcat
|
||||
name: $.appConfiguration.name
|
||||
instance:
|
||||
?:
|
||||
type: io.murano.resources.LinuxMuranoInstance
|
||||
name: generateHostname($.instanceConfiguration.unitNamingPattern, 1)
|
||||
flavor: $.instanceConfiguration.flavor
|
||||
image: $.instanceConfiguration.osImage
|
||||
keyname: $.instanceConfiguration.keyPair
|
||||
assignFloatingIp: $.appConfiguration.assignFloatingIP
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: name
|
||||
type: string
|
||||
label: Application Name
|
||||
initial: Tomcat
|
||||
description: >-
|
||||
Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and
|
||||
underline are allowed
|
||||
- name: assignFloatingIP
|
||||
type: boolean
|
||||
label: Assign Floating IP
|
||||
description: >-
|
||||
Select to true to assign floating IP automatically
|
||||
initial: false
|
||||
required: false
|
||||
widgetMedia:
|
||||
css: {all: ['muranodashboard/css/checkbox.css']}
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
description: Specify some instance parameters on which the application would be created
|
||||
- name: flavor
|
||||
type: flavor
|
||||
label: Instance flavor
|
||||
description: >-
|
||||
Select registered in Openstack flavor. Consider that application performance
|
||||
depends on this parameter.
|
||||
required: false
|
||||
- name: osImage
|
||||
type: image
|
||||
imageType: linux
|
||||
label: Instance image
|
||||
description: >-
|
||||
Select a valid image for the application. Image should already be prepared and
|
||||
registered in glance.
|
||||
- name: keyPair
|
||||
type: keypair
|
||||
label: Key Pair
|
||||
description: >-
|
||||
Select a Key Pair to control access to instances. You can login to
|
||||
instances using this KeyPair after the deployment of application.
|
||||
required: false
|
||||
- name: availabilityZone
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where the application would be installed.
|
||||
required: false
|
||||
- name: unitNamingPattern
|
||||
label: Hostname
|
||||
type: string
|
||||
required: false
|
||||
widgetMedia:
|
||||
js: ['muranodashboard/js/support_placeholder.js']
|
||||
css: {all: ['muranodashboard/css/support_placeholder.css']}
|
BIN
io.murano.apps.apache.Tomcat/logo.png
Normal file
BIN
io.murano.apps.apache.Tomcat/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
10
io.murano.apps.apache.Tomcat/manifest.yaml
Normal file
10
io.murano.apps.apache.Tomcat/manifest.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
Format: 1.0
|
||||
Type: Application
|
||||
FullName: io.murano.apps.apache.Tomcat
|
||||
Name: Apache Tomcat
|
||||
Description: |
|
||||
Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [Servlets, Server, Pages, Java]
|
||||
Classes:
|
||||
io.murano.apps.apache.Tomcat: Tomcat.yaml
|
Loading…
Reference in New Issue
Block a user