Skip to content

Commit

Permalink
Tweak to allow enterprise edition
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Paul committed Apr 17, 2015
1 parent 09688bd commit e8580aa
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 4 deletions.
6 changes: 3 additions & 3 deletions attributes/tarball.rb
@@ -1,6 +1,6 @@
default[:neo4j][:server][:version] = '2.1.7'

default[:neo4j][:server][:tarball][:url] = "http://dist.neo4j.org/neo4j-community-#{node[:neo4j][:server][:version]}-unix.tar.gz"
default[:neo4j][:server][:version] = '2.2.1'
default[:neo4j][:server][:edition] = 'community'
default[:neo4j][:server][:tarball][:url] = "http://dist.neo4j.org/neo4j-#{node[:neo4j][:server][:edition]}-#{node[:neo4j][:server][:version]}-unix.tar.gz"

default[:neo4j][:server][:jvm][:xms] = 32
default[:neo4j][:server][:jvm][:xmx] = 512
Expand Down
2 changes: 1 addition & 1 deletion recipes/tarball.rb
Expand Up @@ -46,7 +46,7 @@
require "tmpdir"

td = Dir.tmpdir
tmp = File.join(td, "neo4j-community-#{node.neo4j.server.version}.tar.gz")
tmp = File.join(td, "neo4j-#{node.neo4j.server.edition}-#{node.neo4j.server.version}.tar.gz")
tmp_spatial = File.join(td, "neo4j-spatial-#{node.neo4j.server.plugins.spatial.version}-server-plugin.zip")

remote_file(tmp) do
Expand Down
5 changes: 5 additions & 0 deletions templates/default/neo4j-server.properties.erb
Expand Up @@ -73,3 +73,8 @@ org.neo4j.server.db.tuning.properties=<%= node.neo4j.server.conf_dir %>/neo4j.pr
#to mount the org.neo4j.examples.server.unmanaged.HelloWorldResource.java from neo4j-examples
#under /examples/unmanaged, resulting in a final URL of http://localhost:7474/examples/unmanaged/helloworld/{nodeId}
#org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged

# Turn on HA mode if initial_hosts is given
<% if node.neo4j.server.edition == 'enterprise' && node.neo4j.server.initial_hosts %>
org.neo4j.server.database.mode=HA
<% end %>
54 changes: 54 additions & 0 deletions templates/default/neo4j.properties.erb
Expand Up @@ -33,3 +33,57 @@ node_auto_indexing=<%= node.neo4j.server.node_auto_indexing.enabled %>
# Remote Shell port
remote_shell_port=<%= node.neo4j.server.remote_shell.port %>
<% if node.neo4j.server.edition == 'enterprise' && node.neo4j.server.server_id %>
# Uncomment and specify these lines for running Neo4j in High Availability mode.
# See the High availability setup tutorial for more details on these settings
# http://neo4j.com/docs/2.1.3/ha-setup-tutorial/
#
# ha.server_id is a unique integer for each instance of the Neo4j database in
# the cluster (as opposed to the coordinator instance IDs).
ha.server_id=<%= node.neo4j.server.server_id %>
#
# ha.initial_hosts is a comma-separated list (without spaces) of the host:port
# of where to find one or more of the known Cluster members, if they are
# already present. If none of them can be contacted the cluster will be formed
# by this instance.
# Avoid localhost due to IP resolution issues on some systems.
# Addresses w/o host (:<port>) will use the localhost IP.
<% if node.neo4j.server.initial_hosts %>
ha.initial_hosts=<%= node.neo4j.server.initial_hosts %>
<% end %>
#
# IP and port for this instance to bind to to communicate data with the
# other neo4j instances in the cluster. This is broadcasted to the other
# cluster members, so different members can have different communication ports.
# Avoid localhost due to IP resolution issues on some systems.
# Addresses w/o host (:<port>) will use the localhost IP.
#ha.server=:6001
#
# IP and port for this instance to bind to, for communicating cluster
# information with the rest of the instances. This will be communicated to the
# rest of the instances via normal cluster traffic but for an instance to join
# a cluster it must already know at least one other instance.
# Port ranges as well as single ports is supported.
# Avoid localhost due to IP resolution issues on some systems.
# Addresses w/o host (:<port>) will use the localhost IP.
# See also ha.initial_hosts
#ha.cluster_server=:5001-5099
#
# The interval at which slaves will pull updates from the master. Comment out
# the option to disable periodic pulling of updates. Unit is seconds.
ha.pull_interval=10
#
# Amount of slaves the master will try to push a transaction to upon commit
# (default is 1). The master will optimistically continue and not fail the
# transaction even if it fails to reach the push factor. Setting this to 0 will
# increase write performance when writing through master but could potentially
# lead to branched data (or loss of transaction) if the master goes down.
#ha.tx_push_factor=1
#
# Strategy the master will use when pushing data to slaves (if the push factor
# is greater than 0). There are two options available "fixed" (default) or
# "round_robin". Fixed will start by pushing to slaves ordered by server id
# (highest first) improving performance since the slaves only have to cache up
# one transaction at a time.
#ha.tx_push_strategy=fixed
<% end %>

0 comments on commit e8580aa

Please sign in to comment.