UNPKG

3.46 kBMarkdownView Raw
1# Neo4j Driver Toolkit
2
3Tools for downloading, managing and testing Neo4j servers.
4
5- `neoget` - download and unarchive Neo4j server packages
6- `neoctl` - start and stop Neo4j servers and update default server password
7- `neorun` - start and stop a Neo4j server with guarantee of server fully started and stopped
8
9
10## Neoget
11Neoget is a download script for fetching Neo4j server packages. To download the latest released version of Neo4j, simply use:
12```
13python neoget.py
14```
15If successful, the downloaded package would be unarchived immediately following the download.
16
17To install a specific Neo4j package version, use `-v` to specify the version:
18```
19python neoget.py -v 3.0.1
20```
21
22Alternatively, a url could also be used with option `-l` to directly download the Neo4j specified by the url
23```
24python neoget.py -l http://alpha.neohq.net/dist/neo4j-enterprise-3.0-NIGHTLY-unix.tar.gz
25```
26
27To install a nightly version, use `-n` to specify the nightly version togther with env var `TEAMCITY_NEO4J_<version>[_WIN]` (such as `TEAMCITY_NEO4J_30NIGHTLY`) to provide the secret teamcity download url for the nightly archives.
28
29Teamcity requires basic access authentication, which could either be provided via environment variable `TEAMCITY_USER` and `TEAMCITY_PASSWORD` or via the url directly with `username:password@` added in front of hostname.
30```
31TEAMCITY_USER=username TEAMCITY_PASSWORD=password TEAMCITY_NEO4J_30NIGHTLY=https://<teamcity_hostname>/repository/download/<build_type_id>/lastSuccessful/<artifact_path> python neoget.py -n 3.0
32```
33or
34```
35TEAMCITY_NEO4J_30NIGHTLY=https://username:password@<teamcity_hostname>/repository/download/<build_type_id>/lastSuccessful/<artifact_path> python neoget.py -n 3.0
36```
37
38witch is almost equivalent to
39```
40curl --user username:password -O https://<teamcity_hostname>/repository/download/<build_type_id>/lastSuccessful/<artifact_path>
41```
42
43For a full help page, use `-h`:
44```
45python neoget.py -h
46```
47
48## Neoctl
49Neoctl is a controller for start and stop Neo4j packages. It also provides a method to update default neo4j password.
50
51To start a server, use the `start` command:
52```
53python neoctl.py --start=neo4j
54```
55
56Similarly, to stop a server, use the `stop` command:
57```
58python neoctl.py --stop=neo4j
59```
60
61To change the default passowrd of a Neo4j server, simply use
62```
63python neoctrl.py --update-passowrd=s3cr3tP4ssw0rd
64```
65
66
67## Neorun
68Neorun provides commands to start and stop a Neo4j server with the guarantee that the server is fully started and stopped when the script returns.
69The start command also exposes a command to download and install a specific Neo4j server if no Neo4j found locally,
70as well as an option to change the default server password after the start.
71
72To start a Neo4j server, simply use the following command:
73```
74python neorun.py --start=neo4j
75```
76When the script returns, then the server is fully ready for any database tasks.
77
78If no Neo4j server is found in path `./neo4j`, then the default Neo4j server version used in `neoget.py` will be downloaded and installed to `./neo4j`.
79To specify other versions to download when a Neo4j is absent, use `-v`, `-t`, `-l` in a similar way as they are defined in `neoget.py`:
80```
81python neorun.py --start=neo4j -v 3.0.2 -p s3cr3tP4ssw0rd
82```
83In the example above, the `-p` option is used to change the default Neo4j password after the server is ready.
84
85For stopping the server, simply use the `stop` command:
86```
87python neorun.py --stop=neo4j
88```
89