Skip to content
Search engine for agencies' published content
Ruby HTML
Branch: master
Clone or download
Latest commit fbbd61e Nov 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci SRCH-811 remove ruby 2.3 from test matrix (#96) Aug 22, 2019
app SRCH-706 do not return suggestion if search returns results (#92) Aug 21, 2019
bin [#153562226] update rubocop (#28) Mar 13, 2018
config
lib [#159121305] stop populating raw text fields (#46) Aug 17, 2018
public Initial facade functionality Apr 10, 2015
spec
vendor Added index templates and lifecycle management for zero-downtime sche… Apr 21, 2015
.codeclimate.yml [#153562226] update rubocop (#28) Mar 13, 2018
.codeinventory.yml update contact email to be team address Jan 31, 2017
.csslintrc [#146337973] make Travis fail without 100% test coverage Jun 5, 2017
.eslintignore [#146337973] make Travis fail without 100% test coverage Jun 5, 2017
.eslintrc [#146337973] make Travis fail without 100% test coverage Jun 5, 2017
.gitignore SRCH-123 upgrade ruby to 2.3.8 (#67) Nov 15, 2018
.rubocop.yml [#159857544] update grape & sprockets (#47) Aug 21, 2018
.ruby-version SRCH-74 upgrade to ruby 2.5.5 (#80) Apr 3, 2019
.simplecov [#146337973] make Travis fail without 100% test coverage Jun 5, 2017
Capfile Initial facade functionality Apr 10, 2015
Gemfile SRCH-1085 Bump rack-cors from 0.4.1 to 1.0.5 Nov 21, 2019
Gemfile.lock SRCH-1085 Bump rack-cors from 0.4.1 to 1.0.5 Nov 21, 2019
LICENSE Initial commit Apr 6, 2015
README.md SRCH-74 upgrade to ruby 2.5.5 (#80) Apr 3, 2019
Rakefile Initial facade functionality Apr 10, 2015
config.ru Turn on New Relic integration Apr 23, 2015

README.md

i14y

CircleCI Code Climate Test Coverage

Search engine for agencies' published content

Dependencies/Prerequisistes

  • 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
$ /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"
}

Development

  • Use rvm to install the version of Ruby specified in .ruby-version.
  • bundle install.
  • Copy config/secrets_example.yml to config/secrets.yml and fill in your own secrets. To generate a random long secret, use rake secret.
  • Run bundle exec rake i14y:setup to 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

Tests

bundle exec rake

Deployment

  • Set your Airbrake api key in config/airbrake.yml in the deployment directory for /i14y/shared/config. This will get copied into the current release directory on deployment.
  • Update your config/secrets.yml file in the deployment directory for /i14y/shared/config. This will get copied into the current release directory on deployment.
  • Update your config/newrelic.yml file in the deployment directory for /i14y/shared/config. This will get copied into the current release directory on deployment.
  • bundle exec cap staging deploy to deploy to a staging environment
  • bundle exec cap production deploy to deploy to a production environment
You can’t perform that action at this time.