Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print an error message if neo4j is already running #362

Open
wants to merge 581 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
581 commits
Select commit Hold shift + click to select a range
817d59d
patched 3.5 changes to other docker entrypoints
jennyowen Dec 4, 2019
110bc9c
ignore upgrade test in 4.0 until I can close the old version containe…
jennyowen Dec 4, 2019
9dc76dd
fixed annoying stderr warnings for 4.0
jennyowen Dec 4, 2019
6197aa3
patched 4.0 fixes to 4.1
jennyowen Dec 4, 2019
d8f74ae
Replaced curl with wget in the entryoint
Dec 10, 2019
b7dad0f
Merge branch 'master' into fix-curl-vulnerability
Dec 10, 2019
e50093a
Final touch of replacing curl
Dec 10, 2019
e35ddb8
Merge pull request #216 from neo4j/fix-curl-vulnerability
bfeshti Dec 10, 2019
de6d73a
add seperate build targets for community and enterprise
Dec 10, 2019
8903096
add neo4j community bintray repository to pom so that neo4j java depe…
Dec 10, 2019
a9e4153
allow setting an env var to skip the plugin test if it causes problems
Dec 10, 2019
c75b2b2
Merge pull request #206 from eastlondoner/run-plugins-tests
eastlondoner Dec 11, 2019
8aac9d0
add the ability to easily run a particular junit test or tests matchi…
Dec 11, 2019
05e39e8
tidying up java test code
Dec 11, 2019
946059d
apply default configurations for plugins when installing a plugin (if…
Dec 11, 2019
a5fd50a
Improve handling of NEO4J_ config setting env variables
Dec 12, 2019
b5a0164
Merge pull request #217 from eastlondoner/configure-plugins-automatic…
eastlondoner Dec 12, 2019
ce9a7e9
use the latest neo4j driver
Dec 11, 2019
1905283
Merge pull request #220 from eastlondoner/tidying
eastlondoner Dec 12, 2019
53076ab
Merge pull request #218 from eastlondoner/make-individual-test
eastlondoner Dec 12, 2019
deed771
Merge pull request #219 from eastlondoner/use-latest-neo4j-driver
eastlondoner Dec 12, 2019
96797c6
Merge pull request #221 from eastlondoner/improve-config-handling
eastlondoner Dec 12, 2019
707b9cb
unset NEO4J_AUTH was setting no password rather than default password…
jennyowen Jan 22, 2020
53ba5c5
Update neo4jlabs-plugins.json
jbarrasa Jan 30, 2020
b192927
Update neo4jlabs-plugins.json
jbarrasa Feb 4, 2020
5ac55f4
Merge pull request #227 from jbarrasa/master
eastlondoner Feb 4, 2020
a9c12d5
updated test dependencies in pom
jennyowen Mar 2, 2020
47075e1
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Mar 2, 2020
05ec38e
Revert "updated test dependencies in pom"
jennyowen Mar 2, 2020
9e86faa
updated pom dependendies
jennyowen Mar 3, 2020
ddcda66
removed udc.source from 4.0.x
Mar 4, 2020
ce5cb12
Fixed a typo
Mar 4, 2020
cf4063d
Moved assumption on top of the test
Mar 5, 2020
7e6d4b6
Merge pull request #234 from neo4j/Remove_udc.source_from_4.0.x
bfeshti Mar 5, 2020
8714fbc
removed user=root flag from chmod of home folder
jennyowen Mar 9, 2020
f8783c5
Merge branch 'master' into confpermissions
jennyowen Mar 9, 2020
27ddc04
added link to Neo4j Community
jennyowen Mar 16, 2020
057ecf5
updated support guidance on README
jennyowen Mar 16, 2020
8eb77c9
changed listen address overrides because they seem unnecessary and ma…
jennyowen Mar 25, 2020
3dcdf60
patched changes to 4.0 conf overrides to 4.1
jennyowen Mar 25, 2020
28191a4
refactored code after review from hugo, patched changes back to 3.4.
jennyowen Apr 1, 2020
eba50a9
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Apr 1, 2020
20e64f4
fixed issue #243
jennyowen Apr 15, 2020
4edbfb1
adding graph-data-science to NEO4JLABS_PLUGINS
Apr 16, 2020
663161f
Merge pull request #245 from eastlondoner/gds-plugin
eastlondoner Apr 17, 2020
52c2c74
TestMounting was incorrectly passing some data mounting tests, fixed.
jennyowen May 6, 2020
baec1f1
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen May 6, 2020
d5c97b6
improved readwrite checks on mounted folders
jennyowen May 21, 2020
bdf86b5
copied new docker source files for 4.2
jennyowen Jun 2, 2020
b0acb4f
moved set password command to after configuration to fix a bug in aura
jennyowen Jun 3, 2020
4c002cf
explicitly set neo4j uid and gid to 7474
jennyowen Jun 9, 2020
03bc788
Revert "explicitly set neo4j uid and gid to 7474"
jennyowen Jun 15, 2020
b65ad72
Revert "Revert "explicitly set neo4j uid and gid to 7474""
jennyowen Jun 16, 2020
994bf19
started test for database dump
jennyowen Mar 12, 2020
b09dd44
made tests that mount 2 or more folders keep the temp folders togethe…
jennyowen Mar 12, 2020
3d75707
added some notes to dump load test
jennyowen Mar 13, 2020
9e5927a
added host FS operation to create test folder under TEST_TMP_FOLDER w…
jennyowen Jun 16, 2020
3f8cc0a
removed dump and load test
jennyowen Jun 16, 2020
3d059c5
Merge branch 'hardcode-uid-gid'
jennyowen Jun 18, 2020
fb989d6
fixed authentication bug in 4.1
jennyowen Jun 26, 2020
c1d4889
fixed authentication bug in 4.1
jennyowen Jun 26, 2020
981c878
refactored make files to create arm64 build
jennyowen Jul 7, 2020
d9aefd7
patched Dockerfile changes to 4.1 and 4.2
jennyowen Jul 8, 2020
fe410ec
Merge branch 'arm-support'
jennyowen Jul 8, 2020
6f5d362
added back packaging make targets to copy release image to output folder
jennyowen Jul 8, 2020
94ed955
added readme section about arm64 images
jennyowen Jul 16, 2020
cc64a60
Update README.md
jennyowen Jul 16, 2020
e3e06a8
fixed package-arm make target
jennyowen Jul 20, 2020
c364cc2
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Jul 20, 2020
04d5df6
proper tagging of packages arm64 build
jennyowen Jul 21, 2020
19667f3
added test for mounting named volume
jennyowen Jul 22, 2020
15355fb
refactored named volume code
jennyowen Jul 23, 2020
896ac82
NamedVolume didn't work if you mounted 2 volumes, it only mounts the …
jennyowen Jul 28, 2020
28a1fbf
added more upgrade tests and mounting tests for named volumes
jennyowen Jul 30, 2020
618ea23
patched docker entrypoint fixes to 4.1 and 4.2
jennyowen Jul 30, 2020
41393ff
patched docker entrypoint fixes to 4.1 and 4.2
jennyowen Jul 30, 2020
770e297
Merge branch 'namedvolumes' of github.com:neo4j/docker-neo4j into nam…
jennyowen Jul 30, 2020
b5f5106
patched permissions checks to 3.5 docker entrypoint
jennyowen Jul 30, 2020
f431f75
fixed patching error in entrypoint scripts
jennyowen Aug 6, 2020
72d5f72
now chown neo4j.conf
jennyowen Sep 15, 2020
e7aba0e
patched neo4j.conf ownership change to 4.0 and 4.2
jennyowen Sep 15, 2020
638e560
changed startup check strategy to try and fix flakiness in configurat…
jennyowen Oct 15, 2020
7afa379
fixed licensing test
jennyowen Oct 16, 2020
9ae6fe0
enabled extended configuration setting and added basic unit tests
jennyowen Oct 23, 2020
afd988a
changed extended conf test to use setting in community and enterprise
jennyowen Oct 23, 2020
0ff5625
created new docker source for 4.3
jennyowen Oct 26, 2020
4e826ad
Relaxed expectation on config log print
Roxling Oct 29, 2020
20792cf
Merge pull request #279 from Roxling/relaxed-config-log
Roxling Oct 29, 2020
b202339
bump testcontainers version
Dec 14, 2020
5ec4a6b
Merge pull request #282 from eastlondoner/update-test-containers
eastlondoner Dec 14, 2020
74fbfe2
add Bloom plugin
GlacialBoy Jan 18, 2021
30302c0
add Bloom plugin
GlacialBoy Jan 18, 2021
3d42514
check read permission for licenses folder
GlacialBoy Jan 18, 2021
49fe2ad
Merge pull request #283 from neo4j/cla/addbloomplugin
GlacialBoy Jan 19, 2021
4148271
fixed ARM64 build script
jennyowen Feb 8, 2021
1d29325
dbms.routing.advertised_address default added for 4.3
jennyowen Feb 5, 2021
771e700
Merge branch 'new-default-confs'
jennyowen Feb 9, 2021
b2b7720
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Feb 9, 2021
17e6c7e
added instructions for building arm images
jennyowen Feb 18, 2021
8fb9a8d
removed old unused repo from pom
jennyowen Apr 27, 2021
5877dcb
add --expand-commands flag to neo4j-admin commands (#294)
eastlondoner May 20, 2021
315b333
temporarily revert tests for command expansion bugs because those bug…
eastlondoner May 20, 2021
340f758
added new 4.4 folder
glindroth May 24, 2021
b3f3a26
use new 'neo4j dry-run' mechanism to start neo4j process in 4.3 (#295)
eastlondoner Jun 2, 2021
e0c2d43
Revert "use new 'neo4j dry-run' mechanism to start neo4j process in 4…
glindroth Jun 3, 2021
a518e2d
Revert "Revert "use new 'neo4j dry-run' mechanism to start neo4j proc…
glindroth Jun 4, 2021
b774b69
updated 4.2 to stop overwriting enterprise configuration settings
jennyowen Jun 9, 2021
a3f89af
patched 4.2 entrypoint changes to other branches
jennyowen Jun 9, 2021
a5f3d5b
updated 4.4 entrypoint to have latest 4.3 changes
jennyowen Jun 9, 2021
6ff1612
patched 3.5 entrypoint to fix configuration overrides. Updated licens…
jennyowen Jun 9, 2021
7986a74
fixed conf test failure in 4.3+
jennyowen Jun 9, 2021
8170386
added apoc-core
renetapopova Jul 9, 2021
f9b6989
fix
renetapopova Jul 9, 2021
468b450
defined install plugin from location
renetapopova Jul 9, 2021
abe0989
reworked my PR
renetapopova Jul 13, 2021
57630ba
fixes the json
renetapopova Jul 13, 2021
7318b01
fixed the unbound parameter
renetapopova Jul 13, 2021
1f085d1
fixed the location in json
renetapopova Jul 13, 2021
f2eed34
another fix in json
renetapopova Jul 13, 2021
e8cb7cb
test bundled plugins
Jul 19, 2021
cf342b2
fix bash string check
Jul 19, 2021
cb00f07
tweak bash
Jul 19, 2021
b8c827c
what I should have done
Jul 19, 2021
be421c1
add debug output to test
Jul 19, 2021
cd24506
apoc versioning not as expected
Jul 19, 2021
daad125
Merge pull request #302 from renetapopova/apoc-core
renetapopova Jul 20, 2021
857a388
added makefile target for testing arm images
jennyowen Sep 13, 2021
f088026
updated makefile to tag arm images with `neo4j` rather than experimen…
jennyowen Sep 17, 2021
66b8bec
fixed race condition in extended conf test
jennyowen Sep 20, 2021
e5c2e8f
new make targets for arm releasing
jennyowen Sep 20, 2021
86d6b6e
Merge branch 'arm-support'
jennyowen Sep 20, 2021
207ff0a
updated TestContainers dependencies to get ARM support
jennyowen Sep 21, 2021
2041181
Make targets for neo4j-admin image
jennyowen Oct 19, 2021
ef47c5a
refactored test folders
jennyowen Oct 19, 2021
05f88fd
fix: upgrade org.slf4j:slf4j-api from 1.7.30 to 1.7.32
snyk-bot Oct 20, 2021
c7296af
fix: upgrade org.slf4j:slf4j-log4j12 from 1.7.30 to 1.7.32
snyk-bot Oct 20, 2021
b8612b8
Merge pull request #308 from neo4j/snyk-upgrade-87d83deb096cad2c92e72…
jennyowen Oct 20, 2021
115d757
Merge pull request #309 from neo4j/snyk-upgrade-4429ab96f6cde5176882e…
jennyowen Oct 20, 2021
8642791
some initial tests for neo4j-admin image
jennyowen Oct 21, 2021
e5de058
dump load tests for non-default user
jennyowen Oct 21, 2021
1d48def
authetication and multiuser tests for dump/load
jennyowen Oct 21, 2021
daf16d9
backup and restore test, refactored database IO helper
jennyowen Oct 22, 2021
e30f423
ensure admin image doesn't run neo4j server
jennyowen Oct 22, 2021
c647d02
copied neo4j-admin source to other neo4j versions
jennyowen Oct 22, 2021
9c58288
added mvn test parameters for neo4j-admin image
jennyowen Oct 22, 2021
ac7145b
database io refactors broke upgrade tests, fixed
jennyowen Oct 22, 2021
f168f61
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Oct 22, 2021
5fbb6d0
fix: upgrade org.slf4j:slf4j-api from 1.7.30 to 1.7.32
snyk-bot Oct 20, 2021
c00b941
fix: upgrade org.slf4j:slf4j-log4j12 from 1.7.30 to 1.7.32
snyk-bot Oct 20, 2021
0d0a1d6
added maven options to make test targets. Deleted unused HA test
jennyowen Oct 27, 2021
81a2edb
added new source for 5.0 branch
jennyowen Nov 1, 2021
8f0321f
teardown method to delete mount folders after unit test
jennyowen Nov 3, 2021
f6a6d8b
Merge branch 'betterTeardown'
jennyowen Nov 3, 2021
cb3f98a
testDumpLoad was running before 4.4.0 for some reason, hopefully fixed
jennyowen Nov 4, 2021
fcfcf10
Revert "testDumpLoad was running before 4.4.0 for some reason, hopefu…
jennyowen Nov 4, 2021
e241b4c
Revert "Merge branch 'betterTeardown'"
jennyowen Nov 4, 2021
d9eb296
fixed broken default_listen_address config in 3.5
jennyowen Nov 8, 2021
aa2002d
fixed typo
jennyowen Nov 8, 2021
79985e3
Change pagecache size debug log output assertion due to type change
tinwelint Nov 19, 2021
7f4dcf5
Temporary disable upgrade tests since upgrade is under update for 5.0…
MishaDemianenko Nov 19, 2021
bdf9a9e
Merge pull request #317 from MishaDemianenko/temp-disable-upgrade
MishaDemianenko Nov 19, 2021
34cd62c
Merge pull request #316 from neo4j/page-cache-mem-type-change
tinwelint Nov 22, 2021
7b86c36
Add podman how to for systems that lack docker support
MishaDemianenko Dec 1, 2021
530a6ab
Merge pull request #319 from MishaDemianenko/5.0-podman-howto
MishaDemianenko Dec 2, 2021
5c75539
creating releasable out folder for admin image
jennyowen Dec 2, 2021
e68c297
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Dec 2, 2021
85a9baa
Temporary disable upgrade tests since upgrade is under update for 5.0…
MishaDemianenko Nov 19, 2021
d2ad9f2
Change pagecache size debug log output assertion due to type change
tinwelint Nov 19, 2021
9b93f75
Add podman how to for systems that lack docker support
MishaDemianenko Dec 1, 2021
8a8c4dc
makefiles now compliant with docker requirements for arm images
jennyowen Dec 3, 2021
9e86b73
makefiles now compliant with docker requirements for arm images
jennyowen Dec 3, 2021
d71738a
Merge branch 'fix-arm-dockerfiles' of github.com:neo4j/docker-neo4j i…
jennyowen Dec 3, 2021
ed5e620
in Dockerfiles combined both RUN commands to one for 4.4 and 5.0
jennyowen Dec 5, 2021
d711d2d
install tini through apt rather htan direct from github
jennyowen Dec 8, 2021
cb52cf8
Revert "install tini through apt rather htan direct from github"
glindroth Dec 16, 2021
9e12322
dump config can now write to conf folder even when running as default…
jennyowen Jan 6, 2022
b9fc888
patched source changes to 4.1 4.2 4.3 and 5.0
jennyowen Jan 6, 2022
13605d5
test to ensure dumped file has correct user when not run as root
jennyowen Jan 6, 2022
6afa0af
Revert "Revert "install tini through apt rather htan direct from gith…
jennyowen Jan 10, 2022
1fb7597
fixed tini install in versions 4.3 and earlier
jennyowen Jan 10, 2022
b058ada
add semantic version comparison
GlacialBoy Jan 11, 2022
3a2061e
fixed typo in 3.5 dockerfile
jennyowen Jan 12, 2022
51cc80d
fixed dump-config permissions for 3.5
jennyowen Jan 14, 2022
1272e67
Merge pull request #329 from neo4j/better-tini
jennyowen Jan 21, 2022
5e9bb21
add semantic version comparison
GlacialBoy Jan 11, 2022
8489c00
semver feature is working in 4.4
jennyowen Jan 17, 2022
ffe2799
added test for semantic versioning in neo4jlabs_plugins feature
jennyowen Jan 19, 2022
cd340c9
added semantic version plugin matching tests
jennyowen Jan 20, 2022
abcd3b1
created common source folder so I only need to maintain one copy of s…
jennyowen Jan 21, 2022
62a7bcc
fixed merge error
jennyowen Jan 21, 2022
c9de29a
merging claudio's original pr
jennyowen Jan 21, 2022
24241ad
patched 4.4 changes to other branches
jennyowen Jan 21, 2022
5af9d5d
fixed java syntax
jennyowen Jan 21, 2022
c046055
attempt to fix intermittent fail of backup-restore test
jennyowen Jan 26, 2022
550cb7d
corrected failing secure-mode test
jennyowen Jan 26, 2022
95963b7
patched entrypoint fix to all other neo4j versions
jennyowen Jan 26, 2022
078e445
plugin tests now use standard temp directory rather than somewhere on…
jennyowen Jan 27, 2022
5bc5417
ignoring plugin tests on arm machines due to possible testcontainersbug
jennyowen Jan 28, 2022
87c890c
Dockerfile template was being released into packages, fixed
jennyowen Feb 10, 2022
d8ba7b9
extra docker-entrypoint was being added to packages
jennyowen Feb 10, 2022
e114e20
package command will package neo4j-admin image too
jennyowen Feb 10, 2022
82300af
renamed /backup to /backups for consistency with existing documentation
jennyowen Feb 23, 2022
0c14079
replace deprecated dbms.procedures() with SHOW PROCEDURES (#336)
HannesSandberg Mar 4, 2022
5a653be
made /docker-entrypoint.sh link to newer /startup/docker-entrypoint.s…
jennyowen Mar 4, 2022
efe2631
Merge branch 'softlink-entrypoint'
jennyowen Mar 4, 2022
cc37970
Change to URLs for the GDS distribution
knutwalker Mar 22, 2022
6467f76
Merge pull request #340 from neo4j/new-gds-distribution-url
knutwalker Mar 23, 2022
ffbc50a
removed bledi from bug report template
jennyowen Apr 12, 2022
95d4194
Move 'causal_clustering` settings into 'cluster' namespace.
MishaDemianenko Apr 21, 2022
182c870
Merge pull request #343 from MishaDemianenko/5.0-cluster-settings
MishaDemianenko Apr 22, 2022
b226792
added test for extra dbms metrics setting in community
jennyowen Apr 25, 2022
e31c451
patched 5.0 changes to earlier releases
jennyowen Apr 25, 2022
18bd613
improved dump-config handling in conf tests
jennyowen Apr 25, 2022
4612dcb
Adapt to new neo4j-admin commands layout
MishaDemianenko May 12, 2022
135f8b7
separated admin tests into 4.4 and later
jennyowen May 16, 2022
f07ec65
Merge pull request #346 from MishaDemianenko/5.0-admin-changes
MishaDemianenko May 16, 2022
3be111e
improved docker development readme
jennyowen May 23, 2022
fbe9428
Adapt tests to new 5.0 memory settings names
MishaDemianenko May 26, 2022
9f1f2a6
Merge pull request #347 from MishaDemianenko/5.0-memory-settings-changes
MishaDemianenko May 27, 2022
67f8272
Cluster settings renames
gfx54b Jun 2, 2022
8eec577
Merge pull request #348 from gfx54b/cluster-settings-rename
glindroth Jun 3, 2022
c0174f9
added test to check that dollars in a configuration setting do not pr…
jennyowen Jun 13, 2022
1d3ce42
made it a little easier to check a config value from inside a running db
jennyowen Jun 13, 2022
17c0acc
patched config escaping fix to 4.4 and 5.0
jennyowen Jun 13, 2022
779bcdc
fixed configuration name changes for 4.4, tests still broken for 5.0
jennyowen Jun 14, 2022
448549a
updated configurations test to check that docker default configuratio…
jennyowen Jun 16, 2022
0bac885
refactored configuration versioning
jennyowen Jun 16, 2022
eee9655
fixed compile problem for java8
jennyowen Jun 17, 2022
50d74be
apparently tx_log is already set in community so cannot be overridden…
jennyowen Jun 17, 2022
76e4c92
added 3.5 config for default listen address
jennyowen Jun 17, 2022
b0e69b5
replaced gosu with runuser in 4.4 added new mount ownership test
jennyowen Jun 20, 2022
59ae6f3
removed gosu from 4.4 Dockerfiles and neo4j-admin entrypoint
jennyowen Jun 20, 2022
f7f1acf
patched 4.4 changes to other branches
jennyowen Jun 20, 2022
fdf5297
removing gosu stopped clean shutdown on SIGTERM in the tests, this sh…
jennyowen Jun 22, 2022
a9bf177
renamed NEO4JLABS_PLUGIN in 5.0
jennyowen Jun 23, 2022
105387c
NEO4J_PLUGINS loads from local products folder instead of downloading…
jennyowen Jun 27, 2022
8ed6c22
added NEO4J_PLUGINS behaviour for CE where plugins aren't bundled in …
jennyowen Jun 29, 2022
6a187f2
added bundled apoc-core plugin loading for 4.3
jennyowen Jun 29, 2022
e622bfc
updated java base image because openjdk is no longer supported
jennyowen Jul 5, 2022
fa4d7f2
added gosu back in 4.4
jennyowen Jul 11, 2022
37e399d
patched gosu changes to 5.0, 4.3 and 3.5
jennyowen Jul 11, 2022
b51e5a4
Refine startup criteria for 5.0-Enterprise containers
gfx54b Jul 12, 2022
661ec42
Merge pull request #356 from gfx54b/async-default-db
jennyowen Jul 12, 2022
e3ed8c1
increased stop timeout in tests
jennyowen Jul 13, 2022
ff8ab0f
using temurin jre not jdk in Dockerfiles now
jennyowen Jul 27, 2022
94347a4
updated 5.0 images to use temurin JRE as base not JDK
jennyowen Jul 27, 2022
0943c9c
Merge branch 'jennyowen/jre-not-jdk-50'
jennyowen Jul 29, 2022
e5a7f5f
Revert "Merge branch 'jennyowen/jre-not-jdk-50'"
jennyowen Jul 29, 2022
0c09185
Revert "using temurin jre not jdk in Dockerfiles now"
jennyowen Jul 29, 2022
61b4601
print an error message if neo4j is already running
xavieryao Aug 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: jennyowen

---

## Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests.
If you have questions on how to use Neo4j, please ask on [Neo4j Community](https://community.neo4j.com/) or [StackOverflow](http://stackoverflow.com/questions/tagged/neo4j) instead of creating an issue here.

To help us understand your issue, please specify important details, primarily:

- **Steps to reproduce**. *Not including reproduction steps will mean your bug will take considerably longer to investigate and fix. Please don't skip this*.
- Expected behaviour
- Actual behaviour
- Neo4j image tag being used, eg `neo4j:latest`, `neo4j:enterprise-3.5` etc
- The output of the `docker version` command
- Operating system: (for example Windows 95/Ubuntu 16.04)

Additionally, include (as appropriate) error messages, log-files, stacktraces, and other debug output.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@
/out/
/in/
/devenv.local
/local-mounts/
/target/

# simlinks to dev scripts in https://github.com/neo-technology/teamcity-witchcraft
download_tool.py
docker_tests_get_installers.py
__pycache__/
150 changes: 136 additions & 14 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,148 @@ other Linuxes. Pull requests welcomed for other platforms.
## OSX only

1. install GNU Make (>=4.0)
1. install the Docker Toolbox
1. install the Docker Toolbox. See: https://docs.docker.com/install/

## Debian
## Linux

1. install `uuid-runtime`
1. install the Docker Toolbox. See https://docs.docker.com/install/

## All platforms
# Building the Image

1. download the Neo4j Community unix tarball
1. copy `devenv.local.template` as `devenv.local`; fill in the
directory to which you have downloaded the tarball and its version
The build will create two images (one for Enterprise and one for Community) for a single version of Neo4j.

# Build process
The make script will automatically download the source files needed to build the images.
You just need to specify the **full** Neo4j version including major, minor and patch numbers. For example:

## OSX only
```bash
NEO4JVERSION=3.5.11 make clean build
```

If you want to build an alpha/beta release, this will still work:

```bash
NEO4JVERSION=3.5.0-alpha01 make clean build
```

When the make script is complete, the image name will be written to file in `tmp/.image-id-community` and `tmp/.image-id-enterprise`:

```bash
$ cat tmp/.image-id-community
test/19564

$ cat tmp/.image-id-enterprise
test/13909
```

## Building ARM64 based images

From Neo4j 4.4.0 onwards, the Neo4j image should be buildable on any architecture using the same build commands as [Building the Image](#building-the-image).

For earlier versions of Neo4j, you may need to set the variable `NEO4J_BASE_IMAGE` to your architecture specific version of `openjdk:11-jdk-slim` (or `openjdk:8-jdk-slim` for versions before 4.0.0).

Like with `amd64` images, you must still specify the **full** Neo4j version including major, minor and patch numbers. For example:

```bash
NEO4J_BASE_IMAGE=arm64v8/openjdk:11-jdk-slim
NEO4JVERSION=4.3.7 make clean build
```


## If the Neo4j Version is not Publicly Available

The make script cannot automatically download unreleased source files, so you need to manually download them before building the images.

1. Assuming you cloned this repository to `$NEO4J_DOCKER_ROOT`,
download the community and enterprise unix tar.gz files and copy them to `$NEO4J_DOCKER_ROOT/in`.
1. Run the make script setting `NEO4JVERSION` to the version number in the files downloaded into the `in/` folder.

For example:

```bash
$ cd $NEO4J_DOCKER_ROOT
$ ls $NEO4J_DOCKER_ROOT/in
neo4j-community-4.0.0-alpha05-unix.tar.gz neo4j-enterprise-4.0.0-alpha05-unix.tar.gz

$ NEO4JVERSION=4.0.0-alpha05 make clean build
```

# Running the Tests

The tests are written in java, and require Maven plus jdk 11 for Neo4j version 4.0 onwards or jdk 8 for earlier Neo4j versions.

The tests require some information about the image before they can test it.
These can be passed as an environment variable or a command line parameter when invoking maven:


| Env Variable | Maven parameter | Description |
|-----------------|-----------------|------------------------------------------------------------|
| `NEO4JVERSION` | `-Dversion` | the Neo4j version of the image |
| `NEO4J_IMAGE` | `-Dimage` | the tag of the image to test |
| `NEO4J_EDITION` | `-Dedition` | Either `community` or `enterprise` depending on the image. |

<!-- prettified with http://www.tablesgenerator.com/markdown_tables -->


### Running with podman

Tests in this module are using testcontainers. The framework expects you to have docker available on your system.
And there are some issues like described here: https://github.com/testcontainers/testcontainers-java/issues/2088

TLDR on what you need to do to be able to use podman:

1. Make sure you have podman service running. For example: ```podman system service --time=0 unix:///tmp/podman.sock```

2. Add those environment variables:
```
DOCKER_HOST=unix:///tmp/podman.sock;
TESTCONTAINERS_RYUK_DISABLED=true;
TESTCONTAINERS_CHECKS_DISABLE=true
```

## Using Maven
The Makefile can run the entire test suite.
1. Make sure `java --version` is java 11 or java 8 as necessary.
2. `NEO4JVERSION=<VERSION> make test` This is a make target that will run these commands:
```bash
mvn test -Dimage=$(cat tmp/.image-id-community) -Dedition=community -Dversion=${NEO4JVERSION}
mvn test -Dimage=$(cat tmp/.image-id-enterprise) -Dedition=enterprise -Dversion=${NEO4JVERSION}
```

## In Intellij

1. Make sure the project SDK is java 17, 11 or 8 as necessary.
2. Edit the [pom.xml file](../master/pom.xml) to replace `${env.NEO4JVERSION}` with the `NEO4JVERSION` you used to build the image.
*(Yes this is terrible, and we need to think of an alternative to this)*.

For example:
```xml
<neo4j.version>${env.NEO4JVERSION}</neo4j.version>
```
becomes
```xml
<neo4j.version>4.0.0-alpha05</neo4j.version>
```
3. Install the [EnvFile](https://plugins.jetbrains.com/plugin/7861-envfile) Intellij plugin.
5. Under Run Configurations edit the Template JUnit configuration:
1. Select the "EnvFile" tab
2. Make sure "Enable EnvFile" is checked.
3. Click the `+` then click to add a `.env` file.
4. In the file selection box select `./tmp/devenv-enterprise.env` or `./tmp/devenv-community.env` depending on which one you want to test. If you do not have the `./tmp` directory, build the docker image and it will be created.
5. Rebuilding the Neo4j image will regenerate the `.env` files, so you don't need to worry about keeping the environment up to date.


### If building an image from your local Neo4j repository

1. Clone the Neo4j github repository and checkout the branch you want.
2. Make sure `java --version` returns java 11 if you're building Neo4j 4.0+, or java 8 if building an earlier branch.
1. Run `mvn install` plus whatever maven build flags you like. This should install the latest neo4j jars into the maven cache.
1. Follow instructions for [running tests in Intellij](#in-intellij),
use the `NEO4JVERSION` that is in the pom file of your Neo4j repository clone.

### cannot find symbol `com.sun.security.auth.module.UnixSystem`

1. create a docker-machine VM
1. export the docker-machine environment for docker
This can happen if you switch from java 8 to java 11 and then try to rebuild the tests in Intellij.

## All platforms
Check that the `java.version` property in the [pom.xml file](../master/pom.xml) is set to 11 instead of 1.8.
DO NOT commit this set to 11 (yes this is a terrible solution).

1. `. devenv`
1. `make`
123 changes: 30 additions & 93 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,106 +1,43 @@
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
.SECONDEXPANSION:
.SECONDARY:
include make-common.mk

ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
NEO4J_BASE_IMAGE?="openjdk:11-jdk-slim"

ifndef NEO4J_VERSION
$(error NEO4J_VERSION is not set)
endif
# Use make test TESTS='<pattern>' to run specific tests
# e.g. `make test TESTS='TestCausalCluster'` or `make test TESTS='*Cluster*'`
# the value of variable is passed to the maven test property. For more info see https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
# by default this is empty which means all tests will be run
TESTS?=""

tarball = neo4j-$(1)-$(2)-unix.tar.gz
dist_site := http://dist.neo4j.org
series := $(shell echo "$(NEO4J_VERSION)" | sed -E 's/^([0-9]+\.[0-9]+)\..*/\1/')

all: out/enterprise/.sentinel out/community/.sentinel
all: test
.PHONY: all

test: test-community test-enterprise
test: test-enterprise test-community
.PHONY: test

out/%/.sentinel: tmp/image-%/.sentinel tmp/.tests-pass-%
> mkdir -p $(@D)
> cp -r $(<D)/* $(@D)
> touch $@

tmp/.tests-pass-%: tmp/.image-id-% $(shell find test -name 'test-*') $(shell find test -name '*.yml') $(shell find test -name '*.sh')
> mkdir -p $(@D)
> image_id=$$(cat $<)
> for test in $(filter test/test-%,$^); do
> echo "Running $${test}"
> "$${test}" "$${image_id}" "${series}" "$*"
> done
> touch $@

tmp/.image-id-%: tmp/local-context-%/.sentinel
> mkdir -p $(@D)
> image=test/$$RANDOM
> docker build --tag=$$image \
--build-arg="NEO4J_URI=file:///tmp/$(call tarball,$*,$(NEO4J_VERSION))" \
$(<D)
> echo -n $$image >$@

tmp/local-context-%/.sentinel: tmp/image-%/.sentinel in/$(call tarball,%,$(NEO4J_VERSION))
> rm -rf $(@D)
> mkdir -p $(@D)
> cp -r $(<D)/* $(@D)
> cp $(filter %.tar.gz,$^) $(@D)/local-package
> touch $@

tmp/image-%/.sentinel: src/$(series)/Dockerfile src/$(series)/docker-entrypoint.sh \
in/$(call tarball,%,$(NEO4J_VERSION))
> mkdir -p $(@D)
> cp $(filter %/docker-entrypoint.sh,$^) $(@D)/docker-entrypoint.sh
> sha=$$(shasum --algorithm=256 $(filter %.tar.gz,$^) | cut -d' ' -f1)
> <$(filter %/Dockerfile,$^) sed \
-e "s|%%NEO4J_SHA%%|$${sha}|" \
-e "s|%%NEO4J_TARBALL%%|$(call tarball,$*,$(NEO4J_VERSION))|" \
-e "s|%%NEO4J_EDITION%%|$*|" \
-e "s|%%NEO4J_DIST_SITE%%|$(dist_site)|" \
>$(@D)/Dockerfile
> mkdir -p $(@D)/local-package
> touch $(@D)/local-package/.sentinel
> touch $@
test-enterprise: build-enterprise
> mvn test -Dimage=$$(cat tmp/.image-id-enterprise) -Dadminimage=$$(cat tmp/.image-id-neo4j-admin-enterprise) -Dedition=enterprise -Dversion=$(NEO4JVERSION) -Dtest=$(TESTS)
.PHONY: test-enterprise

run = trapping-sigint \
docker run --publish 7474:7474 --publish 7687:7687 \
--env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
--env=NEO4J_AUTH=neo4j/foo --rm $$(cat $1)
build-enterprise: tmp/.image-id-enterprise
> @echo "Neo4j $(NEO4J_VERSION)-enterprise available as: $$(cat $<)"
build-community: tmp/.image-id-community
> @echo "Neo4j $(NEO4J_VERSION)-community available as: $$(cat $<)"
run-enterprise: tmp/.image-id-enterprise
> $(call run,$<)
run-community: tmp/.image-id-community
> $(call run,$<)
test-enterprise: tmp/.tests-pass-enterprise
test-community: tmp/.tests-pass-community
.PHONY: run-enterprise run-community build-enterprise build-community test-enterprise test-community
test-community: build-community
> mvn test -Dimage=$$(cat tmp/.image-id-community) -Dadminimage=$$(cat tmp/.image-id-neo4j-admin-community) -Dedition=community -Dversion=$(NEO4JVERSION) -Dtest=$(TESTS)
.PHONY: test-community

fetch_tarball = curl --fail --silent --show-error --location --remote-name \
$(dist_site)/$(call tarball,$(1),$(NEO4J_VERSION))

cache: in/neo4j-%-$(NEO4J_VERSION)-unix.tar.gz
.PHONY: cache

in/neo4j-community-$(NEO4J_VERSION)-unix.tar.gz:
> mkdir -p in
> cd in
> $(call fetch_tarball,community)
# create release images and loadable images
package: package-community package-enterprise
.PHONY: package

in/neo4j-enterprise-$(NEO4J_VERSION)-unix.tar.gz:
> mkdir -p in
> cd in
> $(call fetch_tarball,enterprise)
package-community: tmp/.image-id-community tmp/.image-id-neo4j-admin-community out/community/.sentinel out/neo4j-admin-community/.sentinel
> mkdir -p out
> docker tag $$(cat $<) neo4j:$(NEO4JVERSION)
> docker tag $$(cat tmp/.image-id-neo4j-admin-community) neo4j/neo4j-admin:$(NEO4JVERSION)
> docker save neo4j:$(NEO4JVERSION) > out/neo4j-community-$(NEO4JVERSION)-docker-loadable.tar
> docker save neo4j/neo4j-admin:$(NEO4JVERSION) > out/neo4j-admin-community-$(NEO4JVERSION)-docker-loadable.tar

clean:
> rm -rf tmp
> rm -rf out
.PHONY: clean
package-enterprise: tmp/.image-id-enterprise tmp/.image-id-neo4j-admin-enterprise out/enterprise/.sentinel out/neo4j-admin-enterprise/.sentinel
> mkdir -p out
> docker tag $$(cat $<) neo4j:$(NEO4JVERSION)-enterprise
> docker tag $$(cat tmp/.image-id-neo4j-admin-enterprise) neo4j/neo4j-admin:$(NEO4JVERSION)-enterprise
> docker save neo4j:$(NEO4JVERSION)-enterprise > out/neo4j-enterprise-$(NEO4JVERSION)-docker-loadable.tar
> docker save neo4j/neo4j-admin:$(NEO4JVERSION)-enterprise > out/neo4j-admin-enterprise-$(NEO4JVERSION)-docker-loadable.tar
Loading