|
| 1 | +WebLogic 12c on Docker |
| 2 | +=============== |
| 3 | +Docker configurations to facilitate installation, configuration, and environment setup for developers. |
| 4 | + |
| 5 | +## Based on Oracle Linux Docker image |
| 6 | +For more information please read the [Docker Images from Oracle Linux](http://public-yum.oracle.com/docker-images) page. |
| 7 | + |
| 8 | +## How to build and run |
| 9 | +This project comes with two configurations for a WebLogic Docker Image. One is based on the Developer distribution, the other one on the Generic. See below for more details. |
| 10 | + |
| 11 | +In this project you will find a [bin](https://github.com/weblogic-community/weblogic-docker/tree/master/bin) folder with scripts to help you build and run WebLogic on Docker, either with the Developer or the Generic distribution. See below for instructions and usage. |
| 12 | + |
| 13 | +### Building an image |
| 14 | +First decide which distribution you want to use, then download the required packages and drop them in the folder of your distribution of choice. Then go into the **bin** folder and run the **buildDockerImage.sh** script as root. |
| 15 | + |
| 16 | + $ ./buildDockerImage.sh -h |
| 17 | + Usage: buildDockerImage.sh [-d] |
| 18 | + |
| 19 | + -d: creates image based on 'weblogic12c-developer' distribution, if present. |
| 20 | + 'weblogic12c-generic' otherwhise. |
| 21 | + |
| 22 | +The Dockerfiles for both distributions will create same WebLogic Domain with the following patches and configurations: |
| 23 | + |
| 24 | +#### For Developers (weblogic12c-developer) |
| 25 | +This [Dockerfile](https://github.com/weblogic-community/weblogic-docker/blob/master/weblogic12c-developer/Dockerfile) will create an image using the Developer ZIP Installer for WebLogic 12c 12.1.3. It will configure a base_domain with the following settings: |
| 26 | + |
| 27 | + * JPA 2.1 enabled |
| 28 | + * JAX-RS 2.0 shared library deployed |
| 29 | + * Admin Username: **weblogic** |
| 30 | + * Admin Password: **welcome1** |
| 31 | + * Oracle Linux Username: **oracle** |
| 32 | + * Oracle Linux Password: **welcome1** |
| 33 | + * WebLogic Domain Name: **base_domain** |
| 34 | + |
| 35 | +#### Generic Installer (weblogic12c-generic) |
| 36 | +This second [Dockerfile](https://github.com/weblogic-community/weblogic-docker/blob/master/weblogic12c-generic/Dockerfile) creates an image with only WebLogic 12c (Generic Installer) installed, and no domain configured. |
| 37 | + |
| 38 | +For an example of how to extend this image and create your own domain, you can look into the third [Dockerfile](https://github.com/weblogic-community/weblogic-docker/blob/master/weblogic12c-generic/container-domain/Dockerfile) located in **weblogic12c-generic/container-domain** folder. |
| 39 | + |
| 40 | +### Write your own WebLogic domain with WLST |
| 41 | +The best way to create your own, or extend domains is by using [WebLogic Scripting Tool](http://docs.oracle.com/cd/E57014_01/cross/wlsttasks.htm). The WLST script used to create domains in both Dockerfiles (for [developers](https://github.com/weblogic-community/weblogic-docker/blob/master/weblogic12c-developer/container-scripts/create-wls-domain.py), and the extended example for [generic installer](https://github.com/weblogic-community/weblogic-docker/blob/master/weblogic12c-generic/container-domain/container-scripts/create-wls-domain.py)) is **create-wls-domain.py** (same for both distributions). This script by default adds JMS resources and a few other settings. You may want to tune this script with your own setup to create DataSources and Connection pools, Security Realms, deploy artifacts, and so on. |
| 42 | + |
| 43 | +You can also extend images and override the existing domain, or create a new one with WLST. |
| 44 | + |
| 45 | +### Running WebLogic AdminServer |
| 46 | +To start the WebLogic AdminServer, you can simply call **docker run** command, but we recommend you use the [dockWebLogic.sh](https://github.com/weblogic-community/weblogic-docker/blob/master/bin/dockWebLogic.sh) script. It has the following usage: |
| 47 | + |
| 48 | + $ ./dockWebLogic.sh -h |
| 49 | + Usage: dockWebLogic.sh [-a [-p port]] [-n mywlsadmin] |
| 50 | + |
| 51 | + -a : attach AdminServer port to host. If -a is present, will attach. Change default (7001) with -p port |
| 52 | + -p port: which port on host to attach AdminServer. Default: 7001 |
| 53 | + -n name: give a different name for the container. Default: wlsadmin |
| 54 | + |
| 55 | +### Create a Cluster |
| 56 | +WebLogic has a [Machine](https://docs.oracle.com/middleware/1213/wls/WLACH/taskhelp/machines/ConfigureMachines.html) concept, which is an operational system with an agent, the Node Manager. This resource allows WebLogic to add [Managed Servers](https://docs.oracle.com/middleware/1213/wls/WLACH/taskhelp/domainconfig/CreateManagedServers.html) to an underlying domain in order to create a flexible environment of servers for different applications and resources, and also to define a [Cluster](). By using **Machines** from containers, you can easily create a [Dynamic Cluster]() by simply firing new NodeManagers containers that will be automatically added to the domain running on the AdminServer, started previously. |
| 57 | + |
| 58 | +To easily plug newly created **Machines** to a domain running on another container, use the [dockNodeManager.sh]() script. |
| 59 | + |
| 60 | + $ ./dockNodeManager.sh -h |
| 61 | + Usage: dockNodeManager.sh [-n wls_admin_container_name] |
| 62 | + |
| 63 | + -n: name of the container with a WebLogic AdminServer orchestrating a WebLogic Domain. |
| 64 | + Defaults to 'wlsadmin' |
| 65 | + |
| 66 | + |
| 67 | +## Choose your WebLogic Distribution |
| 68 | +This project hosts two configurations for building Docker images with WebLogic 12c. |
| 69 | + |
| 70 | + * Developer Distribution |
| 71 | + For more information on the WebLogic 12c ZIP Developer Distribution, visit [WLS Zip Distribution for Oracle WebLogic Server 12.1.3.0](download.oracle.com/otn/nt/middleware/12c/wls/1213/README.txt). |
| 72 | + * Generic Full Distribution |
| 73 | + For more information on the WebLogic 12c Generic Full Distribution, visit [WebLogic 12.1.3 Documentation](http://docs.oracle.com/middleware/1213/wls/index.html). |
| 74 | + |
| 75 | +## License |
| 76 | +To download and run WebLogic 12c Distribution regardless of inside or outside a Docker container, and regardless of Generic or Developer distribution, you must agree and accept the [OTN Free Developer License Terms](http://www.oracle.com/technetwork/licenses/wls-dev-license-1703567.html). |
| 77 | + |
| 78 | +To download and run Oracle JDK regardless of inside or outside a DOcker container, you must agree and accept the [Oracle Binary Code License Agreement for Java SE](http://www.oracle.com/technetwork/java/javase/terms/license/index.html). |
| 79 | + |
| 80 | +All scripts and files hosted in this project and GitHub [weblogic-docker](https://github.com/weblogic-community/weblogic-docker/) repository required to build the Docker images are, unless otherwise noted, released under the Common Development and Distribution License (CDDL) 1.0 and GNU Public License 2.0 licenses. |
0 commit comments