From abbc23ddadbc95274845ec92ba48bfdc3629575f Mon Sep 17 00:00:00 2001 From: TimurNurlygayanov Date: Fri, 6 Dec 2013 17:32:43 +0400 Subject: [PATCH] Fixed issue with Key Pairs for Linux-based services Modified UI forms and workflows for Linux services Key Pair parameter moved to the last page of service configuration form and this parameter is not required. Implements: blueprint rewrite-key-pair-for-linux-based-services Change-Id: I3c1a6bb075ecda4dd49ea2a8b86627723ffbb048 --- .../Services/heat_templates/Keypair.template | 9 +++++++ .../Services/heat_templates/Linux.template | 9 ------- .../Services/linuxApacheService-manifest.yaml | 1 + .../Services/linuxTelnetService-manifest.yaml | 1 + .../Services/ui_forms/LinuxApache.yaml | 12 +++++---- .../Services/ui_forms/LinuxTelnet.yaml | 12 +++++---- .../Services/workflows/Apache.xml | 26 ++++++++++++++++--- .../Services/workflows/LinuxTelnet.xml | 25 ++++++++++++++++-- 8 files changed, 71 insertions(+), 24 deletions(-) create mode 100644 muranorepository/Services/heat_templates/Keypair.template diff --git a/muranorepository/Services/heat_templates/Keypair.template b/muranorepository/Services/heat_templates/Keypair.template new file mode 100644 index 0000000..d4c81f4 --- /dev/null +++ b/muranorepository/Services/heat_templates/Keypair.template @@ -0,0 +1,9 @@ +{ + "Resources": { + "$instanceName": { + "Properties": { + "KeyName": "$keyName" + } + } + } +} diff --git a/muranorepository/Services/heat_templates/Linux.template b/muranorepository/Services/heat_templates/Linux.template index 3773a6a..b0d446f 100644 --- a/muranorepository/Services/heat_templates/Linux.template +++ b/muranorepository/Services/heat_templates/Linux.template @@ -1,19 +1,10 @@ { "AWSTemplateFormatVersion": "2010-09-09", - "Parameters": { - "KeyName": { - "Description": "Key Pair", - "Type": "String", - "Default": "$keyName" - } - }, - "Resources": { "$instanceName": { "Type": "AWS::EC2::Instance", "Properties": { - "KeyName": { "Ref" : "KeyName" }, "InstanceType": "$instanceType", "ImageId": "$imageName", "AvailabilityZone": "$availabilityZone", diff --git a/muranorepository/Services/linuxApacheService-manifest.yaml b/muranorepository/Services/linuxApacheService-manifest.yaml index ccd8be3..fec21ed 100644 --- a/muranorepository/Services/linuxApacheService-manifest.yaml +++ b/muranorepository/Services/linuxApacheService-manifest.yaml @@ -30,6 +30,7 @@ heat: - DefaultSecurity.template - WebServerSecurity.template - LinuxSecurity.template + - Keypair.template agent: - DeployApache.template diff --git a/muranorepository/Services/linuxTelnetService-manifest.yaml b/muranorepository/Services/linuxTelnetService-manifest.yaml index cfef262..31e6b02 100644 --- a/muranorepository/Services/linuxTelnetService-manifest.yaml +++ b/muranorepository/Services/linuxTelnetService-manifest.yaml @@ -29,6 +29,7 @@ heat: - DefaultSecurity.template - LinuxSecurity.template - TelnetSecurity.template + - Keypair.template agent: - DeployTelnet.template diff --git a/muranorepository/Services/ui_forms/LinuxApache.yaml b/muranorepository/Services/ui_forms/LinuxApache.yaml index 6ea05e8..5265fd2 100644 --- a/muranorepository/Services/ui_forms/LinuxApache.yaml +++ b/muranorepository/Services/ui_forms/LinuxApache.yaml @@ -27,11 +27,6 @@ forms: label: Instance Count description: Several instances with Apache web Service can be created at one time. helpText: Enter an integer value between 1 and 10 - - name: keyPair - type: keypair - label: Key Pair - description: >- - The Key Pair for VMs with this service - name: unitNamingPattern type: string label: Hostname @@ -68,6 +63,13 @@ forms: description: >- Select valid image for a service. Image should already be prepared and registered in glance. + - name: keyPair + type: keypair + label: Key Pair + description: >- + Select the Key Pair to control access to instances. You can login to + instances using this KeyPair after the deployment of service. + required: false - name: availabilityZone type: azone label: Availability zone diff --git a/muranorepository/Services/ui_forms/LinuxTelnet.yaml b/muranorepository/Services/ui_forms/LinuxTelnet.yaml index 79ba7e0..4c9cf9b 100644 --- a/muranorepository/Services/ui_forms/LinuxTelnet.yaml +++ b/muranorepository/Services/ui_forms/LinuxTelnet.yaml @@ -27,11 +27,6 @@ forms: hidden: true attributeNames: units initial: 1 - - name: keyPair - type: keypair - label: Key Pair - description: >- - The Key Pair for VMs with this service - name: unitNamingPattern type: string label: Hostname @@ -72,6 +67,13 @@ forms: description: >- Select valid image for a service. Image should already be prepared and registered in glance. + - name: keyPair + type: keypair + label: Key Pair + description: >- + Select the Key Pair to control access to instances. You can login to + instances using this KeyPair after the deployment of service. + required: false - name: availabilityZone type: azone label: Availability zone diff --git a/muranorepository/Services/workflows/Apache.xml b/muranorepository/Services/workflows/Apache.xml index 8ce42b7..2891c62 100644 --- a/muranorepository/Services/workflows/Apache.xml +++ b/muranorepository/Services/workflows/Apache.xml @@ -1,4 +1,27 @@ + + + + + + + + + + + + + + ( - - + + Unable to assign Key Pair on unit ) due to + + + + + + @@ -17,7 +40,6 @@