Quantcast
Channel: DevOps tips & tricks
Viewing all articles
Browse latest Browse all 181

Create Weblogic Docker domain using docker-compose

$
0
0

Docker compose 

https://docs.docker.com/compose/

 

docker-compose.yml file

https://docs.docker.com/compose/compose-file/

 

Weblogic 12.2.1.4 Docker image 

https://danielveselka.blogspot.com/2020/10/create-weblogic-12214-docker-image-with.html

 

Weblogic Docker

https://github.com/oracle/docker-images/tree/master/OracleWebLogic

https://github.com/oracle/docker-images/tree/master/OracleWebLogic/dockerfiles/12.2.1.4

http://www.oracle.com/us/products/middleware/cloud-app-foundation/weblogic/weblogic-server-on-docker-wp-2742665.pdf

 

Some samples for Docker compose Weblogic domain

https://github.com/bzon/docker-oracle-weblogic/blob/master/OracleWeblogic/weblogic-samples/1221-app-jms-domain/docker-compose.yml

https://wlatricksntips.blogspot.com/2017/07/5-docker-compose-for-weblogic-cluster.html

 

First attempt

https://github.com/dveselka/weblogic/blob/master/docker-compose/docker-compose.yml

 

version: "3.8"

networks:
&network wlsnet:
driver: bridge

services:
adminserver:
container_name: adminserver
image: oracle/weblogic:12.2.1.4-generic
restart: "no"
environment:
DOMAIN_NAME: myDomain
ADMIN_NAME: myadmin
ADMIN_LISTEN_PORT: 7001
ADMIN_HOST: AdminContainer
ADMINISTRATION_PORT_ENABLED: "false"
ADMINISTRATION_PORT: 9002
MANAGED_SERVER_PORT: 8001
MANAGED_SERVER_NAME_BASE: MS
CONFIGURED_MANAGED_SERVER_COUNT: 2
CLUSTER_NAME: cluster1
CLUSTER_TYPE: DYNAMIC
PRODUCTION_MODE: dev
DOMAIN_HOST_VOLUME: /app/domains
PROPERTIES_FILE_DIR: "/u01/oracle/properties"
PROPERTIES_FILE: /u01/oracle/properties/domain.properties
ports:
- "7001:7001"
- "9002:9002"
networks:
- *network
volumes:
- "/git/weblogic/docker-compose/properties:/u01/oracle/properties"
- "/app/domains:/u01/oracle/user_projects/domains"

volumes:
adminserver:


docker-compose up
Recreating adminserver ... done
Attaching to adminserver
adminserver | Domain Home is: /u01/oracle/user_projects/domains/base_domain
adminserver | /u01/oracle/properties/domain_security.properties
adminserver | A properties file with the username and password needs to be supplied.


Docker compose with --verbose


[dave@dave docker-compose]$ docker-compose  --verbose up
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.utils.config.find_config_file: Trying paths: ['/home/dave/.docker/config.json', '/home/dave/.dockercfg']
docker.utils.config.find_config_file: No config file found
docker.utils.config.find_config_file: Trying paths: ['/home/dave/.docker/config.json', '/home/dave/.dockercfg']
docker.utils.config.find_config_file: No config file found
docker.utils.config.find_config_file: Trying paths: ['/home/dave/.docker/config.json', '/home/dave/.dockercfg']
docker.utils.config.find_config_file: No config file found
urllib3.connectionpool._make_request: http://localhost:None "GET /version HTTP/1.1" 200 831
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/version HTTP/1.1" 200 831
compose.cli.docker_client.get_client: docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
compose.cli.docker_client.get_client: Docker base_url: http+docker://localhost
compose.cli.docker_client.get_client: Docker version: Platform={'Name': ''}, Components=[{'Name': 'Engine', 'Version': '19.03.11', 'Details': {'ApiVersion': '1.40', 'Arch': 'amd64', 'BuildTime': '2020-06-07T00:00:00.000000000+00:00', 'Experimental': 'false', 'GitCommit': '42e35e6', 'GoVersion': 'go1.14.3', 'KernelVersion': '5.8.14-200.fc32.x86_64', 'MinAPIVersion': '1.12', 'Os': 'linux'}}, {'Name': 'containerd', 'Version': '1.3.7', 'Details': {'GitCommit': '8fba4e9a7d01810a393d5d25a3621dc101981175'}}, {'Name': 'runc', 'Version': '1.0.0-rc10', 'Details': {'GitCommit': 'dc9208a3303feef5b3839f4323d9beb36df0a9dd'}}, {'Name': 'docker-init', 'Version': '0.18.0', 'Details': {'GitCommit': ''}}], Version=19.03.11, ApiVersion=1.40, MinAPIVersion=1.12, GitCommit=42e35e6, GoVersion=go1.14.3, Os=linux, Arch=amd64, KernelVersion=5.8.14-200.fc32.x86_64, BuildTime=2020-06-07T00:00:00.000000000+00:00
compose.cli.verbose_proxy.proxy_callable: docker inspect_network <- ('dockercompose_wlsnet')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/networks/dockercompose_wlsnet HTTP/1.1" 404 53
compose.cli.verbose_proxy.proxy_callable: docker info <- ()
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/info HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker info -> {'Architecture': 'x86_64',
'BridgeNfIp6tables': True,
'BridgeNfIptables': True,
'CPUSet': True,
'CPUShares': True,
'CgroupDriver': 'systemd',
'ClusterAdvertise': '',
'ClusterStore': '',
'ContainerdCommit': {'Expected': '8fba4e9a7d01810a393d5d25a3621dc101981175',
'ID': '8fba4e9a7d01810a393d5d25a3621dc101981175'},
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_network <- ('docker-compose_wlsnet')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/networks/docker-compose_wlsnet HTTP/1.1" 200 570
compose.cli.verbose_proxy.proxy_callable: docker inspect_network -> {'Attachable': True,
'ConfigFrom': {'Network': ''},
'ConfigOnly': False,
'Containers': {},
'Created': '2020-10-18T10:11:09.446958986+02:00',
'Driver': 'bridge',
'EnableIPv6': False,
'IPAM': {'Config': [{'Gateway': '172.18.0.1', 'Subnet': '172.18.0.0/16'}],
'Driver': 'default',
'Options': None},
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={'label': ['com.docker.compose.project=docker-compose', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/json?limit=-1&all=0&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker-compose%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 3
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=False, filters={'label': ['com.docker.compose.project=dockercompose', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/json?limit=-1&all=0&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddockercompose%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 3
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={'label': ['com.docker.compose.project=docker-compose', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/json?limit=-1&all=1&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker-compose%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 1519
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 1 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- ('36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {'AppArmorProfile': '',
'Args': [],
'Config': {'AttachStderr': False,
'AttachStdin': False,
'AttachStdout': False,
'Cmd': ['/u01/oracle/container-scripts/createWLSDomain.sh'],
'Domainname': '',
'Entrypoint': None,
'Env': ['DOMAIN_NAME=myDomain',
'ADMIN_NAME=myadmin',
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={'label': ['com.docker.compose.project=docker-compose', 'com.docker.compose.service=adminserver', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/json?limit=-1&all=1&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker-compose%22%2C+%22com.docker.compose.service%3Dadminserver%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 1519
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 1 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- ('36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {'AppArmorProfile': '',
'Args': [],
'Config': {'AttachStderr': False,
'AttachStdin': False,
'AttachStdout': False,
'Cmd': ['/u01/oracle/container-scripts/createWLSDomain.sh'],
'Domainname': '',
'Entrypoint': None,
'Env': ['DOMAIN_NAME=myDomain',
'ADMIN_NAME=myadmin',
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('12214-weblogic-domain-generic')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/images/12214-weblogic-domain-generic/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {'Architecture': 'amd64',
'Author': 'Monica Riccelli <monica.riccelli@oracle.com>',
'Comment': '',
'Config': {'AttachStderr': False,
'AttachStdin': False,
'AttachStdout': False,
'Cmd': ['/u01/oracle/container-scripts/createWLSDomain.sh'],
'Domainname': '',
'Entrypoint': None,
'Env': ['PATH=/usr/java/jdk-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/java/jdk-8/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={'label': ['com.docker.compose.project=docker-compose', 'com.docker.compose.service=adminserver', 'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/json?limit=-1&all=1&size=0&trunc_cmd=0&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker-compose%22%2C+%22com.docker.compose.service%3Dadminserver%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 1519
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 1 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('12214-weblogic-domain-generic')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/images/12214-weblogic-domain-generic/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {'Architecture': 'amd64',
'Author': 'Monica Riccelli <monica.riccelli@oracle.com>',
'Comment': '',
'Config': {'AttachStderr': False,
'AttachStdin': False,
'AttachStdout': False,
'Cmd': ['/u01/oracle/container-scripts/createWLSDomain.sh'],
'Domainname': '',
'Entrypoint': None,
'Env': ['PATH=/usr/java/jdk-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/java/jdk-8/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin',
...
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- ('36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {'AppArmorProfile': '',
'Args': [],
'Config': {'AttachStderr': False,
'AttachStdin': False,
'AttachStdout': False,
'Cmd': ['/u01/oracle/container-scripts/createWLSDomain.sh'],
'Domainname': '',
'Entrypoint': None,
'Env': ['DOMAIN_NAME=myDomain',
'ADMIN_NAME=myadmin',
...
compose.parallel.feed_queue: Pending: {<Service: adminserver>}
compose.parallel.feed_queue: Starting producer thread for <Service: adminserver>
Starting adminserver ...
compose.parallel.feed_queue: Pending: {<Container: adminserver (36c57a)>}
compose.parallel.feed_queue: Starting producer thread for <Container: adminserver (36c57a)>
compose.cli.verbose_proxy.proxy_callable: docker attach <- ('36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07', stdout=True, stderr=True, stream=True)
urllib3.connectionpool._make_request: http://localhost:None "POST /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/attach?logs=0&stdout=1&stderr=1&stream=1 HTTP/1.1" 101 0
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker attach -> <docker.types.daemon.CancellableStream object at 0x7fa40bb7f7d0>
compose.cli.verbose_proxy.proxy_callable: docker start <- ('36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07')
compose.parallel.feed_queue: Pending: set()
compose.parallel.feed_queue: Pending: set()
compose.parallel.feed_queue: Pending: set()
compose.parallel.feed_queue: Pending: set()
compose.parallel.feed_queue: Pending: set()
compose.parallel.feed_queue: Pending: set()
urllib3.connectionpool._make_request: http://localhost:None "POST /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/start HTTP/1.1" 204 0
compose.cli.verbose_proxy.proxy_callable: docker start -> None
Starting adminserver ... done
compose.parallel.feed_queue: Pending: set()
compose.parallel.parallel_execute_iter: Finished processing: <Service: adminserver>
compose.parallel.feed_queue: Pending: set()
Attaching to adminserver
compose.cli.verbose_proxy.proxy_callable: docker events <- (filters={'label': ['com.docker.compose.project=docker-compose', 'com.docker.compose.oneoff=False']}, decode=True)
adminserver | Domain Home is: /u01/oracle/user_projects/domains/base_domain
adminserver | /u01/oracle/properties/domain_security.properties
adminserver | A properties file with the username and password needs to be supplied.
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/events?filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddocker-compose%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker events -> <docker.types.daemon.CancellableStream object at 0x7fa40bb3e510>
compose.cli.verbose_proxy.proxy_callable: docker wait <- ('36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- ('36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07')
urllib3.connectionpool._make_request: http://localhost:None "POST /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/wait HTTP/1.1" 200 None
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.40/containers/36c57a8bd9d6f6a1da699dc047755c741439da108868d0b28c950ccd50381f07/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker wait -> {'Error': None, 'StatusCode': 0}
adminserver exited with code 0
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {'AppArmorProfile': '',
'Args': [],
'Config': {'AttachStderr': False,
'AttachStdin': False,
'AttachStdout': False,
'Cmd': ['/u01/oracle/container-scripts/createWLSDomain.sh'],
'Domainname': '',
'Entrypoint': None,
'Env': ['DOMAIN_NAME=myDomain',
'ADMIN_NAME=myadmin',
...



Viewing all articles
Browse latest Browse all 181

Trending Articles