티스토리 뷰

728x90
반응형

As a engineer, making test environment is very annoying job because each case needs new environment. Moreover, the more annoying thing is that the environment is easily broken for other test, which means that I have to spend same time for same environment when I encount same issue. As aspect of this, Docker is the best for TEST.  Docker quickly provide new pure test environment without much effort.


In this blog, I am going to set up basic test environment for clustered wildfly with dns and apache.


* Architecture



Detail information about docker images :

  1) Centos 6.5

  2) Wildfly 8.1.0.Final

  3) Apache 2.2.15

  3) Bind 9.8.2  (DNS)



There are 2 ways to set up this environment  :

  1) Using generated image files

  2) Building image with Dockerfilec



In this blog, I will explain the first way because....it is easiser than second ^^;


*Using generated image files


Brief Flow :  


 Pull images from index repository(docker hub)   ->   Pull scripts&files from github  -> Start DNS -> Start Apache ->Start Wildfly 1,2,3


 0) Create directory

# mkdir /home/git 


 1) Pull images from index repostitory (docker hub)

# docker pull ljhiyh/centos65:apache       
# docker pull ljhiyh/centos65:wildfly

# docker pull ljhiyh/centos65:dns 


 2) Pull scripts & files from github

# git clone https://github.com/Jooho/sample-docker.git


 3) Start DNS

# cd  /home/git/sample-docker/dns

#  ./docker-start.sh


 4) Start Apache

# cd  /home/git/sample-docker/httpd

#  ./docker-start.sh


 5) Start Wildfly

Master

# ./docker-start.sh -cmd=/bin/bash

#  su -

# cd master

# start.sh


Slave1

# ./docker-start.sh  -host=wildfly2 -ip=172.17.42.22 -cmd=/bin/bash

#  su -

# cd slave

# ./start.sh


Slave2

# ./docker-start.sh -host=wildfly3 -ip=172.17.42.23 -cmd=/bin/bash

#  su -

# cd slave

# ./start.sh



* Test

 0) DNS

   On wildfly1 vm:

bash-4.1# ping ws1.jhouse.org
PING ws1.jhouse.co.kr (172.17.42.20) 56(84) bytes of data.
64 bytes from ws1.42.17.172.in-addr.arpa (172.17.42.20): icmp_seq=1 ttl=64 time=0.075 ms
64 bytes from ws1.42.17.172.in-addr.arpa (172.17.42.20): icmp_seq=2 ttl=64 time=0.045 ms

......
bash-4.1# ping wildfly2.jhouse.org
PING wildfly2.jhouse.co.kr (172.17.42.22) 56(84) bytes of data.
64 bytes from ws1.42.17.172.in-addr.arpa (172.17.42.22): icmp_seq=1 ttl=64 time=0.075 ms
64 bytes from ws1.42.17.172.in-addr.arpa (172.17.42.22): icmp_seq=2 ttl=64 time=0.045 ms


 1) Apache : mod_cluster manager 

 http://ws2.jhouse.org:6666/mod_cluster_manager



 2) Wildfly : Admin console

http://wildfly1.jhouse.org:9990/

user : jboss  password : !qaz2wsx

   


반응형
댓글
250x250
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함