The docker image build files, sample datasets, and use case exmaples, for Oracle Property Graph.
The scripts here are my own. Not Oracle's official material.
Architecture:
After setting up this demo environment, you can also try:
- customer_360 - Customer 360 analysis in banking [3-tier deployment]
- online_retail - Recommendation system in online retail [3-tier deployment]
- route - Simple example of shortest path queries [PGX standalone]
- moneyflows - Find patterns from large money transfer networks [3-tier deployment]
- mule_account - Fake account detection in fraud analysis [3-tier deployment]
Clone docker-images
repository.
$ cd <your-work-directory>
$ git clone https://github.com/oracle/docker-images.git
Download Oracle Database.
Put LINUX.X64_193000_db_home.zip
under:
docker-images/OracleDatabase/SingleInstance/dockerfiles/19.3.0/
Build the image.
$ cd docker-images/OracleDatabase/SingleInstance/dockerfiles/
$ bash buildDockerImage.sh -v 19.3.0 -e
$ cd <your-work-directory>
$ git clone https://github.com/ryotayamanaka/oracle-pg.git -b 20.4
Go to the following pages and download the packages.
Put the following files to oracle-pg/packages/
- oracle-graph-20.4.0.x86_64.rpm
- oracle-graph-client-20.4.0.zip
- oracle-graph-zeppelin-interpreter-20.4.0.zip
- oracle-graph-plsql-20.4.0.zip
- apache-groovy-binary-2.4.20.zip
Run the following script to extract packages:
$ cd oracle-pg/
$ sh extract.sh
Start the containers for Oracle Database only first.
$ cd oracle-pg/
$ docker-compose up database
...
database_1 | Completing Database Creation
...
database_1 | #########################
database_1 | DATABASE IS READY TO USE!
database_1 | #########################
This job takes time.
Connect to the Oracle Database server. See Appendix 1 if you get an error.
$ cd oracle-pg/
$ docker-compose exec database sqlplus sys/Welcome1@orclpdb1 as sysdba
Configure Property Graph features. This script was extracted from oracle-graph-plsql-xx.x.x.zip.
SQL> @/home/oracle/scripts/oracle-graph-plsql/19c_and_above/opgremov.sql
SQL> @/home/oracle/scripts/oracle-graph-plsql/19c_and_above/catopg.sql
Create user roles (graph_developer, graph_administrator) and users (graph_dev, graph_admin).
SQL> @/home/oracle/scripts/create_users.sql
SQL> EXIT
Build and pull images, create containers, and start them.
$ cd oracle-pg/
$ docker-compose up
This job takes time. Cnt+C
to stop all containers.
If there are any errors with jnius
or Cython
see Appendix 3.
Access Graph Visualization and Zeppelin to start graph analytics. Please use FireFox.
- Graph Visualization - http://localhost:7007/ui/ (User: graph_dev, Password: Welcome1)
- Jupyter - http://localhost:8888/
- Zeppelin - http://localhost:8080/#/
To stop, restart, or remove the containers, see Appendix 2.
You need to start the container if it is stopped.
$ cd oracle-pg/
$ docker-compose start database
You will get this error when you try to connect before the database is created.
$ docker-compose exec database sqlplus sys/Welcome1@localhost:1521/orclpdb1 as sysdba
...
ORA-12514: TNS:listener does not currently know of service requested in connect
To check the progress, see logs.
$ cd oracle-pg/
$ docker-compose logs -f database
Cnt+C
to quit.
To start, stop, or restart the containers.
$ cd oracle-pg/
$ docker-compose start|stop|restart
To remove the docker containers.
$ cd oracle-pg/
$ docker-compose down
If jnius/Cython
throw errors or complain about not finding JDK_HOME
, in Dockerfile-client rem out the pip installation of jnius
and Cython
.
In DOckerfile-server rem out references to jupyter notebooks.
Rebuilding should occur without issue.