I guess Docker I don’t have to present anymore, it’s so common today!
You can find the corresponding docker project on my GitHub: https://github.com/gschmutz/dockerfiles
Due to the Oracle licensing agreement, the Oracle software itself can not be provided in the GitHub project. Therefore it’s also not possible to upload a built image to Docker Hub.
So you first have to download the Java 8 SDK as well as Stream Analytics Runtime using your own OTN login. Download the following 2 artifacts into the oracle-stream-analytics/dockerfiles/12.2.1/downloads folder.
- Java 8 Server: server-jre-8u91-linux-x64.tar.gz
- Oracle Stream Analytics Runtime: ofm_integration_osa_184.108.40.206.0_disk1.zip
Building the Oracle Stream Analytics Docker Install image
Navigate to the dockerfiles folder and run the buildDockerImage.sh script as root
$ sh buildDockerImage.sh -v 12.2.1 -A
This will take a while if run for the first time, as it downloads the oracle-linux base image first. At the end you should see a message similar to the one below:
WebLogic Docker Image for 'standalone' version 12.2.1 is ready to be extended: --> gschmutz/oracle-osa:12.2.1-standalone Build completed in 171 seconds.
It indicates that the OSA base docker image has been built successfully.
Be aware: this image is not yet executable, it only contains the software without any domain.
Building a Oracle Stream Analytics Standalone domain
In order to use Oracle Stream Analytics, we have to build a domain. This can be done using Docker as well, extending the Oracle Stream Analytics image created above and creating an OSA domain. Currently there is one sample Dockerfile available in the samples folder which creates an Oracle Stream Analytics Standalone domain. In the future this will be enhanced with a domain connecting to Spark.
To build the 12.2.1 standalone domain, navigate to folder samples/1221-domain and run the following command (use the OSA_PASSWORD parameter to specify the OSA user password):
$ docker build -t 1221-domain --build-arg OSA_PASSWORD=<define> .
There are other build arguments you can use to overwrite the default values of the Oracle Stream Analytics Standalone domain. They are documented in the GitHub project here.
Verify you now have this image in place with:
$ docker images
Running Oracle Stream Analytics server
To start the Oracle Stream Analytics server, you can simply call docker run -d 1221-domain command. The sample Dockerfile defines startwlevs.sh as the default CMD.
$ docker run -d --name=osa -p 9002:9002 1221-domain
Check the log by entering
$ docker logs -f osa
After a couple of seconds, the OSA server should be up and running and you can access the Oracle Stream Analytics Web Console at http://localhost:9002/sx.
Connect with user osaadmin and the password you specified above.