July 2018
M T W T F S S
« Jun    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

WordPress Quotes

Life shrinks or expands in proportion to one's courage.
Anais Nin

Recent Comments

July 2018
M T W T F S S
« Jun    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (30)
Ansibile (18)
Apache (125)
Asterisk (2)
cassandra (2)
Centos (208)
Centos RHEL 7 (254)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (24)
Eassy (11)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (6)
JBOSS (32)
jenkins (1)
Kubernetes (2)
Ldap (5)
Linux (189)
Linux Commands (167)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (21)
MYSQL (82)
Nagios (5)
NaturalOil (13)
Nginx (29)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (34)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
SCALEIO (1)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (59)
Uncategorized (29)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

21 visitors online now
3 guests, 18 bots, 0 members

Hit Counter provided by dental implants orange county

Docker creates Tomcat/Weblogic cluster

Install Tomcat image

Prepare the required jdk, tomcat and other software into the home directory, start a container
docker run -t -i -v /home:/opt/data -name mk_tomcat Ubuntu /bin/bash

This command mounts the local home directory to the /opt/data directory of the container. If the container directory does not exist, it will be automatically created. The next step is the basic configuration of tomcat. After setting the jdk environment variable, place the tomcat program in /opt/apache-tomcat. Edit the /etc/supervisor/conf.d/supervisor.conf file and add the tomcat item.

[supervisord]
nodaemon=true

[program:tomcat]
command=/opt/apache-tomcat/bin/startup.sh

[program:sshd]
command=/usr/sbin/sshd -D
docker commit ac6474aeb31d tomcat

Create a new tomcat folder and create a new Dockerfile.
FROM mk_tomcat EXPOSE
22 8080
CMD [“/usr/bin/supervisord”]

Create an image based on the Dockerfile.
Docker build tomcat tomcat

Install weblogic image

The steps and tomcat basically the same, posted here configuration file
supervisor.conf
[supervisord]
nodaemon=true

[program:weblogic]
command=/opt/Middleware/user_projects/domains/base_domain/bin/startWebLogic.sh

[program:sshd]
command=/usr/sbin/sshd -D
dockerfile
FROM weblogic EXPOSE
22 7001
CMD [“/usr/bin/supervisord”]

Use of the tomcat/weblogic image

Use of storage

At startup, use the -v parameter
-v, –volume=[] Bind mount a volume (eg from the host: -v /host:/container, from docker: -v /container)

Map the local disk to the inside of the container, it changes in real time between the host and the container, so we only need to update the directory of the physical host to update the program and upload the code.

Implementation of tomcat and weblogic clusters

Tomcat just need to open multiple containers
docker run -d -v -p 204:22 -p 7003:8080 -v /home/data:/opt/data -name tm1 tomcat /usr/bin/supervisord
docker run -d -v -p 205:22 -p 7004:8080 -v /home/data:/opt/data –name tm2 tomcat /usr/bin/supervisord
docker run -d -v -p 206:22 -p 7005:8080 -v /home/data:/opt/data –name tm3 tomcat /usr/bin/supervisord

Here to talk about weblogic configuration, we all know that weblogic has a domain concept. If you want to deploy using the normal administrator +node method, you need to write the startup scripts for the administrator and server in supervisord respectively. The advantages of doing this are:

  • You can use weblogic clustering, synchronization and other concepts
  • To deploy a clustered application, you only need to install the application once on the cluster.

weakness is:

  • Docker configuration is complicated
  • There is no way to automatically expand the computing capacity of the cluster. If you need to add nodes, you need to first create a node on the administrator, then configure a new container supervisor startup script, and then start the container

Another method is to install all the programs on the adminiserver. When you need to expand, you can start multiple nodes. Its advantages and disadvantages are the opposite of the previous methods. (It is recommended to use this method to deploy the development and test environment)
docker run -d -v -p 204:22 -p 7001:7001 -v /home/data:/opt/data -name node1 weblogic /usr/bin/ Supervisord
docker run -d -v -p 205:22 -p 7002:7001 -v /home/data:/opt/data -name node2 weblogic /usr/bin/supervisord
docker run -d -v -p 206:22 -p 7003:7001 -v /home/data:/opt/data –name node3 weblogic /usr/bin/supervisord

In this way, using nginx as the load balancer in the front end can complete the configuration.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Blue Captcha Image
Refresh

*

Protected by WP Anti Spam