diff --git a/README.md b/README.md index 2a01ef985c3b4..aa1bbcd42568c 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ The GCE Cloud plugin allows to use GCE API for the unicast discovery mechanism. In order to install the plugin, simply run: `bin/plugin -install elasticsearch/elasticsearch-cloud-gce/2.0.0.RC1`. -| GCE Cloud Plugin | elasticsearch | Release date | -|----------------------------|---------------------|:------------:| -| 2.0.0-SNAPSHOT (master) | 1.0.0.RC1 -> master | | -| 2.0.0.RC1 | 1.0.0.RC1 -> master | 2014-01-15 | -| 1.2.0-SNAPSHOT (1.x) | 0.90.3 -> 0.90 | | -| 1.1.0 | 0.90.3 -> 0.90 | 2013-08-09 | -| 1.0.0 | 0.90.0 -> 0.90.2 | 2013-07-23 | +| GCE Cloud Plugin | elasticsearch | gce api | Release date | +|----------------------------|---------------------|--------------|:------------:| +| 2.0.0-SNAPSHOT (master) | 1.0.0.RC1 -> master | 1.17.0-rc | | +| 2.0.0.RC1 | 1.0.0.RC1 -> master | 1.15.0-rc | 2014-01-15 | +| 1.2.0-SNAPSHOT (1.x) | 0.90.3 -> 0.90 | 1.17.0-rc | | +| 1.1.0 | 0.90.3 -> 0.90 | 1.15.0-rc | 2013-08-09 | +| 1.0.0 | 0.90.0 -> 0.90.2 | 1.15.0-rc | 2013-07-23 | Google Compute Engine Virtual Machine Discovery @@ -98,13 +98,13 @@ sudo apt-get update sudo apt-get install curl # Download Elasticsearch -curl https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.2.deb -o elasticsearch-0.90.2.deb +wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.0.RC1.deb # Prepare Java installation sudo apt-get install java7-runtime-headless # Prepare Elasticsearch installation -sudo dpkg -i elasticsearch-0.90.2.deb +sudo dpkg -i elasticsearch-1.0.0.RC1.deb # Check that elasticsearch is running: curl http://localhost:9200/ @@ -116,10 +116,13 @@ This command should give you a JSON result: { "ok" : true, "status" : 200, - "name" : "Lunatica", + "name" : "Shriker", "version" : { - "number" : "0.90.2", - "snapshot_build" : false + "number" : "1.0.0.RC1", + "build_hash" : "0a5781f44876e8d1c30b6360628d59cb2a7a2bbb", + "build_timestamp" : "2014-01-10T10:18:37Z", + "build_snapshot" : false, + "lucene_version" : "4.6" }, "tagline" : "You Know, for Search" } @@ -131,8 +134,7 @@ Install the plugin: ```sh # Use Plugin Manager to install it -sudo /usr/share/elasticsearch/bin/plugin - --install elasticsearch/elasticsearch-cloud-gce/1.1.0 +sudo /usr/share/elasticsearch/bin/plugin --install elasticsearch/elasticsearch-cloud-gce/2.0.0.RC1 # Configure it: sudo vi /etc/elasticsearch/elasticsearch.yml @@ -206,7 +208,7 @@ gcutil listkernels --project es-cloud | projects/google/global/kernels/gce-v20130603 | SCSI-enabled 3.3.8-gcg built 2013-05-29 01:04:00 | | +----------------------------------------------+--------------------------------------------------+-------------+ # Note the kernel you prefer to use and add your image to your catalog: -gcutil --project=es-cloud addimage elasticsearch-0-90-2 \ +gcutil --project=es-cloud addimage elasticsearch-1-0-0-RC1 \ gs://esimage/e4686d7f5bf904a924ae0cfeb58d0827c6d5b966.image.tar.gz \ --preferred_kernel=projects/google/global/kernels/gce-v20130603 @@ -220,7 +222,7 @@ As you have now an image, you can create as many instances as you need: ```sh # Just change node name (here myesnode2) -gcutil --project=es-cloud addinstance --image=elasticsearch-0-90-2 \ +gcutil --project=es-cloud addinstance --image=elasticsearch-1-0-0-RC1 \ --kernel=projects/google/global/kernels/gce-v20130603 myesnode2 \ --zone europe-west1-a --machine_type f1-micro --service_account_scope=compute-rw \ --persistent_boot_disk @@ -293,7 +295,7 @@ gcutil --project=es-cloud addinstance myesnode1 \ --metadata=es_port:9301 # when creating an instance from an image -gcutil --project=es-cloud addinstance --image=elasticsearch-0-90-2 \ +gcutil --project=es-cloud addinstance --image=elasticsearch-1-0-0-RC1 \ --kernel=projects/google/global/kernels/gce-v20130603 myesnode2 \ --zone europe-west1-a --machine_type f1-micro --service_account_scope=compute-rw \ --persistent_boot_disk --metadata=es_port:9301 @@ -340,7 +342,7 @@ License This software is licensed under the Apache 2 license, quoted below. - Copyright 2009-2013 ElasticSearch + Copyright 2009-2014 Elasticsearch Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of diff --git a/pom.xml b/pom.xml index ad5e0022dbd72..757cf322b8629 100644 --- a/pom.xml +++ b/pom.xml @@ -48,8 +48,8 @@ governing permissions and limitations under the License. --> 1.0.0.RC1 - v1beta15-rev3-1.15.0-rc - 1.15.0-rc + v1beta16-rev1-1.17.0-rc + 1.17.0-rc 4.6.0 1 true @@ -109,6 +109,18 @@ governing permissions and limitations under the License. --> test-jar test + + org.hamcrest + hamcrest-core + 1.3.RC2 + test + + + org.hamcrest + hamcrest-library + 1.3.RC2 + test + diff --git a/src/main/java/org/elasticsearch/discovery/gce/GceUnicastHostsProvider.java b/src/main/java/org/elasticsearch/discovery/gce/GceUnicastHostsProvider.java index 15c498a752be0..06ba581c0df99 100644 --- a/src/main/java/org/elasticsearch/discovery/gce/GceUnicastHostsProvider.java +++ b/src/main/java/org/elasticsearch/discovery/gce/GceUnicastHostsProvider.java @@ -123,6 +123,11 @@ public List buildDynamicNodes() { try { Collection instances = gceComputeService.instances(); + if (instances == null) { + logger.trace("no instance found for project [{}], zone [{}].", this.project, this.zone); + return cachedDiscoNodes; + } + for (Instance instance : instances) { String name = instance.getName(); String type = instance.getMachineType(); diff --git a/src/test/resources/log4j.xml b/src/test/resources/log4j.xml index 8e7ddf7591d5f..07be97b44d76a 100644 --- a/src/test/resources/log4j.xml +++ b/src/test/resources/log4j.xml @@ -1,5 +1,5 @@ -