-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59232/
-----------------------------------------------------------

(Updated May 12, 2017, 7:43 p.m.)


Review request for Ambari, Robert Nettleton and Tim Thorpe.


Bugs: AMBARI-20984
    https://issues.apache.org/jira/browse/AMBARI-20984


Repository: ambari


Description
-------

Currently, if a user wants to use custom HDP repos during a blueprint 
deployment, he has to update the repo URLs before hand via a REST API. The JIRA 
here proposes a way to include stack repos in the blueprint as optional fields 
so that when the fields exist, Ambari server will use the repos to deploy a 
cluster. This eliminates the need for user to run a separate rest api call 
before the actual blueprint deployment.
Attachments


Diffs (updated)
-----

  
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
 c655c62 
  ambari-server/src/main/java/org/apache/ambari/server/topology/Blueprint.java 
139a1ee 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintImpl.java
 826e4e5 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/RepositorySetting.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/topology/Setting.java 
555192c 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
 f5cf498 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
 c8d4d55 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
 4c9815c 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
 1bdeb1b 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/SettingTest.java 
0007acf 
  
ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
 0378753 


Diff: https://reviews.apache.org/r/59232/diff/3/

Changes: https://reviews.apache.org/r/59232/diff/2-3/


Testing
-------

unit tests. patch a trunk cluster with the change and use  blueprint to install 
a cluster.

The section to add to the bp for the repos is like the following.

override_strategy - ALWAYS_APPLY will override the existing repo info stored in 
the metainfo table in the Ambari db. APPLY_WHEN_MISSING will only insert repo 
info to the metainfo table if there is no such entries in the table yet.

  "settings" : [
    {
          "repository_settings" : [
                {
                  "override_strategy":"ALWAYS_APPLY",
                  "operating_system":"redhat7",
                  "repo_id":"HDP-2.6", 
                  
"base_url":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/2.x/BUILDS/2.6.0.3-8";
                },
                {
                  "override_strategy":"APPLY_WHEN_MISSING",
                  "operating_system":"redhat7",
                  "repo_id": "HDP-UTILS-1.1.0.21",
                  "base_url": 
"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7";
                }
          ]
    }
  ],


Thanks,

Di Li

Reply via email to