This is an automated email from the ASF dual-hosted git repository. ishanbha pushed a commit to branch branch-feature-AMBARI-14714-ui in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-ui by this push: new 561d654 [AMBARI-23134] Install wizard revision (#531) 561d654 is described below commit 561d654ea3bf2e0cb1db0bb62503377b2b6fcc59 Author: Jason Golieb <j...@golieb.net> AuthorDate: Sat Mar 3 17:44:10 2018 -0500 [AMBARI-23134] Install wizard revision (#531) * Bug fixes * Implementation of Service Groups (mpacks) admin screen without any back end. Includes DashRow and Timeline controls. * Fixed sql script. * Added all admin permissions to dev server simulated admin. * Implemented "Create Upgrade Plan" dialog * Upgrade status view on service groups admin screen * Upgrade status * Fixed messages.js * Doc icon style * Replaced some simple properties with Em.computed; removed empty view. * Fixes due to API changes. * Additional fix. * Unit test fixes. --- ambari-web/app/controllers/installer.js | 10 +- .../controllers/wizard/selectMpacks_controller.js | 17 +- .../app/controllers/wizard/step3_controller.js | 2 +- .../app/controllers/wizard/step6_controller.js | 5 + .../app/mixins/common/configs/enhanced_configs.js | 36 +- .../hosts/host_component_recommendation_mixin.js | 16 +- .../hosts/host_component_validation_mixin.js | 16 +- .../app/mixins/wizard/assign_master_components.js | 11 +- ambari-web/app/styles/wizard.less | 17 +- ambari-web/app/templates/wizard/step2.hbs | 3 +- ambari-web/app/templates/wizard/step6.hbs | 2 +- ambari-web/app/templates/wizard/step8.hbs | 2 +- .../test/controllers/wizard/selectMpacks_test.js | 688 +++++++++++---------- ambari-web/test/controllers/wizard/step6_test.js | 18 + 14 files changed, 479 insertions(+), 364 deletions(-) diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index 2eaa9be..f176138 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -1524,8 +1524,8 @@ App.InstallerController = App.WizardController.extend(App.Persist, { //get info about services from specific stack versions and save to StackService model const selectedServices = this.get('content.selectedServices'); const servicePromises = selectedServices.map(service => - this.loadMpackServiceInfo(service.stackName, service.stackVersion, service.name) - .then(this.loadMpackServiceInfoSuccess, this.loadMpackServiceInfoError) + this.loadMpackServiceInfo(service.mpackName, service.mpackVersion, service.name) + .then(this.loadMpackServiceInfoSuccess.bind(this), this.loadMpackServiceInfoError.bind(this)) ); return $.when(...servicePromises); @@ -1548,8 +1548,10 @@ App.InstallerController = App.WizardController.extend(App.Persist, { this.set('content.clients', clients); this.save('clients'); - //TODO: mpacks - hard coding this for now. We need to get rid of the concept of "selected stack". - this.set('content.selectedStack', { name: "HDP", version: "3.0.0" }); + //TODO: mpacks - hard coding this to use the name and version of the first stack/mpack for now. We need to get rid of the concept of "selected stack". + const stacks = App.Stack.find(); + const selectedStack = stacks.objectAtContent(0); + this.set('content.selectedStack', { name: selectedStack.get('stackName'), version: selectedStack.get('stackVersion') }); this.save('selectedStack'); dfd.resolve(); diff --git a/ambari-web/app/controllers/wizard/selectMpacks_controller.js b/ambari-web/app/controllers/wizard/selectMpacks_controller.js index 56ef0ac..3c67430 100644 --- a/ambari-web/app/controllers/wizard/selectMpacks_controller.js +++ b/ambari-web/app/controllers/wizard/selectMpacks_controller.js @@ -67,17 +67,16 @@ App.WizardSelectMpacksController = App.WizardStepController.extend({ displayed: index === 0 ? true : false, //by default, display first version id: mpack.RegistryMpackInfo.mpack_name + version.RegistryMpackVersionInfo.mpack_version, version: version.RegistryMpackVersionInfo.mpack_version, - docUrl: version.RegistryMpackVersionInfo.mpack_dock_url, - mpackUrl: version.RegistryMpackVersionInfo.mpack_url, - stackName: version.RegistryMpackVersionInfo.stack_name, - stackVersion: version.RegistryMpackVersionInfo.stack_version, - services: version.RegistryMpackVersionInfo.services ? version.RegistryMpackVersionInfo.services.map(service => { + mpackUrl: version.RegistryMpackVersionInfo.mpack_uri, + logoUrl: version.RegistryMpackVersionInfo.mpack_logo_uri, + docUrl: version.RegistryMpackVersionInfo.mpack_doc_uri, + services: version.RegistryMpackVersionInfo.modules ? version.RegistryMpackVersionInfo.modules.map(service => { return Em.Object.create({ selected: false, displayed: index === 0 ? true : false, //by default, display first version id: mpack.RegistryMpackInfo.mpack_name + version.RegistryMpackVersionInfo.mpack_version + service.name, name: service.name, - displayName: service.displayName || service.name, //TODO: mpacks - remove fallback when display name is available + displayName: service.displayName, version: service.version }) }) : [] @@ -574,10 +573,8 @@ App.WizardSelectMpacksController = App.WizardStepController.extend({ ({ id: service.id, name: service.name, - mpackName: service.mpackVersion.name, - mpackVersion: service.mpackVersion.version, - stackName: service.mpackVersion.stackName, - stackVersion: service.mpackVersion.stackVersion + mpackName: service.mpackVersion.mpack.name, + mpackVersion: service.mpackVersion.version }) ); this.set('content.selectedServices', selectedServices); diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js index d05ef52..a62bf01 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/ambari-web/app/controllers/wizard/step3_controller.js @@ -852,7 +852,7 @@ App.WizardStep3Controller = App.WizardStepController.extend(App.ReloadPopupMixin function () { self._submitProceed(); }, - Em.I18n.t('installer.step3.hostWarningsPopup.hostHasWarnings'), null, Em.I18n.t('installer.step3.hostWarningsPopup.hostHasWarnings.header'), null, 'warning'); + Em.I18n.t('installer.step3.hostWarningsPopup.hostHasWarnings'), null, Em.I18n.t('common.warning'), null, 'warning'); } this._submitProceed(); }, diff --git a/ambari-web/app/controllers/wizard/step6_controller.js b/ambari-web/app/controllers/wizard/step6_controller.js index a081952..2b287f0 100644 --- a/ambari-web/app/controllers/wizard/step6_controller.js +++ b/ambari-web/app/controllers/wizard/step6_controller.js @@ -661,9 +661,14 @@ App.WizardStep6Controller = App.WizardStepController.extend(App.HostComponentVal var bluePrintsForValidation = this.getValidationBlueprint(); this.set('content.recommendationsHostGroups', bluePrintsForValidation); + //TODO - mpacks: Hard coded to use first mpack. Update when we are installing multiple mpacks. + const selectedMpacks = this.get('content.selectedMpacks'); + return this.validateSelectedHostComponents({ services: services, hosts: hostNames, + stackName: selectedMpacks[0].name, + stackVersion: selectedMpacks[0].version, blueprint: bluePrintsForValidation }); }, diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index f870fc6..3072cb5 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -279,12 +279,36 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP * @returns {{recommend: string, hosts: *, services: *, changed_configurations: *}} */ getConfigRecommendationsParams: function(updateDependencies, changedConfigs) { - return { + const params = { recommend: updateDependencies ? 'configuration-dependencies' : 'configurations', hosts: this.get('hostNames'), services: this.get('serviceNames'), changed_configurations: updateDependencies ? changedConfigs : undefined }; + + //TODO - mpacks: Hard coded to use first mpack. Change when we are installing multiple mpacks. + const selectedMpacks = this.get('content.selectedMpacks'); + + if (selectedMpacks) { + params.stackName = selectedMpacks[0].name; + params.stackVersion = selectedMpacks[0].version; + } + + return params; + }, + + /** + * Get the url to use to request the correct stack version from stack advisor. + * Falls back to using the old global config value if necessary. + * + * @param {object} options Should include stackName and stackVersion properties, which should refer to the mpack being installed. + */ + getStackVersionUrl: function getStackVersionUrl(options) { + if (options.stackName && options.stackVersion) { + return '/stacks/' + options.stackName + '/versions/' + options.stackVersion; + } + + return App.get('stackVersionURL'); }, getRecommendationsRequest: function (dataToSend, callback) { @@ -294,8 +318,14 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP name: 'config.recommendations', sender: self, data: { - stackVersionUrl: App.get('stackVersionURL'), - dataToSend: dataToSend + stackVersionUrl: this.getStackVersionUrl(dataToSend), + //exclude stackName and stackVersion from dataToSend + dataToSend: { + recommend: dataToSend.recommend, + hosts: dataToSend.hosts, + services: dataToSend.services, + changed_configurations: dataToSend.changed_configurations + } }, success: 'loadRecommendationsSuccess', error: 'loadRecommendationsError', diff --git a/ambari-web/app/mixins/common/hosts/host_component_recommendation_mixin.js b/ambari-web/app/mixins/common/hosts/host_component_recommendation_mixin.js index b0d58e7..0c6113d 100644 --- a/ambari-web/app/mixins/common/hosts/host_component_recommendation_mixin.js +++ b/ambari-web/app/mixins/common/hosts/host_component_recommendation_mixin.js @@ -91,6 +91,20 @@ App.HostComponentRecommendationMixin = Em.Mixin.create(App.BlueprintMixin, { }, /** + * Get the url to use to request the correct stack version from stack advisor. + * Falls back to using the old global config value if necessary. + * + * @param {object} options Should include stackName and stackVersion properties, which should refer to the mpack being installed. + */ + getStackVersionUrl(options) { + if (options.stackName && options.stackVersion) { + return '/stacks/' + options.stackName + '/versions/' + options.stackVersion; + } + + return App.get('stackVersionURL'); + }, + + /** * Returns request data for recommendation request * @param {HostComponentRecommendationOptions} options * @return {HostRecommendationRequestData} @@ -99,7 +113,7 @@ App.HostComponentRecommendationMixin = Em.Mixin.create(App.BlueprintMixin, { getRecommendationRequestData: function(options) { return { recommend: 'host_groups', - stackVersionUrl: App.get('stackVersionURL'), + stackVersionUrl: this.getStackVersionUrl(options), hosts: options.hosts, services: options.services, recommendations: options.blueprint || this.getComponentsBlueprint(options.components) diff --git a/ambari-web/app/mixins/common/hosts/host_component_validation_mixin.js b/ambari-web/app/mixins/common/hosts/host_component_validation_mixin.js index 538f83c..a8b1cd4 100644 --- a/ambari-web/app/mixins/common/hosts/host_component_validation_mixin.js +++ b/ambari-web/app/mixins/common/hosts/host_component_validation_mixin.js @@ -71,13 +71,27 @@ App.HostComponentValidationMixin = Em.Mixin.create(App.BlueprintMixin, { }, /** + * Get the url to use to request the correct stack version from stack advisor. + * Falls back to using the old global config value if necessary. + * + * @param {object} options Should include stackName and stackVersion properties, which should refer to the mpack being installed. + */ + getStackVersionUrl(options) { + if (options.stackName && options.stackVersion) { + return '/stacks/' + options.stackName + '/versions/' + options.stackVersion; + } + + return App.get('stackVersionURL'); + }, + + /** * Returns request data for validation request * @method getHostComponentValidationParams * @return {HostValidationRequestData} */ getHostComponentValidationParams: function(options) { return { - stackVersionUrl: App.get('stackVersionURL'), + stackVersionUrl: this.getStackVersionUrl(options), hosts: options.hosts, services: options.services, validate: 'host_groups', diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 0870378..4fa8d00 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -529,7 +529,12 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A if (self.get('recommendations')) { self.set('backFromNextStep', true); } + + //TODO - mpacks: Hard-coding to only ask for recommendations for first mpack. Need to change this when we are installing multiple mpacks. + const selectedMpacks = self.get('content.selectedMpacks'); self.getRecommendedHosts({ + stackName: selectedMpacks[0].name, + stackVersion: selectedMpacks[0].version, hosts: self.getHosts() }).then(function () { self.loadStepCallback(self.createComponentInstallationObjects(), self); @@ -1167,10 +1172,14 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A } this.set('validationInProgress', true); - + + //TODO - mpacks: Hard coded to request first mpack only. Must be changed when we are installing multiple mpacks. + const selectedMpacks = this.get('content.selectedMpacks'); // load recommendations with partial request this.getRecommendedHosts({ hosts: hostNames, + stackName: selectedMpacks[0].name, + stackVersion: selectedMpacks[0].version, components: this.getCurrentComponentHostMap() }).then(function() { self.validateSelectedHostComponents({ diff --git a/ambari-web/app/styles/wizard.less b/ambari-web/app/styles/wizard.less index 2c3ad28..52f4b59 100644 --- a/ambari-web/app/styles/wizard.less +++ b/ambari-web/app/styles/wizard.less @@ -66,10 +66,6 @@ } #installOptions { - .step-description { - color: #999; - font-size: 11px; - } .radio-button-options { padding-bottom: 10px; color: #666; @@ -286,10 +282,8 @@ } .step3-table-progress { .progress { - height: 8px; - margin: 5px 5px 5px 0; - border-radius: 2px; - width: 80%; + margin: 0; + width: 75%; } } .step3-table-action { @@ -698,7 +692,6 @@ } } } - max-height: 440px; } .log_popup { @@ -1038,9 +1031,6 @@ .wizard-nav { width: @wizard-side-nav-width; } - .wizard-content.col-md-9 { - width: calc(~"100% - 250px"); - } } } @@ -1059,9 +1049,6 @@ .wizard-nav { width: @wizard-side-nav-width; } - .wizard-content.col-md-9 { - width: calc(~"100% - 250px"); - } } } } diff --git a/ambari-web/app/templates/wizard/step2.hbs b/ambari-web/app/templates/wizard/step2.hbs index aa5dd04..e5e1348 100644 --- a/ambari-web/app/templates/wizard/step2.hbs +++ b/ambari-web/app/templates/wizard/step2.hbs @@ -25,7 +25,8 @@ <div class="panel panel-default"> <div class="panel-body"> <div class="step-description"> - <div>{{t installer.step2.registration.body1}}</div> + {{t installer.step2.registration.body1}} + <br /> {{t installer.step2.registration.body2}} </div> <div class="row radio-button-options"> diff --git a/ambari-web/app/templates/wizard/step6.hbs b/ambari-web/app/templates/wizard/step6.hbs index ca5baba..20c4027 100644 --- a/ambari-web/app/templates/wizard/step6.hbs +++ b/ambari-web/app/templates/wizard/step6.hbs @@ -53,7 +53,7 @@ </div> {{/if}} - <div class="pre-scrollable col-sm-12"> + <div class="pre-scrollable"> <table class="table table-hover" id="component_assign_table" {{QAAttr "slave-clients-table"}}> <thead> <tr> diff --git a/ambari-web/app/templates/wizard/step8.hbs b/ambari-web/app/templates/wizard/step8.hbs index 524665e..ce160ec 100644 --- a/ambari-web/app/templates/wizard/step8.hbs +++ b/ambari-web/app/templates/wizard/step8.hbs @@ -27,7 +27,7 @@ {{t installer.step8.kerberors.warning}} {{/if}} </p> - <div id="step8-content" class="well pre-scrollable" {{QAAttr "review-content"}}> + <div id="step8-content" class="well" {{QAAttr "review-content"}}> <div id="step8-info"> {{#each item in controller.clusterInfo}} <p> diff --git a/ambari-web/test/controllers/wizard/selectMpacks_test.js b/ambari-web/test/controllers/wizard/selectMpacks_test.js index 166289e..e2305bc 100644 --- a/ambari-web/test/controllers/wizard/selectMpacks_test.js +++ b/ambari-web/test/controllers/wizard/selectMpacks_test.js @@ -22,361 +22,406 @@ require('controllers/wizard/selectMpacks_controller'); var wizardSelectMpacksController; var registry = { - "href": "http://localhost:8080/api/v1/registries?fields=mpacks/*,mpacks/versions/RegistryMpackVersionInfo/*", - "items": [ + "href" : "http://localhost:8080/api/v1/registries?fields=mpacks/*,mpacks/versions/RegistryMpackVersionInfo/*,scenarios/*", + "items" : [ { - "href": "http://localhost:8080/api/v1/registries/1", - "RegistryInfo": { - "registry_id": 1 + "href" : "http://localhost:8080/api/v1/registries/1", + "RegistryInfo" : { + "registry_id" : 1 }, - "mpacks": [ + "mpacks" : [ { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/EDW", - "RegistryMpackInfo": { - "mpack_description": "Buzz word buzz word, buzz word buzz word buzz word buzz wording buzzy buzz word.", - "mpack_display_name": null, - "mpack_logo_url": "https://public-repo-1.hortonworks.com/logos/edw-logo.png", - "mpack_name": "EDW", - "registry_id": 1 + "href" : "http://localhost:8080/api/v1/registries/1/mpacks/HDPCORE", + "RegistryMpackInfo" : { + "mpack_description" : "Hortonworks Data Platform Core", + "mpack_id" : "hdpcore", + "mpack_logo_uri" : "https://public-repo-1.hortonworks.com/logos/hdpcore-logo.png", + "mpack_name" : "HDPCORE", + "registry_id" : 1 }, - "versions": [ + "versions" : [ { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/EDW/versions/1.0.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": [ + "href" : "http://localhost:8080/api/v1/registries/1/mpacks/HDPCORE/versions/1.0.0-b85", + "RegistryMpackVersionInfo" : { + "modules" : [ { - "name": "HDPCore", - "minVersion": "3.2.0", - "maxVersion": "3.2.99" - } - ], - "mpack_buildnum": "1.0.0.0-111", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/EDW1/EDW-1.0.0/index.html", - "mpack_name": "EDW", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/EDW/1.0.0.0-111/edw-ambari-mpack-1.0.0.0-111.tar.gz", - "mpack_version": "1.0.0", - "registry_id": 1, - "services": [ - { - "name": "HBASE", - "version": "2.0.0" - }, - { - "name": "HIVE", - "version": "2.0.0" - } - ] - } - } - ] - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore", - "RegistryMpackInfo": { - "mpack_description": "The latest Hortonworks release for Hortonworks Data Platlform Core (HDFS, ZooKeeper, YARN, MapReduce 2) and Hortonworks SmartSenseā¢.", - "mpack_display_name": null, - "mpack_logo_url": "https://public-repo-1.hortonworks.com/logos/hdpcore-logo.png", - "mpack_name": "HDPCore", - "registry_id": 1 - }, - "versions": [ - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore/versions/3.0.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": null, - "mpack_buildnum": "3.0.0.0-247", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDPCore3/HDPCore-3.0.0/index.html", - "mpack_name": "HDPCore", - "mpack_url": "http://localhost:8080/resources/mpack-repo/hdp-ambari-mpack-3.0.0.0-247.tar.gz", - "mpack_version": "3.0.0", - "registry_id": 1, - "services": [ - { - "name": "HDFS", - "version": "3.0.0" - }, - { - "name": "ZOOKEEPER", - "version": "3.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore/versions/3.1.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": null, - "mpack_buildnum": "3.1.0.0-234", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDPCore3/HDPCore-3.1.0/index.html", - "mpack_name": "HDPCore", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/HDPCore/3.1.0.0-234/hdpcore-ambari-mpack-3.1.0.0-234.tar.gz", - "mpack_version": "3.1.0", - "registry_id": 1, - "services": [ - { - "name": "HDFS", - "version": "3.0.0" + "id" : "zookeeper_clients", + "displayName" : "ZooKeeper Clients", + "description" : "Clients for ZooKeeper", + "category" : "CLIENT", + "name" : "ZOOKEEPER_CLIENTS", + "version" : "3.4.0.0-b29", + "definition" : "zookeeper_clients-3.4.0.0-b29-definition.tar.gz", + "dependencies" : [ + { + "id" : "zookeeper", + "name" : "ZOOKEEPER", + "dependencyType" : "RUNTIME" + } + ], + "components" : [ + { + "id" : "zookeeper_client", + "name" : "ZOOKEEPER_CLIENT", + "category" : "CLIENT", + "isExternal" : false, + "version" : "3.4.0.0-b29" + } + ] }, { - "name": "ZOOKEEPER", - "version": "3.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore/versions/3.1.1", - "RegistryMpackVersionInfo": { - "compatible_mpacks": null, - "mpack_buildnum": "3.1.1.0-111", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDPCore3/HDPCore-3.1.1/index.html", - "mpack_name": "HDPCore", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/HDPCore/3.1.1.0-111/hdpcore-ambari-mpack-3.1.1.0-111.tar.gz", - "mpack_version": "3.1.1", - "registry_id": 1, - "services": [ - { - "name": "HDFS", - "version": "3.0.0" + "id" : "zookeeper", + "displayName" : "ZooKeeper", + "description" : "Centralized service which provides highly reliable distributed coordination", + "category" : "SERVER", + "name" : "ZOOKEEPER", + "version" : "3.4.0.0-b29", + "definition" : "zookeeper-3.4.0.0-b29-definition.tar.gz", + "dependencies" : [ + { + "id" : "zookeeper_clients", + "name" : "ZOOKEEPER_CLIENTS", + "dependencyType" : "INSTALL" + } + ], + "components" : [ + { + "id" : "zookeeper_server", + "name" : "ZOOKEEPER_SERVER", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.4.0.0-b29" + } + ] }, { - "name": "ZOOKEEPER", - "version": "3.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore/versions/3.2.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": null, - "mpack_buildnum": "3.2.0.0-345", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDPCore3/HDPCore-3.2.0/index.html", - "mpack_name": "HDPCore", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/HDPCore/3.2.0.0-345/hdpcore-ambari-mpack-3.2.0.0-345.tar.gz", - "mpack_version": "3.2.0", - "registry_id": 1, - "services": [ - { - "name": "HDFS", - "version": "3.0.0" - }, - { - "name": "ZOOKEEPER", - "version": "3.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore/versions/3.2.1", - "RegistryMpackVersionInfo": { - "compatible_mpacks": null, - "mpack_buildnum": "3.2.1.0-333", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDPCore3/HDPCore-3.2.1/index.html", - "mpack_name": "HDPCore", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/HDPCore/3.2.1.0-333/hdpcore-ambari-mpack-3.2.1.0-333.tar.gz", - "mpack_version": "3.2.1", - "registry_id": 1, - "services": [ - { - "name": "HDFS", - "version": "3.0.0" + "id" : "hdfs", + "displayName" : "HDFS", + "description" : "Apache Hadoop Distributed File System", + "category" : "SERVER", + "name" : "HDFS", + "version" : "3.0.0.0-b54", + "definition" : "hdfs-3.0.0.0-b54-definition.tar.gz", + "dependencies" : [ + { + "id" : "hadoop_clients", + "name" : "HADOOP_CLIENTS", + "dependencyType" : "INSTALL" + } + ], + "components" : [ + { + "id" : "namenode", + "name" : "NAMENODE", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "datanode", + "name" : "DATANODE", + "category" : "SLAVE", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "journalnode", + "name" : "JOURNALNODE", + "category" : "SLAVE", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "secondary_namenode", + "name" : "SECONDARY_NAMENODE", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "zkfc", + "name" : "ZKFC", + "category" : "SLAVE", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "nfs_gateway", + "name" : "NFS_GATEWAY", + "category" : "SLAVE", + "isExternal" : false, + "version" : "3.0.0.0-b54" + } + ] }, { - "name": "ZOOKEEPER", - "version": "3.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore/versions/3.3.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": null, - "mpack_buildnum": "3.3.0.0-456", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDPCore3/HDPCore-3.3.0/index.html", - "mpack_name": "HDPCore", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/HDPCore/3.3.0.0-456/hdpcore-ambari-mpack-3.3.0.0-456.tar.gz", - "mpack_version": "3.3.0", - "registry_id": 1, - "services": [ - { - "name": "HDFS", - "version": "3.0.0" + "id" : "yarn", + "displayName" : "YARN", + "description" : "Apache Hadoop Yarn", + "category" : "SERVER", + "name" : "YARN", + "version" : "3.0.0.0-b54", + "definition" : "yarn-3.0.0.0-b54-definition.tar.gz", + "dependencies" : [ + { + "id" : "hadoop_clients", + "name" : "HADOOP_CLIENTS", + "dependencyType" : "INSTALL" + }, + { + "id" : "hdfs", + "name" : "HDFS", + "dependencyType" : "RUNTIME" + }, + { + "id" : "mapreduce2", + "name" : "MAPREDUCE2", + "dependencyType" : "RUNTIME" + }, + { + "id" : "zookeeper", + "name" : "ZOOKEEPER", + "dependencyType" : "RUNTIME" + } + ], + "components" : [ + { + "id" : "resourcemanager", + "name" : "RESOURCEMANAGER", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "nodemanager", + "name" : "NODEMANAGER", + "category" : "SLAVE", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "app_timeline_server", + "name" : "APP_TIMELINE_SERVER", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "timeline_reader", + "name" : "TIMELINE_READER", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.0.0.0-b54" + }, + { + "id" : "yarn_registry_dns", + "name" : "YARN_REGISTRY_DNS", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.0.0.0-b54" + } + ] }, { - "name": "ZOOKEEPER", - "version": "3.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDPCore/versions/3.4.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": null, - "mpack_buildnum": "3.4.0.0-567", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDPCore3/HDPCore-3.4.0/index.html", - "mpack_name": "HDPCore", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/HDPCore/3.4.0.0-567/hdpcore-ambari-mpack-3.4.0.0-567.tar.gz", - "mpack_version": "3.4.0", - "registry_id": 1, - "services": [ - { - "name": "HDFS", - "version": "3.0.0" + "id" : "mapreduce2", + "displayName" : "MAPREDUCE2", + "description" : "Apache Hadoop Mapreduce2", + "category" : "SERVER", + "name" : "MAPREDUCE2", + "version" : "3.0.0.0-b54", + "definition" : "mapreduce2-3.0.0.0-b54-definition.tar.gz", + "dependencies" : [ + { + "id" : "hadoop_clients", + "name" : "HADOOP_CLIENTS", + "dependencyType" : "INSTALL" + }, + { + "id" : "yarn", + "name" : "YARN", + "dependencyType" : "RUNTIME" + } + ], + "components" : [ + { + "id" : "historyserver", + "name" : "HISTORYSERVER", + "category" : "MASTER", + "isExternal" : false, + "version" : "3.0.0.0-b54" + } + ] }, { - "name": "ZOOKEEPER", - "version": "3.0.0" + "id" : "hadoop_clients", + "displayName" : "Hadoop client", + "description" : "Clients for HDFS, YARN and MAPREDUCE services", + "category" : "CLIENT", + "name" : "HADOOP_CLIENTS", + "version" : "3.0.0.0-b54", + "definition" : "hadoop_clients-3.0.0.0-b54-definition.tar.gz", + "dependencies" : [ + { + "id" : "hdfs", + "name" : "HDFS", + "dependencyType" : "RUNTIME" + }, + { + "id" : "yarn", + "name" : "YARN", + "dependencyType" : "RUNTIME" + }, + { + "id" : "mapreduce2", + "name" : "MAPREDUCE2", + "dependencyType" : "RUNTIME" + } + ], + "components" : [ + { + "id" : "hadoop_client", + "name" : "HADOOP_CLIENT", + "category" : "CLIENT", + "isExternal" : false, + "version" : "3.0.0.0-b54" + } + ] } - ] + ], + "mpack_dependencies" : null, + "mpack_description" : "Hortonworks Data Platform Core", + "mpack_doc_uri" : "http://docs.hortonworks.com/HDPDocuments/HDPCORE1/HDPCORE-1.0.0/index.html", + "mpack_id" : "hdpcore", + "mpack_logo_uri" : "https://public-repo-1.hortonworks.com/logos/hdpcore-logo.png", + "mpack_name" : "HDPCORE", + "mpack_uri" : "http://dev.hortonworks.com.s3.amazonaws.com/HDPCORE/centos7/1.x/BUILDS/1.0.0-b85/mpack.json", + "mpack_version" : "1.0.0-b85", + "registry_id" : 1 } } ] }, { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDS", - "RegistryMpackInfo": { - "mpack_description": "Buzz word buzz word, buzz word buzz word buzz word buzz wording buzzy buzz word.", - "mpack_display_name": null, - "mpack_logo_url": "https://public-repo-1.hortonworks.com/logos/hds-logo.png", - "mpack_name": "HDS", - "registry_id": 1 + "href" : "http://localhost:8080/api/v1/registries/1/mpacks/ODS", + "RegistryMpackInfo" : { + "mpack_description" : "Hortonworks Operational Data Store", + "mpack_id" : "ods", + "mpack_logo_uri" : "https://public-repo-1.hortonworks.com/logos/ods-logo.png", + "mpack_name" : "ODS", + "registry_id" : 1 }, - "versions": [ + "versions" : [ { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDS/versions/3.0.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": [ + "href" : "http://localhost:8080/api/v1/registries/1/mpacks/ODS/versions/1.0.0-b27", + "RegistryMpackVersionInfo" : { + "modules" : [ { - "name": "HDPCore", - "minVersion": "3.1.0", - "maxVersion": "3.2.99" - } - ], - "mpack_buildnum": "3.0.0.0-247", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDS4/HDS-4.3.0/index.html", - "mpack_name": "HDS", - "mpack_url": "http://localhost:8080/resources/mpack-repo/hds-ambari-mpack-3.0.0.0-247.tar.gz", - "mpack_version": "3.0.0", - "registry_id": 1, - "services": [ - { - "name": "SPARK", - "version": "2.0.0" + "id" : "hbase", + "displayName" : "HBase", + "description" : "Non-relational distributed database and centralized service for configuration management &\n synchronization\n ", + "category" : "SERVER", + "name" : "HBASE", + "version" : "2.0.0.0-b23", + "definition" : "hbase-2.0.0.0-b23-definition.tar.gz", + "dependencies" : [ + { + "id" : "zookeeper_clients", + "name" : "ZOOKEEPER_CLIENTS", + "dependencyType" : "INSTALL" + } + ], + "components" : [ + { + "id" : "hbase_master", + "name" : "HBASE_MASTER", + "category" : "MASTER", + "isExternal" : false, + "version" : "2.0.0.0-b23" + }, + { + "id" : "hbase_regionserver", + "name" : "HBASE_REGIONSERVER", + "category" : "SLAVE", + "isExternal" : false, + "version" : "2.0.0.0-b23" + } + ] }, { - "name": "ZEPPELIN", - "version": "1.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDS/versions/4.3.0", - "RegistryMpackVersionInfo": { - "compatible_mpacks": [ - { - "name": "HDPCore", - "minVersion": "3.1.0", - "maxVersion": "3.2.99" + "id" : "hbase_clients", + "displayName" : "HBase", + "description" : "Non-relational distributed database and centralized service for configuration management &\n synchronization\n ", + "category" : "CLIENT", + "name" : "HBASE_CLIENTS", + "version" : "2.0.0.0-b23", + "definition" : "hbase_clients-2.0.0.0-b23-definition.tar.gz", + "dependencies" : [ + { + "id" : "zookeeper_clients", + "name" : "ZOOKEEPER_CLIENTS", + "dependencyType" : "INSTALL" + } + ], + "components" : [ + { + "id" : "hbase-client", + "name" : null, + "category" : null, + "isExternal" : null, + "version" : "2.0.0.0-b23" + } + ] } ], - "mpack_buildnum": "4.3.0.0-444", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDS4/HDS-4.3.0/index.html", - "mpack_name": "HDS", - "mpack_url": "file:///var/lib/ambari-server/resources/mpack-repo/hds-ambari-mpack-4.3.0.0-444.tar.gz", - "mpack_version": "4.3.0", - "registry_id": 1, - "services": [ - { - "name": "SPARK", - "version": "2.0.0" - }, - { - "name": "ZEPPELIN", - "version": "1.0.0" - } - ] - } - }, - { - "href": "http://localhost:8080/api/v1/registries/1/mpacks/HDS/versions/4.3.1", - "RegistryMpackVersionInfo": { - "compatible_mpacks": [ + "mpack_dependencies" : [ { - "name": "HDPCore", - "minVersion": "3.2.0", - "maxVersion": "3.3.99" + "id" : "hdpcore", + "name" : "HDPCORE", + "minVersion" : "1.0.0", + "maxVersion" : "1.0.99" } ], - "mpack_buildnum": "4.3.1.0-555", - "mpack_doc_url": "http://docs.hortonworks.com/HDPDocuments/HDS4/HDS-4.3.1/index.html", - "mpack_name": "HDS", - "mpack_url": "https://public-repo-1.hortonworks.com/mpacks/HDS/4.3.1.0-555/hds-ambari-mpack-4.3.1.0-555.tar.gz", - "mpack_version": "4.3.1", - "registry_id": 1, - "services": [ - { - "name": "SPARK", - "version": "2.0.0" - }, - { - "name": "ZEPPELIN", - "version": "1.0.0" - } - ] + "mpack_description" : "Hortonworks Operational Data Store", + "mpack_doc_uri" : "http://docs.hortonworks.com/HDPDocuments/ODS1/ODS-1.0.0/index.html", + "mpack_id" : "ods", + "mpack_logo_uri" : "https://public-repo-1.hortonworks.com/logos/ods-logo.png", + "mpack_name" : "ODS", + "mpack_uri" : "http://dev.hortonworks.com.s3.amazonaws.com/ODS/centos7/1.x/BUILDS/1.0.0-b27/mpack.json", + "mpack_version" : "1.0.0-b27", + "registry_id" : 1 } } ] } ], - "scenarios": [ - { - "href": "http://localhost:8080/api/v1/registries/1/scenarios/DataScience", - "RegistryScenarioInfo": { - "registry_id": 1, - "scenario_description": "Data Science and Machine Learning", - "scenario_mpacks": [ - { - "name": "HDP" - }, - { - "name": "HDS" - } - ], - "scenario_name": "DataScience" - } - }, + "scenarios" : [ { - "href": "http://localhost:8080/api/v1/registries/1/scenarios/EDW", - "RegistryScenarioInfo": { - "registry_id": 1, - "scenario_description": "EDW or SQL Analytics", - "scenario_mpacks": [ + "href" : "http://localhost:8080/api/v1/registries/1/scenarios/DataStore", + "RegistryScenarioInfo" : { + "registry_id" : 1, + "scenario_description" : "Operational Data Store", + "scenario_mpacks" : [ { - "name": "HDP" + "name" : "HDPCORE" }, { - "name": "EDW" + "name" : "ODS" } ], - "scenario_name": "EDW" + "scenario_name" : "DataStore" } }, { - "href": "http://localhost:8080/api/v1/registries/1/scenarios/Hadoop", - "RegistryScenarioInfo": { - "registry_id": 1, - "scenario_description": "Hadoop Core", - "scenario_mpacks": [ + "href" : "http://localhost:8080/api/v1/registries/1/scenarios/Hadoop", + "RegistryScenarioInfo" : { + "registry_id" : 1, + "scenario_description" : "Hadoop Core Platform", + "scenario_mpacks" : [ { - "name": "HDP" + "name" : "HDPCORE" } ], - "scenario_name": "Hadoop" + "scenario_name" : "Hadoop" } } ] @@ -449,17 +494,17 @@ describe('App.WizardSelectMpacksController', function () { describe('#loadStep', function () { it('adds previously selected services to selection', function () { wizardSelectMpacksController.set('content.selectedServices', [ - { id: "HDPCore3.0.0ZOOKEEPER" }, - { id: "HDPCore3.0.0HDFS" } + { id: "HDPCORE1.0.0-b85ZOOKEEPER" }, + { id: "HDPCORE1.0.0-b85HDFS" } ]); wizardSelectMpacksController.loadStep(); - var service = wizardSelectMpacksController.getServiceVersionById("HDPCore3.0.0ZOOKEEPER"); + var service = wizardSelectMpacksController.getServiceVersionById("HDPCORE1.0.0-b85ZOOKEEPER"); expect(service.get('selected')).to.be.true; expect(service.get('mpackVersion.selected')).to.be.true; - var service = wizardSelectMpacksController.getServiceVersionById("HDPCore3.0.0HDFS"); + var service = wizardSelectMpacksController.getServiceVersionById("HDPCORE1.0.0-b85HDFS"); expect(service.get('selected')).to.be.true; expect(service.get('mpackVersion.selected')).to.be.true; }); @@ -469,9 +514,8 @@ describe('App.WizardSelectMpacksController', function () { it('should return an array of mpacks matching the given names', function () { //this test assumes that mpackNames contains the names of all mpacks in the test registry data at the top of this file var mpackNames = [ - 'EDW', - 'HDPCore', - 'HDS' + 'HDPCORE', + 'ODS' ] var expected = wizardSelectMpacksController.get('content.mpacks'); @@ -962,20 +1006,18 @@ describe('App.WizardSelectMpacksController', function () { id: "id1", name: "name1", mpackVersion: { + mpack: { name: "mpackName1" }, name: "mpackName1", - version: "1.0.0.0", - stackName: "stack1", - stackVersion: "1.0.0" + version: "1.0.0.0" } }, { id: "id2", name: "name2", mpackVersion: { + mpack: { name: "mpackName2" }, name: "mpackName2", - version: "1.0.0.0", - stackName: "stack1", - stackVersion: "1.0.0" + version: "1.0.0.0" } } ]); @@ -1004,17 +1046,13 @@ describe('App.WizardSelectMpacksController', function () { id: "id1", name: "name1", mpackName: "mpackName1", - mpackVersion: "1.0.0.0", - stackName: "stack1", - stackVersion: "1.0.0" + mpackVersion: "1.0.0.0" }, { id: "id2", name: "name2", mpackName: "mpackName2", - mpackVersion: "1.0.0.0", - stackName: "stack1", - stackVersion: "1.0.0" + mpackVersion: "1.0.0.0" } ]; diff --git a/ambari-web/test/controllers/wizard/step6_test.js b/ambari-web/test/controllers/wizard/step6_test.js index 0369587..def651e 100644 --- a/ambari-web/test/controllers/wizard/step6_test.js +++ b/ambari-web/test/controllers/wizard/step6_test.js @@ -130,6 +130,12 @@ describe('App.WizardStep6Controller', function () { it('should make checkbox checked', function () { controller.set('hosts', hostsObj); controller.set('content.clients', clientComponents); + controller.set('content.selectedMpacks', [ + { + name: "mpack", + version: "1" + } + ]); controller.selectAllNodes(obj); expect(controller.get('hosts')).to.eql(Em.A([Em.Object.create({ hasMaster: false, @@ -170,6 +176,12 @@ describe('App.WizardStep6Controller', function () { it('should uncheck checkbox', function () { controller.set('hosts', hostsObj); controller.set('content.clients', clientComponents); + controller.set('content.selectedMpacks', [ + { + name: "mpack", + version: "1" + } + ]); controller.deselectAllNodes(obj); expect(controller.get('hosts')).to.eql(Em.A([Em.Object.create({ hasMaster: false, @@ -1339,6 +1351,12 @@ describe('App.WizardStep6Controller', function () { beforeEach(function () { controller.get('content').setProperties({ + selectedMpacks: [ + { + name: "mpack", + version: "1" + } + ], recommendations: { blueprint: { host_groups: [ -- To stop receiving notification emails like this one, please contact ishan...@apache.org.