Saturday, October 28, 2017

Oracle Database Docker Image in Docker Cloud (Digital Ocean)

Red Samurai is using Docker for our internal development environment. We are running Oracle Database and WebLogic server (with ADF support) on Docker Cloud. It is much easier to manager Docker containers than to maintain our own server.

In this post I will describe how to setup Oracle Database in Docker Cloud. Of course you could run Docker container locally on your machine, but main power of Docker comes with the option to be able to run container in the Cloud.

If you are new to Docker and Docker Cloud, it is very easy to be lost - there are so many various blogs and articles, hard to understand from where to start. I would recommend to start from Get Started, Part 1: Orientation and setup tutorial. You will learn most of the important Docker commands and push Docker image to the registry. Next check this tutorial - Create your first service. It describes how to create Cloud Node through Docker Cloud interface. Keep in mind - Docker itself doesn't run Docker Container, it provides connectors to various Cloud providers for Docker - Azure, Amazon, Digital Ocean, etc. I did some research and it looks like Digital Ocean is the best option to run Docker container - pricing model is straightforward, registration and management processes are simple and clear.

First step should be to create Docker Node in Docker Cloud (you must be connected to Cloud provider). Here is the info for our Digital Ocean node instance:

Node creation process is straightforward. Once node is created, it becomes part of Node cluster:

Docker Cloud node creation process triggers droplet (Cloud instance) creation in Digital Ocean. This process takes around 5 minutes in total.

Digital Ocean provides very nice UI to manage and monitor droplet:

Graphs to monitor droplet performance:

Digital Ocean provides option to run administration console directly in the browser, without even using separate SSH connection (this is very convenient for quick administration).

I found it to be the easiest way to create Oracle DB docker image in Digital Cloud droplet by executing docker run command directly in droplet administration console. I'm using official Oracle Database Enterprise Edition Docker image.

With docker run command, i can pull and run Docker image (referencing official Oracle DB Docker registry). Where detach=true means container will run without blocking console:

docker run --detach=true --name RedSamuraiDB -p 1521:1521 -p 5500:5500 -e ORACLE_SID=RedSamuraiDB -e ORACLE_PDB=ORCLPDB1 store/oracle/database-enterprise:

Command is executed from Digital Ocean droplet console:

Image is downloaded directly from Docker Store into Digital Ocean droplet:

With docker run command, image is not only downloaded, but also container is started. We can execute docker ps -l to see if container was started successfully:

Finally we need to reset default password (Oradoc_db1) set for Oracle DB Docker container. This can be done by logging into sqlplus from Digital Ocean droplet console. First we need to enter into Docker container prompt by executing (use Docker container name):

docker exec -it RedSamuraiDB bash



DB is accessible from outside:

This brings power of Docker - Oracle DB setup in few minutes.

Sunday, October 8, 2017

Takeaways from OOW'17

Let's summarise important points from OOW'17 conference. This year conference was a breakthrough for Oracle JET - most of Oracle Cloud UI's were implemented with Oracle JET. Oracle ADF is used for Oracle SaaS (Fusion Middleware) back office applications, same as before. There is often misunderstanding in JET vs. ADF comparison. Keep in mind - JET is only UI layer and it can be compared with ADF Faces only. While ADF is much more than UI - ADF BC Model, ADF Task Flows and ADF Bindings.

1. Use JET for front-end apps, with relatively simple complexity but strong requirement for performance and scalability. Back-end can be implemented with ADF BC REST. Typically it would take longer to implement JET UI comparing to ADF Faces (no drag and drop support, unless using Visual Cloud Builder Service for JET)

2. Use ADF Faces for complex and large back-office applications. Some degree of mix between ADF Faces and JET is possible. Back-end should be done in ADF BC

ADF is stable technology and Oracle is focusing to advertise new things on OOW. Recommended focus for ADF developers was around JCS, DevCS, JET and VBCS:

There was one session about how to move existing ADF app into the cloud with JCS. And session about ADF BC REST, no new features - mainly showing customer system implementation with current features.

JET open source contribution was announced, along with new JET offline support - persistence toolkit (will be available through NPM in next couple of weeks):

Oracle explained why handling offline use case in JET is important:

Persistence toolkit will run on JET hybrid, web and desktop apps (yes you can run JET as desktop app, with 3-rd party Electron plugin):

Here you can read more detail info about persistent toolkit design principles:

JET supports Fetch API (used by persistence toolkit):

Architecture explanation for JET persistence toolkit:

Another hot topic related to JET - Web components. Slots are supported, this allows to build advanced Web components with dedicated facets (ADF Faces terminology):

OOW'17 was packed with chatbot demos. Unfortunately there is no trial access for chatbot cloud yet. There was good session about chatbots from Lyudmil Pelov - he explained how Oracle chatbot service and language processing works:

I was impressed with Oracle Visual Cloud Builder Service progress this year. I really liked this service and I think it will become JET IDE development tool. Is not focused for business users only, but is targeted for JET developers too. It comes with embedded DB or you can call external services too. Next versions will allow direct JET code development, combined with drag and drop:

Develop JET in VBCS using drag and drop where possible and code additional logic in JS/HTML:

VBCS is not targeted for business users anymore, they target it for coders (us) too - thats news I like:

RDK UI is available now for ADF, JET and MAF. ADF RDK was updated to newer version. ADF and JET RDK UI look is identical.



Machine Learning was another big thing on OOW and JavaOne. Nice to hear things I was studying in university about neural networks are becoming hype now:

JVM garbage collection tuning. Is better to have objects to be dead young. This means in ADF is better to use Backing Bean Scope where possible, because short scope bean is destroyed after request and this allows VM to clean memory: