Browse Source

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

Aleksandr Kovalenko 10 years ago
parent
commit
804577346e
28 changed files with 673 additions and 3 deletions
  1. 16 1
      ambari-web/app/app.js
  2. 5 0
      ambari-web/app/controllers.js
  3. 24 0
      ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step1_controller.js
  4. 24 0
      ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
  5. 24 0
      ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step3_controller.js
  6. 24 0
      ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
  7. 81 0
      ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/wizard_controller.js
  8. 9 0
      ambari-web/app/controllers/main/admin/highAvailability_controller.js
  9. 5 0
      ambari-web/app/controllers/main/service/item.js
  10. 9 0
      ambari-web/app/messages.js
  11. 7 0
      ambari-web/app/models/host_component.js
  12. 2 1
      ambari-web/app/models/service.js
  13. 1 1
      ambari-web/app/models/stack_service_component.js
  14. 2 0
      ambari-web/app/routes/main.js
  15. 177 0
      ambari-web/app/routes/ra_high_availability_routes.js
  16. 21 0
      ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step1.hbs
  17. 21 0
      ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step2.hbs
  18. 21 0
      ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step3.hbs
  19. 21 0
      ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/step4.hbs
  20. 41 0
      ambari-web/app/templates/main/admin/highAvailability/rangerAdmin/wizard.hbs
  21. 1 0
      ambari-web/app/utils/db.js
  22. 5 0
      ambari-web/app/views.js
  23. 26 0
      ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step1_view.js
  24. 26 0
      ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step2_view.js
  25. 26 0
      ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step3_view.js
  26. 26 0
      ambari-web/app/views/main/admin/highAvailability/rangerAdmin/step4_view.js
  27. 25 0
      ambari-web/app/views/main/admin/highAvailability/rangerAdmin/wizard_view.js
  28. 3 0
      ambari-web/app/views/main/service/item.js

+ 16 - 1
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}
    */
@@ -203,6 +203,21 @@ module.exports = Em.Application.create({
     return result;
   }.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
    */

+ 5 - 0
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');

+ 24 - 0
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"
+});
+

+ 24 - 0
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"
+});
+

+ 24 - 0
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"
+});
+

+ 24 - 0
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"
+});
+

+ 81 - 0
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);
+  }
+});

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

@@ -77,6 +77,15 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
     return true;
   },
 
+  /**
+   * 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

+ 5 - 0
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, {

+ 9 - 0
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',

+ 7 - 0
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: '',

+ 2 - 1
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'),

+ 1 - 1
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 **/

+ 2 - 0
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')
   }),
 

+ 177 - 0
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');
+    }
+  })
+});

+ 21 - 0
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>

+ 21 - 0
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>

+ 21 - 0
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>

+ 21 - 0
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>

+ 41 - 0
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>

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

@@ -43,6 +43,7 @@ var InitialData =  {
   },
   'HighAvailabilityWizard': {},
   'RMHighAvailabilityWizard': {},
+  'RAHighAvailabilityWizard': {},
   'RollbackHighAvailabilityWizard': {},
   'MainAdminStackAndUpgrade': {},
   'KerberosDisable': {},

+ 5 - 0
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');

+ 26 - 0
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')
+
+});

+ 26 - 0
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')
+
+});

+ 26 - 0
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')
+
+});

+ 26 - 0
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')
+
+});

+ 25 - 0
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')
+});

+ 3 - 0
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) {