Training GDS Setup Windows - 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 Windows (4.3) and have an instance running in a regular (non-elevated) powershell window.

Version: this document is current for version 4.3.3

Last Update: 2021/09/01 - Update 4.3.3, GDS 1.6.4

One - Location Location Location

While the database is running in one powershell window, we are going to position ourselves in a second window. This document will assume you did the installation in C:\users<your user>\Documents\neo4j, please adapt the instructions to your installation folder if necessary.

PS C:\Users\Your User> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      7.1.4
...
PS C:\Users\Your User> cd .\Documents\neo4j\
PS C:\Users\Your User\Documents\neo4j> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy ByPass
PS C:\Users\Your User\Documents\neo4j>

Two - Downloading the database dumps

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

PS C:\Users\Your User\Documents\neo4j> mkdir dump
PS C:\Users\Your User\Documents\neo4j> $WebClient = New-Object System.Net.WebClient
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://github.com/tomgeudens/practical-neo4j/raw/master/data/gds_gameofthrones.dump", (Get-Location).Path + "\dump\gds_gameofthrones.dump")
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://github.com/tomgeudens/practical-neo4j/raw/master/data/gds_paysim.dump", (Get-Location).Path + "\dump\gds_paysim.dump")

Do check that the sizes match with yours !

PS C:\Users\Your User\Documents\neo4j> dir .\dump\*.dump

...    Length Name
...    ------ ----
...   2989545 gds_gameofthrones.dump
...  73742915 gds_paysim.dump

Three - Loading the dumps

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!

PS C:\Users\Your User\Documents\neo4j> . .\scripts\environment.ps1
PS C:\Users\Your User\Documents\neo4j> .\neo4j-enterprise-4.3.3\bin\neo4j-admin.ps1 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.
PS C:\Users\Your User\Documents\neo4j> .\neo4j-enterprise-4.3.3\bin\neo4j-admin.ps1 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.

PS C:\Users\Your User\Documents\neo4j> .\neo4j-enterprise-4.3.3\bin\cypher-shell.bat -u neo4j -p trinity -d system "CREATE DATABASE gameofthrones;"
PS C:\Users\Your User\Documents\neo4j> .\neo4j-enterprise-4.3.3\bin\cypher-shell.bat -u neo4j -p trinity -d system "CREATE DATABASE paysim;"

PS C:\Users\Your User\Documents\neo4j> .\neo4j-enterprise-4.3.3\bin\cypher-shell.bat -u neo4j -p trinity -d gameofthrones "MATCH () RETURN count(*);"
+----------+
| count(*) |
+----------+
| 2641     |
+----------+
PS C:\Users\Your User\Documents\neo4j> .\neo4j-enterprise-4.3.3\bin\cypher-shell.bat -u neo4j -p trinity -d paysim "MATCH () RETURN count(*);"
+----------+
| count(*) |
+----------+
| 332948   |
+----------+

You can now exit this powershell window, the running instance (leave that one running obviously) is ready (and waiting) for the Graph Data Science training.

Verify Browser Guide access

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!

⚠️ **GitHub.com Fallback** ⚠️