Restructure murano-apps repository
Change-Id: I9cdb1e4afcb9929c7b7a5437faaa25d284daefdb Closes-Bug: #1441644
This commit is contained in:
54
Applications/MySQL/package/Classes/DockerMySQL.yaml
Normal file
54
Applications/MySQL/package/Classes/DockerMySQL.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
Namespaces:
|
||||
=: io.murano.apps.docker
|
||||
std: io.murano
|
||||
|
||||
Name: DockerMySQL
|
||||
|
||||
Extends: DockerApplication
|
||||
|
||||
Properties:
|
||||
name:
|
||||
Contract: $.string().notNull()
|
||||
|
||||
publish:
|
||||
Contract: $.bool().notNull()
|
||||
Default: true
|
||||
|
||||
password:
|
||||
Contract: $.string().notNull()
|
||||
|
||||
|
||||
Methods:
|
||||
initialize:
|
||||
Body:
|
||||
- $._environment: $.find(std:Environment).require()
|
||||
- $._scope: switch($.publish, $ => public, not $ => internal)
|
||||
|
||||
|
||||
getContainer:
|
||||
Body:
|
||||
Return:
|
||||
name: $.name
|
||||
image: mysql
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: $.password
|
||||
ports:
|
||||
- port: 3306
|
||||
scope: $._scope
|
||||
|
||||
|
||||
onInstallationStart:
|
||||
Body:
|
||||
- $._environment.reporter.report($this, 'Installing MySQL')
|
||||
|
||||
|
||||
onInstallationFinish:
|
||||
Body:
|
||||
- If: $.publish
|
||||
Then:
|
||||
- $endpoints: $.applicationEndpoints.where($.scope = $this._scope).
|
||||
select(format('{0}:{1}', $.address, $.port))
|
||||
|
||||
- $._environment.reporter.report($this, 'MySQL {0} is available at {1}'.format($.name, join(', ', $endpoints)))
|
||||
Else:
|
||||
- $._environment.reporter.report($this, 'MySQL {0} has deployed but is not accessible from outside'.format($.name))
|
39
Applications/MySQL/package/UI/ui.yaml
Normal file
39
Applications/MySQL/package/UI/ui.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
Version: 2
|
||||
|
||||
Application:
|
||||
?:
|
||||
type: io.murano.apps.docker.DockerMySQL
|
||||
name: $.appConfiguration.name
|
||||
host: $.appConfiguration.host
|
||||
publish: $.appConfiguration.publish
|
||||
password: $.appConfiguration.password
|
||||
|
||||
Forms:
|
||||
- appConfiguration:
|
||||
fields:
|
||||
- name: name
|
||||
type: string
|
||||
label: Application Name
|
||||
initial: DockerMySQL
|
||||
description: >-
|
||||
Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and
|
||||
underline are allowed
|
||||
- name: host
|
||||
type:
|
||||
- io.murano.apps.docker.kubernetes.KubernetesPod
|
||||
- io.murano.apps.docker.DockerStandaloneHost
|
||||
label: Container Host
|
||||
description: >-
|
||||
Select an instance of Docker contaniner hosting provider to run the app
|
||||
- name: password
|
||||
type: password
|
||||
label: MySQL Password
|
||||
description: >-
|
||||
Password for root user in MySQL
|
||||
- name: publish
|
||||
type: boolean
|
||||
label: Visible from outside
|
||||
initial: true
|
||||
required: false
|
||||
description: >-
|
||||
Check if you intend to access application from the Internet
|
BIN
Applications/MySQL/package/logo.png
Normal file
BIN
Applications/MySQL/package/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
10
Applications/MySQL/package/manifest.yaml
Normal file
10
Applications/MySQL/package/manifest.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
Format: 1.0
|
||||
Type: Application
|
||||
FullName: io.murano.apps.docker.DockerMySQL
|
||||
Name: Docker MySQL
|
||||
Description: |
|
||||
MySQL Docker Application. Adds MySQL docker container with MySQL listening on port 3306.
|
||||
Author: 'Mirantis, Inc'
|
||||
Tags: [docker, application]
|
||||
Classes:
|
||||
io.murano.apps.docker.DockerMySQL: DockerMySQL.yaml
|
Reference in New Issue
Block a user