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

Test upgrading from the latest published minor version #261

Open
wants to merge 397 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
397 commits
Select commit Hold shift + click to select a range
5c6ad08
Check groups when determining if a directory is writable
May 25, 2019
edef1e2
Merge pull request #169 from eastlondoner/fix-for-groups
jennyowen May 27, 2019
5e66363
fixed minor typos in docker-entrypoint.sh
jennyowen May 27, 2019
73770e2
patched 3.5 changes to 3.4 and 3.3
jennyowen May 27, 2019
febc011
adding back +x file permissions which got wiped when i patched entryp…
jennyowen May 27, 2019
2478a45
added extended group permission checks to 3.6 entrypoint
jennyowen May 27, 2019
5ec33f5
added extended group permission checks to 4.0 entrypoint
jennyowen May 27, 2019
55ab1c3
refactoring tests to use test-containers.
jennyowen May 31, 2019
8fcf613
test mounting /data as specified user
jennyowen May 31, 2019
fe237f5
minor refactoring of mounting tests
jennyowen Jun 3, 2019
a4f5821
added logs and data mounting tests
jennyowen Jun 3, 2019
77c310b
refactored folder creation and mounting utilities out of TestMounting…
jennyowen Jun 3, 2019
f75531f
moved utilities folder to more sensible location
jennyowen Jun 3, 2019
990d819
more refactoring of test code
jennyowen Jun 3, 2019
143c317
migrated 3.5 to debian slim base image
jennyowen Jun 3, 2019
710965a
patched 3.5 base image changes to 3.4 and 3.3
jennyowen Jun 3, 2019
e3da938
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Jun 4, 2019
5fcde3b
changed base image on 3.6 and 4.0 to openjdk with debian slim
jennyowen Jun 4, 2019
2345bf8
made diagnostic message on logs folder check better
jennyowen Jun 4, 2019
e1a7b76
added switch around file permission improvments
jennyowen Jun 4, 2019
c6c91ef
can now run java tests from makefile and/or maven
jennyowen Jun 4, 2019
03f94a1
deleted obsolete Makefile stuff. Refactored tests to use JUnit5 prope…
jennyowen Jun 4, 2019
e12275d
added secure permissions flag testing for mounted folders
jennyowen Jun 5, 2019
768b1a9
removed commented out code
jennyowen Jun 5, 2019
70b205c
Send warning about chowning folder to stdout.
Jun 10, 2019
7597e69
Merge pull request #17 from neo-technology/dev-jgrobbel-send-warning-…
jennyowen Jun 10, 2019
b4984d7
Send warning about chowning folder to stdout.
Jun 10, 2019
6bb6c0f
Merge pull request #173 from neo4j/rm-stderr-warning
jennyowen Jun 10, 2019
de8473b
added test for causal clustering
glindroth Jun 10, 2019
551a7cb
Merge branch 'test-refactor' of github.com:neo-technology/docker-neo4…
jennyowen Jun 10, 2019
586f6fb
removed stray files
jennyowen Jun 11, 2019
e79b56b
added tests for setting password
jennyowen Jun 12, 2019
73c39cc
added conf override test
jennyowen Jun 12, 2019
95db37d
fixed failing assertion in testNoUnexpectedErrors
jennyowen Jun 13, 2019
72ab89f
reverted to old way of testing causal clustering
glindroth Jun 13, 2019
d14b9cf
reordered find so that it doesnt give annoying warning
jennyowen Jun 13, 2019
5ccf92a
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Jun 13, 2019
164c121
improved clustering test - now there is remaining the issue that
glindroth Jun 13, 2019
e2e36a5
improvements of clustering test
glindroth Jun 18, 2019
645130a
readability checks instead of writability on /conf /ssl /plugins /imp…
jennyowen Jun 18, 2019
08409ea
worked on HA test
jennyowen Jun 20, 2019
94364bc
HA test now working
jennyowen Jun 24, 2019
89643ce
refactoring tests to use test-containers.
jennyowen May 31, 2019
828683f
test mounting /data as specified user
jennyowen May 31, 2019
76a9c3a
minor refactoring of mounting tests
jennyowen Jun 3, 2019
e9029f6
added logs and data mounting tests
jennyowen Jun 3, 2019
8a2b9f4
refactored folder creation and mounting utilities out of TestMounting…
jennyowen Jun 3, 2019
5df2e1c
moved utilities folder to more sensible location
jennyowen Jun 3, 2019
76ef046
more refactoring of test code
jennyowen Jun 3, 2019
f57c310
made diagnostic message on logs folder check better
jennyowen Jun 4, 2019
c002601
can now run java tests from makefile and/or maven
jennyowen Jun 4, 2019
7dc3c3c
deleted obsolete Makefile stuff. Refactored tests to use JUnit5 prope…
jennyowen Jun 4, 2019
4f6fe4a
added secure permissions flag testing for mounted folders
jennyowen Jun 5, 2019
3761061
added test for causal clustering
glindroth Jun 10, 2019
82e104a
added tests for setting password
jennyowen Jun 12, 2019
26f8c44
added conf override test
jennyowen Jun 12, 2019
4c2238b
fixed failing assertion in testNoUnexpectedErrors
jennyowen Jun 13, 2019
8c0753a
reverted to old way of testing causal clustering
glindroth Jun 13, 2019
79520b2
improved clustering test - now there is remaining the issue that
glindroth Jun 13, 2019
afaaca1
improvements of clustering test
glindroth Jun 18, 2019
b0bfe3f
worked on HA test
jennyowen Jun 20, 2019
841b416
HA test now working
jennyowen Jun 24, 2019
3e313a7
cleaned up pom a little
jennyowen Jun 24, 2019
798b224
Revert "removed stray files"
jennyowen Jun 24, 2019
4b9306c
merged latest 3.5 changes into 3.6 and 4.0
jennyowen Jun 24, 2019
9dfa53f
Merge branch 'master' of github.com:neo-technology/docker-neo4j into …
jennyowen Jun 25, 2019
168893d
omitting container_name parameter in clustering test
glindroth Jun 25, 2019
795a829
Mount tests for unwritable data and logs
jennyowen Jun 25, 2019
70c7375
merged with gustav's changes
jennyowen Jun 25, 2019
e244065
removed obsolete old tests
jennyowen Jun 25, 2019
08a848c
make unit tests close containers.
jennyowen Jun 26, 2019
7cc177d
fixing tests
Jun 26, 2019
5e04dc7
Merge pull request #177 from eastlondoner/test-fixes
glindroth Jun 26, 2019
3337967
some fixes to basic tests
jennyowen Jun 26, 2019
07a9a63
not sure why cypher-shell path test fails, attempt to fix 1
jennyowen Jun 26, 2019
c12b233
not sure why cypher-shell path test fails, attempt to fix 2
jennyowen Jun 26, 2019
3610caa
added support for installing plugins such as apoc at runtime
Jun 26, 2019
b29cf87
not sure why cypher-shell path test fails, attempt to fix 3
jennyowen Jun 27, 2019
822872d
Merge pull request #176 from eastlondoner/wget-apoc
eastlondoner Jun 27, 2019
44b094d
not sure why cypher-shell path test fails, attempt to fix 4
jennyowen Jun 27, 2019
9ec5dc1
trying to fix causal clustering test fail
jennyowen Jun 27, 2019
652047a
trying to fix causal clustering test fail 2
jennyowen Jun 27, 2019
5dd6de1
trying to fix causal clustering test fail 3
jennyowen Jun 27, 2019
ec4cbd2
Revert "added support for installing plugins such as apoc at runtime"
glindroth Jun 27, 2019
809a43d
trying to fix causal clustering test fail 4
jennyowen Jun 27, 2019
3ab310b
not sure why cypher-shell path test fails, attempt to fix 5
jennyowen Jun 27, 2019
529bcfc
trying to fix causal clustering test fail 5
jennyowen Jun 27, 2019
946e81e
not sure why cypher-shell path test fails, attempt to fix 6
jennyowen Jun 27, 2019
0a84252
not sure why cypher-shell path test fails, attempt to fix 7
jennyowen Jun 28, 2019
4449d2a
muting CC test so we can do merge
jennyowen Jun 28, 2019
a17f0a0
for some reason CC test was still running, muting all CC unit tests
jennyowen Jun 28, 2019
f345a97
replaced some junit4 with junit5
jennyowen Jun 28, 2019
de806f3
added back Makefile targets to create releasable package
jennyowen Jun 28, 2019
fd8a661
merged refactored tests
jennyowen Jun 28, 2019
baef582
removed stray files
jennyowen Jun 28, 2019
437ceaf
Remove apt cache based on Dockerfile Best practices https://docs.dock…
Jun 29, 2019
9749217
Merge pull request #179 from eastlondoner/andy/dockerfile-tweak
bfeshti Jul 1, 2019
806ac1e
Fixed the issue that doesnt set the max heap size correctly from the …
Jul 2, 2019
d4aa81f
Fixed the max heap size issue
Jul 2, 2019
b8c6ca1
Merge pull request #180 from neo4j/max-heapsize-fix
bfeshti Jul 2, 2019
f555223
Adding the ability to install neo4j labs plugins on container startup
Jul 5, 2019
c832a61
created a bug reporting template
jennyowen Jul 9, 2019
6236030
Revert "removed stray files"
jennyowen Jul 9, 2019
84c6811
added test for install neo4jlabs plugins at runtime
Jul 9, 2019
aef2eda
Merge pull request #181 from eastlondoner/andy/install-apoc-at-runtime
eastlondoner Jul 10, 2019
43ffbbd
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Jul 10, 2019
84425d9
Revert "Merge pull request #181 from eastlondoner/andy/install-apoc-a…
jennyowen Jul 11, 2019
9c2f856
packaging was tagging enterprise and community the same
jennyowen Jul 12, 2019
a996470
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Jul 12, 2019
1f9266e
Revert "packaging was tagging enterprise and community the same"
glindroth Jul 17, 2019
a42253b
packaging was tagging enterprise and community the same, now with no …
jennyowen Jul 22, 2019
07f9834
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Jul 22, 2019
ab8b51d
patched 3.5 heap overide fix to 3.6 and 4.0
jennyowen Jul 22, 2019
a2ac34f
removed redundant 'build' folder
jennyowen Aug 1, 2019
57c65a8
Turns off driver encryption in tests.
Aug 5, 2019
cbde9af
Merge branch 'master' of github.com:neo-technology/docker-neo4j
jennyowen Aug 5, 2019
9efb81f
fixed bug in license checking code
jennyowen Aug 5, 2019
1e2ae8e
made test of license acceptance more thorough
jennyowen Aug 6, 2019
e181228
Fixed ovverriding of custom configurations by docker-entrypoint
Aug 6, 2019
47fb7b6
Added missing max heap conf line
Aug 6, 2019
0e30677
added 4.0 docker scripts to public docker repo.
jennyowen Aug 7, 2019
fc8432c
license acceptance test failed because the container kill command was…
jennyowen Aug 7, 2019
33e2268
Merge pull request #187 from jennyowen/private-merge
jennyowen Aug 7, 2019
fa72c38
can now set non-root user via envoriment variable.
jennyowen Aug 9, 2019
a4d66eb
Switch to using the latest neo4j driver (beta)
Aug 25, 2019
7d7f92e
Revert "Revert "Merge pull request #181 from eastlondoner/andy/instal…
Aug 8, 2019
8e0902a
bring TestPluginInstallation.java up to date with changes to SetConta…
Aug 9, 2019
962557a
adding install-plugins-at-runtime to 4.0 code
Aug 25, 2019
9713b2a
Tweaks to pom and makefile so neo4j version env var name stuff works …
Aug 25, 2019
2c5abc5
Merge pull request #191 from eastlondoner/andy/use-latest-neo-driver
eastlondoner Aug 26, 2019
5fdff60
Merge pull request #188 from eastlondoner/andy/install-apoc-at-runtime
jennyowen Aug 26, 2019
01259fd
Fixed ovverriding of custom configurations by docker-entrypoint
Aug 6, 2019
0a55fc1
Fixes based on the suggestions from the last review
Sep 5, 2019
27eff35
Resolved merging conflicts
Sep 5, 2019
82afb5a
Small fixes based on suggestions from the review
Sep 6, 2019
2ac6306
Edited the entrypoint to pass configs based on Edition
Sep 6, 2019
45e179d
Reverted changes made to pass the configs based on Edition to include…
Sep 6, 2019
030fac1
Merge pull request #186 from neo4j/docker-entrypoint-fix
bfeshti Sep 6, 2019
a18c1b8
docker-entrypoint will now set default configs based on Neo4j Edition
Sep 11, 2019
7168356
added changes for the 3.3 also
Sep 11, 2019
b880bf4
patches based on the last review
Sep 11, 2019
a1895ec
docker-entrypoint will now set default configs based on Neo4j Edition
Sep 11, 2019
22ee74a
Merge pull request #192 from neo4j/set-configs-based-on-edition
bfeshti Sep 12, 2019
838c023
rebased on master
jennyowen Sep 12, 2019
8a4b3cc
env NEO4J_dbms_directories_logs was being overwritten by folder writa…
jennyowen Sep 12, 2019
d1a0b1d
Changed unsupported.dbms.udc.source to docker
Sep 13, 2019
49031c2
Merge pull request #195 from neo4j/change-unsupported.dbms.udc.source…
bfeshti Sep 13, 2019
fcdfdf0
neo4jlabs-plugins.json was been included in local docker image build …
jennyowen Sep 25, 2019
d0e1a25
Merge pull request #196 from neo4j/fix-makefile
jennyowen Sep 25, 2019
fbb40ee
changing the versions.json urls to use github.io (github pages) urls
eastlondoner Sep 27, 2019
8f8924a
improved Neo4j version parser and muted PluginInstallation test when …
jennyowen Oct 2, 2019
5dcf7ee
removed all reference to environment variable NEO4J_VERSION in favour…
jennyowen Oct 3, 2019
694f925
makefile now creates devenv file
jennyowen Oct 3, 2019
1c1df2d
Tried to improve container closing so that tests don't leave so many …
jennyowen Oct 4, 2019
06048d0
Merge pull request #197 from eastlondoner/master
eastlondoner Oct 4, 2019
f8178db
disabled plugin test for 4.0
jennyowen Oct 7, 2019
488b0fb
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Oct 7, 2019
c08fb1c
improved development instructions
jennyowen Oct 7, 2019
c4d848e
updated main readme
jennyowen Oct 7, 2019
b4c0b36
merged public repository into private
jennyowen Oct 30, 2019
93935cc
patched changes to 3.5 entrypoint onto 3.6 entrypoint
jennyowen Oct 30, 2019
1c64629
added `require-password-change` flag to `set-initial-password`
jennyowen Oct 31, 2019
bb60e76
fixed weird inconsistencies between docker entrypoints
jennyowen Nov 1, 2019
9044dc4
Rename tx-logs to transactions
klaren Nov 1, 2019
5fad554
tx-logs folder was renamed
jennyowen Nov 5, 2019
c375ea1
removed some unused test conf files
jennyowen Nov 8, 2019
2996846
Merge branch 'master' of github.com:neo4j/docker-neo4j
jennyowen Nov 8, 2019
5b71dfd
fixed jvm.additional overriden by docker-entrypoint
Nov 15, 2019
10014c4
removed old jvm.additional overriding config
Nov 15, 2019
6d9e8f2
updated set intitial password to new requires password reset argument…
jennyowen Nov 21, 2019
5c8cb8a
Merge branch 'master' of github.com:neo4j/docker-neo4j into mergepubl…
jennyowen Nov 21, 2019
09bc490
edited pom to make it easier to switch between java 8 and 11
jennyowen Nov 21, 2019
57f0ed2
enabled require-password-reset feature in 4.0
jennyowen Nov 21, 2019
7e95b5c
removing private files
jennyowen Nov 22, 2019
8de0b0a
Reverted previous changes and added a more reliable way to fix jvm.ad…
Nov 25, 2019
1e47370
fixed indentation and added some helpful comments
Nov 25, 2019
bc476cb
Merge pull request #205 from neo4j/fix-jvm.additional-not-overriden
bfeshti Nov 25, 2019
154b9d2
Added 4.1 docker-image-src
Nov 25, 2019
54d1bd4
Merge pull request #209 from neo4j/add-4.1-docker-image-src
bfeshti Nov 25, 2019
f40b214
refactored to use try with resources to clean up containers
jennyowen Nov 25, 2019
f58bf3a
refactored new test to use try with resources
jennyowen Nov 25, 2019
3efe2f1
increased timeouts and cleaned some obsolete imports
jennyowen Nov 26, 2019
ee631e7
given mounted folders more descriptive names
jennyowen Dec 2, 2019
476bbd9
fixed upgrade from before file permissions in 3.5 fix and added tests.
jennyowen Dec 3, 2019
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
15ba3e6
reformatting TestUpgrade.java to use spaces instead of tabs
Jun 15, 2020
147c675
Use autoclosable drivers. Consume and return results from Cypher proc…
Jun 15, 2020
6cc7a54
Test upgrading from the latest published minor version to the current…
Jun 15, 2020
f85e167
Improve DatabaseIO: use autoclosable drivers, consume and return resu…
Jun 22, 2020
c2c7bbc
Rewrite UpgradeTest based on PR feedback
Jun 22, 2020
ea936c4
don't need a version const for 4.2
Jun 22, 2020
6cb6586
handle the difference between community and enterprise mountable dire…
Jun 22, 2020
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, bfeshti

---

## 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) 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__/
121 changes: 107 additions & 14 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,119 @@ 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
```


## 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 -->

## 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 11 or java 8 as necessary.
1. 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>
```
1. Install the [EnvFile](https://plugins.jetbrains.com/plugin/7861-envfile) Intellij plugin.
2. 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.
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 the Neo4j Version is not Publicly Available

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`
98 changes: 58 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,92 +10,110 @@ ifeq ($(origin .RECIPEPREFIX), undefined)
endif
.RECIPEPREFIX = >

ifndef NEO4J_VERSION
$(error NEO4J_VERSION is not set)
ifndef NEO4JVERSION
$(error NEO4JVERSION is not set)
endif

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/')
dist_site := https://dist.neo4j.org
series := $(shell echo "$(NEO4JVERSION)" | sed -E 's/^([0-9]+\.[0-9]+)\..*/\1/')

all: out/enterprise/.sentinel out/community/.sentinel
# 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?=""

all: test
.PHONY: all

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

out/%/.sentinel: tmp/image-%/.sentinel tmp/.tests-pass-%
test-enterprise: tmp/.image-id-enterprise
> mvn test -Dimage=$$(cat $<) -Dedition=enterprise -Dversion=$(NEO4JVERSION) -Dtest=$(TESTS)
.PHONY: test-enterprise

test-community: tmp/.image-id-community
> mvn test -Dimage=$$(cat $<) -Dedition=community -Dversion=$(NEO4JVERSION) -Dtest=$(TESTS)
.PHONY: test-community

# just build the images, don't test or package
build: tmp/.image-id-community tmp/.image-id-enterprise
.PHONY: build

# create release images and loadable images
package: package-community package-enterprise
.PHONY: package

package-community: tmp/.image-id-community out/community/.sentinel
> mkdir -p out
> docker tag $$(cat $<) neo4j:$(NEO4JVERSION)
> docker save neo4j:$(NEO4JVERSION) > out/neo4j-community-$(NEO4JVERSION)-docker-loadable.tar

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

out/%/.sentinel: tmp/image-%/.sentinel
> 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 $@
# building the image

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))" \
--build-arg="NEO4J_URI=file:///tmp/$(call tarball,$*,$(NEO4JVERSION))" \
$(<D)
> echo -n $$image >$@
> echo "NEO4JVERSION=$(NEO4JVERSION)" > tmp/devenv-${*}.env
> echo "NEO4J_IMAGE=$$image" >> tmp/devenv-${*}.env
> echo "NEO4J_EDITION=${*}" >> tmp/devenv-${*}.env

tmp/local-context-%/.sentinel: tmp/image-%/.sentinel in/$(call tarball,%,$(NEO4J_VERSION))
tmp/neo4jlabs-plugins.json: ./neo4jlabs-plugins.json
> mkdir -p $(@D)
> cp $< $@

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

tmp/image-%/.sentinel: src/$(series)/Dockerfile src/$(series)/docker-entrypoint.sh \
in/$(call tarball,%,$(NEO4J_VERSION))
tmp/image-%/.sentinel: docker-image-src/$(series)/Dockerfile docker-image-src/$(series)/docker-entrypoint.sh \
in/$(call tarball,%,$(NEO4JVERSION)) tmp/neo4jlabs-plugins.json
> 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_TARBALL%%|$(call tarball,$*,$(NEO4JVERSION))|" \
-e "s|%%NEO4J_EDITION%%|$*|" \
-e "s|%%NEO4J_DIST_SITE%%|$(dist_site)|" \
>$(@D)/Dockerfile
> mkdir -p $(@D)/local-package
> cp $(filter %.json,$^) $(@D)/local-package
> touch $(@D)/local-package/.sentinel
> touch $@

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

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

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

in/neo4j-community-$(NEO4J_VERSION)-unix.tar.gz:
in/neo4j-community-$(NEO4JVERSION)-unix.tar.gz:
> mkdir -p in
> cd in
> $(call fetch_tarball,community)

in/neo4j-enterprise-$(NEO4J_VERSION)-unix.tar.gz:
in/neo4j-enterprise-$(NEO4JVERSION)-unix.tar.gz:
> mkdir -p in
> cd in
> $(call fetch_tarball,enterprise)
Expand Down
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
*NOTE:* Supported images are available in the [official image library](https://hub.docker.com/_/neo4j/) on Docker Hub.
Please use those for production use.

# Using the Neo4j Docker image
# Using the Neo4j Docker Image

## Neo4j 2.3
Documentation for the Neo4j image can be found [here](https://neo4j.com/docs/operations-manual/current/deployment/single-instance/docker/).

Documentation for the Neo4j 2.3 image can be found [here](https://neo4j.com/developer/docker-23/).

You can start a Neo4j 2.3 container like this:
You can start a Neo4j container like this:

```
docker run \
--publish=7474:7474 \
--publish=7474:7474 --publish=7687:7687 \
--volume=$HOME/neo4j/data:/data \
neo4j:2.3
--volume=$HOME/neo4j/logs:/logs \
neo4j:latest
```

## Neo4j 3.0

Documentation for the Neo4j 3.0 image can be found [here](http://neo4j.com/docs/operations-manual/current/deployment/single-instance/docker/).

You can start a Neo4j 3.0 container like this:
To start a Neo4j Enterprise Edition container, you can run:

```
docker run \
--publish=7474:7474 --publish=7687:7687 \
--env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
--volume=$HOME/neo4j/data:/data \
neo4j:3.0
--volume=$HOME/neo4j/logs:/logs \
neo4j:enterprise
```

Mounting the `/data` and `/logs` folder is optional,
but it means that data can persist between closing and reopening Neo4j containers.


# Building and Developing the Neo4j Docker Image

See [DEVELOPMENT.md](DEVELOPMENT.md)

# Getting support and contributing

Please create issues and pull requests in the Github repository.
For bug reports and feature requests, please create issues and pull requests against this Github repository.

If you need guidance with using Neo4j you can ask questions here: https://community.neo4j.com/
11 changes: 0 additions & 11 deletions build/record-env

This file was deleted.

5 changes: 0 additions & 5 deletions build/trapping-sigint

This file was deleted.

Loading