From dbc2f21d418ec48cb84eee30383924dc2d8353ea Mon Sep 17 00:00:00 2001 From: Serg Melikyan Date: Thu, 21 Nov 2013 18:39:06 +0400 Subject: [PATCH] Update templates for Quantum support Change-Id: Ie23022b2f0573a6c2a354ec347686eb876de2774 --- .../data/templates/cf/ApacheSecurity.template | 29 +++ .../data/templates/cf/Linux.template | 1 - .../data/templates/cf/Windows.template | 1 - .../services/MsSqlClusterServer.yaml | 236 ++++++++++++++++++ 4 files changed, 265 insertions(+), 2 deletions(-) create mode 100644 quantum_support/conductor/data/templates/cf/ApacheSecurity.template create mode 100644 quantum_support/dashboard/services/MsSqlClusterServer.yaml diff --git a/quantum_support/conductor/data/templates/cf/ApacheSecurity.template b/quantum_support/conductor/data/templates/cf/ApacheSecurity.template new file mode 100644 index 00000000..7a35b2d9 --- /dev/null +++ b/quantum_support/conductor/data/templates/cf/ApacheSecurity.template @@ -0,0 +1,29 @@ +{ + "Resources": { + "$port-{instanceName}": { + "Properties": { + "security_groups" : [ {"Ref" : "ApacheSecurityGroup"} ] + } + }, + "ApacheSecurityGroup": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "SecurityGroupIngress": [ + { + "ToPort": "80", + "IpProtocol": "tcp", + "FromPort": "80", + "CidrIp": "0.0.0.0/0" + }, + { + "ToPort": "433", + "IpProtocol": "tcp", + "FromPort": "433", + "CidrIp": "0.0.0.0/0" + } + ], + "GroupDescription": "Enable access to HTTP and HTTPS protocols" + } + } + } +} \ No newline at end of file diff --git a/quantum_support/conductor/data/templates/cf/Linux.template b/quantum_support/conductor/data/templates/cf/Linux.template index 2edc7cd0..0cb588d6 100644 --- a/quantum_support/conductor/data/templates/cf/Linux.template +++ b/quantum_support/conductor/data/templates/cf/Linux.template @@ -13,7 +13,6 @@ "$instanceName": { "Type": "AWS::EC2::Instance", "Properties": { - "BootFromVolume": true, "InstanceType": "$instanceType", "ImageId": "$imageName", "AvailabilityZone": "$availabilityZone", diff --git a/quantum_support/conductor/data/templates/cf/Windows.template b/quantum_support/conductor/data/templates/cf/Windows.template index 357864d7..4d94198a 100644 --- a/quantum_support/conductor/data/templates/cf/Windows.template +++ b/quantum_support/conductor/data/templates/cf/Windows.template @@ -13,7 +13,6 @@ "$instanceName": { "Type": "AWS::EC2::Instance", "Properties": { - "BootFromVolume": true, "InstanceType": "$instanceType", "ImageId": "$imageName", "AvailabilityZone": "$availabilityZone", diff --git a/quantum_support/dashboard/services/MsSqlClusterServer.yaml b/quantum_support/dashboard/services/MsSqlClusterServer.yaml new file mode 100644 index 00000000..d8ef8507 --- /dev/null +++ b/quantum_support/dashboard/services/MsSqlClusterServer.yaml @@ -0,0 +1,236 @@ +name: MS SQL Server Cluster +type: msSqlClusterServer + +description: >- + The MS SQL Failover Cluster installs + Microsoft SQL Failover Cluster Server + +unitTemplates: + - isMaster: true + isSync: true + name: 'node-#' + - isMaster: false + isSync: true + name: 'node-#' + - isMaster: false + isSync: false + name: 'node-#' + +forms: + - serviceConfiguration: + fields: + - name: title + type: string + required: false + hidden: true + attributeNames: false + description: MS SQL Failover Cluster + - name: name + type: string + label: Service Name + description: >- + Enter a desired name for a service. Just A-Z, a-z, 0-9, dash and + underline are allowed. + minLength: 2 + maxLength: 64 + regexpValidator: '^[-\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + helpText: 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. + - name: externalAD + type: boolean + label: Active Directory is configured by the System Administrator + widgetAttrs: # temporary hack + class: external-ad + # temporaryHack + widgetMedia: + js: [muranodashboard/js/external-ad.js] + css: {all: [muranodashboard/css/checkbox.css]} + required: false + - name: domainAdminUserName + type: string + label: Active Directory User + enabled: {YAQL: $.serviceConfiguration.externalAD} + regexpValidator: '^[-\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + - name: domainAdminPassword + type: password + label: Active Directory Password + enabled: {YAQL: $.serviceConfiguration.externalAD} + - name: domain + type: domain + label: Domain + enabled: {YAQL: not $.serviceConfiguration.externalAD} + description: >- + Service can be joined to the Active Directory domain. If you want to + create an AD domain create the AD Service first. + helpText: Optional field for a domain to which service can be joined + - name: mixedModeAuth + type: boolean + label: Mixed-mode Authentication + initial: true + required: false + description: >- + Mixed authentication mode allows the use of Windows + credentials but supplements them with local SQL Server user + accounts that the administrator may create and maintain within + SQL Server. If this mode is on SA password is required + # temporaryHack + widgetMedia: + js: [muranodashboard/js/mixed-mode.js] + css: {all: [muranodashboard/css/checkbox.css]} + - name: saPassword + type: password + label: SA Password + description: Set system administrator password for the MS SQL Server. + helpText: SQL server System Administrator account + enabled: {YAQL: $.serviceConfiguration.mixedModeAuth} + - clusterConfiguration: + fields: + - name: clusterIp + type: clusterip + label: Cluster Static IP + description: Specify a valid IPv4 fixed IP. + - name: clusterName + type: string + label: Cluster Name + helpText: Service name for new SQL Cluster service + description: >- + Specify a name of a cluster. Just A-Z, a-z, 0-9, dash and underline are allowed. + - name: agGroupName + type: string + label: Availability Group Name + helpText: Name of AG during SQL setup + regexpValidator: '^[A-Za-z0-9_-]+$' + description: >- + Specify a name of an AG. Just A-Z, a-z, 0-9, dash and underline are allowed. + - name: agListenerName + type: string + label: Availability Group Listener Name + helpText: FQDN name of a new DNS entry for AG Listener endpoint + regexpValidator: '^[-\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + description: >- + Specify a name of an AG Listener . Just A-Z, a-z, 0-9, dash and underline are allowed. + - name: agListenerIP + type: clusterip + label: Availability Group Listener IP + description: Specify a valid IPv4 fixed IP. + - name: sqlServiceUserName + type: string + label: SQL User Name + regexpValidator: '^[-\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + description: User name that will be created to manage cluster instances. + - name: sqlServicePassword + type: password + label: SQL User Password + description: User password that will be created to manage cluster instances. + - name: dcInstances + type: instance + label: Instance Count + minValue: 2 + maxValue: 5 + initial: 2 + attributeNames: false + helpText: Enter an integer value between 2 and 5 + description: Microsoft SQL Failover Cluster includes up to 5 instances. + - 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. + required: false + regexpValidator: '^(([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#])$' + helpText: Optional field for a machine hostname template + # temporaryHack + widgetMedia: + js: [muranodashboard/js/support_placeholder.js] + css: {all: [muranodashboard/css/support_placeholder.css]} + validators: + # if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern + - expr: {YAQL: not $.clusterConfiguration.unitNamingPattern.bool() or '#' in $.clusterConfiguration.unitNamingPattern} + message: Incrementation symbol "#" is required in the Hostname template + # if IP is not valid on its own, it will be empty - the + # first check is needed to not emit comparison error when + # both IPs are not valid + - expr: {YAQL: not $.clusterConfiguration.clusterIP.bool() or $.clusterConfiguration.clusterIP != $.clusterConfiguration.agListenerIP} + message: Listener IP and Cluster Static IP should be different + - unitsConfiguration: + fields: + - name: nodes + type: table + label: Nodes + attributeNames: units + columns: + - columnName: name + columnType: label + title: Node + - columnName: isSync + columnType: checkbox + title: Sync + - columnName: isMaster + columnType: radio + title: Master + initial: {YAQL: $.clusterConfiguration.dcInstances} + description: >- + Configure cluster instances. Cluster node quantity can be set + with 'Add' and 'Remove' buttons. Configure Sync mode by + enabling corresponding checkbox. All other nodes will be in + Async mode. Just 2 nodes are allowed to be Sync. Also one + Master node need to be selected. SQL Failover cluster has + limit of 5 instances. + - name: databases + type: databaselist + label: Database list + description: >- + Specify names for new databases which will be created as part + of service installation. Here should come 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 sign, + number sign or dollar sign. + helpText: Enter comma separated list of databases that will be created + - instanceConfiguration: + fields: + - name: title + type: string + required: false + hidden: true + attributeNames: false + descriptionTitle: Instance Configuration + description: Specify some instance parameters on which service would be created. + - 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