This blog series shows how to get started with WebLogic and Docker – in 3 different Clouds:
- Docker and the Oracle Images
- Create and run a WebLogic Docker Image on a local machine and upload the WebLogic Docker Image into the Docker Hub registry
- WebLogic Docker Container on Oracle Container Cloud Service
- WebLogic Docker Container on Microsoft Azure Container Service
- WebLogic Docker Container on Amazon EC2 Container Service
Starting point & Outline
Starting point for this blog is:
- A computer with a browser
- A WebLogic Docker Container Image in a private Docker Hub repository, as described in this blog [todo: make reference]
- Identity Domain Administrator access to the Oracle Public Cloud, e.g. via a trial account
The blog itself consists of 2 main parts:
- Create a Container Cloud Service
- Run the container image from the Docker Hub repository on the created Cloud Service
Create a Container Cloud Service
First step is to create an Oracle Container Cloud Service. Start by logging in as Identity Domain Administrator. When you have a trial account, you will have received a mail like the one below:
Login into MyServices Administration using the url from the mail as shown above:
Click on the ‘Create Instance’ to start provisioning fo the Container Cloud Service. A pop-up is now shown:
Pick the Container (cloud service), which brings you to the first page of the wizard for creation of the Container Cloud Service:
Click ‘Create Service’ button:
On this page, create the SSH Public Key: click the Edit button and select ‘Create a New Key’:
Click Enter:
Download the key. Continue by clicking Next. That brings you to the overview page:
Review the data and then click ‘Create’ to start creation of the Container Cloud Service:
Now, the service is creating for several minutes – mine took 11 minutes. The page will then look like:
Click on the ‘WebLogicService’, which brings you to a more detailed overview of your created Container Cloud Service:
Like shown in the above picture: go to the ‘Container Console’:
Login with the admin username and password that you entered when creating the Container Cloud Service. This will now bring you to the Dashboard of the Cloud Container Service named WebLogicService:
In this console, the main concepts of the Oracle Container Cloud Service are clearly visible:
- Task: action created in the Oracle Container Cloud Service as a response to your requests
- Event: individual, discrete operations on the Oracle Container Cloud Service
- Service: comprises the information required for running a Docker image on a host
- Stack: comprises the configuration for running a set of services as a single entity
- Deployment: a deployed service or stack on the Oracle Container Cloud Service
- Container: a Docker container, i.e. a process created to run a Docker image
- Image: a Docker image
- Hosts: the Oracle Compute virtual machines that are managed by the Oracle Container Cloud Service (also: worker nodes)
- Resource Pools: a combination of hosts into groups of compute resources
- Registry: a Docker registry, i.e. a system for storing and sharing Docker images
- Tags: labels for organizing resource pools and the hosts within them (used for management)
Run the WebLogic image from Docker Hub registry
With the Oracle Container Cloud Service up and running, we can start running the WebLogic image that we have in Docker Hub. The following has to be done:
- Update the registry to access the private Docker Hub repository where the WebLogic image is stored
- Create a Service for the WebLogic container image
- Deploy the Service
- Test the deployment
Steps are shown below:
- Update the registry to access the private Docker Hub repository where the WebLogic image is stored
Goto registries:
Click the Edit button and add the authorization details for the private Docker Hub registry:
- Create a Service for the WebLogic container image
Next, we’ll create a Service that describes how we want to deploy the WebLogic container image. Goto the Services page and click on the New Service button:
In the Service Editor pop-up, enter the values like shown below. Note the port mapping settings!
Click Save and note that the Service is added:
- Deploy the Service
In the previous sceen, click the green Deploy button to start deployment of the service.
Accept the default settings and click Deploy. After some time, i.e. when the deployment has completed, the Deployments tab will be colored green:
- Test the deployment
First, check that the image has actually been pulled in on your host, by looking at the Images tab:
Then, check for the container to be up-and-running in the Containers tab:
Now, as a final check, you’ll want to log in into the weblogic console.
First, go to the Hosts tab, and find the public ip address:
Then, point your browser to the familiar url, here: http://129.150.70.46:7001/console
… and login to observe that the WebLogic server has the developer_domain, which is a clear indication that it is indeed running in our container from Docker Hub.