Skip to content

Commit

Permalink
#16: Clean up elastic search things because cleanliness is next to go…
Browse files Browse the repository at this point in the history
…dliness
  • Loading branch information
pirog committed Jul 18, 2017
1 parent 41485c2 commit 985b1ba
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/config/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Supported Services
The following services are currently supported. Please check out each one to learn how to use them.

* ####[apache](./../services/apache.md)
* ####[elasticsearch](./../services/elasticsearch.md)
* ####[mailhog](./../services/mailhog.md)
* ####[mariadb](./../services/mariadb.md)
* ####[memcached](./../services/memcached.md)
Expand Down
7 changes: 5 additions & 2 deletions docs/services/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ Elasticsearch
Supported versions
------------------

* 5.5/.4/.3/.2/.1
* 5.5
* 5.4
* 5.3
* 5.2
* 5.1
* latest

Example
Expand All @@ -28,7 +32,6 @@ cd /path/to/app
# Get info (app needs to be running to get this)
lando info

```
{
"search": {
"type": "elasticsearch",
Expand Down
4 changes: 1 addition & 3 deletions examples/elasticsearch/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
# There are various envvars you can specify to further customize how
# elasticsearch works.
#
# See: https://hub.docker.com/r/eeacms/varnish/
# See: https://hub.docker.com/r/itzg/elasticsearch/
#
# overrides:
# services:
Expand All @@ -44,8 +44,6 @@ services:
appserver:
type: node:6.10
command: npm start
build:
- "cd $LANDO_MOUNT & npm install"

# Add some nice command routing
tooling:
Expand Down
2 changes: 1 addition & 1 deletion examples/elasticsearch/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.get('/', function(req, res) {
console.log(error);
return res.end('elasticsearch cluster is down!' + JSON.stringify(error, null, 2));
} else {
return res.end('All is well.');
return res.end('Elastic search contacted! All is well.');
}
});
});
5 changes: 5 additions & 0 deletions plugins/lando-services/elasticsearch/elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ module.exports = function(lando) {
}
};

// Surfaces the config file if specified
if (_.has(config, 'config')) {
info.config = config.config;
}

// Return the collected info
return info;

Expand Down
4 changes: 2 additions & 2 deletions plugins/lando-services/lib/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = function(lando) {

// 80 Char Violators
var pma = 'phpmyadmin';
var es = 'elasticsearch';

// Add the services
lando.services.add('apache', require('./../apache/apache')(lando));
Expand All @@ -42,8 +43,7 @@ module.exports = function(lando) {
lando.services.add('redis', require('./../redis/redis')(lando));
lando.services.add('solr', require('./../solr/solr')(lando));
lando.services.add('varnish', require('./../varnish/varnish')(lando));
lando.services.add('elasticsearch',
require('./../elasticsearch/elasticsearch')(lando));
lando.services.add(es, require('./../elasticsearch/elasticsearch')(lando));

});

Expand Down

0 comments on commit 985b1ba

Please sign in to comment.