Skip to content

Instantly share code, notes, and snippets.

@JaSpr
Last active August 29, 2015 14:14
Show Gist options
  • Save JaSpr/ca7272b127fa3fb2830a to your computer and use it in GitHub Desktop.
Save JaSpr/ca7272b127fa3fb2830a to your computer and use it in GitHub Desktop.
Some helpful setup
$ vagrant up
if it fails on provision regarding puppet:
$ vagrant ssh # gets you into the vagrant box
$ sudo apt-get install puppet
$ exit # leaves ssh
$ vagrant provision
once vagrant is done
$ vagrant ssh
$ sudo service elasticsearch start
$ exit
$ ./activator run
@n8rzz
Copy link

n8rzz commented Feb 2, 2015

Dependencies

Oracle VirtualBox https://www.virtualbox.org/wiki/Downloads
Vagrant https://www.vagrantup.com/downloads.html
Ruby 2.1.1
gem install sass compass
Java SDK === version 1.8 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)

Vargrant

$ vagrant up

if it fails on provision regarding puppet:
$ vagrant ssh
$ sudo apt-get install puppet
$ exit

$ vagrant provision

once vagrant is done

$ vagrant ssh

Elasticsearch

  • Download Elasticsearch:
    $ sudo wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.0.deb --no-check-certificate
  • Install Elasticsearch:
    $ sudo dpkg -i elasticsearch-1.4.0.deb
  • Navigate to the elasticsearch folder that houses the plugins: $ cd /usr/share/elasticsearch
  • Install the JDBC River Plugin:
    $ sudo bin/plugin --install jdbc --url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-river-jdbc/1.4.0.10/elasticsearch-river-jdbc-1.4.0.10.zip
  • Install the HEAD plugin:
    $ sudo bin/plugin -install mobz/elasticsearch-head
  • Navigate to the JDBC River Plugin folder:
    $ cd /usr/share/elasticsearch/plugins
  • Download the driver into the folder: cd jdbc
    $ sudo wget https://jdbc.postgresql.org/download/postgresql-9.4-1201.jdbc41.jar
  • Navigate and update the elasticsearch.yml file:
    $ cd /etc/elasticsearch
  • then: sudo nano elasticsearch.yml

Then add the following to the bottom of the file.

http.cors.enabled : true
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length

Ctrl X, Y, Enter to save changes

  • Navigate home and start the service: cd ~ , then sudo service elasticsearch restart

Compile and start local server [host:9000]

cd crossmark-portal
./activator run

Navigate to localhost:9000

Run the database evolution [click run scripts]

in a new folder, pull the redemption-aggregation repo.
./activator run in this new folder

Elasticsearch _river

localhost:9200/_plugin/head
Any Request tab
set url in query textbox to: http://localhost:9200/_river/my_jdbc_river/
next text box to: _meta
and PUT in the dropdown
copy contents of [YOUR_PROJECT]/puppet/templates/offerindex.json in to big textarea
click request


git protocol

when in develop or master: git pull --rebase upstream develop
hotfixes branch off current master -b hotfix/name
when done: git push origin hotfix/name [my origin]
then do merge request from [name]/crossmark master to origin master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment