Przeglądaj źródła

AMBARI-6237. Add HDP-UTILS repos field for ubuntu. (aonishuk)

Andrew Onishuk 11 lat temu
rodzic
commit
7d9d452533

+ 6 - 3
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py

@@ -19,7 +19,8 @@ limitations under the License.
 from resource_management import *
 import json
 
-_UBUNTU_REPO_COMPONENTS = ["HDP", "main"]
+# components_lits = repoName + postfix
+_UBUNTU_REPO_COMPONENTS_POSTFIX = ["main"]
 
 def _alter_repo(action, repo_string, repo_template):
   """
@@ -36,14 +37,16 @@ def _alter_repo(action, repo_string, repo_template):
       repo['baseUrl'] = None
     if not 'mirrorsList' in repo:
       repo['mirrorsList'] = None
-
+    
+    ubuntu_components = [ repo['repoName'] ] + _UBUNTU_REPO_COMPONENTS_POSTFIX
+    
     Repository(repo['repoId'],
                action = action,
                base_url = repo['baseUrl'],
                mirror_list = repo['mirrorsList'],
                repo_file_name = repo['repoName'],
                repo_template = repo_template,
-               components = _UBUNTU_REPO_COMPONENTS, # ubuntu specific
+               components = ubuntu_components, # ubuntu specific
     )
 
 def install_repos():

+ 5 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml

@@ -59,5 +59,10 @@
       <repoid>HDP-2.1</repoid>
       <reponame>HDP</reponame>
     </repo>
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.17/repos/ubuntu12</baseurl>
+      <repoid>HDP-UTILS-1.1.0.17</repoid>
+      <reponame>HDP-UTILS</reponame>
+    </repo>
   </os>
 </reposinfo>

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

@@ -75,7 +75,7 @@ App.supports = {
   autoRollbackHA: false,
   appTimelineServer: true,
   jobs: true,
-  ubuntu: false,
+  ubuntu: true,
   views: false,
   flume: false,
   databaseConnection: true