Skip to content

Get Started

Sea Yo edited this page Mar 4, 2016 · 73 revisions

Eywa currently uses sqlite3 as database store, while all the indices are stored in Elasticsearch. So to install Eywa, you can either Run with Docker, which bundles everything in one image ready to use, or Install different components separately.

Prerequisites

  • Having a running linux server, with suggested minimal configuration of 1 CPU + 1GB Mem.

Run with Docker

  • Install Docker

This tutorial provides detailed instructions on how to install docker on ubuntu. For more instructions about other platforms, please hit Docker's official website

  • Running the container, with default minimal setup
  docker run -d -p 8080:8080 -p 8081:8081 -e "ES_HEAP_SIZE=512m" -v /var/elasticsearch:/var/elasticsearch -v /var/eywa:/var/eywa vivowares/eywa:latest

This will download our latest docker image and start both Elasticsearch and Eywa in the same container. Elasticsearch will be using minimal configuration of 512mb memory, and Eywa will be using default setup too. After a couple of seconds or so, Eywa should be listening to both 8080 and 8081 ports.

You can check if eywa is alive by:

  curl localhost:8080/

Which should return something like:

  {"greeting":"I See You..."}

Woo-ho, that was easy, Eywa now is ready to serve!

Install different components separately

If you want to run each component of Eywa separately, you can follow this instruction to install them one by one.

  • Install Sqlite3

    For Ubuntu, just do sudo apt-get update && sudo apt-get install sqlite3 libsqlite3-dev -y.

  • Install Java

    For Ubuntu, you can do:

  sudo apt-get install python-software-properties -y
  sudo add-apt-repository ppa:webupd8team/java
  sudo apt-get update
  sudo apt-get install oracle-java8-installer
  wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.1.1.deb
  sudo dpkg -i elasticsearch-2.1.1.deb
  sudo /usr/share/elasticsearch/bin/plugin install mapper-size

For information about how to config Elasticsearch, you should be able to find their official documentation pretty helpful.

And then restart your elasticsearch:

  sudo service elasticsearch restart
  • Install go1.5.1

We suggest to use gvm to manage golang versions and your $GOPATH. While there is a known issue during installing go1.5.1 with $GOROOT setting, following this solution can help get you through. Please refer to this issue for more details.

  gvm install go1.4
  gvm use go1.4
  export GOROOT_BOOTSTRAP=$GOROOT
  gvm install go1.5.1
  gvm use go1.5.1 --default
  gvm uninstall go1.4
  • Install Eywa
  go get github.com/vivowares/eywa
  go install github.com/vivowares/eywa

Now you have eywa installed. However, to start the service, you have to provide a configuration file at default location, /etc/eywa/eywa.yml.

Detailed configurations can be found in section Configuration Details. And there is an example file which should be able to get you started. Simply copy it form there. Make sure you have the right permission on all the paths mentioned in that config, and you are connecting the right Elasticsearch endpoint.

Finally, after entering this command, you will be good to go:

  export EYWA_HOME=$(dirname $(which eywa)); eywa migrate && eywa setup_es && eywa serve &

Now Eywa should be serving at port 8080 and 8081. Hoo~

Clone this wiki locally