Installs and configures GRAKN.AI on Ubuntu servers.
- Ansible >2.3.1
- Tested on Ubuntu 16.04
The role needs to be run as root or with 'become: yes'.
Grakn itself requires:
- Oracle Java 8 on the target server.
- Cassandra
- Redis
- Zookeeper
- Kafka
For Analytics, you will need:
- Apache Spark cluster
- Apache Hadoop node
For defaults values of the variables below, see defaults/main.yml
.
Grakn version:
grakn_version: "0.14.0"
Backend configuration:
storage_hostname: 10.0.0.1,10.0.0.2,10.0.0.3
storage_cassandra_replication_strategy_class: org.apache.cassandra.locator.SimpleStrategy
storage_cassandra_replication_strategy_options: "replication_factor,1"
See Cassandra documentation for more information.
Auxiliary server configuration:
kafka_hosts: ['localhost']
zookeeper_hosts: ['localhost']
redis_host: "localhost" # single server
Java options passed directly to the JVM on the command line:
grakn_extra_options: "-Xmx12g -XX:+HeapDumpOnOutOfMemoryError"
Log level for Grakn:
grakn_log_level: "INFO"
Your package needs to be named grakn-dist-SOME_VERSION.tar.gz
.
This can be obtain by compiling Grakn from source
By default, the role will download the release available on GitHub and install it on the server.
To download from a custom location, add this to group_vars/all
:
grakn_version: SOME_VERSION
grakn_download_url: "https://example.com/path/to/grakn-dist-SOME_VERSION.tar.gz"
You must specify the version so the playbook extracts the correct directory from archive and deploys the matching configuration.
The distribution archive must be located in files/
of the playbook's directory.
Add the following to your group_vars/all
:
upload_release: true
grakn_version: SOME_VERSION
If you want to specify an alternative directory, use:
grakn_package_directory: "/full/path/to/tar/"
We currently don't have a way of checking if the installed and uploaded version of Grakn match for idempotence so to force a re-deploy, add this variable to your Grakn hosts:
redeploy: true
From the CLI you can run it as follows:
ansible-playbook -i inventory grakn_test.yml --tags role:grakn -e "{redeploy: true}"
playbook.yml
- name: Grakn deployment
hosts:
- "grakn"
become: yes
roles:
- { role: grakn }
group_vars/all
storage_hostname: "10.0.0.1,10.0.0.2,10.0.0.3"
zookeeper_hosts: [ 10.0.0.11 ]
kafka_hosts: [ 10.0.0.21,10.0.0.22,10.0.0.23 ]
redis_host: "10.0.0.31"
Apache 2.0