# Es newbie trying to understand adding a node on ec2

**URL:** <https://discuss.elastic.co/t/es-newbie-trying-to-understand-adding-a-node-on-ec2/3754>\
**Category:** Elasticsearch\
**Created:** [January 7, 2011, 6:52pm UTC](https://discuss.elastic.co/t/es-newbie-trying-to-understand-adding-a-node-on-ec2/3754 "2011-01-07T18:52:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![molicule](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/molicule/32/3287_2.png) [@molicule](https://discuss.elastic.co/u/molicule)\
**Post date:** [January 7, 2011, 6:52pm UTC](https://discuss.elastic.co/t/es-newbie-trying-to-understand-adding-a-node-on-ec2/3754/1 "2011-01-07T18:52:41Z")

</div>

Hi,

I've setup es on an ec2 micro instance and have it working, sending  
json back and  
forth is pretty cool.

I've gone through the docs and googled around but am still unable to  
understand the following.

1. I'm currently indexing user transaction records and would like to  
add another node on another ec2 instance. How do I do this? A step by  
step walkthru for an es&ec2 newbie would be helpful.

2. If in addition to this I also wanted to index the Twitter River,  
how would I do that i.e. would I need a separate es server instance on  
a separate ec2 box (if so how would it play as a node too) or would I  
use multi-tenancy to do this, if so how? Whilst on the Twitter River  
subject I notice you use username, password auth and the twitter folks  
want everyone to start using oauth, if one got the oauth token out-of-  
band than one would only need to send a signed url from within ES, So  
if i built the signed url is there a way i can give it to ES?

3. Is there a document someplace that provides a deeper explanation  
into shards & replicas?

Thanks

---

<div class="post-metadata">

**Author:** ![molicule](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/molicule/32/3287_2.png) [@molicule](https://discuss.elastic.co/u/molicule)\
**Post date:** [January 9, 2011, 7:26pm UTC](https://discuss.elastic.co/t/es-newbie-trying-to-understand-adding-a-node-on-ec2/3754/2 "2011-01-09T19:26:22Z")

</div>

Hi,

So I added a second ec2 instance, installed elasticsearch on it and  
than on instance 1 I brought down elasticsearch, changed the config/  
e...yml file to add ec2 discovery as per  
[http://www.elasticsearch.com/docs/elasticsearch/cloud/aws/ec2\_discovery/](http://www.elasticsearch.com/docs/elasticsearch/cloud/aws/ec2_discovery/)  
I than brought elasticsearch back up on instance 1. I did the same on  
instance 2 i.e. edited the config/e..yml file to reflect ec2 discovery  
and brought elasticsearch up.

My question is, should I not now see that instance2 is another node  
and a replica of instance1 and its data directory start filling up.  
That however does not seem to be happening. Could someone outline what  
I should see/expect, what I might be doing wrong etc.

Inline below for future newbies I've added some notes that might save  
them some time

On Jan 7, 10:52 am, molicule [molic...@gmail.com](mailto:molic...@gmail.com) wrote:

> 1. Is there a document someplace that provides a deeper explanation  
> into shards & replicas?

There are 4 places in which to search for the documentation i.e.

1. The docs on [elasticsearch.com](http://elasticsearch.com)
2. The wiki and issues sections of the github wiki
3. The blog
4. This user list

for shards, replicas etc. read [GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine](https://github.com/elasticsearch/elasticsearch/wiki/Scaling-ElasticSearch)

For installing plugins see [Documentation suggests deprecated (?) cloud plugin · Issue #582 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/issue/582)

---

<div class="post-metadata">

**Author:** ![harryf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harryf/32/3281_2.png) [@harryf](https://discuss.elastic.co/u/harryf)\
**Post date:** [January 10, 2011, 1:42am UTC](https://discuss.elastic.co/t/es-newbie-trying-to-understand-adding-a-node-on-ec2/3754/3 "2011-01-10T01:42:33Z")

</div>

For me the minimum elastic search config ( in ./conf/elasticsearch.yml ) I've been able to get it working with is;

cloud: aws: access\_key: $AWS\_ACCESS\_KEY secret\_key: $AWS\_SECRET\_KEY

discovery:  
type: ec2

Where $AWS\_ACCESS\_KEY and $AWS\_SECRET\_KEY are replaced with their values. This also assumes you're using the default us-east1 datacenter.

You also need to give permission to port 9300 as well, the port used for cluster communication - see docs on ec2-authorize

Once multiple nodes are started, you can see if the cluster is working by accessing http://:9200/\_cluster/health - you should see something like "number\_of\_nodes: 2"

---

<div class="post-metadata">

**Author:** ![molicule](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/molicule/32/3287_2.png) [@molicule](https://discuss.elastic.co/u/molicule)\
**Post date:** [January 10, 2011, 2:05am UTC](https://discuss.elastic.co/t/es-newbie-trying-to-understand-adding-a-node-on-ec2/3754/4 "2011-01-10T02:05:41Z")

</div>

Thanks a heap! That was it i.e. I needed to open port 9300 for  
10.0.0.0/8 and now \_cluster/health is green with 2 nodes

On Jan 9, 5:42 pm, harryf [hfue...@gmail.com](mailto:hfue...@gmail.com) wrote:

> For me the minimum Elasticsearch config ( in ./conf/elasticsearch.yml ) I've  
> been able to get it working with is;
> 
> cloud:  
> aws:  
> access\_key: $AWS\_ACCESS\_KEY  
> secret\_key: $AWS\_SECRET\_KEY
> 
> discovery:  
> type: ec2
> 
> Where $AWS\_ACCESS\_KEY and $AWS\_SECRET\_KEY are replaced with their values.  
> This also assumes you're using the default us-east1 datacenter.
> 
> You also need to give permission to port 9300 as well, the port used for  
> cluster communication - see docs on ec2-authorize
> 
> ## Once multiple nodes are started, you can see if the cluster is working by accessing http://:9200/\_cluster/health - you should see something like "number\_of\_nodes: 2"
> 
> View this message in context:[http://elasticsearch-users.115913.n3.nabble.com/es-newbie-trying-to-u](http://elasticsearch-users.115913.n3.nabble.com/es-newbie-trying-to-u)...  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:14am UTC](https://discuss.elastic.co/t/es-newbie-trying-to-understand-adding-a-node-on-ec2/3754/5 "2017-07-06T04:14:06Z")

</div>


