Training GDS Setup Mac - tomgeudens/practical-neo4j GitHub Wiki
Context: This document provides the instructions to do a manual setup of the databases for the Graph Data Science training.
Prerequisite: The document will assume you have done a Setup Neo4j Enterprise on Mac (4.3) and have an instance running.
Version: this document is current for version 4.3.3
Last Update: 2021/07/19 - Update 4.3.3, GDS 1.6.4
Important : All of the below is executed in the Terminal app !
While the database is running in one shell window, we are going to position ourselves in a second window. This document will assume you did the installation in /Users/youruser/neo4j, please adapt the instructions to your installation folder if necessary.
<machine>:~ <user>$ cd neo4j
<machine>:neo4j <user>$ ls -l
... install
... neo4j-enterprise-4.3.3
... scripts
... zulu11.48.21-ca-jre11.0.11-macosx_x64
In this step a subfolder dump will be created and the following files will be put into it :
What | Location |
---|---|
Game Of Thrones GDS Dump | dump/gds_gameofthrones.dump |
Paysim GDS Dump | dump/gds_paysim.dump |
The instructions below will accomplish this
<machine>:neo4j <user>$ mkdir dump
<machine>:neo4j <user>$ curl -L -o "dump/gds_gameofthrones.dump" https://github.com/tomgeudens/practical-neo4j/raw/master/data/gds_gameofthrones.dump
<machine>:neo4j <user>$ curl -L -o "dump/gds_paysim.dump" https://github.com/tomgeudens/practical-neo4j/raw/master/data/gds_paysim.dump
Do check that the sizes match with yours !
<machine>:neo4j <user>$ ls -l dump
... 2989545 ... gds_gameofthrones.dump
... 73742915 ... gds_paysim.dump
The beauty of the Neo4j 4.x release is that we can create new databases on the fly and load them offline. And that's exactly what we are going to do now ... Make sure to verify your counts match up with what is shown here!
<machine>:neo4j <user>$ . ./scripts/environment.sh
<machine>:neo4j <user>$ neo4j-enterprise-4.3.3/bin/neo4j-admin load --from=dump/gds_gameofthrones.dump --database=gameofthrones
Selecting JVM - Version:11.0.11, Name:OpenJDK 64-Bit Server VM, Vendor:Azul Systems, Inc.
Done: 83 files, 21.97MiB processed.
<machine>:neo4j <user>$ neo4j-enterprise-4.3.3/bin/neo4j-admin load --from=dump/gds_paysim.dump --database=paysim
Selecting JVM - Version:11.0.11, Name:OpenJDK 64-Bit Server VM, Vendor:Azul Systems, Inc.
Done: 111 files, 314.3MiB processed.
<machine>:neo4j <user>$ neo4j-enterprise-4.3.3/bin/cypher-shell -u neo4j -p trinity -d system "CREATE DATABASE gameofthrones;"
<machine>:neo4j <user>$ neo4j-enterprise-4.3.3/bin/cypher-shell -u neo4j -p trinity -d system "CREATE DATABASE paysim;"
<machine>:neo4j <user>$ neo4j-enterprise-4.3.3/bin/cypher-shell -u neo4j -p trinity -d gameofthrones "MATCH () RETURN count(*);"
+----------+
| count(*) |
+----------+
| 2641 |
+----------+
<machine>:neo4j <user>$ neo4j-enterprise-4.3.3/bin/cypher-shell -u neo4j -p trinity -d paysim "MATCH () RETURN count(*);"
+----------+
| count(*) |
+----------+
| 332948 |
+----------+
You can now exit this shell, the running instance (leave that one running obviously) is ready (and waiting) for the Graph Data Science training.
We'll quickly test if you have access to the browser guides that'll be used during the training. If you did the above installation, the Neo4j Browser itself will allow it, but your organization may restrict access in other ways.
Fire up a regular webbrowser (a recent Chrome, Firefox, Microsoft Edge or Opera GX are all fine, Microsoft IE and Safari may give issues) and browse to your running instance. Log on to the default database (username is neo4j, password is trinity).
Paste the following (complete command with colon included, that's not a url) in the Neo4j Browser command pane and execute with the blue arrow
:play https://metis.tomgeudens.io/gdstest
and do as it says there.
If it worked ... great. You might want to explore a bit (instructions are right there in front of you) how a browser guide works ... it's going to come in handy during the session. If it didn't work ... no worries, we'll have a few other ways to get you executing commands.
Enjoy!