-
Notifications
You must be signed in to change notification settings - Fork 91
Issue#130 add docker sample that creates a domain #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue#130 add docker sample that creates a domain #131
Conversation
…ithub.com:oracle/weblogic-deploy-tooling into issue#130-add-docker-sample-that-creates-a-domain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Richard I have made an initial review, please let me know if you have any questions.
samples/docker-domain/Dockerfile
Outdated
if [ -n "$WDT_MODEL" ]; then MODEL_OPT="-model_file /u01/$WDT_MODEL"; fi && \ | ||
if [ -n "$WDT_ARCHIVE" ]; then ARCHIVE_OPT="-archive_file /u01/$WDT_ARCHIVE"; fi && \ | ||
/u01/weblogic-deploy/bin/createDomain.sh \ | ||
-oracle_home /u01/oracle \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the ORACLE_HOME env
samples/docker-domain/Dockerfile
Outdated
/u01/weblogic-deploy/bin/createDomain.sh \ | ||
-oracle_home /u01/oracle \ | ||
-java_home ${JAVA_HOME} \ | ||
-domain_parent /u01/oracle/user_projects/domains \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a DOMAIN_HOME env
samples/docker-domain/README.md
Outdated
@@ -0,0 +1,50 @@ | |||
Example Image with a WLS Domain | |||
================================ | |||
This Dockerfile extends the Oracle WebLogic image by creating a sample WLS 12.2.1.3 domain and cluster from a WebLogic Deploy Tool model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The official name is Oracle WebLogic Deploy Tooling (WDT). Can you add a link to the GitHub project since it will be in the docker-images sample project.
samples/docker-domain/README.md
Outdated
|
||
### WebLogic Deploy Tool | ||
|
||
The WebLogic Deploy Tool is used to create the domain image from a model file. Details about the tool and the model file format can be found in its GitHub project: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give an example instead of differing to WDT project. You might want to say that a user can discover using WDT a preexisting domain which produces a yaml that captures the configuration. This yaml can be changed to specify specific configuration parameters and then the create script of WDT is used to create the domain inside the image.
samples/docker-domain/README.md
Outdated
|
||
### How to Build and Run | ||
|
||
**NOTE:** The image is based on a WebLogic image in the Docker store: store/oracle/weblogic:12.2.1.3 . Verify that you have access to download this image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
download this image to your local repository.
samples/docker-domain/README.md
Outdated
|
||
$ docker run -d --name MS1 --link wlsadmin:wlsadmin -p 8001:8001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD=<admin_password> -e MS_NAME=MS1 --volumes-from wlsadmin 12213-domain createServer.sh | ||
|
||
TBD To start a second Managed Server (MS2), run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBD, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't implemented the server start scripts yet. Would you rather just take these sections out until that is in place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would the script to start MS1 different than the script to start MS2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see so you do not have scripts to start MS1 or MS2, no this is fine since we will not commit to docker-images until everything is ready.
samples/docker-domain/README.md
Outdated
|
||
$ docker run -d --name MS2 --link wlsadmin:wlsadmin -p 8002:8001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD=<admin_password> -e MS_NAME=MS2 --volumes-from wlsadmin 12213-domain createServer.sh | ||
|
||
The above scenario from this sample will give you a WebLogic domain with a cluster set up on a single host environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the cluster a configure cluster a dynamic cluster or it does not matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like it to be a dynamic cluster, if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently just a configure cluster. Plan to make this a dynamic cluster when server scripts are ready.
# | ||
#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
docker build \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avi might ask that you have a buildDockerImage script similar to https://github.com/oracle/docker-images/blob/master/OracleWebLogic/samples/12213-webtier-apache/buildDockerImage.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that looks pretty straightforward. Let me know if he wants to do this.
@@ -0,0 +1,2 @@ | |||
ADMIN_PORT=7001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this domain.properties if you have a simple-properties.yaml and can define the defaults in the Dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't currently use this for the admin startup script, not sure if we will need for the server scripts. One problem is that we can't easily extract the values we want from the yaml model file. I'll know more once we have startup scripts.
# | ||
# - wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/weblogic-deploy-tooling-0.11/weblogic-deploy.zip | ||
# | ||
weblogic-deploy.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a checksum for this zip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github doesn't appear to offer checksum capabilities. We could put something in the release notes, but seems kinda odd.
samples/docker-domain/Dockerfile
Outdated
# ----------------------- | ||
# Put all downloaded files in the same directory as this Dockerfile | ||
# Run: | ||
# $ sudo docker build \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should tell customers where to put application binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or... make it clear that these should be included with the application model?
samples/docker-domain/README.md
Outdated
================================ | ||
This Dockerfile extends the Oracle WebLogic image by creating a sample WLS 12.2.1.3 domain and cluster from a WebLogic Deploy Tool model. | ||
|
||
Utility scripts are copied into the image, enabling users to plug Node Manager automatically into the Administration Server running on another container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more a question, since I'm hoping to see them below, but... What are these scripts and what exactly do they do?
samples/docker-domain/README.md
Outdated
|
||
$ docker run -d --name MS2 --link wlsadmin:wlsadmin -p 8002:8001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD=<admin_password> -e MS_NAME=MS2 --volumes-from wlsadmin 12213-domain createServer.sh | ||
|
||
The above scenario from this sample will give you a WebLogic domain with a cluster set up on a single host environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like it to be a dynamic cluster, if possible.
|
||
# Start Admin Server and tail the logs | ||
${DOMAIN_HOME}/startWebLogic.sh | ||
touch ${DOMAIN_HOME}/servers/AdminServer/logs/AdminServer.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should discuss this as for K8s we're going to want the logs relocated outside the domain home to a file-system location where a persistent volume is mounted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is planned to have a dynamic cluster, still working on that. I think the log directory can be moved to persistent volume.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this statement does not preclude the logs being outside. The mechanism in Docker -v is used to map the logs outside of the container.
…-creates-a-domain' into issue#130-add-docker-sample-that-creates-a-domain
…ithub.com:oracle/weblogic-deploy-tooling into issue#130-add-docker-sample-that-creates-a-domain
This looks good to me. My only comment is that we may want to note that a domain-in-image's image needs to be protected with the same level of care as a stand-alone domain-home, since it contains sufficient information to decrypt WL passwords (the domain secret/SerializedSystemIni.dat). Derek, Monica, and I have discussed in more detail via Slack... |
add docker sample that creates a domain. Fixes #130