My cluster has a yellow health as it has only one single node, so the replicas remain unasigned simply because no other node is available to contain them.
Complete steps on Windows Box are:
bin\service
install elastic-search-x64-node01 which will create service named
elastic-search-x64-node01 edit elasticsearch.yml config file:
cluster.name: Animals
node.name: Snake
node.master: true
node.data: true
path.data: C:\ELK\storage\data
path.logs: C:\ELK\storage\logs
http.port: 9200
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["127.0.0.1"]
run service manager elastic-search-x64-node01 and set-up your services rules and start the service
unzip elastic, say, to C:\ELK\elastic2\ run command bin\service
install elastic-search-x64-node02 which will create service named
elastic-search-x64-node02
edit elasticsearch.yml config file:
cluster.name: Animals
node.name: Baboon
node.master: false
node.data: true
path.data: C:\ELK\storage\data
path.logs: C:\ELK\storage\logs
http.port: 9201
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["127.0.0.1"]
run service manager elastic-search-x64-node02 and set-up your services rules and start the service
At this point you have 2 separate nodes (they store data in the same folder, but I'm too laze to edit path.data for second node) as 2 separate Windows Services and GET http://localhost:9200/_cluster/health shows something like:
{
"cluster_name": "Animals",
"status": "green",
"timed_out": false,
"number_of_nodes": 2,
"number_of_data_nodes": 2,
"active_primary_shards": 4,
"active_shards": 8,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0,
"task_max_waiting_in_queue_millis": 0,
"active_shards_percent_as_number": 100
}