This tutorial will guide you through the steps of deploying ADF Essentials Summit Sample application on Glassfish server. For this purpose we are going to use two Docker containers, one for Summit DB and one for Summit Application server (Glassfish 4.1 Recommended by Oracle).
To walk through the tutorial you will need to have the following components installed in your development environment.
You will also need to visit Oracle XE Docker hub site Login Proceed to checkout and follow the steps providing your contact information, accepting the license agreement, so that you can get the docker content for Oracle XE server.
Prepare your application db
From Oracle JDeveloper and Oracle ADF 12c (184.108.40.206) — Code Samples Download Summit application and schema ZIP, and extract the content in a temporary location.
- Create the following folder structure
| ├─ init/
| ├─ scripts/
| ├─ Dockerfile
- Copy all files from uncompressed Summit_Schema/Database/scripts to your summit-db/scripts folder.
- Create summit-db/init.sh script with the following content.
- Create summit-db/Dockerfile with the following content.
Now we are ready to test our Database.
Connect to your database using
jdbc:oracle:thin:@172.18.0.2:1521:XE with username c##summit_adf and password summit_adf and you should be able to see your C##SUMMIT_ADF schema.
Prepare your application server
Now let’s get our Glassfish server up and running in a docker container. To achieve this we will follow Oracle Official documentation and automate each step in a Dockerfile.
- Navigate to your project and add summit-server folder to it.
- Add a webapps folder inside summit-server. You will put your EAR file in this location.
- Download adf-essentials.zip from Oracle ADF Essentials, For this tutorial we used the
- Download Basic Client RPM from Oracle instant client website.
- Locate com.oracle.webservices.fmw.client.jar (You can find it in JDeveloper installation folder) in your summit-server/lib folder.
- Create a Dockerfile with the following content. And copy the content from our Github repository
You should end up with the following directory structure:
│ ├─ init/
│ ├─ scripts/
│ ├─ Dockerfile
│ ├─ webapps/
│ ├─ lib/
│ │ ├─ com.oracle.webservices.fmw.client.jar
│ │ ├─ oracle-instantclient19.6-basic-220.127.116.11.0-1.x86_64.rpm
│ ├─ adf-essentials.zip
│ ├─ Dockerfile
Prepare your application for deployment
Follow Deploying Oracle ADF Summit Core Sample To EAR for Glassfish to generate your Summit applications EAR file and copy it into your /project/summit-server/webapps folder.
Ready to Race!
Now we are ready to get our application up and running. Follow the following steps to start your application server docker.
|#Build Docker Image
docker build -t ancapit/summit-server .
#Start Docker Container
docker run -d -p 8080:8080 –network=InfraNET –name summit-server ancapit/summit-server
Now you should be able to access http://localhost:8080/SummitADF-ViewController-context-root/faces/index.jsf and see something like this in your browser.