Commit fb65bbdb authored by Bryan Fox's avatar Bryan Fox Committed by Tao Feng

Improve flexibility & user-friendliness of helm deployment (#209)

* Create ES initContainer to increase map count

ES >= 5 requires an mmap count of at least 262,144 (see
https://elk-docker.readthedocs.io/#prerequisites).

This approach is similar to that used by the official Helm chart.

* Make Neo4J memory configurable

* Update image versions to pick up bug fixes
parent 7606e3e4
...@@ -19,14 +19,23 @@ provider: aws ...@@ -19,14 +19,23 @@ provider: aws
dnsZone: teamname.company.com dnsZone: teamname.company.com
dockerhubImagePath: amundsendev dockerhubImagePath: amundsendev
searchServiceName: search searchServiceName: search
searchImageVersion: 1.4.0 searchImageVersion: 1.4.2
metadataServiceName: metadata metadataServiceName: metadata
metadataImageVersion: 1.1.1 metadataImageVersion: 1.1.5
frontEndServiceName: frontend frontEndServiceName: frontend
frontEndImageVersion: 1.0.9 frontEndImageVersion: 1.1.1
frontEndServicePort: 80 frontEndServicePort: 80
``` ```
You may want to override the default memory usage for Neo4J. In particular, if you're just test-driving a deployment and your node exits with status 137, you should set the usage to smaller values:
```
config:
dbms:
heap_initial_size: 2Gi
heap_max_size: 2Gi
pagecache_size: 2Gi
```
With this values file, you can then setup amundsen with these commands: With this values file, you can then setup amundsen with these commands:
``` ```
helm install templates/helm/neo4j --values impl/helm/dev/values.yaml helm install templates/helm/neo4j --values impl/helm/dev/values.yaml
......
...@@ -12,7 +12,7 @@ affinity: {} ...@@ -12,7 +12,7 @@ affinity: {}
tolerations: [] tolerations: []
searchServiceName: search searchServiceName: search
searchImageVersion: 1.4.0 searchImageVersion: 1.4.2
search: search:
replicas: 1 replicas: 1
resources: resources:
...@@ -27,7 +27,7 @@ search: ...@@ -27,7 +27,7 @@ search:
tolerations: [] tolerations: []
metadataServiceName: metadata metadataServiceName: metadata
metadataImageVersion: 1.1.1 metadataImageVersion: 1.1.5
metadata: metadata:
replicas: 1 replicas: 1
resources: resources:
...@@ -43,7 +43,7 @@ metadata: ...@@ -43,7 +43,7 @@ metadata:
tolerations: [] tolerations: []
frontEndServiceName: frontend frontEndServiceName: frontend
frontEndImageVersion: 1.0.9 frontEndImageVersion: 1.1.1
frontEndServicePort: 80 frontEndServicePort: 80
frontEnd: frontEnd:
replicas: 1 replicas: 1
......
...@@ -24,11 +24,17 @@ spec: ...@@ -24,11 +24,17 @@ spec:
tolerations: tolerations:
{{ toYaml . | indent 8 }} {{ toYaml . | indent 8 }}
{{- end }} {{- end }}
initContainers:
- name: init-map-count
image: busybox:1.31
securityContext:
privileged: true
command: ["sysctl", "-w", "vm.max_map_count={{ .Values.initContainer.vmMaxMapCount }}"]
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
image: {{ .Chart.Name }}:{{ .Chart.AppVersion }} image: {{ .Chart.Name }}:{{ .Chart.AppVersion }}
ports: ports:
- containerPort: 9200 - containerPort: 9200
{{- with .Values.resources }} {{- with .Values.resources }}
resources: resources:
{{ toYaml . | indent 10 }} {{ toYaml . | indent 10 }}
......
provider: aws provider: aws
# nodeSelector # nodeSelector
# affinity # affinity
# tolerations # tolerations
# resources # resources
# annotations # annotations
environment: staging environment: staging
dnsZone: teamname.company.com dnsZone: teamname.company.com
initContainer:
vmMaxMapCount: 262144
resources: resources:
limits: limits:
cpu: 2 cpu: 2
......
...@@ -21,11 +21,11 @@ data: ...@@ -21,11 +21,11 @@ data:
dbms.logs.query.enabled=true dbms.logs.query.enabled=true
dbms.logs.query.rotation.keep_number=7 dbms.logs.query.rotation.keep_number=7
dbms.logs.query.rotation.size=20m dbms.logs.query.rotation.size=20m
dbms.memory.heap.initial_size=23000m dbms.memory.heap.initial_size={{ .Values.config.dbms.heap_initial_size }}
dbms.memory.heap.max_size=23000m dbms.memory.heap.max_size={{ .Values.config.dbms.heap_max_size }}
dbms.memory.pagecache.size=26600m dbms.memory.pagecache.size={{ .Values.config.dbms.pagecache_size }}
dbms.security.allow_csv_import_from_file_urls=true dbms.security.allow_csv_import_from_file_urls=true
dbms.security.procedures.unrestricted=algo.*,apoc.* dbms.security.procedures.unrestricted=algo.*,apoc.*
dbms.windows_service_name=neo4j dbms.windows_service_name=neo4j
apoc.export.file.enabled=true apoc.export.file.enabled=true
apoc.import.file.enabled=true apoc.import.file.enabled=true
\ No newline at end of file
provider: aws provider: aws
# nodeSelector # nodeSelector
# affinity # affinity
# tolerations # tolerations
# resources # resources
# annotations # annotations
environment: staging environment: staging
dnsZone: teamname.company.com dnsZone: teamname.company.com
resources: resources:
...@@ -13,3 +13,8 @@ resources: ...@@ -13,3 +13,8 @@ resources:
requests: requests:
cpu: 1 cpu: 1
memory: 1Gi memory: 1Gi
config:
dbms:
heap_initial_size: 23000m
heap_max_size: 23000m
pagecache_size: 26600m
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment