Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

make ambari not generate yum config

Highlighted

make ambari not generate yum config

Contributor

When using ambari to install hadoop, ambari will generate a yum conf under /etc/yum.repo.d. We cannot use this yum conf because:

1. Since our environment cannot access internet, we put hadoop yum packages on our yum repo server using HTTPS.

We cannot make our yum repo server use HTTP since it is against company policy. However, the yum conf generated by ambari seems not to support HTTPS and ambari cannot access this HTTPS yum server.

2. When ambari's yum conf is generated under /etc/yum.repo.d, this faulty yum conf will mask other valid yum configs and Ambari cannot download hadoop packages by using other valid yum conf.

Is there a way to disable Ambari generate a yum conf under /etc/yum.repo.d so that ambari can use the valid yum configs to download packages from our yum repo server? Thanks any clue.

4 REPLIES 4
Highlighted

Re: make ambari not generate yum config

Mentor

@Lian Jiang

Ambari is unable to validate URLs beginning with "https:", however you can bypass this check by selecting "Skip Repository Base URL Validation".

HTH

Highlighted

Re: make ambari not generate yum config

Contributor

Thanks @Geoffrey Shelton Okot. "Skip Repository Base URL Validation" seems to only exist in manual install via ambari UI. I am using ambari blueprint to automate the installation. Is this option available for automation? Thanks.

Highlighted

Re: make ambari not generate yum config

Mentor

@Lian Jiang

That's also possible if you are using Ambari blueprints have a look at Step 4

There are scenarios where public Stack repositories may not be accessible during the creation of cluster via blueprint or an alternate repository is required for Stack.

To use a local or alternate repository:

PUT /api/v1/stacks/:stack/versions/:stackVersion/operating_systems/:osType/repositories/:repoId 

{ "Repositories” : { 
    "base_url” : "<CUSTOM_REPO_BASE_URL>", 
    "verify_base_url” : true 
  } 
}

Reference

HTH

Highlighted

Re: make ambari not generate yum config

Contributor

Thanks @Geoffrey Shelton Okot. We are using HDP3 and ambari 2.7. The process of ambari automation is a little different from that from your reference. For example, your reference does not use VDF which is required by hortonwork HDP3.

With VDF, the process is:

1. I use ambari api to register the vdf json which tells ambari the location of an xml containing stack and repo info. In my case, it is a file using http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.0.1.0/HDP-3.0.1.0-187.xml as the template.

2. ambari extracts the repo info (e.g. base url, repo id) and generates /etc/yum.repo.d/ambari-hdp-1.repo which is used by ambari to download hadoop yum packages.

As you can see, this process does not need to explicitly register the local repo using HTTP PUT mentioned by your reference.

Unfortunately, neither HDP-3.0.1.0-187.xml or ambari source code related to VDF seems to support any option related to skipping base url verification.

Also, verifyRepository and verifyRepositories in AmbariManagementControllerImpl.java does not skip SSL cert validation. Not sure how verify_base_url=false can help ambari access the HTTPS yum repo.

Any clarification is appreciated

Don't have an account?
Coming from Hortonworks? Activate your account here