Apache Ambari Administration
Also available as:
PDF
loading table of contents...

Chapter 13. Setting up Ambari to use an Internet Proxy Server

If you plan to use private repositories (i.e. available on the Internet) for installing Apache Ambari and deploying a Hadoop stack in your cluster, you must provide Ambari and the hosts in the cluster Internet access to obtain the software from those repositories. Specifically:

  • Ambari Server: uses Internet access to validate the repositories.

  • yum (or an equivalent package manager, depending on your operating system): performs the software installation from the repositories.

Therefore, if your environment requires use of an Internet proxy server for access, you must configure Ambari Server component and yum on all the hosts to use that proxy server.

Ambari can install software if you have no Internet access. If you have no Internet access (via a proxy server or otherwise), you can use local repositories for installing the cluster software. In that case, configuring Ambari to use a proxy server is not required. However, Ambari and the hosts in the cluster must have access to your local repositories.

To configure internet proxy settings for Ambari Server:

Steps

  1. On the Ambari Server host, stop Ambari Server:

    ambari-server stop
  2. Add proxy settings to the following script: /var/lib/ambari-server/ambari-env.sh.

    -Dhttp.proxyHost=<yourProxyHost> -Dhttp.proxyPort=<yourProxyPort>
  3. Optionally, to prevent some host names from accessing the proxy server, define the list of excluded hosts, as follows:

    -Dhttp.nonProxyHosts=<pipe|separated|list|of|hosts>
  4. If your proxy server requires authentication, add the username and password, as follows:

    -Dhttp.proxyUser=<username> -Dhttp.proxyPassword=<password>
  5. Restart the Ambari Server to pick up this change.

To configure yum to use internet proxy settings for all hosts:

Setting up yum to use a proxy server depends a lot on your environment and operating system. The instructions below provide some guidance but we strongly recommend you consult with your system administrators and operating system documentation for assistance & specific instructions.

  1. On each host in the cluster, specify the proxy settings in /etc/yum.conf by adding the following entry:

    proxy=http://<yourProxyHost>:<yourProxyPort>
  2. If your proxy server requires authentication, add the username and password, as follows:

    enableProxyAuth=1
    proxy_username=<username>
    proxy_password=<password>
  3. Save the yum configuration file.

It is important to highlight that defining a proxy server, username and password in /etc/yum.conf means all users of yum connect to the proxy server with those details. Please consult your system administrators and refer to your operating system documentation for more details on this configuration and possible alternatives.

More Information

Using a Local Repository