Difference between revisions of "Murano/Documentation/DynamicUI"
(→Application and Templates) |
Timur Sufiev (talk | contribs) |
||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | =Dynamic UI Definition | + | =Dynamic UI Definition specification= |
+ | |||
+ | <syntaxhighlight lang="yaml"> | ||
+ | Version: 3 | ||
+ | |||
+ | Templates: | ||
+ | primaryController: | ||
+ | ?: | ||
+ | type: io.murano.windows.activeDirectory.PrimaryController | ||
+ | host: | ||
+ | ?: | ||
+ | type: io.murano.windows.Host | ||
+ | adminPassword: $.serviceConfiguration.adminPassword | ||
+ | name: generateHostname($.serviceConfiguration.unitNamingPattern, 1) | ||
+ | flavor: $.instanceConfiguration.flavor | ||
+ | image: $.instanceConfiguration.osImage | ||
+ | assignFloatingIp: $.serviceConfiguration.assignFloatingIP | ||
+ | |||
+ | secondaryController: | ||
+ | ?: | ||
+ | type: io.murano.windows.activeDirectory.SecondaryController | ||
+ | host: | ||
+ | ?: | ||
+ | type: io.murano.services.windows.Host | ||
+ | adminPassword: $.serviceConfiguration.adminPassword | ||
+ | name: generateHostname($.serviceConfiguration.unitNamingPattern, $index + 1) | ||
+ | flavor: $.instanceConfiguration.flavor | ||
+ | image: $.instanceConfiguration.osImage | ||
+ | |||
+ | secondaryControllerOutput: | ||
+ | - label: concat('#', $index) | ||
+ | value: | ||
+ | - label: Host Name | ||
+ | value: $.secondaryControllers[$index].host.name | ||
+ | - label: Flavor | ||
+ | value: $.secondaryControllers[$index].host.flavor | ||
+ | - label: Image | ||
+ | value: $.secondaryControllers[$index].host.image | ||
+ | - label: Floating IP | ||
+ | value: $.secondaryControllers[$index].host.floatingIp | ||
+ | |||
+ | |||
+ | Application: | ||
+ | ?: | ||
+ | type: io.murano.windows.activeDirectory.ActiveDirectory | ||
+ | name: $.serviceConfiguration.name | ||
+ | primaryController: $primaryController | ||
+ | secondaryControllers: repeat($secondaryController, $.serviceConfiguration.dcInstances - 1) | ||
+ | |||
+ | Output: | ||
+ | - label: Domain Name | ||
+ | value: $.name | ||
+ | - label: Primary Controller | ||
+ | value: | ||
+ | - label: Host Name | ||
+ | value: $.primaryController.host.name | ||
+ | - label: Flavor | ||
+ | value: $.primaryController.host.flavor | ||
+ | - label: Image | ||
+ | value: $.primaryController.host.image | ||
+ | - label: Floating IP | ||
+ | value: $.primaryController.host.floatingIp | ||
+ | - label: Secondary Controllers | ||
+ | value: repeat($.secondaryControllerOutput, len($.secondaryControllers)) | ||
+ | |||
+ | Input: | ||
+ | - serviceConfiguration: | ||
+ | fields: | ||
+ | - name: name | ||
+ | type: string | ||
+ | label: Domain Name | ||
+ | description: >- | ||
+ | Enter a desired name for a new domain. This name should fit to | ||
+ | DNS Domain Name requirements: it should contain | ||
+ | only A-Z, a-z, 0-9, (.) and (-) and should not end with a dash. | ||
+ | DNS server will be automatically set up on each of the Domain | ||
+ | Controller instances. Note: Only first 15 characters or characters | ||
+ | before first period is used as NetBIOS name. | ||
+ | validators: | ||
+ | - expr: | ||
+ | minLength: 2 | ||
+ | maxLength: 255 | ||
+ | - expr: | ||
+ | regexp: '^([0-9A-Za-z]|[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z])\.[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z]$' | ||
+ | message: >- | ||
+ | Only letters, numbers and dashes in the middle are | ||
+ | allowed. Period characters are allowed only when they | ||
+ | are used to delimit the components of domain style | ||
+ | names. Single-level domain is not | ||
+ | appropriate. Subdomains are not allowed. | ||
+ | - expr: | ||
+ | regexp: '(^[^.]+$|^[^.]{1,15}\..*$)' | ||
+ | message: >- | ||
+ | NetBIOS name cannot be shorter than 1 symbol and | ||
+ | longer than 15 symbols. | ||
+ | - expr: | ||
+ | regexp: '(^[^.]+$|^[^.]*\.[^.]{2,63}.*$)' | ||
+ | message: >- | ||
+ | DNS host name cannot be shorter than 2 symbols and | ||
+ | longer than 63 symbols. | ||
+ | helpText: >- | ||
+ | Just letters, numbers and dashes are allowed. | ||
+ | A dot can be used to create subdomains | ||
+ | - name: dcInstances | ||
+ | type: integer | ||
+ | label: Instance Count | ||
+ | description: >- | ||
+ | You can create several Active Directory instances by setting | ||
+ | instance number larger than one. One primary Domain Controller | ||
+ | and a few secondary DCs will be created. | ||
+ | initial: 1 | ||
+ | helpText: Enter an integer value between 1 and 100 | ||
+ | validators: | ||
+ | - expr: | ||
+ | minValue: 1 | ||
+ | maxValue: 100 | ||
+ | - name: adminAccountName | ||
+ | type: string | ||
+ | label: Account Name | ||
+ | initial: Administrator | ||
+ | validators: | ||
+ | - expr: | ||
+ | regexp: '^[-\w]+$' | ||
+ | message: Just letters, numbers, underscores and hyphens are allowed. | ||
+ | - name: adminPassword | ||
+ | type: password | ||
+ | label: Administrator password | ||
+ | descriptionTitle: Passwords | ||
+ | description: >- | ||
+ | Windows requires strong password for service administration. | ||
+ | Your password should have at least one letter in each | ||
+ | register, a number and a special character. Password length should be | ||
+ | a minimum of 7 characters. | ||
+ | |||
+ | Once you forget your password you won't be able to | ||
+ | operate the service until recovery password would be entered. So it's | ||
+ | better for Recovery and Administrator password to be different. | ||
+ | - name: recoveryPassword | ||
+ | type: password | ||
+ | label: Recovery password | ||
+ | - name: assignFloatingIP | ||
+ | required: false | ||
+ | type: boolean | ||
+ | label: Assign Floating IP | ||
+ | description: >- | ||
+ | Select to true to assign floating IP automatically to Primary DC | ||
+ | initial: false | ||
+ | required: false | ||
+ | - name: disableNamingPattern | ||
+ | required: false | ||
+ | type: boolean | ||
+ | label: Disable naming pattern | ||
+ | - name: hideNamingPattern | ||
+ | required: false | ||
+ | type: boolean | ||
+ | label: Hide naming pattern | ||
+ | - name: unitNamingPattern | ||
+ | type: string | ||
+ | label: Hostname template | ||
+ | description: >- | ||
+ | For your convenience all instance hostnames can be named | ||
+ | in the same way. Enter a name and use # character for incrementation. | ||
+ | For example, host# turns into host1, host2, etc. Please follow Windows | ||
+ | hostname restrictions. | ||
+ | enabled: not $.serviceConfiguration.disableNamingPattern | ||
+ | hidden: $.serviceConfiguration.hideNamingPattern | ||
+ | required: false | ||
+ | validators: | ||
+ | - expr: | ||
+ | # FIXME: does not work for # turning into 2-digit numbers | ||
+ | regexp: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$' | ||
+ | - expr: | ||
+ | maxLength: 15 | ||
+ | helpText: Optional field for a machine hostname template | ||
+ | validators: | ||
+ | # if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern | ||
+ | - expr: $.serviceConfiguration.dcInstances < 2 or not $.serviceConfiguration.unitNamingPattern.bool() or '#' in $.serviceConfiguration.unitNamingPattern | ||
+ | message: Incrementation symbol "#" is required in the Hostname template | ||
+ | - instanceConfiguration: | ||
+ | fields: | ||
+ | - name: flavor | ||
+ | type: flavor | ||
+ | label: Instance flavor | ||
+ | description: >- | ||
+ | Select registered in Openstack flavor. Consider that service performance | ||
+ | depends on this parameter. | ||
+ | required: false | ||
+ | - name: osImage | ||
+ | type: image | ||
+ | imageType: windows | ||
+ | label: Instance image | ||
+ | description: >- | ||
+ | Select valid image for a service. Image should already be prepared and | ||
+ | registered in glance. | ||
+ | - name: availabilityZone | ||
+ | type: azone | ||
+ | label: Availability zone | ||
+ | description: Select availability zone where service would be installed. | ||
+ | required: false | ||
+ | title: | ||
+ | label: Instance Configuration | ||
+ | description: Specify some instance parameters on which service would be created. | ||
+ | Version: 3 | ||
+ | |||
+ | Templates: | ||
+ | primaryController: | ||
+ | ?: | ||
+ | type: io.murano.windows.activeDirectory.PrimaryController | ||
+ | host: | ||
+ | ?: | ||
+ | type: io.murano.windows.Host | ||
+ | adminPassword: $.serviceConfiguration.adminPassword | ||
+ | name: generateHostname($.serviceConfiguration.unitNamingPattern, 1) | ||
+ | flavor: $.instanceConfiguration.flavor | ||
+ | image: $.instanceConfiguration.osImage | ||
+ | assignFloatingIp: $.serviceConfiguration.assignFloatingIP | ||
+ | |||
+ | secondaryController: | ||
+ | ?: | ||
+ | type: io.murano.windows.activeDirectory.SecondaryController | ||
+ | host: | ||
+ | ?: | ||
+ | type: io.murano.services.windows.Host | ||
+ | adminPassword: $.serviceConfiguration.adminPassword | ||
+ | name: generateHostname($.serviceConfiguration.unitNamingPattern, $index + 1) | ||
+ | flavor: $.instanceConfiguration.flavor | ||
+ | image: $.instanceConfiguration.osImage | ||
+ | |||
+ | secondaryControllerOutput: | ||
+ | - label: concat('#', $index) | ||
+ | value: | ||
+ | - label: Host Name | ||
+ | value: $.secondaryControllers[$index].host.name | ||
+ | - label: Flavor | ||
+ | value: $.secondaryControllers[$index].host.flavor | ||
+ | - label: Image | ||
+ | value: $.secondaryControllers[$index].host.image | ||
+ | - label: Floating IP | ||
+ | value: $.secondaryControllers[$index].host.floatingIp | ||
+ | |||
+ | |||
+ | Application: | ||
+ | ?: | ||
+ | type: io.murano.windows.activeDirectory.ActiveDirectory | ||
+ | name: $.serviceConfiguration.name | ||
+ | primaryController: $primaryController | ||
+ | secondaryControllers: repeat($secondaryController, $.serviceConfiguration.dcInstances - 1) | ||
+ | |||
+ | Output: | ||
+ | - label: Domain Name | ||
+ | value: $.name | ||
+ | - label: Primary Controller | ||
+ | value: | ||
+ | - label: Host Name | ||
+ | value: $.primaryController.host.name | ||
+ | - label: Flavor | ||
+ | value: $.primaryController.host.flavor | ||
+ | - label: Image | ||
+ | value: $.primaryController.host.image | ||
+ | - label: Floating IP | ||
+ | value: $.primaryController.host.floatingIp | ||
+ | - label: Secondary Controllers | ||
+ | value: repeat($.secondaryControllerOutput, len($.secondaryControllers)) | ||
+ | |||
+ | Input: | ||
+ | - serviceConfiguration: | ||
+ | fields: | ||
+ | - name: name | ||
+ | type: string | ||
+ | label: Domain Name | ||
+ | description: >- | ||
+ | Enter a desired name for a new domain. This name should fit to | ||
+ | DNS Domain Name requirements: it should contain | ||
+ | only A-Z, a-z, 0-9, (.) and (-) and should not end with a dash. | ||
+ | DNS server will be automatically set up on each of the Domain | ||
+ | Controller instances. Note: Only first 15 characters or characters | ||
+ | before first period is used as NetBIOS name. | ||
+ | validators: | ||
+ | - expr: | ||
+ | minLength: 2 | ||
+ | maxLength: 255 | ||
+ | - expr: | ||
+ | regexp: '^([0-9A-Za-z]|[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z])\.[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z]$' | ||
+ | message: >- | ||
+ | Only letters, numbers and dashes in the middle are | ||
+ | allowed. Period characters are allowed only when they | ||
+ | are used to delimit the components of domain style | ||
+ | names. Single-level domain is not | ||
+ | appropriate. Subdomains are not allowed. | ||
+ | - expr: | ||
+ | regexp: '(^[^.]+$|^[^.]{1,15}\..*$)' | ||
+ | message: >- | ||
+ | NetBIOS name cannot be shorter than 1 symbol and | ||
+ | longer than 15 symbols. | ||
+ | - expr: | ||
+ | regexp: '(^[^.]+$|^[^.]*\.[^.]{2,63}.*$)' | ||
+ | message: >- | ||
+ | DNS host name cannot be shorter than 2 symbols and | ||
+ | longer than 63 symbols. | ||
+ | helpText: >- | ||
+ | Just letters, numbers and dashes are allowed. | ||
+ | A dot can be used to create subdomains | ||
+ | - name: dcInstances | ||
+ | type: integer | ||
+ | label: Instance Count | ||
+ | description: >- | ||
+ | You can create several Active Directory instances by setting | ||
+ | instance number larger than one. One primary Domain Controller | ||
+ | and a few secondary DCs will be created. | ||
+ | initial: 1 | ||
+ | helpText: Enter an integer value between 1 and 100 | ||
+ | validators: | ||
+ | - expr: | ||
+ | minValue: 1 | ||
+ | maxValue: 100 | ||
+ | - name: adminAccountName | ||
+ | type: string | ||
+ | label: Account Name | ||
+ | initial: Administrator | ||
+ | validators: | ||
+ | - expr: | ||
+ | regexp: '^[-\w]+$' | ||
+ | message: Just letters, numbers, underscores and hyphens are allowed. | ||
+ | - name: adminPassword | ||
+ | type: password | ||
+ | label: Administrator password | ||
+ | descriptionTitle: Passwords | ||
+ | description: >- | ||
+ | Windows requires strong password for service administration. | ||
+ | Your password should have at least one letter in each | ||
+ | register, a number and a special character. Password length should be | ||
+ | a minimum of 7 characters. | ||
+ | |||
+ | Once you forget your password you won't be able to | ||
+ | operate the service until recovery password would be entered. So it's | ||
+ | better for Recovery and Administrator password to be different. | ||
+ | - name: recoveryPassword | ||
+ | type: password | ||
+ | label: Recovery password | ||
+ | - name: assignFloatingIP | ||
+ | required: false | ||
+ | type: boolean | ||
+ | label: Assign Floating IP | ||
+ | description: >- | ||
+ | Select to true to assign floating IP automatically to Primary DC | ||
+ | initial: false | ||
+ | required: false | ||
+ | - name: disableNamingPattern | ||
+ | required: false | ||
+ | type: boolean | ||
+ | label: Disable naming pattern | ||
+ | - name: hideNamingPattern | ||
+ | required: false | ||
+ | type: boolean | ||
+ | label: Hide naming pattern | ||
+ | - name: unitNamingPattern | ||
+ | type: string | ||
+ | label: Hostname template | ||
+ | description: >- | ||
+ | For your convenience all instance hostnames can be named | ||
+ | in the same way. Enter a name and use # character for incrementation. | ||
+ | For example, host# turns into host1, host2, etc. Please follow Windows | ||
+ | hostname restrictions. | ||
+ | enabled: not $.serviceConfiguration.disableNamingPattern | ||
+ | hidden: $.serviceConfiguration.hideNamingPattern | ||
+ | required: false | ||
+ | validators: | ||
+ | - expr: | ||
+ | # FIXME: does not work for # turning into 2-digit numbers | ||
+ | regexp: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$' | ||
+ | - expr: | ||
+ | maxLength: 15 | ||
+ | helpText: Optional field for a machine hostname template | ||
+ | validators: | ||
+ | # if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern | ||
+ | - expr: $.serviceConfiguration.dcInstances < 2 or not $.serviceConfiguration.unitNamingPattern.bool() or '#' in $.serviceConfiguration.unitNamingPattern | ||
+ | message: Incrementation symbol "#" is required in the Hostname template | ||
+ | - instanceConfiguration: | ||
+ | fields: | ||
+ | - name: flavor | ||
+ | type: flavor | ||
+ | label: Instance flavor | ||
+ | description: >- | ||
+ | Select registered in Openstack flavor. Consider that service performance | ||
+ | depends on this parameter. | ||
+ | required: false | ||
+ | - name: osImage | ||
+ | type: image | ||
+ | imageType: windows | ||
+ | label: Instance image | ||
+ | description: >- | ||
+ | Select valid image for a service. Image should already be prepared and | ||
+ | registered in glance. | ||
+ | - name: availabilityZone | ||
+ | type: azone | ||
+ | label: Availability zone | ||
+ | description: Select availability zone where service would be installed. | ||
+ | required: false | ||
+ | title: | ||
+ | label: Instance Configuration | ||
+ | description: Specify some instance parameters on which service would be created. | ||
+ | |||
+ | </syntaxhighlight> | ||
The main purpose of Dynamic UI is to generate application creation forms "on-the-fly". Murano dashboard doesn't know anything about what applications can be deployed and witch web form need to be used to create application instance. So all application definitions should contain a yaml file which will tell dashboard now to create an application and what validation to be applied. This document will help you to compose a valid UI definition to your application. | The main purpose of Dynamic UI is to generate application creation forms "on-the-fly". Murano dashboard doesn't know anything about what applications can be deployed and witch web form need to be used to create application instance. So all application definitions should contain a yaml file which will tell dashboard now to create an application and what validation to be applied. This document will help you to compose a valid UI definition to your application. | ||
Line 5: | Line 407: | ||
== Structure == | == Structure == | ||
UI definition should be a valid yaml file and should contain the following sections (for version 2): | UI definition should be a valid yaml file and should contain the following sections (for version 2): | ||
− | * '''Version''' - points out to which syntax version is used | + | * '''Version''' - points out to which syntax version is used, optional |
− | * '''Templates''' - optional, auxiliary section, using together with an Application section | + | * '''Templates''' - optional, auxiliary section, using together with an Application section, optional |
− | * '''Application''' - object model description which will be used in application deployment | + | * '''Application''' - object model description which will be used in application deployment, required |
− | * '''Forms''' - web form definitions | + | * '''Forms''' - web form definitions, required |
==== Version ==== | ==== Version ==== | ||
− | Version of supported dynamic UI syntax | + | Version of supported dynamic UI syntax. The latest version is 2. |
+ | Version mapping: | ||
+ | Murano 0.4 - version 1 | ||
+ | Murano 0.5 - version 2 | ||
==== Application and Templates ==== | ==== Application and Templates ==== | ||
In the Application section "application object model" is described. This model will be translated into json and according to that json application will be deployed. | In the Application section "application object model" is described. This model will be translated into json and according to that json application will be deployed. | ||
Application section should contain all necessary keys that required for murano-engine to deploy an application. Note that under ''?'' section goes system part of the model. | Application section should contain all necessary keys that required for murano-engine to deploy an application. Note that under ''?'' section goes system part of the model. | ||
− | You can pick parameters you got from the user (they should be described in the Forms section) and pick the right place where they should be set. To do this [https://github.com/tsufiev/yaql/blob/master/README.md YAQL] is used | + | You can pick parameters you got from the user (they should be described in the Forms section) and pick the right place where they should be set. To do this [https://github.com/tsufiev/yaql/blob/master/README.md YAQL] is used. All lines are going to be checked for a yaql expressions. Thus, ''generateHostname'' will be recognized as yaql function and will generate machine hostname . |
− | |||
− | |||
− | |||
Example: | Example: | ||
<syntaxhighlight lang="yaml"> | <syntaxhighlight lang="yaml"> | ||
− | + | primaryController: | |
− | + | ?: | |
− | + | type: io.murano.windows.activeDirectory.PrimaryController | |
− | + | host: | |
− | + | ?: | |
+ | type: io.murano.services.windows.Host | ||
+ | adminPassword: $.serviceConfiguration.adminPassword | ||
+ | name: generateHostname($.serviceConfiguration.unitNamingPattern, 1) | ||
+ | flavor: $.instanceConfiguration.flavor | ||
+ | image: $.instanceConfiguration.osImage | ||
+ | |||
+ | secondaryController: | ||
+ | ?: | ||
+ | type: io.murano.windows.activeDirectory.SecondaryController | ||
+ | host: | ||
?: | ?: | ||
− | + | type: io.murano.services.windows.Host | |
− | + | adminPassword: $.serviceConfiguration.adminPassword | |
− | + | name: generateHostname($.serviceConfiguration.unitNamingPattern, $index + 1) | |
+ | flavor: $.instanceConfiguration.flavor | ||
+ | image: $.instanceConfiguration.osImage | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 70: | Line 484: | ||
- name: dcInstances | - name: dcInstances | ||
type: integer | type: integer | ||
− | |||
hidden: true | hidden: true | ||
initial: 1 | initial: 1 |
Latest revision as of 10:40, 13 May 2014
Contents
Dynamic UI Definition specification
Version: 3
Templates:
primaryController:
?:
type: io.murano.windows.activeDirectory.PrimaryController
host:
?:
type: io.murano.windows.Host
adminPassword: $.serviceConfiguration.adminPassword
name: generateHostname($.serviceConfiguration.unitNamingPattern, 1)
flavor: $.instanceConfiguration.flavor
image: $.instanceConfiguration.osImage
assignFloatingIp: $.serviceConfiguration.assignFloatingIP
secondaryController:
?:
type: io.murano.windows.activeDirectory.SecondaryController
host:
?:
type: io.murano.services.windows.Host
adminPassword: $.serviceConfiguration.adminPassword
name: generateHostname($.serviceConfiguration.unitNamingPattern, $index + 1)
flavor: $.instanceConfiguration.flavor
image: $.instanceConfiguration.osImage
secondaryControllerOutput:
- label: concat('#', $index)
value:
- label: Host Name
value: $.secondaryControllers[$index].host.name
- label: Flavor
value: $.secondaryControllers[$index].host.flavor
- label: Image
value: $.secondaryControllers[$index].host.image
- label: Floating IP
value: $.secondaryControllers[$index].host.floatingIp
Application:
?:
type: io.murano.windows.activeDirectory.ActiveDirectory
name: $.serviceConfiguration.name
primaryController: $primaryController
secondaryControllers: repeat($secondaryController, $.serviceConfiguration.dcInstances - 1)
Output:
- label: Domain Name
value: $.name
- label: Primary Controller
value:
- label: Host Name
value: $.primaryController.host.name
- label: Flavor
value: $.primaryController.host.flavor
- label: Image
value: $.primaryController.host.image
- label: Floating IP
value: $.primaryController.host.floatingIp
- label: Secondary Controllers
value: repeat($.secondaryControllerOutput, len($.secondaryControllers))
Input:
- serviceConfiguration:
fields:
- name: name
type: string
label: Domain Name
description: >-
Enter a desired name for a new domain. This name should fit to
DNS Domain Name requirements: it should contain
only A-Z, a-z, 0-9, (.) and (-) and should not end with a dash.
DNS server will be automatically set up on each of the Domain
Controller instances. Note: Only first 15 characters or characters
before first period is used as NetBIOS name.
validators:
- expr:
minLength: 2
maxLength: 255
- expr:
regexp: '^([0-9A-Za-z]|[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z])\.[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z]$'
message: >-
Only letters, numbers and dashes in the middle are
allowed. Period characters are allowed only when they
are used to delimit the components of domain style
names. Single-level domain is not
appropriate. Subdomains are not allowed.
- expr:
regexp: '(^[^.]+$|^[^.]{1,15}\..*$)'
message: >-
NetBIOS name cannot be shorter than 1 symbol and
longer than 15 symbols.
- expr:
regexp: '(^[^.]+$|^[^.]*\.[^.]{2,63}.*$)'
message: >-
DNS host name cannot be shorter than 2 symbols and
longer than 63 symbols.
helpText: >-
Just letters, numbers and dashes are allowed.
A dot can be used to create subdomains
- name: dcInstances
type: integer
label: Instance Count
description: >-
You can create several Active Directory instances by setting
instance number larger than one. One primary Domain Controller
and a few secondary DCs will be created.
initial: 1
helpText: Enter an integer value between 1 and 100
validators:
- expr:
minValue: 1
maxValue: 100
- name: adminAccountName
type: string
label: Account Name
initial: Administrator
validators:
- expr:
regexp: '^[-\w]+$'
message: Just letters, numbers, underscores and hyphens are allowed.
- name: adminPassword
type: password
label: Administrator password
descriptionTitle: Passwords
description: >-
Windows requires strong password for service administration.
Your password should have at least one letter in each
register, a number and a special character. Password length should be
a minimum of 7 characters.
Once you forget your password you won't be able to
operate the service until recovery password would be entered. So it's
better for Recovery and Administrator password to be different.
- name: recoveryPassword
type: password
label: Recovery password
- name: assignFloatingIP
required: false
type: boolean
label: Assign Floating IP
description: >-
Select to true to assign floating IP automatically to Primary DC
initial: false
required: false
- name: disableNamingPattern
required: false
type: boolean
label: Disable naming pattern
- name: hideNamingPattern
required: false
type: boolean
label: Hide naming pattern
- name: unitNamingPattern
type: string
label: Hostname template
description: >-
For your convenience all instance hostnames can be named
in the same way. Enter a name and use # character for incrementation.
For example, host# turns into host1, host2, etc. Please follow Windows
hostname restrictions.
enabled: not $.serviceConfiguration.disableNamingPattern
hidden: $.serviceConfiguration.hideNamingPattern
required: false
validators:
- expr:
# FIXME: does not work for # turning into 2-digit numbers
regexp: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$'
- expr:
maxLength: 15
helpText: Optional field for a machine hostname template
validators:
# if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern
- expr: $.serviceConfiguration.dcInstances < 2 or not $.serviceConfiguration.unitNamingPattern.bool() or '#' in $.serviceConfiguration.unitNamingPattern
message: Incrementation symbol "#" is required in the Hostname template
- instanceConfiguration:
fields:
- name: flavor
type: flavor
label: Instance flavor
description: >-
Select registered in Openstack flavor. Consider that service performance
depends on this parameter.
required: false
- name: osImage
type: image
imageType: windows
label: Instance image
description: >-
Select valid image for a service. Image should already be prepared and
registered in glance.
- name: availabilityZone
type: azone
label: Availability zone
description: Select availability zone where service would be installed.
required: false
title:
label: Instance Configuration
description: Specify some instance parameters on which service would be created.
Version: 3
Templates:
primaryController:
?:
type: io.murano.windows.activeDirectory.PrimaryController
host:
?:
type: io.murano.windows.Host
adminPassword: $.serviceConfiguration.adminPassword
name: generateHostname($.serviceConfiguration.unitNamingPattern, 1)
flavor: $.instanceConfiguration.flavor
image: $.instanceConfiguration.osImage
assignFloatingIp: $.serviceConfiguration.assignFloatingIP
secondaryController:
?:
type: io.murano.windows.activeDirectory.SecondaryController
host:
?:
type: io.murano.services.windows.Host
adminPassword: $.serviceConfiguration.adminPassword
name: generateHostname($.serviceConfiguration.unitNamingPattern, $index + 1)
flavor: $.instanceConfiguration.flavor
image: $.instanceConfiguration.osImage
secondaryControllerOutput:
- label: concat('#', $index)
value:
- label: Host Name
value: $.secondaryControllers[$index].host.name
- label: Flavor
value: $.secondaryControllers[$index].host.flavor
- label: Image
value: $.secondaryControllers[$index].host.image
- label: Floating IP
value: $.secondaryControllers[$index].host.floatingIp
Application:
?:
type: io.murano.windows.activeDirectory.ActiveDirectory
name: $.serviceConfiguration.name
primaryController: $primaryController
secondaryControllers: repeat($secondaryController, $.serviceConfiguration.dcInstances - 1)
Output:
- label: Domain Name
value: $.name
- label: Primary Controller
value:
- label: Host Name
value: $.primaryController.host.name
- label: Flavor
value: $.primaryController.host.flavor
- label: Image
value: $.primaryController.host.image
- label: Floating IP
value: $.primaryController.host.floatingIp
- label: Secondary Controllers
value: repeat($.secondaryControllerOutput, len($.secondaryControllers))
Input:
- serviceConfiguration:
fields:
- name: name
type: string
label: Domain Name
description: >-
Enter a desired name for a new domain. This name should fit to
DNS Domain Name requirements: it should contain
only A-Z, a-z, 0-9, (.) and (-) and should not end with a dash.
DNS server will be automatically set up on each of the Domain
Controller instances. Note: Only first 15 characters or characters
before first period is used as NetBIOS name.
validators:
- expr:
minLength: 2
maxLength: 255
- expr:
regexp: '^([0-9A-Za-z]|[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z])\.[0-9A-Za-z][0-9A-Za-z-]*[0-9A-Za-z]$'
message: >-
Only letters, numbers and dashes in the middle are
allowed. Period characters are allowed only when they
are used to delimit the components of domain style
names. Single-level domain is not
appropriate. Subdomains are not allowed.
- expr:
regexp: '(^[^.]+$|^[^.]{1,15}\..*$)'
message: >-
NetBIOS name cannot be shorter than 1 symbol and
longer than 15 symbols.
- expr:
regexp: '(^[^.]+$|^[^.]*\.[^.]{2,63}.*$)'
message: >-
DNS host name cannot be shorter than 2 symbols and
longer than 63 symbols.
helpText: >-
Just letters, numbers and dashes are allowed.
A dot can be used to create subdomains
- name: dcInstances
type: integer
label: Instance Count
description: >-
You can create several Active Directory instances by setting
instance number larger than one. One primary Domain Controller
and a few secondary DCs will be created.
initial: 1
helpText: Enter an integer value between 1 and 100
validators:
- expr:
minValue: 1
maxValue: 100
- name: adminAccountName
type: string
label: Account Name
initial: Administrator
validators:
- expr:
regexp: '^[-\w]+$'
message: Just letters, numbers, underscores and hyphens are allowed.
- name: adminPassword
type: password
label: Administrator password
descriptionTitle: Passwords
description: >-
Windows requires strong password for service administration.
Your password should have at least one letter in each
register, a number and a special character. Password length should be
a minimum of 7 characters.
Once you forget your password you won't be able to
operate the service until recovery password would be entered. So it's
better for Recovery and Administrator password to be different.
- name: recoveryPassword
type: password
label: Recovery password
- name: assignFloatingIP
required: false
type: boolean
label: Assign Floating IP
description: >-
Select to true to assign floating IP automatically to Primary DC
initial: false
required: false
- name: disableNamingPattern
required: false
type: boolean
label: Disable naming pattern
- name: hideNamingPattern
required: false
type: boolean
label: Hide naming pattern
- name: unitNamingPattern
type: string
label: Hostname template
description: >-
For your convenience all instance hostnames can be named
in the same way. Enter a name and use # character for incrementation.
For example, host# turns into host1, host2, etc. Please follow Windows
hostname restrictions.
enabled: not $.serviceConfiguration.disableNamingPattern
hidden: $.serviceConfiguration.hideNamingPattern
required: false
validators:
- expr:
# FIXME: does not work for # turning into 2-digit numbers
regexp: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$'
- expr:
maxLength: 15
helpText: Optional field for a machine hostname template
validators:
# if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern
- expr: $.serviceConfiguration.dcInstances < 2 or not $.serviceConfiguration.unitNamingPattern.bool() or '#' in $.serviceConfiguration.unitNamingPattern
message: Incrementation symbol "#" is required in the Hostname template
- instanceConfiguration:
fields:
- name: flavor
type: flavor
label: Instance flavor
description: >-
Select registered in Openstack flavor. Consider that service performance
depends on this parameter.
required: false
- name: osImage
type: image
imageType: windows
label: Instance image
description: >-
Select valid image for a service. Image should already be prepared and
registered in glance.
- name: availabilityZone
type: azone
label: Availability zone
description: Select availability zone where service would be installed.
required: false
title:
label: Instance Configuration
description: Specify some instance parameters on which service would be created.
The main purpose of Dynamic UI is to generate application creation forms "on-the-fly". Murano dashboard doesn't know anything about what applications can be deployed and witch web form need to be used to create application instance. So all application definitions should contain a yaml file which will tell dashboard now to create an application and what validation to be applied. This document will help you to compose a valid UI definition to your application.
Structure
UI definition should be a valid yaml file and should contain the following sections (for version 2):
- Version - points out to which syntax version is used, optional
- Templates - optional, auxiliary section, using together with an Application section, optional
- Application - object model description which will be used in application deployment, required
- Forms - web form definitions, required
Version
Version of supported dynamic UI syntax. The latest version is 2. Version mapping: Murano 0.4 - version 1 Murano 0.5 - version 2
Application and Templates
In the Application section "application object model" is described. This model will be translated into json and according to that json application will be deployed. Application section should contain all necessary keys that required for murano-engine to deploy an application. Note that under ? section goes system part of the model. You can pick parameters you got from the user (they should be described in the Forms section) and pick the right place where they should be set. To do this YAQL is used. All lines are going to be checked for a yaql expressions. Thus, generateHostname will be recognized as yaql function and will generate machine hostname .
Example:
primaryController:
?:
type: io.murano.windows.activeDirectory.PrimaryController
host:
?:
type: io.murano.services.windows.Host
adminPassword: $.serviceConfiguration.adminPassword
name: generateHostname($.serviceConfiguration.unitNamingPattern, 1)
flavor: $.instanceConfiguration.flavor
image: $.instanceConfiguration.osImage
secondaryController:
?:
type: io.murano.windows.activeDirectory.SecondaryController
host:
?:
type: io.murano.services.windows.Host
adminPassword: $.serviceConfiguration.adminPassword
name: generateHostname($.serviceConfiguration.unitNamingPattern, $index + 1)
flavor: $.instanceConfiguration.flavor
image: $.instanceConfiguration.osImage
Forms
This section describes Django forms. Set name for your form and provide fields and validators. Each field should contain:
- name - system field name, could be any
- label - name, that will be displayed in the form
- description - description, that will be displayed in the form description area. Use yaml line folding character >- to keep the correct formatting during data transferring.
- type - system field type
- string - Django string field
- boolean - Django boolean field
- text - Django boolean field
- integer - Django integer field
- password - Specific field with validation for strong password
- clusterip - Specific field, used for cluster IP
- floatingip - Specific field, used for enabling Floating IP during deployment
- domain - Specific field, used for Active Directory domain
- databaselist - Specific field, a list of databases (comma-separated list of database names, where each name has the following syntax: first symbol should be latin letter or underscore; subsequent symbols can be Latin letter, numeric, underscore, at the sign, number sign or dollar sign)
- table - Specific field, used for defining table in a form
- flavor - Specific field, used for defining flavor in a form
- keypair - Specific field, used for defining KeyPair in a form
- image- Specific field, used for defining image in a form
- azone - Specific field, used for defining availability zone in a form
- psqlDatabase -Specific field, used for browsing deployed PostgreSQL databases
- imageType - only for fields of image type. Apply filters to all murano images by image type name, registered during adding metadata to an image.
Example
Forms:
- serviceConfiguration:
fields:
- name: name
type: string
label: Service Name
description: >-
To identify your service in logs please specify a service name
- name: dcInstances
type: integer
hidden: true
initial: 1
required: false
maxLength: 15
helpText: Optional field for a machine hostname template
- instanceConfiguration:
fields:
- name: flavor
type: flavor
label: Instance flavor
description: >-
Select registered in Openstack flavor. Consider that service performance
depends on this parameter.
required: false
- name: osImage
type: image
imageType: linux
label: Instance image
description: >-
Select valid image for a service. Image should already be prepared and
registered in glance.
- name: availabilityZone
type: azone
label: Availability zone
description: Select availability zone where service would be installed.
required: false