Community Articles

Find and share helpful community-sourced technical articles.
avatar

You may be in a bind if you need to install HDP on Azure with CentOS 6 or RHEL 6 and certain services (not everything). By following these steps below, you will be able to use ambari-server to install HDP on any of the supported Hortonworks/Azure VMs.

1) Configure your VMs - use the same VNet for all VMs

Run the next steps as root or sudo the commands:

2) Update /etc/hosts on all your machines:

vi /etc/hosts 
172.1.1.0 master1.jd32j3j3kjdppojdf3349dsfeow0.dx.internal.cloudapp.net
172.1.1.1 master2.jd32j3j3kjdppojdf3349dsfeow0.dx.internal.cloudapp.net
172.1.1.2 master3.jd32j3j3kjdppojdf3349dsfeow0.dx.internal.cloudapp.net 
172.1.1.3 worker1.jd32j3j3kjdppojdf3349dsfeow0.dx.internal.cloudapp.net
172.1.1.4 worker2.jd32j3j3kjdppojdf3349dsfeow0.dx.internal.cloudapp.net
172.1.1.5 worker3.jd32j3j3kjdppojdf3349dsfeow0.dx.internal.cloudapp.net

* use the FQDN (find the fqdn by typing hostname -f). The ip address are internal and can be found on eth0 by typing ifconfig

3) Edit /etc/sudoers.d/waagent so that you don't need to type a password when sudoing

a) change permissions on /etc/sudoers.d/waagent:

chmod 600 /etc/sudoers.d/waagent

b) update the file "username ALL = (ALL) ALL" to "username ALL = (ALL) NOPASSWD: ALL":

vi /etc/sudoers.d/waagent 

c) change permissions on /etc/sudoers.d/waagent:

chmod 440 /etc/sudoers.d/waagent 

* change username to the user that you sudo with (the user that will install Ambari)

3) Disable iptables

a) service iptables stop 
b) chkconfig iptables off 

* If you need iptables enabled, please make the necessary port configuration changes found here

4) Disable transparent huge pages

a) Run the following in your shell:

cat > /usr/local/sbin/ambari-thp-disable.sh <<-'EOF'
#!/usr/bin/env bash
# disable transparent huge pages: for Hadoop
thp_disable=true
if [ "${thp_disable}" = true ]; then
    for path in redhat_transparent_hugepage transparent_hugepage; do
        for file in enabled defrag; do
            if test -f /sys/kernel/mm/${path}/${file}; then
                echo never > /sys/kernel/mm/${path}/${file}
            fi
        done
    done
fi
exit 0
EOF
b) chmod 755 /usr/local/sbin/ambari-thp-disable.sh 
c) sh /usr/local/sbin/ambari-thp-disable.sh 

* Perform a-c on all hosts to disable transparent huge pages

5) If you don't have a private key generated (where the host running ambari-server can use a privat key to login to all the hosts - please perform this step)

a) ssh-keygen -t rsa -b 2048 -C "username@master1.jd32j3j3kjdppojdf3349dsfeow0.dx.internal.cloudapp.net" 
b) ssh-copy-id -i /locationofgeneratedinaabove/id_rsa.pub username@master1 

* Run b above on all hosts, this way you can ssh using the username into all hosts from the ambari-server host without a password

6) Install the ambari repo on the server where you'll install Ambari (documentation😞

wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo -O /etc/yum.repos.d/ambari.repo

7) Install ambari-server:

yum install ambari-server 

😎 Setup ambari-server:

ambari-server setup 

* You can use the defaults by pressing ENTER

9) Start ambari-server:

ambari-server start 

* This could take a few minutes to startup depending on the speed of your machine

10) Open your browser and go to the ip address where ambari-server is running http://ambariipaddress:8080

* Continue with your HDP 2.4.3 installation
2,097 Views