Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How can I add a node to a cluster using ambari ????

avatar
Contributor
 
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Divya Thaore

A good practice to configure passwordless ssh by generating ssh-key on the Ambari server and copying it to all the host in the cluster. Those are the pre-requisites for the cluster install see steps below

#####################################
#  Generating the ssh key on CentOS 7
#####################################
ssh-keygen
chmod 700 ~/.ssh
cat ~/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
########################################
# copy the public key to all other hosts
########################################
cat .ssh/id_rsa.pub | ssh root@xxx_host 'cat >> .ssh/authorized_keys'

Or you can use manual by installing the ambari-agent on the other nodes but this is impractical for large clusters!

One the slave node

# yum install -y ambari-agent 

Then edit the ambari-agent.ini, under security

[server]
hostname=$FQDN_Ambari server
url_port=8440
secured_url_port=8441

The start the agent

# ambari-agent start

Then you can proceed with you Ambari UI adding the hosts remember to do this on all the host you intend to join to your cluster

HTH

View solution in original post

9 REPLIES 9

avatar
New Contributor

Hi Divya,

From Ambari UI, click on "Hosts" from the top right list of options. Then from the Actions dropdown, select "Add New Hosts".

Thanks.

avatar
Contributor

@kpeddibhotla in that it is asking for SSH key or manual installation.. Can u help with the same ?

avatar
Master Mentor

@Divya Thaore

A good practice to configure passwordless ssh by generating ssh-key on the Ambari server and copying it to all the host in the cluster. Those are the pre-requisites for the cluster install see steps below

#####################################
#  Generating the ssh key on CentOS 7
#####################################
ssh-keygen
chmod 700 ~/.ssh
cat ~/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
########################################
# copy the public key to all other hosts
########################################
cat .ssh/id_rsa.pub | ssh root@xxx_host 'cat >> .ssh/authorized_keys'

Or you can use manual by installing the ambari-agent on the other nodes but this is impractical for large clusters!

One the slave node

# yum install -y ambari-agent 

Then edit the ambari-agent.ini, under security

[server]
hostname=$FQDN_Ambari server
url_port=8440
secured_url_port=8441

The start the agent

# ambari-agent start

Then you can proceed with you Ambari UI adding the hosts remember to do this on all the host you intend to join to your cluster

HTH

avatar
Contributor

@Geoffrey Shelton Okot thanks generated the key.. But not able to copy it and paste to ambari

avatar
Master Mentor

@Divya Thaore
If you generated the ssh-keys hoping you didn't protect it with a password navigate to the /root/.ssh directory and

# cat  id_rsa 

And copy all the content between including the begin and end as shown and paste in the designated window in Ambari UI

-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA8qP3SQ+81GIpYSd/Sw1uKjt1khxv/zh4aEbRbPK0pcaW1KAh
9mD76BdouBRifv6Mn8ydnanSthRNOmH1LcF8YhkudLseKJFoLO2iIFWtFwSqMPmX
cipTpBo+1YQGdrf3ugKsBZ+vWZBisEI6F5pTGHUrAEO3phYXQxfP6GEoVGQj7aIB
........
.....
qUzoqQKBgBjIJakrJfoFGySAOImIxjQDD0sv3ZTc85WtFeFyRvQxewdPQDS8NvZo 6pyhYJRSGSgaL+xzEwg3D1ofQinkYw1jVYUzldBZESMOslmEuOzYbpImnY3yxLOG Yo0j49637Chn8BMVnrlELUWWf6YHOrXmwHT6nu71WmbqFBzbmsv8
-----END RSA PRIVATE KEY-----

or using WinSCP download the above file and use the option to load from your windows/mac client

HTH


avatar
Master Mentor

@Divya Thaore

Just a follow up do you still need help?

avatar
Contributor
@Geoffrey Shelton Okot

Thanks for asking. yes I still need help. As I am not able to copy the key still from the ssh shell to the ambari web page..neother to my local system. I have also enabled the bidirectional Transfer for the sandbox. But still not able to..

avatar
Master Mentor

@Divya Thaore

Are you trying to create a cluster using the sandbox from HW? Do you have putty? If not can you download putty

avatar
Contributor
@Geoffrey Shelton Okot

yes through sandbox from HW.