To run the full ./gradlew build locally, PatterdaleTest.java
expects two oracle databases to be running locally.
You can start a pair of default databases with the following commands.
docker run -d -p 8081:8080 -p 1522:1521 sath89/oracle-12c
docker run -d -p 8082:8080 -p 1523:1521 sath89/oracle-12c
Or you can run the following Docker command: docker-compose up -d referencing docker-compose.yml.
Patterdale requires a the Oracle jdbc driver to be passed in as a volume mount.
It can be downloaded here: Oracle JDBC Downloads page.
I would recommend placing it in a repo directory within the project. The jar is ignored in .gitignore.
This will start up two Oracle database instances, Prometheus and Patterdale. Prometheus will be available at http://localhost:9090. Try searching for the database_up metric.
./gradlew will require the ojdbc8.jar driver.
By adding the properties mavenOracleUsername and mavenOraclePassword to your gradle.properties file,
which correspond to a valid Oracle single-sign on account, you’ll be able to download the driver.
If this file doesn’t exist, simply create this file in your .gradle directory (located in your $HOME dir).
./gradlew shadowJar docker
The following command will generate a fat jar in the build/libs directory and then build a docker image based on the
Dockerfile provided. The image built will be named: tjheslin1/patterdale:DEV-SNAPSHOT.
patterdale.yml from src/test/resources may need to have the jdbcUrls updating, if this occurs replace localhost in the jdbcUrls with your local IP address.
Once the app has started up and created connection pools, the URL to the /metrics page will be logged. Note: the sath89/oracle-12c containers may take a few minutes to start up.