-
Notifications
You must be signed in to change notification settings - Fork 16
Get Started
If you are thinking about launching Eywa in production, please check our FAQ section to get some ideas about recommended configurations.
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.
- Having a running linux server, with suggested minimal configuration of 1 CPU + 1GB Mem.
- 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
The easiest way to install docker is through the command below provided by DaoCloud.io:
curl -sSL https://get.daocloud.io/docker | sh
- Running the container, with default minimal setup
docker run -t -d -p 8080:8080 -p 8081:8081 -e "ES_HEAP_SIZE=512m" -v /var/elasticsearch:/var/elasticsearch -v /var/eywa:/var/eywa 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.
One thing to note about is these two directories: /var/elasticsearch
and /var/eywa
. The first one stores all your indices and the second one stores all your logs, metadata including channels, etc. So next time when you restart the docker or, upgrade Eywa with newer version, remember to map the same directory by -v /var/eywa:/var/eywa
and -v /var/elasticsearch:/var/elasticsearch
so that all your old data will be retained.
Eywa by default looks at /etc/eywa/eywa.yml
for configurations, if you want to provide your own configs you should also do -v /your/config/dir:/etc/eywa
. For more details about how to configure Eywa, please check out the Configuration section.
Once the docker container starts, You can check if eywa is alive by:
curl localhost:8080/greeting
Which should return something like:
{"greeting":"I See You..."}
Woo-ho, that was easy, Eywa now is ready to serve!
If you want to run each component of Eywa separately, you can follow this instruction to install them one by one.
-
For Ubuntu, just do
sudo apt-get update && sudo apt-get install sqlite3 libsqlite3-dev -y
. -
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
There is known issue with compiling Go on macOS Sierra and go1.7.1 is the only one that starts working on macOS Sierra. So please following the solution to install Go.
gvm install go1.7.1
gvm use go1.7.1
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.7.3
gvm use go1.7.3 --default
gvm uninstall go1.7.1
- Install Eywa
go get github.com/xcodersun/eywa
go install github.com/xcodersun/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 for now. Make sure you have the right permissions on all the paths mentioned in that file, and you are connecting Eywa to 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~