5. docker-compose for WebLogic cluster deployment
In the earlier post you have seen how to use docker-compose for WebLogic images to build and also run the container with new application deployment. In this post you will be able to see the WebLogic managed servers forms cluster and the application will be deployed on top of it.
9. If all good then proceed for the run the containers - wlsadmin, managedserver, nodemanager and webtier docker-compose up
10. Check the containers logs with container names as argument docker-compose ps docker logs wlscluster_managedserver_1 -f
11. Expansion of docker containers for clustered Weblogic domain. docker-compose scale managedserver=4
We will be more happy to help you for your dockerization of WebLogic environments.
References:
Prerequisites
Let me keep the list of prerequisite steps which you can follow my previous blog post or youtube video.- docker pull oraclelinux:7-slim
- git clone https://github.com/oracle/docker-images.git
- download server-jre1.8 latest version copy to OracleJava/dockerfiles build the image and make it as oracle/serverjre:8
- download weblogic 12.2.1.2.0 quick installer which is used for development, it is small in size. image name it as oracle/weblogic:12.2.1.2-developer
- create new docker images where 12212-domain:latest using WLST and shell script which are available in container scripts.
- create new docker images named as 1221-appdeploy:latest where it uses 12212-domain as base images.
- And also docker pull httpd:2.4 6. download the proxy plugin for 12.2.1.2 create the 1221-webtier:latest [apache with proxy plugin configured]
The power of docker-compose script
Now lets pick the following docker-compose.yml file where it will use two images the two images : 1221-appdeploy, 1221-webtier Using last session created admin container for create managedserver with port changeversion: '2' networks: &network wlsnet: driver: bridge services: # Deploys the wlsServer with default hostname 'wlsadmin' used by scripts in 1221-domain. &adm adminserver: image: &i 1221-appdeploy container_name: wlsadmin ports: - "8001:7001" networks: - *network # Deploys a container running a Managed Server and a Node Manager to control MS from wlsServer managedserver: image: *i command: createServer.sh networks: - *network depends_on: - *adm # Deploys a container running only a node manager. to deploy a managed server here later, use wlsServer Web Console nodemanager: image: *i command: createMachine.sh networks: - *network depends_on: - *adm # WebTier for load balancing requests to cluster webtier: image: 1221-webtier networks: - *network ports: - "8800:80" environment: - WEBLOGIC_CLUSTER="managedserver:7001" links: - managedserver ################ END OF compose file ###############################
Next steps
8. Validate the docker configuration syntax docker-compose config9. If all good then proceed for the run the containers - wlsadmin, managedserver, nodemanager and webtier docker-compose up
10. Check the containers logs with container names as argument docker-compose ps docker logs wlscluster_managedserver_1 -f
11. Expansion of docker containers for clustered Weblogic domain. docker-compose scale managedserver=4
We will be more happy to help you for your dockerization of WebLogic environments.
References:
Comments
Post a Comment