Переглянути джерело

AMBARI-6490. RM HA Wizard: routing and skeleton. (akovalenko)

Aleksandr Kovalenko 11 роки тому
батько
коміт
b86433949b
79 змінених файлів з 765 додано та 76 видалено
  1. 1 0
      ambari-web/app/config.js
  2. 20 15
      ambari-web/app/controllers.js
  3. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard_controller.js
  4. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step1_controller.js
  5. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step2_controller.js
  6. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step3_controller.js
  7. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
  8. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step1_controller.js
  9. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step2_controller.js
  10. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
  11. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js
  12. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step5_controller.js
  13. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step6_controller.js
  14. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
  15. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step8_controller.js
  16. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
  17. 0 0
      ambari-web/app/controllers/main/admin/highAvailability/nameNode/wizard_controller.js
  18. 24 0
      ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step1_controller.js
  19. 24 0
      ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
  20. 24 0
      ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step3_controller.js
  21. 26 0
      ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
  22. 60 0
      ambari-web/app/controllers/main/admin/highAvailability/resourceManager/wizard_controller.js
  23. 22 0
      ambari-web/app/controllers/main/admin/highAvailability_controller.js
  24. 0 7
      ambari-web/app/controllers/main/admin/stack_upgrade_controller.js
  25. 0 7
      ambari-web/app/controllers/main/service/add_controller.js
  26. 5 0
      ambari-web/app/controllers/main/service/item.js
  27. 0 8
      ambari-web/app/controllers/main/service/reassign_controller.js
  28. 8 0
      ambari-web/app/controllers/wizard.js
  29. 13 0
      ambari-web/app/messages.js
  30. 2 1
      ambari-web/app/models/service.js
  31. 1 1
      ambari-web/app/routes/high_availability_routes.js
  32. 1 0
      ambari-web/app/routes/main.js
  33. 162 0
      ambari-web/app/routes/rm_high_availability_routes.js
  34. 1 1
      ambari-web/app/routes/rollbackHA_routes.js
  35. 8 0
      ambari-web/app/styles/application.less
  36. 9 1
      ambari-web/app/templates/main/admin/highAvailability.hbs
  37. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/rollback.hbs
  38. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard.hbs
  39. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/step1.hbs
  40. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/step2.hbs
  41. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/step3.hbs
  42. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
  43. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step2.hbs
  44. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step3.hbs
  45. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step4.hbs
  46. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step5.hbs
  47. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step6.hbs
  48. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step7.hbs
  49. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step8.hbs
  50. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/step9.hbs
  51. 0 0
      ambari-web/app/templates/main/admin/highAvailability/nameNode/wizard.hbs
  52. 24 0
      ambari-web/app/templates/main/admin/highAvailability/resourceManager/step1.hbs
  53. 24 0
      ambari-web/app/templates/main/admin/highAvailability/resourceManager/step2.hbs
  54. 24 0
      ambari-web/app/templates/main/admin/highAvailability/resourceManager/step3.hbs
  55. 24 0
      ambari-web/app/templates/main/admin/highAvailability/resourceManager/step4.hbs
  56. 45 0
      ambari-web/app/templates/main/admin/highAvailability/resourceManager/wizard.hbs
  57. 1 0
      ambari-web/app/utils/db.js
  58. 20 15
      ambari-web/app/views.js
  59. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard_view.js
  60. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step1_view.js
  61. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step2_view.js
  62. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step3_view.js
  63. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/rollback_view.js
  64. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step1_view.js
  65. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step2_view.js
  66. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step3_view.js
  67. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step4_view.js
  68. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step5_view.js
  69. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step6_view.js
  70. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step7_view.js
  71. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step8_view.js
  72. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/step9_view.js
  73. 1 1
      ambari-web/app/views/main/admin/highAvailability/nameNode/wizard_view.js
  74. 26 0
      ambari-web/app/views/main/admin/highAvailability/resourceManager/step1_view.js
  75. 26 0
      ambari-web/app/views/main/admin/highAvailability/resourceManager/step2_view.js
  76. 26 0
      ambari-web/app/views/main/admin/highAvailability/resourceManager/step3_view.js
  77. 26 0
      ambari-web/app/views/main/admin/highAvailability/resourceManager/step4_view.js
  78. 55 0
      ambari-web/app/views/main/admin/highAvailability/resourceManager/wizard_view.js
  79. 18 5
      ambari-web/app/views/main/service/item.js

+ 1 - 0
ambari-web/app/config.js

@@ -71,6 +71,7 @@ App.supports = {
   ldapGroupMapping: false,
   localRepositories: true,
   highAvailability: true,
+  resourceManagerHighAvailability: false,
   deleteHost: true,
   autoRollbackHA: false,
   appTimelineServer: true,

+ 20 - 15
ambari-web/app/controllers.js

@@ -28,23 +28,28 @@ require('controllers/main');
 require('controllers/main/dashboard');
 require('controllers/main/admin');
 require('controllers/main/admin/highAvailability_controller');
-require('controllers/main/admin/highAvailability/wizard_controller');
+require('controllers/main/admin/highAvailability/nameNode/wizard_controller');
 require('controllers/main/admin/highAvailability/progress_controller');
 require('controllers/main/admin/highAvailability/progress_popup_controller');
-require('controllers/main/admin/highAvailability/rollback_controller');
-require('controllers/main/admin/highAvailability/step1_controller');
-require('controllers/main/admin/highAvailability/step2_controller');
-require('controllers/main/admin/highAvailability/step3_controller');
-require('controllers/main/admin/highAvailability/step4_controller');
-require('controllers/main/admin/highAvailability/step5_controller');
-require('controllers/main/admin/highAvailability/step6_controller');
-require('controllers/main/admin/highAvailability/step7_controller');
-require('controllers/main/admin/highAvailability/step8_controller');
-require('controllers/main/admin/highAvailability/step9_controller');
-require('controllers/main/admin/rollbackHA/step1_controller');
-require('controllers/main/admin/rollbackHA/step2_controller');
-require('controllers/main/admin/rollbackHA/step3_controller');
-require('controllers/main/admin/rollbackHA/rollback_wizard_controller');
+require('controllers/main/admin/highAvailability/nameNode/rollback_controller');
+require('controllers/main/admin/highAvailability/nameNode/step1_controller');
+require('controllers/main/admin/highAvailability/nameNode/step2_controller');
+require('controllers/main/admin/highAvailability/nameNode/step3_controller');
+require('controllers/main/admin/highAvailability/nameNode/step4_controller');
+require('controllers/main/admin/highAvailability/nameNode/step5_controller');
+require('controllers/main/admin/highAvailability/nameNode/step6_controller');
+require('controllers/main/admin/highAvailability/nameNode/step7_controller');
+require('controllers/main/admin/highAvailability/nameNode/step8_controller');
+require('controllers/main/admin/highAvailability/nameNode/step9_controller');
+require('controllers/main/admin/highAvailability/nameNode/rollbackHA/step1_controller');
+require('controllers/main/admin/highAvailability/nameNode/rollbackHA/step2_controller');
+require('controllers/main/admin/highAvailability/nameNode/rollbackHA/step3_controller');
+require('controllers/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard_controller');
+require('controllers/main/admin/highAvailability/resourceManager/wizard_controller');
+require('controllers/main/admin/highAvailability/resourceManager/step1_controller');
+require('controllers/main/admin/highAvailability/resourceManager/step2_controller');
+require('controllers/main/admin/highAvailability/resourceManager/step3_controller');
+require('controllers/main/admin/highAvailability/resourceManager/step4_controller');
 require('controllers/main/admin/cluster');
 require('controllers/main/admin/stack_upgrade_controller');
 require('controllers/main/admin/user');

+ 0 - 0
ambari-web/app/controllers/main/admin/rollbackHA/rollback_wizard_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/rollbackHA/step1_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step1_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/rollbackHA/step2_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step2_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/rollbackHA/step3_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollbackHA/step3_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step1_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step1_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step2_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step2_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step3_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step4_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step4_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step5_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step6_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step6_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step7_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step8_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step8_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js


+ 0 - 0
ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js → ambari-web/app/controllers/main/admin/highAvailability/nameNode/wizard_controller.js


+ 24 - 0
ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step1_controller.js

@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardStep1Controller = Em.Controller.extend({
+  name: "rMHighAvailabilityWizardStep1Controller"
+});
+

+ 24 - 0
ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js

@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardStep2Controller = Em.Controller.extend({
+  name:"rMHighAvailabilityWizardStep2Controller"
+});
+

+ 24 - 0
ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step3_controller.js

@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardStep3Controller = Em.Controller.extend({
+  name: "rMHighAvailabilityWizardStep3Controller"
+});
+

+ 26 - 0
ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js

@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+require('controllers/main/admin/misc_controller');
+
+App.RMHighAvailabilityWizardStep4Controller = Em.Controller.extend({
+  name:"rMHighAvailabilityWizardStep4Controller"
+});
+

+ 60 - 0
ambari-web/app/controllers/main/admin/highAvailability/resourceManager/wizard_controller.js

@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardController = App.WizardController.extend({
+
+  name: 'rMHighAvailabilityWizardController',
+
+  totalSteps: 4,
+
+  content: Em.Object.create({
+    controllerName: 'rMHighAvailabilityWizardController'
+  }),
+
+  setCurrentStep: function (currentStep, completed) {
+    this._super(currentStep, completed);
+    App.clusterStatus.setClusterStatus({
+      clusterName: this.get('content.cluster.name'),
+      clusterState: 'RM_HIGH_AVAILABILITY_DEPLOY',
+      wizardControllerName: 'rMHighAvailabilityWizardController',
+      localdb: App.db.data
+    });
+  },
+
+  /**
+   * Remove all loaded data.
+   * Created as copy for App.router.clearAllSteps
+   */
+  clearAllSteps: function () {
+    this.clearInstallOptions();
+    // clear temporary information stored during the install
+    this.set('content.cluster', this.getCluster());
+  },
+
+  /**
+   * Clear all temporary data
+   */
+  finish: function () {
+    this.setCurrentStep(1);
+    App.db.data.RMHighAvailabilityWizard = {};
+    App.router.get('updateController').updateAll();
+  }
+});

+ 22 - 0
ambari-web/app/controllers/main/admin/highAvailability_controller.js

@@ -63,6 +63,28 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
     App.router.transitionTo('main.admin.rollbackHighAvailability');
   },
 
+  /**
+   * enable ResourceManager High Availability
+   * @return {Boolean}
+   */
+  enableRMHighAvailability: function () {
+    //Prerequisite Checks
+    var message = [];
+    if (App.HostComponent.find().filterProperty('componentName', 'ZOOKEEPER_SERVER').length < 3) {
+      message.push(Em.I18n.t('admin.rm_highAvailability.error.zooKeeperNum'));
+    }
+
+    if (App.router.get('mainHostController.hostsCountMap.TOTAL') < 3) {
+      message.push(Em.I18n.t('admin.rm_highAvailability.error.hostsNum'));
+    }
+    if (message.length > 0) {
+      this.showErrorPopup(message);
+      return false;
+    }
+    App.router.transitionTo('main.admin.enableRMHighAvailability');
+    return true;
+  },
+
   setSecurityStatus: function () {
     if (App.testMode) {
       this.set('securityEnabled', !App.testEnableSecurity);

+ 0 - 7
ambari-web/app/controllers/main/admin/stack_upgrade_controller.js

@@ -42,13 +42,6 @@ App.StackUpgradeController = App.WizardController.extend({
     controllerName: 'stackUpgradeController'
   }),
 
-  /**
-   * return new object extended from clusterStatusTemplate
-   * @return Object
-   */
-  getCluster: function(){
-    return jQuery.extend({}, this.get('clusterStatusTemplate'), {name: App.router.getClusterName()});
-  },
   /**
    * return new object extended from upgradeOptionsTemplate
    * @return Object

+ 0 - 7
ambari-web/app/controllers/main/service/add_controller.js

@@ -62,13 +62,6 @@ App.AddServiceController = App.WizardController.extend({
     });
   },
 
-  /**
-   * return new object extended from clusterStatusTemplate
-   * @return Object
-   */
-  getCluster: function(){
-    return jQuery.extend({}, this.get('clusterStatusTemplate'), {name: App.router.getClusterName()});
-  },
   /**
    * Load services data. Will be used at <code>Select services(step4)</code> step
    */

+ 5 - 0
ambari-web/app/controllers/main/service/item.js

@@ -378,6 +378,11 @@ App.MainServiceItemController = Em.Controller.extend({
     ability_controller.disableHighAvailability();
   },
 
+  enableRMHighAvailability: function() {
+    var ability_controller = App.router.get('mainAdminHighAvailabilityController');
+    ability_controller.enableRMHighAvailability();
+  },
+
   isPending:true
 
 });

+ 0 - 8
ambari-web/app/controllers/main/service/reassign_controller.js

@@ -129,14 +129,6 @@ App.ReassignMasterController = App.WizardController.extend({
     });
   },
 
-  /**
-   * return new object extended from clusterStatusTemplate
-   * @return Object
-   */
-  getCluster: function () {
-    return jQuery.extend({}, this.get('clusterStatusTemplate'), {name: App.router.getClusterName()});
-  },
-
   /**
    * Load services data from server.
    */

+ 8 - 0
ambari-web/app/controllers/wizard.js

@@ -1012,5 +1012,13 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, {
     }).start();
 
     return dfd.promise();
+  },
+
+  /**
+   * return new object extended from clusterStatusTemplate
+   * @return Object
+   */
+  getCluster: function () {
+    return jQuery.extend({}, this.get('clusterStatusTemplate'), {name: App.router.getClusterName()});
   }
 });

+ 13 - 0
ambari-web/app/messages.js

@@ -818,8 +818,11 @@ Em.I18n.translations = {
   'admin.highAvailability':' High Availability',
   'admin.highAvailability.button.enable':'Enable NameNode HA',
   'admin.highAvailability.button.disable':'Disable NameNode HA',
+  'admin.rm_highAvailability.button.enable':'Enable ResourceManager HA',
+  'admin.rm_highAvailability.button.disable':'Disable ResourceManager HA',
   'admin.highAvailability.disabled':'NameNode HA is disabled',
   'admin.highAvailability.enabled':'NameNode HA is enabled',
+  'admin.rm_highAvailability.disabled':'ResourceManager HA is disabled',
   'admin.highAvailability.confirmRollbackHeader':'Confirm Rollback',
   'admin.highAvailability.confirmRollbackBody':'This will rollback all operations that were done in HA wizard',
   'admin.highAvailability.confirmManualRollbackBody':'You are in the process of enabling NameNode HA. If you exit now, you must follow manual instructions to revert back to the non-HA setup as documented in the Ambari User Guide\'s <i>Rolling Back NameNode HA</i> section.  Are you sure you want to exit the wizard?',
@@ -827,6 +830,9 @@ Em.I18n.translations = {
   'admin.highAvailability.error.namenodeStarted':'NameNode must be running before you enable NameNode HA.',
   'admin.highAvailability.error.zooKeeperNum':'You must have at least 3 ZooKeeper Servers in your cluster to enable NameNode HA.',
   'admin.highAvailability.error.security':'You cannot enable NameNode HA via this wizard as your cluster is already secured.  First, disable security by going to Admin > Security, and then run this Enable NameNode HA wizard again.  After NameNode HA is enabled, you can go back to Admin > Security to secure the cluster.',
+  'admin.rm_highAvailability.error.hostsNum':'You must have at least 3 hosts in your cluster to enable ResourceManager HA.',
+  'admin.rm_highAvailability.error.zooKeeperNum':'You must have at least 3 ZooKeeper Servers in your cluster to enable ResourceManager HA.',
+
   'admin.highAvailability.wizard.header':'Enable NameNode HA Wizard',
   'admin.highAvailability.wizard.progressPage.notice.inProgress':'Please wait while NameNode HA is being deployed.',
   'admin.highAvailability.wizard.progressPage.notice.completed':'Please proceed to the next step.',
@@ -966,6 +972,13 @@ Em.I18n.translations = {
     '<b>manual steps</b> (that you must perform in sequence as instructed by the wizard).<br/><br/>' +
     '<b>You should plan a cluster maintenance window and prepare for cluster downtime when enabling NameNode HA.</b>',
   'admin.highAvailability.wizard.step1.alert':'If you have HBase running, please exit this wizard and stop HBase first.',
+
+  'admin.rm_highAvailability.wizard.header': 'Enable ResourceManager HA Wizard',
+  'admin.rm_highAvailability.wizard.step1.header': 'Get Started',
+  'admin.rm_highAvailability.wizard.step2.header': 'Select Host',
+  'admin.rm_highAvailability.wizard.step3.header': 'Review',
+  'admin.rm_highAvailability.wizard.step4.header': 'Configure Components',
+
   'admin.security.title':'Kerberos security has not been enabled',
   'admin.security.enabled': 'Kerberos security is enabled',
   'admin.security.disabled': 'Kerberos security is disabled',

+ 2 - 1
ambari-web/app/models/service.js

@@ -79,7 +79,8 @@ App.Service = DS.Model.extend(App.ServiceModelMixin, {
     var typeServiceMap = {
       GANGLIA: ['MONITORING'],
       NAGIOS:  ['MONITORING'],
-      HDFS: ['HA_MODE']
+      HDFS: ['HA_MODE'],
+      YARN: ['HA_MODE']
     };
     return typeServiceMap[this.get('serviceName')] || [];
   }.property('serviceName'),

+ 1 - 1
ambari-web/app/routes/high_availability_routes.js

@@ -19,7 +19,7 @@
 var App = require('app');
 
 module.exports = App.WizardRoute.extend({
-  route: '/highAvailability/enable',
+  route: '/highAvailability/NameNode/enable',
 
   enter: function (router) {
     Em.run.next(function () {

+ 1 - 0
ambari-web/app/routes/main.js

@@ -470,6 +470,7 @@ module.exports = Em.Route.extend({
 
     rollbackHighAvailability: require('routes/rollbackHA_routes'),
 
+    enableRMHighAvailability: require('routes/rm_high_availability_routes'),
 
     adminSecurity: Em.Route.extend({
       route: '/security',

+ 162 - 0
ambari-web/app/routes/rm_high_availability_routes.js

@@ -0,0 +1,162 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+module.exports = App.WizardRoute.extend({
+  route: '/highAvailability/ResourceManager/enable',
+
+  enter: function (router) {
+    Em.run.next(function () {
+      var rMHighAvailabilityWizardController = router.get('rMHighAvailabilityWizardController');
+      App.router.get('updateController').set('isWorking', false);
+      var popup = App.ModalPopup.show({
+        classNames: ['full-width-modal'],
+        header: Em.I18n.t('admin.rm_highAvailability.wizard.header'),
+        bodyClass: App.RMHighAvailabilityWizardView.extend({
+          controller: rMHighAvailabilityWizardController
+        }),
+        primary: Em.I18n.t('form.cancel'),
+        showFooter: false,
+        secondary: null,
+
+        onClose: function () {
+          var controller = App.router.get('rMHighAvailabilityWizardController');
+          controller.clearStorageData();
+          controller.setCurrentStep('1');
+          App.router.get('updateController').set('isWorking', true);
+          App.clusterStatus.setClusterStatus({
+            clusterName: App.router.get('content.cluster.name'),
+            clusterState: 'DEFAULT',
+            wizardControllerName: App.router.get('rMHighAvailabilityWizardController.name'),
+            localdb: App.db.data
+          });
+          this.hide();
+          App.router.transitionTo('main.admin.adminHighAvailability');
+        },
+        didInsertElement: function () {
+          this.fitHeight();
+        }
+      });
+      rMHighAvailabilityWizardController.set('popup', popup);
+      var currentClusterStatus = App.clusterStatus.get('value');
+      if (currentClusterStatus) {
+        switch (currentClusterStatus.clusterState) {
+          case 'RM_HIGH_AVAILABILITY_DEPLOY' :
+            rMHighAvailabilityWizardController.setCurrentStep(currentClusterStatus.localdb.RMHighAvailabilityWizard.currentStep);
+            break;
+          default:
+            var currStep = App.router.get('rMHighAvailabilityWizardController.currentStep');
+            rMHighAvailabilityWizardController.setCurrentStep(currStep);
+            break;
+        }
+      }
+      router.transitionTo('step' + rMHighAvailabilityWizardController.get('currentStep'));
+    });
+  },
+
+  step1: Em.Route.extend({
+    route: '/step1',
+    connectOutlets: function (router) {
+      var controller = router.get('rMHighAvailabilityWizardController');
+      controller.setCurrentStep('1');
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rMHighAvailabilityWizardStep1', controller.get('content'));
+      })
+    },
+    unroutePath: function () {
+      return false;
+    },
+    next: function (router) {
+      router.transitionTo('step2');
+    }
+  }),
+
+  step2: Em.Route.extend({
+    route: '/step2',
+    connectOutlets: function (router) {
+      var controller = router.get('rMHighAvailabilityWizardController');
+      controller.setCurrentStep('2');
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rMHighAvailabilityWizardStep2', controller.get('content'));
+      })
+    },
+    unroutePath: function () {
+      return false;
+    },
+    next: function (router) {
+      router.transitionTo('step3');
+    },
+    back: function (router) {
+      router.transitionTo('step1');
+    }
+  }),
+
+  step3: Em.Route.extend({
+    route: '/step3',
+    connectOutlets: function (router) {
+      var controller = router.get('rMHighAvailabilityWizardController');
+      controller.setCurrentStep('3');
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rMHighAvailabilityWizardStep3',  controller.get('content'));
+      })
+    },
+    unroutePath: function () {
+      return false;
+    },
+    next: function (router) {
+      router.transitionTo('step4');
+    },
+    back: Em.Router.transitionTo('step2')
+  }),
+
+  step4: Em.Route.extend({
+    route: '/step9',
+    connectOutlets: function (router) {
+      var controller = router.get('rMHighAvailabilityWizardController');
+      controller.setCurrentStep('4');
+      controller.setLowerStepsDisable(4);
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rMHighAvailabilityWizardStep4',  controller.get('content'));
+      })
+    },
+    unroutePath: function () {
+      return false;
+    },
+    next: function (router) {
+      var controller = router.get('rMHighAvailabilityWizardController');
+      controller.finish();
+      controller.get('popup').hide();
+      App.clusterStatus.setClusterStatus({
+        clusterName: controller.get('content.cluster.name'),
+        clusterState: 'DEFAULT',
+        wizardControllerName: 'rMHighAvailabilityWizardController',
+        localdb: App.db.data
+      });
+      router.transitionTo('main.index');
+    }
+  }),
+
+  gotoStep1: Em.Router.transitionTo('step1'),
+
+  gotoStep2: Em.Router.transitionTo('step2'),
+
+  gotoStep3: Em.Router.transitionTo('step3'),
+
+  gotoStep4: Em.Router.transitionTo('step4')
+});

+ 1 - 1
ambari-web/app/routes/rollbackHA_routes.js

@@ -19,7 +19,7 @@
 var App = require('app');
 
 module.exports = App.WizardRoute.extend({
-  route: '/highAvailability/rollbackHA',
+  route: '/highAvailability/NameNode/rollbackHA',
 
   enter: function (router) {
     Em.run.next(function () {

+ 8 - 0
ambari-web/app/styles/application.less

@@ -4029,6 +4029,14 @@ table.graphs {
     padding-bottom: 15px;
   }
 }
+
+.ha-btn {
+  margin-left: 0px;
+}
+
+.rm-ha {
+  margin-top: 20px;
+}
 /* End Admin Access*/
 
 /*Start About*/

+ 9 - 1
ambari-web/app/templates/main/admin/highAvailability.hbs

@@ -33,10 +33,18 @@
     {{#if controller.dataIsLoaded}}
       <p class="muted">
         {{t admin.highAvailability.disabled}}
-        <a class="btn btn-padding btn-success" {{action enableHighAvailability target="controller"}}>{{t admin.highAvailability.button.enable}}</a>
       </p>
+      <a class="btn btn-padding btn-success ha-btn" {{action enableHighAvailability target="controller"}}>{{t admin.highAvailability.button.enable}}</a>
     {{else}}
       <div class="spinner"></div>
     {{/if}}
   {{/if}}
+  {{#if App.supports.resourceManagerHighAvailability}}
+    <div class="rm-ha">
+      <p class="muted">
+        {{t admin.rm_highAvailability.disabled}}
+      </p>
+      <a class="btn btn-padding btn-success ha-btn" {{action enableRMHighAvailability target="controller"}}>{{t admin.rm_highAvailability.button.enable}}</a>
+    </div>
+  {{/if}}
 </div>

+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/rollback.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/rollback.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/rollbackHA/rollback_wizard.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/rollbackHA/step1.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/step1.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/rollbackHA/step2.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/step2.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/rollbackHA/step3.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/rollbackHA/step3.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step1.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step2.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step2.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step3.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step3.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step4.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step4.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step5.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step5.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step6.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step6.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step7.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step7.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step8.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step8.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/step9.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/step9.hbs


+ 0 - 0
ambari-web/app/templates/main/admin/highAvailability/wizard.hbs → ambari-web/app/templates/main/admin/highAvailability/nameNode/wizard.hbs


+ 24 - 0
ambari-web/app/templates/main/admin/highAvailability/resourceManager/step1.hbs

@@ -0,0 +1,24 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div>
+  <h2>{{t admin.rm_highAvailability.wizard.step1.header}}</h2>
+
+  <div class="btn-area">
+    <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+  </div>
+</div>

+ 24 - 0
ambari-web/app/templates/main/admin/highAvailability/resourceManager/step2.hbs

@@ -0,0 +1,24 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div>
+  <h2>{{t admin.rm_highAvailability.wizard.step2.header}}</h2>
+
+  <div class="btn-area">
+    <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+  </div>
+</div>

+ 24 - 0
ambari-web/app/templates/main/admin/highAvailability/resourceManager/step3.hbs

@@ -0,0 +1,24 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div>
+  <h2>{{t admin.rm_highAvailability.wizard.step3.header}}</h2>
+
+  <div class="btn-area">
+    <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+  </div>
+</div>

+ 24 - 0
ambari-web/app/templates/main/admin/highAvailability/resourceManager/step4.hbs

@@ -0,0 +1,24 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div>
+  <h2>{{t admin.rm_highAvailability.wizard.step4.header}}</h2>
+
+  <div class="btn-area">
+    <a class="btn btn-success pull-right" {{action next}}>{{t common.complete}}</a>
+  </div>
+</div>

+ 45 - 0
ambari-web/app/templates/main/admin/highAvailability/resourceManager/wizard.hbs

@@ -0,0 +1,45 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+<div class="wizard">
+  <div class="container">
+    <div class="container-fluid">
+      <div class="row-fluid">
+        <div class="span3">
+          <!--Sidebar content-->
+          <div class="well">
+            <ul class="nav nav-pills nav-stacked">
+              <li class="nav-header">{{t admin.rm_highAvailability.wizard.header}}</li>
+              <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep1 target="controller"}}>{{t admin.rm_highAvailability.wizard.step1.header}}</a></li>
+              <li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep2 target="controller"}}>{{t admin.rm_highAvailability.wizard.step2.header}}</a></li>
+              <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep3 target="controller"}}>{{t admin.rm_highAvailability.wizard.step3.header}}</a></li>
+              <li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled"}}><a href="javascript:void(null);"  {{action gotoStep4 target="controller"}}>{{t admin.rm_highAvailability.wizard.step4.header}}</a></li>
+            </ul>
+          </div>
+        </div>
+          <div class="wizard-content well span9">
+            {{#if view.isLoaded}}
+              {{outlet}}
+            {{else}}
+                <div class="spinner"></div>
+            {{/if}}
+          </div>
+      </div>
+    </div>
+  </div>
+</div>

+ 1 - 0
ambari-web/app/utils/db.js

@@ -38,6 +38,7 @@ var InitialData =  {
   'ReassignMaster' : {},
   'AddSecurity': {},
   'HighAvailabilityWizard': {},
+  'RMHighAvailabilityWizard': {},
   'RollbackHighAvailabilityWizard': {},
   'tmp': {}
 

+ 20 - 15
ambari-web/app/views.js

@@ -64,22 +64,27 @@ require('views/main/host/metrics/processes');
 require('views/main/host/addHost/step4_view');
 require('views/main/admin');
 require('views/main/admin/highAvailability_view');
-require('views/main/admin/highAvailability/wizard_view');
+require('views/main/admin/highAvailability/nameNode/wizard_view');
 require('views/main/admin/highAvailability/progress_view');
-require('views/main/admin/highAvailability/rollback_view');
-require('views/main/admin/highAvailability/step1_view');
-require('views/main/admin/highAvailability/step2_view');
-require('views/main/admin/highAvailability/step3_view');
-require('views/main/admin/highAvailability/step4_view');
-require('views/main/admin/highAvailability/step5_view');
-require('views/main/admin/highAvailability/step6_view');
-require('views/main/admin/highAvailability/step7_view');
-require('views/main/admin/highAvailability/step8_view');
-require('views/main/admin/highAvailability/step9_view');
-require('views/main/admin/rollbackHA/step1_view');
-require('views/main/admin/rollbackHA/step2_view');
-require('views/main/admin/rollbackHA/step3_view');
-require('views/main/admin/rollbackHA/rollback_wizard_view');
+require('views/main/admin/highAvailability/nameNode/rollback_view');
+require('views/main/admin/highAvailability/nameNode/step1_view');
+require('views/main/admin/highAvailability/nameNode/step2_view');
+require('views/main/admin/highAvailability/nameNode/step3_view');
+require('views/main/admin/highAvailability/nameNode/step4_view');
+require('views/main/admin/highAvailability/nameNode/step5_view');
+require('views/main/admin/highAvailability/nameNode/step6_view');
+require('views/main/admin/highAvailability/nameNode/step7_view');
+require('views/main/admin/highAvailability/nameNode/step8_view');
+require('views/main/admin/highAvailability/nameNode/step9_view');
+require('views/main/admin/highAvailability/nameNode/rollbackHA/step1_view');
+require('views/main/admin/highAvailability/nameNode/rollbackHA/step2_view');
+require('views/main/admin/highAvailability/nameNode/rollbackHA/step3_view');
+require('views/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard_view');
+require('views/main/admin/highAvailability/resourceManager/wizard_view');
+require('views/main/admin/highAvailability/resourceManager/step1_view');
+require('views/main/admin/highAvailability/resourceManager/step2_view');
+require('views/main/admin/highAvailability/resourceManager/step3_view');
+require('views/main/admin/highAvailability/resourceManager/step4_view');
 require('views/main/admin/cluster');
 require('views/main/admin/misc_view');
 require('views/main/admin/stack_upgrade');

+ 1 - 1
ambari-web/app/views/main/admin/rollbackHA/rollback_wizard_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard_view.js

@@ -28,7 +28,7 @@ App.RollbackHighAvailabilityWizardView = Em.View.extend({
     }
   },
 
-  templateName: require('templates/main/admin/rollbackHA/rollback_wizard'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/rollbackHA/rollback_wizard'),
 
   isStep1Disabled: function () {
     return this.isStepDisabled(1);

+ 1 - 1
ambari-web/app/views/main/admin/rollbackHA/step1_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step1_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.RollbackHighAvailabilityWizardStep1View = Em.View.extend({
 
-  templateName: require('templates/main/admin/rollbackHA/step1'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/rollbackHA/step1'),
 
   addNNHosts: null,
   sNNHosts: null,

+ 1 - 1
ambari-web/app/views/main/admin/rollbackHA/step2_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step2_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.RollbackHighAvailabilityWizardStep2View = App.HighAvailabilityWizardStep4View.extend({
 
-  templateName: require('templates/main/admin/rollbackHA/step2'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/rollbackHA/step2'),
 
   step2BodyText: function () {
     var activeNN = App.HostComponent.find().findProperty('displayNameAdvanced','Active NameNode');

+ 1 - 1
ambari-web/app/views/main/admin/rollbackHA/step3_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step3_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.RollbackHighAvailabilityWizardStep3View = Em.View.extend({
 
-  templateName: require('templates/main/admin/rollbackHA/step3'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/rollbackHA/step3'),
 
   didInsertElement: function() {
 

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/rollback_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/rollback_view.js

@@ -20,7 +20,7 @@
 var App = require('app');
 
 App.HighAvailabilityRollbackView = App.HighAvailabilityProgressPageView.extend({
-  templateName: require('templates/main/admin/highAvailability/rollback'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/rollback'),
 
   notice: Em.I18n.t('admin.highAvailability.rollback.notice.inProgress'),
   submitButtonText: Em.I18n.t('common.done')

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step1_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step1_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep1View = Em.View.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step1'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/step1'),
 
   didInsertElement: function() {
     App.popover($("div.controls input[type=text]"), {'placement': 'right', 'trigger': 'hover', 'title': this.t('admin.highAvailability.wizard.step1.nameserviceid.tooltip.title'), 'content': this.t('admin.highAvailability.wizard.step1.nameserviceid.tooltip.content')});

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step2_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step2_view.js

@@ -23,6 +23,6 @@ require('views/wizard/step5_view');
 
 App.HighAvailabilityWizardStep2View = App.WizardStep5View.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step2')
+  templateName: require('templates/main/admin/highAvailability/nameNode/step2')
 
 });

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step3_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step3_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep3View = Em.View.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step3'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/step3'),
   didInsertElement: function () {
     this.get('controller').loadStep();
   },

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step4_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step4_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep4View = Em.View.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step4'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/step4'),
 
   didInsertElement: function() {
     this.get('controller').pullCheckPointStatus();

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step5_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step5_view.js

@@ -21,5 +21,5 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep5View = App.HighAvailabilityProgressPageView.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step5')
+  templateName: require('templates/main/admin/highAvailability/nameNode/step5')
 });

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step6_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step6_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep6View = Em.View.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step6'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/step6'),
 
   didInsertElement: function() {
     this.get('controller').pullCheckPointStatus();

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step7_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step7_view.js

@@ -21,5 +21,5 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep7View = App.HighAvailabilityProgressPageView.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step7')
+  templateName: require('templates/main/admin/highAvailability/nameNode/step7')
 });

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step8_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step8_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep8View = Em.View.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step8'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/step8'),
 
   step8BodyText: function () {
     var nN = this.get('controller.content.masterComponentHosts').findProperty('isCurNameNode', true);

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/step9_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/step9_view.js

@@ -21,7 +21,7 @@ var App = require('app');
 
 App.HighAvailabilityWizardStep9View = App.HighAvailabilityProgressPageView.extend({
 
-  templateName: require('templates/main/admin/highAvailability/step9'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/step9'),
 
   submitButtonText: Em.I18n.t('common.done'),
 

+ 1 - 1
ambari-web/app/views/main/admin/highAvailability/wizard_view.js → ambari-web/app/views/main/admin/highAvailability/nameNode/wizard_view.js

@@ -70,7 +70,7 @@ App.HighAvailabilityWizardView = Em.View.extend({
     }
   },
 
-  templateName: require('templates/main/admin/highAvailability/wizard'),
+  templateName: require('templates/main/admin/highAvailability/nameNode/wizard'),
 
   isStep1Disabled: function () {
     return this.isStepDisabled(1);

+ 26 - 0
ambari-web/app/views/main/admin/highAvailability/resourceManager/step1_view.js

@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardStep1View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/resourceManager/step1')
+
+});

+ 26 - 0
ambari-web/app/views/main/admin/highAvailability/resourceManager/step2_view.js

@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardStep2View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/resourceManager/step2')
+
+});

+ 26 - 0
ambari-web/app/views/main/admin/highAvailability/resourceManager/step3_view.js

@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardStep3View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/resourceManager/step3')
+
+});

+ 26 - 0
ambari-web/app/views/main/admin/highAvailability/resourceManager/step4_view.js

@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardStep4View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/resourceManager/step4')
+
+});

+ 55 - 0
ambari-web/app/views/main/admin/highAvailability/resourceManager/wizard_view.js

@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.RMHighAvailabilityWizardView = Em.View.extend({
+
+  isLoaded: true,
+
+  didInsertElement: function() {
+    var currentStep = this.get('controller.currentStep');
+    if (currentStep > 3) {
+      this.get('controller').setLowerStepsDisable(currentStep);
+    }
+  },
+
+  templateName: require('templates/main/admin/highAvailability/resourceManager/wizard'),
+
+  isStep1Disabled: function () {
+    return this.isStepDisabled(1);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep2Disabled: function () {
+    return this.isStepDisabled(2);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep3Disabled: function () {
+    return this.isStepDisabled(3);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStep4Disabled: function () {
+    return this.isStepDisabled(4);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
+  isStepDisabled: function (index) {
+    return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
+  }
+
+});

+ 18 - 5
ambari-web/app/views/main/service/item.js

@@ -68,11 +68,17 @@ App.MainServiceItemView = Em.View.extend({
         cssClass: 'icon-medkit',
         disabled: false
       },
-      TOGGLE_HA: {
+      TOGGLE_NN_HA: {
         action: App.get('isHaEnabled') ? 'disableHighAvailability' : 'enableHighAvailability',
         label: App.get('isHaEnabled') ? Em.I18n.t('admin.highAvailability.button.disable') : Em.I18n.t('admin.highAvailability.button.enable'),
         cssClass: App.get('isHaEnabled') ? 'icon-arrow-down' : 'icon-arrow-up',
-        isHidden: (App.get('isHaEnabled') && !App.get('autoRollbackHA'))
+        isHidden: (App.get('isHaEnabled') && !App.get('supports.autoRollbackHA'))
+      },
+      TOGGLE_RM_HA: {
+        action: 'enableRMHighAvailability',
+        label: Em.I18n.t('admin.rm_highAvailability.button.enable'),
+        cssClass: 'icon-arrow-up',
+        isHidden: !App.get('supports.resourceManagerHighAvailability')
       },
       MOVE_COMPONENT: {
         action: 'reassignMaster',
@@ -98,8 +104,8 @@ App.MainServiceItemView = Em.View.extend({
     var self = this;
     var options = [];
     var service = this.get('controller.content');
-    var allMasters = this.get('controller.content.hostComponents').filterProperty('isMaster').mapProperty('componentName').uniq();
-    var allSlaves = this.get('controller.content.hostComponents').filterProperty('isSlave').mapProperty('componentName').uniq();
+    var allMasters = service.get('hostComponents').filterProperty('isMaster').mapProperty('componentName').uniq();
+    var allSlaves = service.get('hostComponents').filterProperty('isSlave').mapProperty('componentName').uniq();
     var actionMap = this.actionMap();
 
     if (this.get('controller.isClientsOnlyService')) {
@@ -128,7 +134,14 @@ App.MainServiceItemView = Em.View.extend({
         }));
       });
       if (service.get('serviceTypes').contains('HA_MODE')) {
-        options.push(actionMap.TOGGLE_HA);
+        switch (service.get('serviceName')) {
+          case 'HDFS':
+            options.push(actionMap.TOGGLE_NN_HA);
+            break;
+          case 'YARN':
+            options.push(actionMap.TOGGLE_RM_HA);
+            break;
+        }
       }
       options.push(actionMap.RUN_SMOKE_TEST);
       options.push(actionMap.TOGGLE_PASSIVE);