-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.yml
209 lines (183 loc) · 6.1 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
---
## General
app_name: neo4j
# Version
neo4j_image: neo4j
neo4j_version: 5.20.0
neo4j_tag: "{{ neo4j_version }}-{{ neo4j_edition }}"
neo4j_edition: community
# The port exposed by the service goes here
neo4j_http_port: 7474
neo4j_bolt_port: 7687
# Set false if you don't care about if docker is installed
neo4j_docker_check: true
# Set true to force the download and installation
neo4j_force_reinstall: false
# Paths
neo4j_skeleton_paths:
- path: "{{ neo4j_docker_files_path }}"
mode: "0755"
- path: "{{ neo4j_docker_data_path }}"
mode: "0755"
- path: "{{ neo4j_docker_logs_path }}"
mode: "0755"
- path: "{{ neo4j_docker_conf_path }}"
mode: "0744"
- path: "{{ neo4j_docker_plugins_path }}"
mode: "0744"
- path: "{{ neo4j_docker_licenses_path }}"
mode: "0744"
- path: "{{ neo4j_docker_import_path }}"
mode: "0744"
- path: "{{ neo4j_docker_lib_path }}"
mode: "0744"
# Owner
neo4j_user: neo4j
neo4j_group: neo4j
neo4j_user_id: 7474
neo4j_user_shell: /usr/sbin/nologin
neo4j_docker_user: neo4j
neo4j_required_packages:
- python3-dev
- python3-pip
- libsasl2-dev
- libssl-dev
neo4j_required_python_packages:
- docker==6.1.3
- docker-compose==1.29.2
- requests==2.31.0
neo4j_project_name: "{{ app_name }}"
neo4j_docker_container_name: "{{ neo4j_project_name }}"
neo4j_docker_service_name: "{{ neo4j_project_name }}"
neo4j_docker_compose_pull: always
neo4j_docker_compose_recreate: auto
# Using compose file
# Ansible docker compose file template
neo4j_docker_files_path: "/usr/local/src/{{ neo4j_project_name }}"
neo4j_docker_data_path: /var/lib/neo4j/data
neo4j_docker_logs_path: /var/log/neo4j
neo4j_docker_conf_path: /var/lib/neo4j/conf
neo4j_docker_plugins_path: /var/lib/neo4j/plugins
neo4j_docker_licenses_path: /var/lib/neo4j/licenses
neo4j_docker_import_path: /var/lib/neo4j/import
neo4j_docker_lib_path: /usr/share/neo4j/lib
neo4j_docker_compose_template: docker-compose.yml.j2
neo4j_docker_compose_file: "{{ neo4j_docker_files_path }}/docker-compose.yml"
# Using definitions
neo4j_install_using_definition: false
neo4j_docker_definition:
version: '3.8'
services:
neo4j:
image: "{{ neo4j_image }}:{{ neo4j_tag }}"
restart: always
networks:
- neo4j
container_name: "{{ neo4j_docker_container_name }}"
ports:
- "{{ neo4j_http_port }}:{{ neo4j_http_port }}"
- "{{ neo4j_bolt_port }}:{{ neo4j_bolt_port }}"
environment:
- NEO4J_AUTH={{ neo4j_login_user.name }}/{{ neo4j_login_user.password }}
volumes:
- "{{ neo4j_docker_conf_path }}:/conf"
- "{{ neo4j_docker_data_path }}:/data"
- "{{ neo4j_docker_logs_path }}:/logs"
networks:
neo4j:
name: "{{ neo4j_project_name }}"
# neo4j config file
neo4j_override_default_config: false
neo4j_config_template: neo4j.conf.j2
neo4j_config_file: "{{ neo4j_docker_conf_path }}/neo4j.conf"
# neo4j_custom_config_file: "{{ playbook_dir }}/files/neo4j.conf"
# neo4j_admin_custom_config_file: "{{ playbook_dir }}/files/admin-neo4j.conf"
# neo4j_custom_server_logs_config_file: "{{ playbook_dir }}/files/server-logs.xml"
# neo4j_custom_user_logs_config_file: "{{ playbook_dir }}/files/user-logs.xml"
neo4j_docker_compose_version: "3.8"
neo4j_docker_compose_restart: "always"
neo4j_docker_compose_networks:
- name: "{{ neo4j_project_name }}"
external: true
neo4j_docker_compose_ports:
- "{{ neo4j_http_port }}:{{ neo4j_http_port }}"
- "{{ neo4j_bolt_port }}:{{ neo4j_bolt_port }}"
neo4j_docker_compose_env_vars:
- NEO4J_AUTH={{ neo4j_login_user.name }}/{{ neo4j_login_user.password }}
neo4j_docker_compose_volumes:
- "{{ neo4j_docker_conf_path }}:/var/lib/neo4j/conf"
- "{{ neo4j_docker_data_path }}:/data"
- "{{ neo4j_docker_logs_path }}:/logs"
# Custom docker-compose.yml
# neo4j_custom_docker_compose_file: "{{ playbook_dir }}/files/docker/docker-compose.yml"
# Custom neo4j config vars
neo4j_configuration:
neo4j_server_directories:
data: /data
# plugins: plugins
logs: /logs
# lib: lib
# run: run
# licenses: licenses
# import: import
# neo4j_auth_enabled: false
# neo4j_usage_report_enabled: false
neo4j_memory:
# heap_initial_size: 512m
# heap_max_size: 512m
pagecache_size: 512m
# transaction_total_max: 256m
# transaction_max: 16m
neo4j_network:
default_listen_address: 0.0.0.0
# default_advertised_address: localhost
bolt_enabled: "true"
# bolt_tls_level: DISABLED
bolt_listen_address: "{{ neo4j_bolt_port }}"
# bolt_advertised_address: "{{ neo4j_bolt_port }}"
http_enabled: "true"
http_listen_address: "{{ neo4j_http_port }}"
# http_advertised_address: "{{ neo4j_http_port }}"
https_enabled: "false"
# https_listen_address: 7473
# https_advertised_address: 7473
# threads_worker_count:
# neo4j_logging:
# http_enabled: "true"
# gc_enabled: "true"
# gc_options: -Xlog:gc*,safepoint,age*=trace
# gc_rotation_keep_number: 5
# gc_rotation_size: 20m
neo4j_miscellaneous:
tx_log_rotation_retention_policy: 2 days 2G
neo4j_jvm:
jvm_additional:
- -XX:+UseG1GC
- -XX:-OmitStackTraceInFastThrow
- -XX:+AlwaysPreTouch
- -XX:+UnlockExperimentalVMOptions
- -XX:+TrustFinalNonStaticFields
- -XX:+DisableExplicitGC
- -Djdk.nio.maxCachedBufferSize=1024
- -Dio.netty.tryReflectionSetAccessible=true
# - -XX:+ExitOnOutOfMemoryError
- -Djdk.tls.ephemeralDHKeySize=2048
- -Djdk.tls.rejectClientInitiatedRenegotiation=true
# - agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
# - -Djdk.serialFilter=java.**;org.neo4j.**;com.neo4j.**;com.hazelcast.**;net.sf.ehcache.Element;com.sun.proxy.*;org.openjdk.jmh.**;!*
- -XX:FlightRecorderOptions=stackdepth=256
- -XX:+UnlockDiagnosticVMOptions
- -XX:+DebugNonSafepoints
- --add-opens=java.base/java.nio=ALL-UNNAMED
- --add-opens=java.base/java.io=ALL-UNNAMED
- --add-opens=java.base/sun.nio.ch=ALL-UNNAMED
# - --add-modules=jdk.incubator.vector
- -Dlog4j2.disable.jmx=true
# - -XX:MaxMetaspaceSize=1024m
# - -XX:ReservedCodeCacheSize=512m
# - -XX:-DontCompileHugeMethods
# neo4j_custom_jvm:
# dbms.tx_state.max_off_heap_memory: 512m
neo4j_login_user:
name: admin
password: admin