Support Questions
Find answers, ask questions, and share your expertise

Install Ambari-Agent on each hosts

Explorer

Currently trying to install my first cluster, question might be a bit stupid.

I'm on step 2 on Ambari's cluster installation wizard, where I have to list some hosts for the cluster.

Currently I'm only able to register "localhost.localdomain" and I have no idea on how to list other hosts.

My "hosts" file has many hosts such as "cluster1.local", cluster2...", "cluster11.local" but I don't know how I can install ambari-agent on each of these hosts since they are on the same machine with "localhost.localdomain".

I tried to edit ambari-agent.ini and changing hostname but it doesn't help. Checked on api/v1/hosts and only one host is named on it.

I really want to try to set up a multi node cluster so how can I actually install agent on my other hosts ?

I'm on CenTOS 6.6 by the way.

11 REPLIES 11

Re: Install Ambari-Agent on each hosts

@Nicolas YUE

Ambari will take care of the agent installation if you have configured password less ssh between nodes.

If you dont have password less ssh then as you mentioned, you have to modify ini file and Make sure you put ambari server address as mentioned below. Now going back to your question, you can just type hosts that you want then to be part of cluster

  1. Install the EPEL repo.
    yum install epel-release
  2. Install the Ambari Agent
    yum install ambari-agent
  3. Configure the Ambari Agent by editing the ambari-agent.ini file.
    vi /etc/ambari-agent/conf/ambari-agent.ini
                                        
    [server]
    hostname={your.ambari.server.hostname}
    url_port=4080
    secured_url_port=8443
  4. Start the agent. The agent registers with the Server on start.
    ambari-agent start

Re: Install Ambari-Agent on each hosts

Explorer

That's what I tried but it doesn't seem to work.

For example if I want to add cluster1.local, I change

hostname=cluster1.local

ambari-agent stop (I assume since I had to change the hostname)

ambari-agent start

But then if I check api/v1/hosts, cluster1.local isn't there and the installation fails to register it too. localhost.localdomain still works though.

So I don't really know how I can add another host

Re: Install Ambari-Agent on each hosts

@Nicolas YUE You have to provide ambari server in .ini file

hostname={your.ambari.server.hostname}

Once agent install done then you will give all the hostname in Ambari installation console and at the bottom there is option to skip agent installation

Re: Install Ambari-Agent on each hosts

Please see this http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_Installing_HDP_AMB/content/_confirm_hosts...

You have to manually add hostname ....Ambari wont pull hosts based on agents 🙂

Re: Install Ambari-Agent on each hosts

Explorer

Yes, I was staying on the same host for the whole time...

Re: Install Ambari-Agent on each hosts

@Nicolas YUE Hit accept on one of the best answers to close the thread.

Re: Install Ambari-Agent on each hosts

Mentor

You dont need to install manually the agent on the servers in the cluster. Ambari will automatically take care of that provided you configured the passwordless login for the user running the Ambari installation.

The hosts hould have a FQDN and dont remove the fisrt 2 line in your the /etc/hosts. Check this link

I have also attached a configuration I deployed. If you ain't using postgre as the derby database make sure you install configure the desired DB as described here

This is specific for MySQL setup for Ambari

Re: Install Ambari-Agent on each hosts

Explorer

I read your pdf and I think I understood what I was doing wrong. I was staying on localhost everytime I was trying something new and I should have went on other hosts to configure everything.

Re: Install Ambari-Agent on each hosts

Explorer

Stupid mistake, I was staying on the same host and changing file parameters which of course wouldn't work...