Search engine for agencies' published content
- Install Elasticsearch 5.6+:
$ brew search elasticsearch
$ brew install elasticsearch@5.6
To allow ES 5.6 to run in parallel with another version of Elasticsearch in development and test environments, we run I14y on port 9256 instead of the default port 9200. You'll need to specify the port, cluster name, and node name for your 5.6 cluster:
$ vi /usr/local/Cellar/elasticsearch@5.6/<specific version>/libexec/config/elasticsearch.yml
cluster.name: elasticsearch_56
node.name: "es56"
http.port: 9256
-
You'll need Java 7+ to run the included
stream2esutility that handles copying data from one index version to the next. Runjava -versionto make sure. -
Your Elasticsearch cluster needs the ICU analysis plugin and the Kuromoji analysis plugin and the Smart Chinese Analysis Plugin installed:
$ /usr/local/opt/elasticsearch@5.6/libexec/bin/elasticsearch-plugin install analysis-kuromoji
$ /usr/local/opt/elasticsearch@5.6/libexec/bin/elasticsearch-plugin install analysis-icu
$ /usr/local/opt/elasticsearch@5.6/libexec/bin/elasticsearch-plugin install analysis-smartcn
Be sure to restart Elasticsearch after you have installed the plugins:
$ brew services restart elasticsearch@5.6
Verify that Elasticsearch 5.6.x is running on port 9256:
$ curl localhost:9256
{
"name" : "es56",
"cluster_name" : "elasticsearch_56",
"cluster_uuid" : "IhVLFTNYQj6Ac6Xi4Uegmg",
"version" : {
"number" : "5.6.9",
"build_hash" : "877a590",
"build_date" : "2018-04-12T16:25:14.838Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}
- Use
rvmto install the version of Ruby specified in.ruby-version. bundle install.- Copy
config/secrets_example.ymltoconfig/secrets.ymland fill in your own secrets. To generate a random long secret, userake secret. - Run
bundle exec rake i14y:setupto create the neccessary indexes, index templates, and dynamic field templates.
If you ever want to start from scratch with your indexes/templates, you can clear everything out:
bundle exec rake i14y:clear_all
bundle exec rake
- Set your Airbrake api key in
config/airbrake.ymlin the deployment directory for/i14y/shared/config. This will get copied into the current release directory on deployment. - Update your
config/secrets.ymlfile in the deployment directory for/i14y/shared/config. This will get copied into the current release directory on deployment. - Update your
config/newrelic.ymlfile in the deployment directory for/i14y/shared/config. This will get copied into the current release directory on deployment. bundle exec cap staging deployto deploy to a staging environmentbundle exec cap production deployto deploy to a production environment