ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-10281. Enable Ranger Admin HA Wizard skeleton. (akovalenko)
Date Mon, 30 Mar 2015 18:29:43 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c77993e13 -> 804577346


AMBARI-10281. Enable Ranger Admin HA Wizard skeleton. (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/80457734
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/80457734
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/80457734

Branch: refs/heads/trunk
Commit: 804577346e85297a61fca6119df51d5ec1f10335
Parents: c77993e
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Mon Mar 30 20:36:35 2015 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Mon Mar 30 21:29:29 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/app.js                           |  17 +-
 ambari-web/app/controllers.js                   |   5 +
 .../rangerAdmin/step1_controller.js             |  24 +++
 .../rangerAdmin/step2_controller.js             |  24 +++
 .../rangerAdmin/step3_controller.js             |  24 +++
 .../rangerAdmin/step4_controller.js             |  24 +++
 .../rangerAdmin/wizard_controller.js            |  81 +++++++++
 .../main/admin/highAvailability_controller.js   |   9 +
 ambari-web/app/controllers/main/service/item.js |   5 +
 ambari-web/app/messages.js                      |   9 +
 ambari-web/app/models/host_component.js         |   7 +
 ambari-web/app/models/service.js                |   3 +-
 .../app/models/stack_service_component.js       |   2 +-
 ambari-web/app/routes/main.js                   |   2 +
 .../app/routes/ra_high_availability_routes.js   | 177 +++++++++++++++++++
 .../highAvailability/rangerAdmin/step1.hbs      |  21 +++
 .../highAvailability/rangerAdmin/step2.hbs      |  21 +++
 .../highAvailability/rangerAdmin/step3.hbs      |  21 +++
 .../highAvailability/rangerAdmin/step4.hbs      |  21 +++
 .../highAvailability/rangerAdmin/wizard.hbs     |  41 +++++
 ambari-web/app/utils/db.js                      |   1 +
 ambari-web/app/views.js                         |   5 +
 .../highAvailability/rangerAdmin/step1_view.js  |  26 +++
 .../highAvailability/rangerAdmin/step2_view.js  |  26 +++
 .../highAvailability/rangerAdmin/step3_view.js  |  26 +++
 .../highAvailability/rangerAdmin/step4_view.js  |  26 +++
 .../highAvailability/rangerAdmin/wizard_view.js |  25 +++
 ambari-web/app/views/main/service/item.js       |   3 +
 28 files changed, 673 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index bd5090e..38ba4bd 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -190,7 +190,7 @@ module.exports = Em.Application.create({
 
   /**
    * If ResourceManager High Availability is enabled
-   * Based on number of ResourceManager components host components installed
+   * Based on number of ResourceManager host components installed
    *
    * @type {bool}
    */
@@ -204,6 +204,21 @@ module.exports = Em.Application.create({
   }.property('router.clusterController.isLoaded', 'isStackServicesLoaded'),
 
   /**
+   * If Ranger Admin High Availability is enabled
+   * Based on number of Ranger Admin host components installed
+   *
+   * @type {bool}
+   */
+  isRAHaEnabled: function () {
+    var result = false;
+    var raStackComponent = App.StackServiceComponent.find().findProperty('componentName','RANGER_ADMIN');
+    if (raStackComponent && raStackComponent.get('isMultipleAllowed')) {
+      result = App.HostComponent.find().filterProperty('componentName', 'RANGER_ADMIN').length
> 1;
+    }
+    return result;
+  }.property('router.clusterController.isLoaded', 'isStackServicesLoaded'),
+
+  /**
    * Object with utility functions for list of service names with similar behavior
    */
   services: Em.Object.create({

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 5319723..56b144d 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -51,6 +51,11 @@ require('controllers/main/admin/highAvailability/resourceManager/step1_controlle
 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/highAvailability/rangerAdmin/wizard_controller');
+require('controllers/main/admin/highAvailability/rangerAdmin/step1_controller');
+require('controllers/main/admin/highAvailability/rangerAdmin/step2_controller');
+require('controllers/main/admin/highAvailability/rangerAdmin/step3_controller');
+require('controllers/main/admin/highAvailability/rangerAdmin/step4_controller');
 require('controllers/main/admin/stack_and_upgrade_controller');
 require('controllers/main/admin/serviceAccounts_controller');
 require('controllers/main/admin/advanced');

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step1_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step1_controller.js
new file mode 100644
index 0000000..d431ec9
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/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.RAHighAvailabilityWizardStep1Controller = Em.Controller.extend({
+  name: "rAHighAvailabilityWizardStep1Controller"
+});
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
new file mode 100644
index 0000000..9a13839
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/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.RAHighAvailabilityWizardStep2Controller = Em.Controller.extend({
+  name: "rAHighAvailabilityWizardStep2Controller"
+});
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step3_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step3_controller.js
new file mode 100644
index 0000000..475cc52
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/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.RAHighAvailabilityWizardStep3Controller = Em.Controller.extend({
+  name: "rAHighAvailabilityWizardStep3Controller"
+});
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
new file mode 100644
index 0000000..fb6423f
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_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.RAHighAvailabilityWizardStep4Controller = Em.Controller.extend({
+  name: "rAHighAvailabilityWizardStep4Controller"
+});
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/wizard_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/wizard_controller.js
new file mode 100644
index 0000000..cd60f22
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/wizard_controller.js
@@ -0,0 +1,81 @@
+/**
+ * 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.RAHighAvailabilityWizardController = App.WizardController.extend({
+
+  name: 'rAHighAvailabilityWizardController',
+
+  totalSteps: 4,
+
+  isFinished: false,
+
+  content: Em.Object.create({
+    controllerName: 'rAHighAvailabilityWizardController'
+  }),
+
+  init: function () {
+    this._super();
+    this.clearStep();
+  },
+
+  clearStep: function () {
+    this.set('isFinished', false);
+  },
+
+  setCurrentStep: function (currentStep, completed) {
+    this._super(currentStep, completed);
+    App.clusterStatus.setClusterStatus({
+      clusterName: this.get('content.cluster.name'),
+      wizardControllerName: 'rAHighAvailabilityWizardController',
+      localdb: App.db.data
+    });
+  },
+
+  /**
+   * Load data for all steps until <code>current step</code>
+   */
+  loadAllPriorSteps: function () {
+    var step = this.get('currentStep');
+    switch (step) {
+      case '1':
+        this.load('cluster');
+    }
+  },
+
+  /**
+   * 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.resetDbNamespace();
+    App.router.get('updateController').updateAll();
+    this.set('isFinished', true);
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers/main/admin/highAvailability_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index bac7b67..9fe9bbb 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -78,6 +78,15 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
   },
 
   /**
+   * enable Ranger Admin High Availability
+   * @return {Boolean}
+   */
+  enableRAHighAvailability: function () {
+    App.router.transitionTo('main.services.enableRAHighAvailability');
+    return true;
+  },
+
+  /**
    * join or wrap message depending on whether it is array or string
    * @param message
    * @return {*}

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index ba1d1c2..8f817d2 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -714,6 +714,11 @@ App.MainServiceItemController = Em.Controller.extend({
     ability_controller.enableRMHighAvailability();
   },
 
+  enableRAHighAvailability: function() {
+    var ability_controller = App.router.get('mainAdminHighAvailabilityController');
+    ability_controller.enableRAHighAvailability();
+  },
+
   downloadClientConfigs: function (event) {
     var component = this.get('content.clientComponents').rejectProperty('totalCount', 0)[0];
     componentsUtils.downloadClientConfigs.call(this, {

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 18fcd17..92c0a74 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1022,6 +1022,7 @@ Em.I18n.translations = {
   'admin.highAvailability.button.disable':'Disable NameNode HA',
   'admin.rm_highAvailability.button.enable':'Enable ResourceManager HA',
   'admin.rm_highAvailability.button.disable':'Disable ResourceManager HA',
+  'admin.ra_highAvailability.button.enable':'Enable Ranger Admin HA',
   'admin.highAvailability.disabled':'NameNode HA is disabled',
   'admin.highAvailability.enabled':'NameNode HA is enabled',
   'admin.rm_highAvailability.disabled':'ResourceManager HA is disabled',
@@ -1200,6 +1201,14 @@ Em.I18n.translations = {
   'admin.rm_highAvailability.wizard.step4.notice.inProgress':'Please wait while ResourceManager
HA is being deployed.',
   'admin.rm_highAvailability.wizard.step4.notice.completed':'ResourceManager HA has been
enabled successfully.',
 
+  'admin.ra_highAvailability.wizard.header': 'Enable Ranger Admin HA Wizard',
+  'admin.ra_highAvailability.wizard.step1.header': 'Get Started',
+  'admin.ra_highAvailability.wizard.step2.header': 'Select Hosts',
+  'admin.ra_highAvailability.wizard.step3.header': 'Review',
+  'admin.ra_highAvailability.wizard.step4.header': 'Install, Start and Test',
+  'admin.ra_highAvailability.closePopup':'Enable Ranger Admin HA Wizard is in progress. You
must allow the wizard to complete for Ambari to be in usable state. ' +
+  'If you choose to quit, you must follow manual instructions to complete or revert enabling
Ranger Admin HA as documented in the Ambari User Guide. Are you sure you want to exit the
wizard?',
+
   'admin.security.title':'Kerberos security has not been enabled',
   'admin.security.enabled': 'Kerberos security is enabled',
   'admin.security.disabled': 'Kerberos security is disabled',

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 240f1db..bd4c69a 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -283,6 +283,13 @@ App.HostComponentActionMap = {
         isHidden: App.get('isRMHaEnabled'),
         disabled: App.get('isSingleNode')
       },
+      TOGGLE_RA_HA: {
+        action: 'enableRAHighAvailability',
+        label: Em.I18n.t('admin.ra_highAvailability.button.enable'),
+        cssClass: 'icon-arrow-up',
+        isHidden: App.get('isRAHaEnabled'),
+        disabled: App.get('isSingleNode')
+      },
       MOVE_COMPONENT: {
         action: 'reassignMaster',
         context: '',

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/models/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js
index a4696d1..08e1662 100644
--- a/ambari-web/app/models/service.js
+++ b/ambari-web/app/models/service.js
@@ -84,7 +84,8 @@ App.Service = DS.Model.extend({
     var typeServiceMap = {
       GANGLIA: ['MONITORING'],
       HDFS: ['HA_MODE'],
-      YARN: ['HA_MODE']
+      YARN: ['HA_MODE'],
+      RANGER: ['HA_MODE']
     };
     return typeServiceMap[this.get('serviceName')] || [];
   }.property('serviceName'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/models/stack_service_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service_component.js b/ambari-web/app/models/stack_service_component.js
index e47787a..f46e39a 100644
--- a/ambari-web/app/models/stack_service_component.js
+++ b/ambari-web/app/models/stack_service_component.js
@@ -144,7 +144,7 @@ App.StackServiceComponent = DS.Model.extend({
    * @property {Boolean} isMasterAddableInstallerWizard
    **/
   isMasterAddableInstallerWizard: function() {
-    return this.get('isMaster') && this.get('isMultipleAllowed') && this.get('maxToInstall')
> 2;
+    return this.get('isMaster') && this.get('isMultipleAllowed') && this.get('maxToInstall')
=== Infinity;
   }.property('componentName'),
 
   /** @property {Boolean} isHAComponentOnly - Components that can be installed only if HA
enabled **/

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 251b376..739f9c9 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -674,6 +674,8 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 
     enableRMHighAvailability: require('routes/rm_high_availability_routes'),
 
+    enableRAHighAvailability: require('routes/ra_high_availability_routes'),
+
     rollbackHighAvailability: require('routes/rollbackHA_routes')
   }),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/routes/ra_high_availability_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/ra_high_availability_routes.js b/ambari-web/app/routes/ra_high_availability_routes.js
new file mode 100644
index 0000000..074436b
--- /dev/null
+++ b/ambari-web/app/routes/ra_high_availability_routes.js
@@ -0,0 +1,177 @@
+/**
+ * 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/RangerAdmin/enable',
+
+  enter: function (router) {
+    var rAHighAvailabilityWizardController = router.get('rAHighAvailabilityWizardController');
+    rAHighAvailabilityWizardController.dataLoading().done(function () {
+      //Set RANGER as current service
+      App.router.set('mainServiceItemController.content', App.Service.find().findProperty('serviceName',
'RANGER'));
+    });
+    Em.run.next(function () {
+      App.router.get('updateController').set('isWorking', false);
+      var popup = App.ModalPopup.show({
+        classNames: ['full-width-modal'],
+        header: Em.I18n.t('admin.ra_highAvailability.wizard.header'),
+        bodyClass: App.RAHighAvailabilityWizardView.extend({
+          controller: rAHighAvailabilityWizardController
+        }),
+        primary: Em.I18n.t('form.cancel'),
+        showFooter: false,
+        secondary: null,
+
+        onClose: function () {
+          var rAHighAvailabilityWizardController = router.get('rAHighAvailabilityWizardController'),
+              currStep = rAHighAvailabilityWizardController.get('currentStep'),
+              self = this;
+
+          if (parseInt(currStep) === 4) {
+            App.showConfirmationPopup(function () {
+              router.get('updateController').set('isWorking', true);
+              rAHighAvailabilityWizardController.finish();
+              App.clusterStatus.setClusterStatus({
+                clusterName: App.router.getClusterName(),
+                clusterState: 'DEFAULT',
+                localdb: App.db.data
+              }, {
+                alwaysCallback: function () {
+                  self.hide();
+                  router.transitionTo('main.services.index');
+                  //location.reload();
+                }
+              });
+            }, Em.I18n.t('admin.ra_highAvailability.closePopup'));
+          } else {
+            router.get('updateController').set('isWorking', true);
+            rAHighAvailabilityWizardController.finish();
+            App.clusterStatus.setClusterStatus({
+              clusterName: App.router.getClusterName(),
+              clusterState: 'DEFAULT',
+              localdb: App.db.data
+            }, {
+              alwaysCallback: function () {
+                self.hide();
+                router.transitionTo('main.services.index');
+                //location.reload();
+              }
+            });
+          }
+        },
+        didInsertElement: function () {
+          this.fitHeight();
+        }
+      });
+      rAHighAvailabilityWizardController.set('popup', popup);
+      var currentClusterStatus = App.clusterStatus.get('value');
+      if (currentClusterStatus) {
+        switch (currentClusterStatus.clusterState) {
+          case 'RA_HIGH_AVAILABILITY_DEPLOY' :
+            rAHighAvailabilityWizardController.setCurrentStep(currentClusterStatus.localdb.RAHighAvailabilityWizard.currentStep);
+            break;
+          default:
+            var currStep = App.router.get('rAHighAvailabilityWizardController.currentStep');
+            rAHighAvailabilityWizardController.setCurrentStep(currStep);
+            break;
+        }
+      }
+      router.transitionTo('step' + rAHighAvailabilityWizardController.get('currentStep'));
+    });
+  },
+
+  step1: Em.Route.extend({
+    route: '/step1',
+    connectOutlets: function (router) {
+      var controller = router.get('rAHighAvailabilityWizardController');
+      controller.setCurrentStep('1');
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rAHighAvailabilityWizardStep1', controller.get('content'));
+      })
+    },
+    next: function (router) {
+      router.transitionTo('step2');
+    }
+  }),
+
+  step2: Em.Route.extend({
+    route: '/step2',
+    connectOutlets: function (router) {
+      var controller = router.get('rAHighAvailabilityWizardController');
+      controller.setCurrentStep('2');
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rAHighAvailabilityWizardStep2', controller.get('content'));
+      })
+    },
+    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('rAHighAvailabilityWizardController');
+      controller.setCurrentStep('3');
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rAHighAvailabilityWizardStep3', controller.get('content'));
+      })
+    },
+    next: function (router) {
+      router.transitionTo('step4');
+    },
+    back: function (router) {
+      router.transitionTo('step2');
+    }
+  }),
+
+  step4: Em.Route.extend({
+    route: '/step4',
+    connectOutlets: function (router) {
+      var controller = router.get('rAHighAvailabilityWizardController');
+      controller.setCurrentStep('4');
+      controller.dataLoading().done(function () {
+        controller.connectOutlet('rAHighAvailabilityWizardStep4', controller.get('content'));
+      })
+    },
+    next: function (router) {
+      router.get('updateController').set('isWorking', true);
+      var rAHighAvailabilityWizardController = router.get('rAHighAvailabilityWizardController');
+      rAHighAvailabilityWizardController.finish();
+      App.clusterStatus.setClusterStatus({
+        clusterName: App.router.getClusterName(),
+        clusterState: 'DEFAULT',
+        localdb: App.db.data
+      }, {
+        alwaysCallback: function () {
+          rAHighAvailabilityWizardController.get('popup').hide();
+          router.transitionTo('main.services.index');
+          //location.reload();
+        }
+      });
+    },
+    back: function (router) {
+      router.transitionTo('step3');
+    }
+  })
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step1.hbs b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step1.hbs
new file mode 100644
index 0000000..bb7745d
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step1.hbs
@@ -0,0 +1,21 @@
+{{!
+* 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 copy
+right 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="btn-area">
+  <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step2.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step2.hbs b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step2.hbs
new file mode 100644
index 0000000..1ba7cc5
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step2.hbs
@@ -0,0 +1,21 @@
+{{!
+* 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="btn-area">
+  <a class="btn" {{action back}}>&larr; {{t common.back}}</a>
+  <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step3.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step3.hbs b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step3.hbs
new file mode 100644
index 0000000..1ba7cc5
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step3.hbs
@@ -0,0 +1,21 @@
+{{!
+* 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="btn-area">
+  <a class="btn" {{action back}}>&larr; {{t common.back}}</a>
+  <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step4.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step4.hbs b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step4.hbs
new file mode 100644
index 0000000..1ba7cc5
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step4.hbs
@@ -0,0 +1,21 @@
+{{!
+* 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="btn-area">
+  <a class="btn" {{action back}}>&larr; {{t common.back}}</a>
+  <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/wizard.hbs b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/wizard.hbs
new file mode 100644
index 0000000..228cb89
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/wizard.hbs
@@ -0,0 +1,41 @@
+{{!
+* 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 id="ra-ha-wizard" 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.ra_highAvailability.wizard.header}}</li>
+              <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep1 target="controller"}}>{{t admin.ra_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.ra_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.ra_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.ra_highAvailability.wizard.step4.header}}</a></li>
+            </ul>
+          </div>
+        </div>
+          <div class="wizard-content well span9">
+            {{outlet}}
+          </div>
+      </div>
+    </div>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/utils/db.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index 4fd4b2e..e5f9bb7 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -43,6 +43,7 @@ var InitialData =  {
   },
   'HighAvailabilityWizard': {},
   'RMHighAvailabilityWizard': {},
+  'RAHighAvailabilityWizard': {},
   'RollbackHighAvailabilityWizard': {},
   'MainAdminStackAndUpgrade': {},
   'KerberosDisable': {},

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index ef98340..602f68a 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -137,6 +137,11 @@ 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/highAvailability/rangerAdmin/wizard_view');
+require('views/main/admin/highAvailability/rangerAdmin/step1_view');
+require('views/main/admin/highAvailability/rangerAdmin/step2_view');
+require('views/main/admin/highAvailability/rangerAdmin/step3_view');
+require('views/main/admin/highAvailability/rangerAdmin/step4_view');
 require('views/main/admin/serviceAccounts_view');
 require('views/main/admin/stack_upgrade/upgrade_wizard_view');
 require('views/main/admin/stack_upgrade/upgrade_version_box_view');

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step1_view.js b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step1_view.js
new file mode 100644
index 0000000..74b2664
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/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.RAHighAvailabilityWizardStep1View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/rangerAdmin/step1')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step2_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step2_view.js b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step2_view.js
new file mode 100644
index 0000000..3202938
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/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.RAHighAvailabilityWizardStep2View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/rangerAdmin/step2')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step3_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step3_view.js b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step3_view.js
new file mode 100644
index 0000000..8aa0125
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/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.RAHighAvailabilityWizardStep3View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/rangerAdmin/step3')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step4_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step4_view.js b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step4_view.js
new file mode 100644
index 0000000..cd3b9b1
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/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.RAHighAvailabilityWizardStep4View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/rangerAdmin/step4')
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/wizard_view.js b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/wizard_view.js
new file mode 100644
index 0000000..613cdad
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/rangerAdmin/wizard_view.js
@@ -0,0 +1,25 @@
+/**
+ * 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.RAHighAvailabilityWizardView = Em.View.extend(App.WizardMenuMixin, {
+
+  templateName: require('templates/main/admin/highAvailability/rangerAdmin/wizard')
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/80457734/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index c4a27b3..6fd6cec 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -148,6 +148,9 @@ App.MainServiceItemView = Em.View.extend({
           case 'YARN':
             options.push(actionMap.TOGGLE_RM_HA);
             break;
+          case 'RANGER':
+            options.push(actionMap.TOGGLE_RA_HA);
+            break;
         }
       }
       if (serviceCheckSupported) {


Mime
View raw message