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

Configure Jenkins agent using declarative pipeline

$
0
0

HOWTO

  • Configure agents  https://www.howtoforge.com/tutorial/ubuntu-jenkins-master-slave/
  • Agent x node https://stackoverflow.com/questions/42050626/jenkins-pipeline-agent-vs-node
  • Declarative pipeline syntax https://www.jenkins.io/doc/book/pipeline/syntax/
  • Pipeline example https://www.jenkins.io/doc/pipeline/examples/
  • https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-multiple-agents

 

Configure Jenkins agent

agent

    The agent section specifies where the entire Pipeline, or a specific stage, will execute in the Jenkins environment depending on where the agentsection is placed. The section must be defined at the top-level inside the pipeline block, but stage-level usage is optional.

 

label 
  
   Execute the Pipeline, or stage, on an agent available in the Jenkins environment with the provided label. For example: agent { label 'my-defined-label' }

 

node

agent { node { label 'labelName' } } behaves the same as agent { label 'labelName' }, but node allows for additional options (such as customWorkspace).

 

Multiple agents

pipeline {
agent none
stages {
stage('Build') {
agent any
steps {
checkout scm
sh 'make'
stash includes: '**/target/*.jar', name: 'app'
}
}
stage('Test on Linux') {
agent {
label 'linux'
}
steps {
unstash 'app'
sh 'make check'
}
post {
always {
junit '**/target/*.xml'
}
}
}
stage('Test on Windows') {
agent {
label 'windows'
}
steps {
unstash 'app'
bat 'make check'
}
post {
always {
junit '**/target/*.xml'
}
}
}
}
}

Create Java EE 8 mininal project from Maven archetype

$
0
0

 HOWTO

 

Project

 https://github.com/dveselka/java-ee-8

Generate project from Adam Bien minimal archetype

[dave@dave git]$ cd java-ee-8/
[dave@dave java-ee-8]$ mvn archetype:generate -Dfilter=com.airhacks:javaee8-essentials-archetype
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: remote -> com.airhacks:javaee8-essentials-archetype (Java EE 8 project quickstart template. Clean, lean and minimalistic.)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1
Choose com.airhacks:javaee8-essentials-archetype version:
1: 0.0.1
2: 0.0.2
3: 0.0.4
Choose a number: 3: 3
Downloading from central: https://repo.maven.apache.org/maven2/com/airhacks/javaee8-essentials-archetype/0.0.4/javaee8-essentials-archetype-0.0.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/com/airhacks/javaee8-essentials-archetype/0.0.4/javaee8-essentials-archetype-0.0.4.pom (3.9 kB at 13 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/com/airhacks/javaee8-essentials-archetype/0.0.4/javaee8-essentials-archetype-0.0.4.jar
Downloaded from central: https://repo.maven.apache.org/maven2/com/airhacks/javaee8-essentials-archetype/0.0.4/javaee8-essentials-archetype-0.0.4.jar (3.9 kB at 16 kB/s)
Define value for property 'groupId': com.dave
Define value for property 'artifactId': java-ee8-minimal
Define value for property 'version' 1.0-SNAPSHOT: :
Define value for property 'package' com.dave: :
Confirm properties configuration:
groupId: com.dave
artifactId: java-ee8-minimal
version: 1.0-SNAPSHOT
package: com.dave
Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: javaee8-essentials-archetype:0.0.4
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.dave
[INFO] Parameter: artifactId, Value: java-ee8-minimal
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.dave
[INFO] Parameter: packageInPathFormat, Value: com/dave
[INFO] Parameter: package, Value: com.dave
[INFO] Parameter: groupId, Value: com.dave
[INFO] Parameter: artifactId, Value: java-ee8-minimal
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Project created from Archetype in dir: /git/java-ee-8/java-ee8-minimal
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.463 s
[INFO] Finished at: 2020-12-27T10:48:01+01:00
[INFO] ------------------------------------------------------------------------

 

Generated project
[dave@dave java-ee-8]$ find java-ee8-minimal/
java-ee8-minimal/
java-ee8-minimal/pom.xml
java-ee8-minimal/Dockerfile
java-ee8-minimal/README.md
java-ee8-minimal/buildAndRun.sh
java-ee8-minimal/src
java-ee8-minimal/src/main
java-ee8-minimal/src/main/java
java-ee8-minimal/src/main/java/com
java-ee8-minimal/src/main/java/com/airhacks
java-ee8-minimal/src/main/java/com/airhacks/JAXRSConfiguration.java
java-ee8-minimal/src/main/java/com/airhacks/ping
java-ee8-minimal/src/main/java/com/airhacks/ping/boundary
java-ee8-minimal/src/main/java/com/airhacks/ping/boundary/PingResource.java
java-ee8-minimal/src/main/resources
java-ee8-minimal/src/main/resources/META-INF
java-ee8-minimal/src/main/resources/META-INF/microprofile-config.properties
java-ee8-minimal/src/main/webapp
java-ee8-minimal/src/main/webapp/WEB-INF
java-ee8-minimal/src/main/webapp/WEB-INF/beans.xml

 

Deploy Java EE 8 application into JBoss Wildfy AS running on Docker

$
0
0

HOWTO

 

GitHub projects

Start JBoss Wildfly using Docker

[dave@dave java-ee-8]$ docker run -it jboss/wildfly
Unable to find image 'jboss/wildfly:latest' locally
latest: Pulling from jboss/wildfly
75f829a71a1c: Pull complete
7b11f246b3d3: Pull complete
b765648c2a58: Pull complete
506aff4a9c5a: Pull complete
e7e0b6e22530: Pull complete
Digest: sha256:152a4dd6e524afa133dd200b1a4ba6411dc334dfd84921d5eafcbae85f859c00
Status: Downloaded newer image for jboss/wildfly:latest
=========================================================================

JBoss Bootstrap Environment

JBOSS_HOME: /opt/jboss/wildfly

JAVA: /usr/lib/jvm/java/bin/java

JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

10:40:59,521 INFO [org.jboss.modules] (main) JBoss Modules version 1.10.2.Final
10:41:00,013 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.12.Final
10:41:00,021 INFO [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
10:41:00,093 WARN [org.jboss.as.warn.fd-limit] (main) WFLYSRV0071: The operating system has limited the number of open files to 1024 for this process; a value of at least 4096 is recommended
10:41:00,133 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 21.0.1.Final (WildFly Core 13.0.3.Final) starting
10:41:00,961 INFO [org.wildfly.security] (ServerService Thread Pool -- 27) ELY00001: WildFly Elytron version 1.13.1.Final
10:41:01,501 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:41:01,542 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 36) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
10:41:01,611 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
10:41:01,626 INFO [org.xnio] (MSC service thread 1-5) XNIO version 3.8.2.Final
10:41:01,631 INFO [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.8.2.Final
10:41:01,671 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 52) WFLYCLINF0001: Activating Infinispan subsystem.
10:41:01,685 INFO [org.wildfly.extension.microprofile.jwt.smallrye._private] (ServerService Thread Pool -- 63) WFLYJWT0001: Activating WildFly MicroProfile JWT Subsystem
10:41:01,693 INFO [org.wildfly.extension.microprofile.config.smallrye._private] (ServerService Thread Pool -- 61) WFLYCONF0001: Activating WildFly MicroProfile Config Subsystem
10:41:01,700 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 5.0.19.Final
10:41:01,709 INFO [org.wildfly.extension.microprofile.health.smallrye] (ServerService Thread Pool -- 62) WFLYHEALTH0001: Activating Eclipse MicroProfile Health Subsystem
10:41:01,711 INFO [org.jboss.as.jaxrs] (ServerService Thread Pool -- 54) WFLYRS0016: RESTEasy version 3.13.2.Final
10:41:01,718 WARN [org.wildfly.extension.io] (ServerService Thread Pool -- 53) WFLYIO005: Your system is configured with 1024 file descriptors, but your current application server configuration will require a minimum of 1032 (and probably more than that); attempting to adjust, however you should expect stability problems unless you increase this number
10:41:01,725 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 76) WFLYWS0002: Activating WebServices Extension
10:41:01,726 INFO [org.wildfly.extension.microprofile.metrics.smallrye] (ServerService Thread Pool -- 64) WFLYMETRICS0001: Activating Eclipse MicroProfile Metrics Subsystem
10:41:01,696 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 74) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
10:41:01,733 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 59) WFLYJSF0007: Activated the following JSF Implementations: [main]
10:41:01,733 INFO [org.jboss.as.security] (ServerService Thread Pool -- 72) WFLYSEC0002: Activating Security Subsystem
10:41:01,739 INFO [org.wildfly.extension.microprofile.opentracing] (ServerService Thread Pool -- 65) WFLYTRACEXT0001: Activating MicroProfile OpenTracing Subsystem
10:41:01,741 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 53) WFLYIO001: Worker 'default' has auto-configured to 16 IO threads with 128 max task threads based on your 8 available processors
10:41:01,740 INFO [org.jboss.as.security] (MSC service thread 1-1) WFLYSEC0001: Current PicketBox version=5.0.3.Final-redhat-00006
10:41:01,735 INFO [org.jboss.as.connector] (MSC service thread 1-8) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.23.Final)
10:41:01,759 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 66) WFLYNAM0001: Activating Naming Subsystem
10:41:01,780 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0003: Undertow 2.2.2.Final starting
10:41:01,849 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 44) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
10:41:01,864 INFO [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
10:41:01,869 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
10:41:01,881 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0018: Started Driver service with driver-name = h2
10:41:02,030 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 75) WFLYUT0014: Creating file handler for path '/opt/jboss/wildfly/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
10:41:02,043 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0012: Started server default-server.
10:41:02,046 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0018: Host default-host starting
10:41:02,051 INFO [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 128 (per class), which is derived from thread worker pool sizing.
10:41:02,051 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 32 (per class), which is derived from the number of CPUs on this host.
10:41:02,194 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
10:41:02,297 INFO [org.jboss.as.ejb3] (MSC service thread 1-5) WFLYEJB0493: EJB subsystem suspension complete
10:41:02,381 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
10:41:02,549 INFO [org.jboss.as.patching] (MSC service thread 1-2) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
10:41:02,568 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore /opt/jboss/wildfly/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
10:41:02,580 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) WFLYDS0013: Started FileSystemDeploymentService for directory /opt/jboss/wildfly/standalone/deployments
10:41:02,668 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
10:41:02,763 INFO [org.jboss.ws.common.management] (MSC service thread 1-3) JBWS022052: Starting JBossWS 5.4.2.Final (Apache CXF 3.3.7)
10:41:02,946 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
10:41:02,949 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 21.0.1.Final (WildFly Core 13.0.3.Final) started in 3839ms - Started 317 of 579 services (370 services are lazy, passive or on-demand)
10:41:02,951 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
10:41:02,951 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

 

SSH into Docker container
[dave@dave java-ee-8]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
32092f4064f8 jboss/wildfly "/opt/jboss/wildfly/…" 4 minutes ago Up 4 minutes 8080/tcp thirsty_mccarthy
[dave@dave java-ee-8]$ docker exec -it thirsty_mccarthy /bin/bash
[jboss@32092f4064f8 ~]$ uname -a
Linux 32092f4064f8 5.9.15-100.fc32.x86_64 #1 SMP Wed Dec 16 16:49:20 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[jboss@32092f4064f8 ~]$ more /etc/re
redhat-release resolv.conf
[jboss@32092f4064f8 ~]$ more /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
[jboss@32092f4064f8 ~]$ ls /opt/jboss/
.bash_logout .bash_profile .bashrc wildfly/
[jboss@32092f4064f8 ~]$ ls /opt/jboss/
.bash_logout .bash_profile .bashrc wildfly/
[jboss@32092f4064f8 ~]$ ls /opt/jboss/wildfly/
.installation/ LICENSE.txt appclient/ copyright.txt domain/ modules/ welcome-content/
.well-known/ README.txt bin/ docs/ jboss-modules.jar standalone/

 Start the container with port mapping


[dave@dave java-ee8-minimal]$ docker run -it com.dave/java-ee8-minimal /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement=0.0.0.0
=========================================================================

JBoss Bootstrap Environment

JBOSS_HOME: /opt/jboss/wildfly

JAVA: /usr/lib/jvm/java/bin/java

JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

11:05:36,608 INFO [org.jboss.modules] (main) JBoss Modules version 1.10.2.Final
11:05:37,223 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.12.Final
11:05:37,235 INFO [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
11:05:37,349 WARN [org.jboss.as.warn.fd-limit] (main) WFLYSRV0071: The operating system has limited the number of open files to 1024 for this process; a value of at least 4096 is recommended
11:05:37,409 INFO [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 21.0.1.Final (WildFly Core 13.0.3.Final) starting

 

Create custom Docker image with added start command and admin user



$ more Dockerfile
FROM jboss/wildfly

RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#123 --silent

COPY ./target/java-ee8-minimal.war /opt/jboss/wildfly/standalone/deployments/

CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]



$ docker build -t com.dave/java-ee8-minimal .
Sending build context to Docker daemon 45.06kB
Step 1/4 : FROM jboss/wildfly
latest: Pulling from jboss/wildfly
75f829a71a1c: Pull complete
7b11f246b3d3: Pull complete
b765648c2a58: Pull complete
506aff4a9c5a: Pull complete
e7e0b6e22530: Pull complete
Digest: sha256:152a4dd6e524afa133dd200b1a4ba6411dc334dfd84921d5eafcbae85f859c00
Status: Downloaded newer image for jboss/wildfly:latest
---> 8d9094a2468d
Step 2/4 : RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#123 --silent
---> Running in aa5d352002f3
Removing intermediate container aa5d352002f3
---> 8b8272a09327
Step 3/4 : COPY ./target/java-ee8-minimal.war /opt/jboss/wildfly/standalone/deployments/
---> cc421f2ffe58
Step 4/4 : CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
---> Running in 1dc6700a5950
Removing intermediate container 1dc6700a5950
---> fc3355adcac3
Successfully built fc3355adcac3
Successfully tagged com.dave/java-ee8-minimal:latest


Get IP address

$$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ba4374f6cbb1 com.dave/java-ee8-minimal "/opt/jboss/wildfly/…" 4 minutes ago Up 4 minutes 8080/tcp java-ee8-minimal
[dave@dave java-ee-8]$ docker inspect -f '{{ .NetworkSettings.IPAddress }}' java-ee8-minimal
172.17.0.2

Start the mofified container with mapped ports and added admin user

[dave@dave java-ee8-minimal]$ docker run -it --name java-ee8-minimal com.dave/java-ee8-minimal
=========================================================================

JBoss Bootstrap Environment

JBOSS_HOME: /opt/jboss/wildfly

JAVA: /usr/lib/jvm/java/bin/java

JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

11:18:28,581 INFO [org.jboss.modules] (main) JBoss Modules version 1.10.2.Final
11:18:29,127 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.12.Final
11:18:29,135 INFO [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
11:18:29,219 WARN [org.jboss.as.warn.fd-limit] (main) WFLYSRV0071: The operating system has limited the number of open files to 1024 for this process; a value of at least 4096 is recommended
11:18:29,286 INFO [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 21.0.1.Final (WildFly Core 13.0.3.Final) starting
11:18:30,137 INFO [org.wildfly.security] (ServerService Thread Pool -- 28) ELY00001: WildFly Elytron version 1.13.1.Final
11:18:30,739 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
11:18:30,782 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 21) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
11:18:30,819 INFO [org.jboss.as.repository] (ServerService Thread Pool -- 9) WFLYDR0001: Content added at location /opt/jboss/wildfly/standalone/data/content/9a/599d68cb6a082432b9ec80cfbc307a3345471e/content
11:18:30,905 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
11:18:30,921 INFO [org.xnio] (MSC service thread 1-8) XNIO version 3.8.2.Final
11:18:30,928 INFO [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.8.2.Final
11:18:30,982 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 52) WFLYCLINF0001: Activating Infinispan subsystem.
11:18:30,969 WARN [org.wildfly.extension.io] (ServerService Thread Pool -- 53) WFLYIO005: Your system is configured with 1024 file descriptors, but your current application server configuration will require a minimum of 1032 (and probably more than that); attempting to adjust, however you should expect stability problems unless you increase this number
11:18:31,001 INFO [org.jboss.as.jaxrs] (ServerService Thread Pool -- 54) WFLYRS0016: RESTEasy version 3.13.2.Final
11:18:31,003 INFO [org.jboss.as.connector] (MSC service thread 1-7) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.23.Final)
11:18:31,022 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 44) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
11:18:31,038 INFO [org.wildfly.extension.microprofile.metrics.smallrye] (ServerService Thread Pool -- 64) WFLYMETRICS0001: Activating Eclipse MicroProfile Metrics Subsystem
11:18:31,038 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = h2
11:18:31,066 INFO [org.wildfly.extension.microprofile.jwt.smallrye._private] (ServerService Thread Pool -- 63) WFLYJWT0001: Activating WildFly MicroProfile JWT Subsystem
11:18:31,038 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 59) WFLYJSF0007: Activated the following JSF Implementations: [main]
11:18:31,069 INFO [org.wildfly.extension.microprofile.health.smallrye] (ServerService Thread Pool -- 62) WFLYHEALTH0001: Activating Eclipse MicroProfile Health Subsystem
11:18:31,069 INFO [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 5.0.19.Final
11:18:31,079 INFO [org.wildfly.extension.microprofile.opentracing] (ServerService Thread Pool -- 65) WFLYTRACEXT0001: Activating MicroProfile OpenTracing Subsystem
11:18:31,079 INFO [org.wildfly.extension.microprofile.config.smallrye._private] (ServerService Thread Pool -- 61) WFLYCONF0001: Activating WildFly MicroProfile Config Subsystem
11:18:31,083 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 53) WFLYIO001: Worker 'default' has auto-configured to 16 IO threads with 128 max task threads based on your 8 available processors
11:18:31,100 INFO [org.jboss.as.security] (ServerService Thread Pool -- 72) WFLYSEC0002: Activating Security Subsystem
11:18:31,105 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 66) WFLYNAM0001: Activating Naming Subsystem
11:18:31,099 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 74) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
11:18:31,103 INFO [org.jboss.as.security] (MSC service thread 1-3) WFLYSEC0001: Current PicketBox version=5.0.3.Final-redhat-00006
11:18:31,135 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 76) WFLYWS0002: Activating WebServices Extension
11:18:31,153 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0003: Undertow 2.2.2.Final starting
11:18:31,197 INFO [org.jboss.as.naming] (MSC service thread 1-8) WFLYNAM0003: Starting Naming Service
11:18:31,208 INFO [org.jboss.as.mail.extension] (MSC service thread 1-8) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
11:18:31,356 INFO [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 32 (per class), which is derived from the number of CPUs on this host.
11:18:31,358 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 128 (per class), which is derived from thread worker pool sizing.
11:18:31,369 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 75) WFLYUT0014: Creating file handler for path '/opt/jboss/wildfly/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
11:18:31,382 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0012: Started server default-server.
11:18:31,400 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0018: Host default-host starting
11:18:31,507 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
11:18:31,571 INFO [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0493: EJB subsystem suspension complete
11:18:31,643 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
11:18:31,878 INFO [org.jboss.as.patching] (MSC service thread 1-3) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
11:18:31,896 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-8) WFLYDM0111: Keystore /opt/jboss/wildfly/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
11:18:31,910 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) WFLYDS0013: Started FileSystemDeploymentService for directory /opt/jboss/wildfly/standalone/deployments
11:18:31,919 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "java-ee8-minimal.war" (runtime-name: "java-ee8-minimal.war")
11:18:31,989 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
11:18:32,071 INFO [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBossWS 5.4.2.Final (Apache CXF 3.3.7)
11:18:32,618 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0003: Processing weld deployment java-ee8-minimal.war
11:18:32,877 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-4) HV000001: Hibernate Validator 6.0.21.Final
11:18:33,273 INFO [io.jaegertracing.internal.JaegerTracer] (MSC service thread 1-4) No shutdown hook registered: Please call close() manually on application shutdown.
11:18:33,390 INFO [org.jboss.weld.Version] (MSC service thread 1-3) WELD-000900: 3.1.5 (Final)
11:18:33,681 INFO [org.infinispan.CONTAINER] (ServerService Thread Pool -- 78) ISPN000128: Infinispan version: Infinispan 'Corona Extra' 11.0.4.Final
11:18:33,743 INFO [org.infinispan.CONFIG] (MSC service thread 1-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
11:18:33,745 INFO [org.infinispan.CONFIG] (MSC service thread 1-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
11:18:33,870 INFO [org.infinispan.PERSISTENCE] (ServerService Thread Pool -- 78) ISPN000556: Starting user marshaller 'org.wildfly.clustering.infinispan.spi.marshalling.InfinispanProtoStreamMarshaller'
11:18:33,934 INFO [io.smallrye.metrics] (MSC service thread 1-4) MicroProfile: Metrics activated (SmallRye Metrics version: 2.4.2)
11:18:34,134 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 78) WFLYCLINF0002: Started http-remoting-connector cache from ejb container
11:18:34,899 INFO [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 79) RESTEASY002225: Deploying javax.ws.rs.core.Application: class com.airhacks.JAXRSConfiguration$Proxy$_$$_WeldClientProxy
11:18:34,959 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 79) WFLYUT0021: Registered web context: '/java-ee8-minimal' for server 'default-server'
11:18:35,066 INFO [org.jboss.as.server] (ServerService Thread Pool -- 45) WFLYSRV0010: Deployed "java-ee8-minimal.war" (runtime-name : "java-ee8-minimal.war")
11:18:35,129 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
11:18:35,133 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 21.0.1.Final (WildFly Core 13.0.3.Final) started in 7081ms - Started 441 of 664 services (375 services are lazy, passive or on-demand)
11:18:35,136 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://0.0.0.0:9990/management
11:18:35,136 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://0.0.0.0:9990


Access the Admin console at port 9990 

Access the application at http://172.17.0.2:8080/java-ee8-minimal/resources/ping

Enjoy Jakarta EE with MicroProfile 2+!

 

Deploy JBoss Wildfly Java EE app with Maven using Jenkins pipeline and Docker

$
0
0

 HOWTO

 

GitHub projects


Pipeline file https://github.com/dveselka/java-ee-8/blob/main/java-ee8-minimal/Jenkinsfile

Add jenkins user into docker group

sudo usermod -aG docker jenkins
sudo systemctl restart jenkins

Checkout app from GitHub

        stage('Checkout') {
git url: 'https://github.com/dveselka/java-ee-8/', credentialsId: 'dave-devops', branch: 'main'
}

 

Build application using Maven

        stage('Build') {

dir('java-ee8-minimal'){
withMaven(maven:'Maven'
) {
sh 'pwd'
sh 'env'
sh 'mvn clean package'

def pom = readMavenPom file:'pom.xml'
print pom.version
env.version = pom.version
}
}
}

 

Build Docker image

https://www.jenkins.io/doc/book/pipeline/docker/
        stage("BuildDockerImage"){
dir('java-ee8-minimal'){
def customImage = docker.build("my-image:${env.BUILD_ID}")
}
}
Jenkins log - Docker image build
[Pipeline] { (Image)
[Pipeline] dir
Running in /var/lib/jenkins/workspace/java-ee-8/java-ee8-minimal
[Pipeline] {
[Pipeline] isUnix
[Pipeline] sh
+ docker build -t com.dave/java-ee8-minimal:4 .
Sending build context to Docker daemon 46.59kB

Step 1/4 : FROM jboss/wildfly
---> 8d9094a2468d
Step 2/4 : RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#123 --silent
---> Using cache
---> 8b8272a09327
Step 3/4 : COPY ./target/java-ee8-minimal.war /opt/jboss/wildfly/standalone/deployments/
---> 229ba08da529
Step 4/4 : CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
---> Running in fdea8bab71ee
Removing intermediate container fdea8bab71ee
---> c165d87af41e
Successfully built c165d87af41e
Successfully tagged com.dave/java-ee8-minimal:4

 

Push Docker image to repository (optional)

 

Run container

        stage ('Run') {
dir('java-ee8-minimal'){
docker.image("com.dave/java-ee8-minimal:${env.BUILD_ID}").run('-it --name java-ee8-minimal com.dave/java-ee8-minimal')
}
}

 

Install Jenkins Docker plugin to remove this error

groovy.lang.MissingPropertyException: No such property: docker for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:270)

 
Jenkins log - run Docker container

[Pipeline] { (Run)
[Pipeline] dir
Running in /var/lib/jenkins/workspace/java-ee-8/java-ee8-minimal
[Pipeline] {
[Pipeline] isUnix
[Pipeline] sh
+ docker run -d -it --name java-ee8-minimal com.dave/java-ee8-minimal:6
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS
Docker process
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0eb3d2588c6b com.dave/java-ee8-minimal:6 "/opt/jboss/wildfly/…" 2 minutes ago Up 2 minutes 8080/tcp java-ee8-minimal

Call another job in Jenkins declarative pipeline with parameters

$
0
0

 HOWTO

 

Parameters on the pipeline job

pipeline {
agent any
parameters {
string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')

text(name: 'BIOGRAPHY', defaultValue: '', description: 'Enter some information about the person')

booleanParam(name: 'TOGGLE', defaultValue: true, description: 'Toggle this value')

choice(name: 'CHOICE', choices: ['One', 'Two', 'Three'], description: 'Pick something')

password(name: 'PASSWORD', defaultValue: 'SECRET', description: 'Enter a password')
}
stages {
stage('Example') {
steps {
echo "Hello ${params.PERSON}"

echo "Biography: ${params.BIOGRAPHY}"

echo "Toggle: ${params.TOGGLE}"

echo "Choice: ${params.CHOICE}"

echo "Password: ${params.PASSWORD}"
}
}
}
}

 

Called job


pipeline {
agent {
label 'dave_node'
}
parameters {
string(name: 'branch', defaultValue: 'main', description: 'Some branch')
}
stages {
stage('CalledJob') {

steps {

echo "Build CalledJob branch ${params.branch}"

script {
params.each {param ->
println "${param.key} -> ${param.value} "
} }


git url: 'https://github.com/dveselka/calledjob/', credentialsId: 'daveCredentials', branch: "${params.branch}"
}
}
}
}


Calling job


stage('BuildOtherJob') {
steps {

echo "Call other job job"
script {
build job: 'jobtocall', parameters: [
string(name: 'branch', value: "some_branch")
]
}
}
}


Ansible - create multiple directories

$
0
0

HOWTO

 

GitHub repo

 


 Create role

- name: Create /app/dave  dir
become: true
file:
path: /app/dave
state: directory
owner: dave
group: dave
recurse: yes
mode: '0755'

- name: Create /app/dave/ appl dirs
file:
path: "{{ item }}"
owner: dave
group: dave
recurse: yes
with_items:
- /app/dave/opt/jboss
- /app/dave/data/

Dir structure
[dave@dave devops-ansible]$ find create-dev-env/
create-dev-env/
create-dev-env/tasks
create-dev-env/tasks/main.yml

 

Call role 

Create file local.yml

---
- name: Configure local dev env
hosts: localhost
connection: local
gather_facts: no
roles:
- dave-dev-env

 

Run playbook

ansible-playbook local.yml



Configure Weblogic Custom Network Channel

$
0
0

HOWTO

WLST to add custom channel

[dave@dave base_domain]$ more Script1611468688411.py 

cd('/Servers/AdminServer')
cmo.createNetworkAccessPoint('DaveChannel')

cd('/Servers/AdminServer/NetworkAccessPoints/DaveChannel')
cmo.setProtocol('t3')
cmo.setListenPort(8001)
cmo.setEnabled(true)
cmo.setHttpEnabledForThisProtocol(true)
cmo.setTunnelingEnabled(false)
cmo.setOutboundEnabled(false)
cmo.setTwoWaySSLEnabled(false)
cmo.setClientCertificateEnforced(false)

activate()

Weblogic server log

####<Jan 24, 2021 6:13:42,045 AM GMT> <Notice> <Server> <f403a85ea0c9> <AdminServer> <weblogic.socket.ServerListenThread> <<WLS Kernel>> <> <365e7dc7-40ef-4cff-bf44-b736fef5ffdd-0000000e> <1611468822045> <[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] 
> <BEA-002613> <Channel "DaveChannel[1]" is now listening on 127.0.0.1:8001 for protocols t3, http.>

Fedora disk cleanup

$
0
0

HOWTO

 

 

Disk usage - show largest folders

[dave@dave ~]$ sudo du --exclude="/home" -x -h -a / | sort -r -h | head -30
65G /
49G /var
42G /var/lib
29G /var/lib/libvirt/images
29G /var/lib/libvirt
21G /var/lib/libvirt/images/guest.img
11G /usr
9.3G /var/lib/docker
8.3G /var/lib/libvirt/images/Fedora-Workstation-31
6.5G /var/lib/libvirt/images/Fedora-Workstation-31/Fedora-Workstation-31-20180518.0.x86_64.qcow2
4.7G /var/lib/docker/overlay2
4.6G /var/lib/docker/volumes
3.8G /usr/lib64
3.1G /usr/share
2.9G /var/cache
2.4G /var/lib/docker/volumes/minikube/_data
2.4G /var/lib/docker/volumes/minikube
2.3G /var/lib/docker/volumes/minikube/_data/lib
2.2G /var/lib/snapd
2.1G /var/lib/docker/volumes/minikube/_data/lib/docker/overlay2
2.1G /var/lib/docker/volumes/minikube/_data/lib/docker
2.1G /git
2.0G /var/log
1.9G /var/log/journal/355c2948e7a04c958080cf5f5d683b14
1.9G /var/log/journal
1.9G /usr/lib
1.8G /var/lib/libvirt/images/Fedora-Workstation-31/Fedora-Workstation-Live-x86_64-31-1.9.iso
1.7G /app
1.5G /var/snap/microk8s/common/var
1.5G /var/snap/microk8s/common

Docker cleanup
[dave@dave ~]$ docker system prune -a
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache

Are you sure you want to continue? [y/N] y


Create Centos 8 Oracle JDK Docker image

$
0
0

HOWTO

 

Download Oracle JDK RPM from https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

 

GitHub repo https://github.com/dveselka/weblogic/tree/master/docker-oracle-java-8

Docker file

 

[dave@dave docker-oracle-java-8]$ more Dockerfile 
FROM centos:8

ADD jdk-8u231-linux-x64.rpm jdk-8u231-linux-x64.rpm

RUN dnf -y install jdk-8u231-linux-x64.rpm

 

 

Build Docker image 

[dave@dave docker-oracle-java-8]$ docker build -t dveselka/oracle-jdk-8 .
Sending build context to Docker daemon 178.6MB
Step 1/3 : FROM centos:8
---> 300e315adb2f
Step 2/3 : ADD jdk-8u231-linux-x64.rpm jdk-8u231-linux-x64.rpm
---> e08cec58130d
Step 3/3 : RUN dnf -y install jdk-8u231-linux-x64.rpm
---> Running in edde270eb14b
CentOS Linux 8 - AppStream 2.8 MB/s | 6.3 MB 00:02
CentOS Linux 8 - BaseOS 2.5 MB/s | 2.3 MB 00:00
CentOS Linux 8 - Extras 16 kB/s | 8.6 kB 00:00
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
jdk1.8 x86_64 2000:1.8.0_231-fcs @commandline 170 M

Transaction Summary
================================================================================
Install 1 Package

Total size: 170 M
Installed size: 294 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : jdk1.8-2000:1.8.0_231-fcs.x86_64 1/1
Running scriptlet: jdk1.8-2000:1.8.0_231-fcs.x86_64 1/1
Unpacking JAR files...
tools.jar...
plugin.jar...
javaws.jar...
deploy.jar...
rt.jar...
jsse.jar...
charsets.jar...
localedata.jar...

Verifying : jdk1.8-2000:1.8.0_231-fcs.x86_64 1/1

Installed:
jdk1.8-2000:1.8.0_231-fcs.x86_64

Complete!
Removing intermediate container edde270eb14b
---> bec32556adc7
Successfully built bec32556adc7
Successfully tagged dveselka/oracle-jdk-8:latest

 

Created image

 

[dave@dave docker-oracle-java-8]$ pwd
/git/weblogic/docker-oracle-java-8
[dave@dave docker-oracle-java-8]$ ls -1
Dockerfile
jdk-8u231-linux-x64.rpm
[dave@dave docker-oracle-java-8]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dveselka/oracle-jdk-8 latest bec32556adc7 3 minutes ago 799MB

 

Java inside running container

 

[dave@dave docker-oracle-java-8]$ docker run -it dveselka/oracle-jdk-8
[root@f679c2746165 /]# java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

[root@f679c2746165 /]# ls -l /usr/java
total 4
lrwxrwxrwx. 1 root root 16 Feb 7 09:53 default -> /usr/java/latest
drwxr-xr-x. 8 root root 4096 Feb 7 09:53 jdk1.8.0_231-amd64
lrwxrwxrwx. 1 root root 28 Feb 7 09:53 latest -> /usr/java/jdk1.8.0_231-amd64
[root@f679c2746165 /]# more /etc/redhat-release
CentOS Linux release 8.3.2011


Create Oracle Weblogic Docker image using Centos 8

$
0
0

 HOWTO

 

GitHub repo

 

Docker file

On Centos add link to JDK
RUN ln -s  /usr/java/latest/ /usr/java/jdk-8

 

[dave@dave docker-weblogic-centos-8]$ more Dockerfile.generic 
#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved.
#
#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
# ORACLE DOCKERFILES PROJECT
# --------------------------
# This is the Dockerfile for Oracle WebLogic Server 12.2.1.4 Generic Distro
#
# REQUIRED FILES TO BUILD THIS IMAGE
# ----------------------------------
# (1) fmw_12.2.1.4.0_wls_Disk1_1of1.zip
# Download the Generic installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html
#
# (2) server-jre-8uXX-linux-x64.tar.gz
# Download from http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html
#
# HOW TO BUILD THIS IMAGE
# -----------------------
# Put all downloaded files in the same directory as this Dockerfile
# Run:
# $ docker build -f Dockerfile.generic -t oracle/weblogic:12.2.1.4-generic .
#
# IMPORTANT
# ---------
# The resulting image of this Dockerfile contains a WLS Empty Domain.
#
# From the OIracle Docker GitHub Project
# --------------------------------------
FROM dveselka/oracle-jdk-8 as builder

# Maintainer
# ----------
MAINTAINER Daniel Veselka

# Common environment variables required for this build (do NOT change)
# --------------------------------------------------------------------
ENV ORACLE_HOME=/u01/oracle \
JAVA_HOME=/usr/java/latest \
USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin

# Setup filesystem and oracle user
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
# ------------------------------------------------------------
RUN mkdir -p /u01 && \
chmod a+xr /u01 && \
useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle

# Environment variables required for this build (do NOT change)
# -------------------------------------------------------------
ENV FMW_PKG=fmw_12.2.1.4.0_wls_Disk1_1of1.zip \
FMW_JAR=fmw_12.2.1.4.0_wls.jar

# Copy packages
# -------------
COPY $FMW_PKG install.file oraInst.loc /u01/
RUN chown oracle:oracle -R /u01

# Install
# ------------------------------------------------------------
USER oracle

RUN cd /u01 && ${JAVA_HOME}/bin/jar xf /u01/$FMW_PKG && cd - && \
${JAVA_HOME}/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE="WebLogic Server"&&
\
rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/oraInst.loc /u01/install.file && \
rm -rf /u01/oracle/cfgtoollogs

# Final image stage
FROM dveselka/oracle-jdk-8

ENV ORACLE_HOME=/u01/oracle \
USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \
SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh \
PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin

# Domain and Server environment variables
# ------------------------------------------------------------
ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \
ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \
ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \
ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"

# Setup filesystem and oracle user
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
# ------------------------------------------------------------
RUN mkdir -p /u01 && \
chmod a+xr /u01 && \
useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle

COPY --from=builder --chown=oracle:oracle /u01 /u01

# Copy scripts
#-------------
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/

RUN chmod +xr $SCRIPT_FILE && \
chown oracle:oracle -R /u01/oracle/createAndStartEmptyDomain.sh && \
chown oracle:oracle -R /u01/oracle/create-wls-domain.py

RUN ln -s /usr/java/latest/ /usr/java/jdk-8

USER oracle

WORKDIR ${ORACLE_HOME}

# Define default command to start script.
CMD ["/u01/oracle/createAndStartEmptyDomain.sh"]

Build image
[dave@dave docker-weblogic-centos-8]$ ./buildDockerImage.sh  -g -v 12.2.1.4
Checking if required packages are present and valid...
fmw_12.2.1.4.0_wls_Disk1_1of1.zip: OK
md5sum: WARNING: 1 line is improperly formatted
=====================
Building image 'oracle/weblogic:12.2.1.4-generic' ...
Sending build context to Docker daemon 866.5MB
Step 1/19 : FROM dveselka/oracle-jdk-8 as builder
---> bec32556adc7
Step 2/19 : MAINTAINER Daniel Veselka
---> Running in af3cef73329d
Removing intermediate container af3cef73329d
---> b93016858b03
Step 3/19 : ENV ORACLE_HOME=/u01/oracle JAVA_HOME=/usr/java/latest USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
---> Running in 63b3777a9040
Removing intermediate container 63b3777a9040
---> 82fb7b7cd6e8
Step 4/19 : RUN mkdir -p /u01 && chmod a+xr /u01 && useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle
---> Running in 63ba70aa9b9a
Removing intermediate container 63ba70aa9b9a
---> a4b954c717e1
Step 5/19 : ENV FMW_PKG=fmw_12.2.1.4.0_wls_Disk1_1of1.zip FMW_JAR=fmw_12.2.1.4.0_wls.jar
---> Running in 5b7fb0593599
Removing intermediate container 5b7fb0593599
---> 3447bba4b718
Step 6/19 : COPY $FMW_PKG install.file oraInst.loc /u01/
---> 09f0542931f2
Step 7/19 : RUN chown oracle:oracle -R /u01
---> Running in 8413ad11f113
Removing intermediate container 8413ad11f113
---> b8a2c7bb0114
Step 8/19 : USER oracle
---> Running in 75fa0ca56981
Removing intermediate container 75fa0ca56981
---> 6c85ed12d882
Step 9/19 : RUN cd /u01 && ${JAVA_HOME}/bin/jar xf /u01/$FMW_PKG && cd - && ${JAVA_HOME}/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE="WebLogic Server"&& rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/oraInst.loc /u01/install.file && rm -rf /u01/oracle/cfgtoollogs
---> Running in 07ef1bdaf763
/
Launcher log file is /tmp/OraInstall2021-02-07_11-34-29AM/launcher2021-02-07_11-34-29AM.log.
Extracting the installer . . . . . Done
Checking if CPU speed is above 300 MHz. Actual 2731.381 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 8015 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 27309 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2021-02-07_11-34-29AM
Log: /tmp/OraInstall2021-02-07_11-34-29AM/install2021-02-07_11-34-29AM.log
Setting ORACLE_HOME...
Setting INSTALL_TYPE...
Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Validations are disabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.2.1.4.0 completed successfully.
Logs successfully copied to /u01/oracle/.inventory/logs.
Removing intermediate container 07ef1bdaf763
---> f0ae2aba0dfc
Step 10/19 : FROM dveselka/oracle-jdk-8
---> bec32556adc7
Step 11/19 : ENV ORACLE_HOME=/u01/oracle USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
---> Running in 1a6644809ac8
Removing intermediate container 1a6644809ac8
---> efe0fb8d544c
Step 12/19 : ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" ADMIN_NAME="${ADMIN_NAME:-AdminServer}" ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"
---> Running in dcfe279ce745
Removing intermediate container dcfe279ce745
---> a5727a8ccc86
Step 13/19 : RUN mkdir -p /u01 && chmod a+xr /u01 && useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle
---> Running in b7a8d369be07
Removing intermediate container b7a8d369be07
---> db8cd5ffd3cc
Step 14/19 : COPY --from=builder --chown=oracle:oracle /u01 /u01
---> 7c6cf0a33e7c
Step 15/19 : COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/
---> ab295f4312d1
Step 16/19 : RUN chmod +xr $SCRIPT_FILE && chown oracle:oracle -R /u01/oracle/createAndStartEmptyDomain.sh && chown oracle:oracle -R /u01/oracle/create-wls-domain.py
---> Running in 591f7791b9ca
Removing intermediate container 591f7791b9ca
---> da623462c1b3
Step 17/19 : USER oracle
---> Running in 3992a4838297
Removing intermediate container 3992a4838297
---> 30090b2cc920
Step 18/19 : WORKDIR ${ORACLE_HOME}
---> Running in bfb4d92eea36
Removing intermediate container bfb4d92eea36
---> 5464d9a6c933
Step 19/19 : CMD ["/u01/oracle/createAndStartEmptyDomain.sh"]
---> Running in ee7f2ecb5dfb
Removing intermediate container ee7f2ecb5dfb
---> 6ca3e64b737c
Successfully built 6ca3e64b737c
Successfully tagged oracle/weblogic:12.2.1.4-generic

WebLogic Docker Image for 'generic' version 12.2.1.4 is ready to be extended:

--> oracle/weblogic:12.2.1.4-generic

Build completed in 78 seconds.


Docker images

[dave@dave docker-weblogic-centos-8]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
oracle/weblogic 12.2.1.4-generic 6ca3e64b737c 3 minutes ago 1.7GB
<none> <none> f0ae2aba0dfc 3 minutes ago 3.43GB
<none> <none> ac0fdf1fa66b 10 minutes ago 2.53GB
dveselka/oracle-jdk-8 latest bec32556adc7 2 hours ago 799MB
centos 8 300e315adb2f 2 months ago 209MB

Start via Docker compose https://github.com/dveselka/weblogic/tree/master/docker-compose

[dave@dave docker-compose]$ docker-compose up
Recreating adminserver ... done
Attaching to adminserver
adminserver | Domain Home is: /u01/oracle/user_projects/domains/base_domain
adminserver | .
adminserver | .
adminserver | JAVA Memory arguments: -Djava.security.egd=file:/dev/./urandom
adminserver | .
adminserver | CLASSPATH=/usr/java/jdk-8/lib/tools.jar:/u01/oracle/wlserver/server/lib/weblogic.jar:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/u01/oracle/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/u01/oracle/wlserver/common/derby/lib/derbynet.jar:/u01/oracle/wlserver/common/derby/lib/derbyclient.jar:/u01/oracle/wlserver/common/derby/lib/derby.jar
adminserver | .
adminserver | PATH=/u01/oracle/user_projects/domains/base_domain/bin:/u01/oracle/wlserver/server/bin:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/usr/java/jdk-8/jre/bin:/usr/java/jdk-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
adminserver | .
adminserver | ***************************************************
adminserver | * To start WebLogic Server, use a username and *
adminserver | * password assigned to an admin-level user. For *
adminserver | * server administration, use the WebLogic Server *
adminserver | * console at http://hostname:port/console *
adminserver | ***************************************************
adminserver | Starting WLS with line:
adminserver | /usr/java/jdk-8/bin/java -server -Djava.security.egd=file:/dev/./urandom -cp /u01/oracle/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/u01/oracle/wlserver/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -javaagent:/u01/oracle/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/u01/oracle/wlserver/server -Dweblogic.home=/u01/oracle/wlserver/server weblogic.Server
adminserver | <Feb 7, 2021 12:11:14 PM UTC> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
adminserver | <Feb 7, 2021 12:11:14 PM UTC> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
adminserver | <Feb 7, 2021 12:11:15 PM UTC> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.231-b11 from Oracle Corporation.>
adminserver | <Feb 7, 2021 12:11:15 PM UTC> <Info> <RCM> <BEA-2165021> <"ResourceManagement" is not enabled in this JVM. Enable "ResourceManagement" to use the WebLogic Server "Resource Consumption Management" feature. To enable "ResourceManagement", you must specify the following JVM options in the WebLogic Server instance in which the JVM runs: -XX:+UnlockCommercialFeatures -XX:+ResourceManagement.>
adminserver | <Feb 7, 2021 12:11:15 PM UTC> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.2.1.4.0 Thu Sep 12 04:04:29 GMT 2019 1974621>
adminserver | <Feb 7, 2021 12:11:16 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
adminserver | <Feb 7, 2021 12:11:16 PM UTC> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
adminserver | <Feb 7, 2021 12:11:16 PM UTC> <Info> <WorkManager> <BEA-002942> <CMM memory level becomes 0. Setting standby thread pool size to 256.>
adminserver | <Feb 7, 2021 12:11:16,937 PM UTC> <Notice> <Log Management> <BEA-170019> <The server log file weblogic.logging.FileStreamHandler instance=269987631
adminserver | Current log file=/u01/oracle/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log
adminserver | Rotation dir=/u01/oracle/user_projects/domains/base_domain/servers/AdminServer/logs
adminserver | is opened. All server side log events will be written to this file.>
adminserver | <Feb 7, 2021 12:11:17,340 PM UTC> <Notice> <Security> <BEA-090946> <Security pre-initializing using security realm: myrealm>
adminserver | <Feb 7, 2021 12:11:17,742 PM UTC> <Notice> <Security> <BEA-090947> <Security post-initializing using security realm: myrealm>
adminserver | <Feb 7, 2021 12:11:19,068 PM UTC> <Notice> <Security> <BEA-090082> <Security initialized using administrative security realm: myrealm>
adminserver | <Feb 7, 2021 12:11:19,491 PM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://172.18.0.2:7001/jndi/weblogic.management.mbeanservers.runtime.>
adminserver | <Feb 7, 2021 12:11:19,836 PM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://172.18.0.2:7001/jndi/weblogic.management.mbeanservers.domainruntime.>
adminserver | <Feb 7, 2021 12:11:19,905 PM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://172.18.0.2:7001/jndi/weblogic.management.mbeanservers.edit.>
adminserver | <Feb 7, 2021 12:11:20,635 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
adminserver | <Feb 7, 2021 12:11:20,636 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
adminserver | <Feb 7, 2021 12:11:20,679 PM UTC> <Notice> <Log Management> <BEA-170036> <The Logging monitoring service timer has started to check for logged message counts every 30 seconds.>
adminserver | <Feb 7, 2021 12:11:22,622 PM UTC> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
adminserver | <Feb 7, 2021 12:11:23,341 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
adminserver | <Feb 7, 2021 12:11:23,397 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
adminserver | <Feb 7, 2021 12:11:23,509 PM UTC> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file /u01/oracle/user_projects/domains/base_domain/security/DemoIdentity.jks.>
adminserver | <Feb 7, 2021 12:11:23,515 PM UTC> <Alert> <Security> <BEA-090153> <Demo identity certificate is used in production mode: [
adminserver | [
adminserver | Version: V3
adminserver | Subject: CN=794f2c0e3ee2, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
adminserver | Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11
adminserver |
adminserver | Key: Sun RSA public key, 2048 bits
adminserver | modulus: 26838327778898456722569204198984467509172640352530051733549109525133283974600325906458385360281362330723900551392988783885568763658016982861875683950431979780339267865425463311828723837223295164471286857371165896946981034990618198550252859100246149011023042470841617644534808675166118818454411938389868423057103848303033771079510911206199151703631312564688677505511467106652371154459278678050900618418189743928164838609763680737537691343551521732731548749678004488134931553428290107248141031307033583570185969506050865692546416669099681502406817688196403387933508447993657923564686656271197365849782798325606355980739
adminserver | public exponent: 65537
adminserver | Validity: [From: Thu Nov 05 07:19:32 UTC 2020,
adminserver | To: Tue Nov 06 07:19:32 UTC 2035]
adminserver | Issuer: CN=CertGenCA, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
adminserver | SerialNumber: [ -0ebaf757 4156fdae 0e8d93f2 4a398123]
adminserver |
adminserver | Certificate Extensions: 3
adminserver | [1]: ObjectId: 2.5.29.35 Criticality=false
adminserver | AuthorityKeyIdentifier [
adminserver | KeyIdentifier [
adminserver | 0000: 34 38 FD 45 D8 80 CF C7 D2 E8 DF 1D F8 A1 39 B0 48.E..........9.
adminserver | 0010: 11 88 00 6A ...j
adminserver | ]
adminserver | ]
adminserver |
adminserver | [2]: ObjectId: 2.5.29.15 Criticality=true
adminserver | KeyUsage [
adminserver | DigitalSignature
adminserver | Non_repudiation
adminserver | Key_Encipherment
adminserver | Data_Encipherment
adminserver | Key_Agreement
adminserver | ]
adminserver |
adminserver | [3]: ObjectId: 2.5.29.14 Criticality=false
adminserver | SubjectKeyIdentifier [
adminserver | KeyIdentifier [
adminserver | 0000: A5 D8 9E 6B 0A 56 5C CD 67 DD 2C 73 55 4B 72 C5 ...k.V\.g.,sUKr.
adminserver | 0010: E8 91 11 7F ....
adminserver | ]
adminserver | ]
adminserver |
adminserver | ]
adminserver | Algorithm: [SHA256withRSA]
adminserver | Signature:
adminserver | 0000: 6C 99 12 BC 56 77 D3 10 14 F2 E5 0F 72 7F 66 CF l...Vw......r.f.
adminserver | 0010: E5 05 DF 3D 05 82 5F 62 F5 D7 AC 3B BF A2 76 41 ...=.._b...;..vA
adminserver | 0020: 40 28 CE 63 95 1E F8 1C C0 98 33 A0 6C 0E 92 B2 @(.c......3.l...
adminserver | 0030: 61 AF 0B A3 B8 0D 3A 54 26 83 BC B6 DE 5E CE 06 a.....:T&....^..
adminserver | 0040: 8C 9B E6 31 74 E2 78 5C 62 C1 CE DC 91 7A AA 82 ...1t.x\b....z..
adminserver | 0050: 31 F6 6B 3B 40 58 4D 62 51 EB B5 3D 38 FA 5A 2C 1.k;@XMbQ..=8.Z,
adminserver | 0060: 55 67 E8 6A 9A 5C 60 AE B2 1A 57 E8 36 F4 28 8F Ug.j.\`...W.6.(.
adminserver | 0070: 7F 10 C3 CD E4 BA 78 83 1E 2A 9A 8F 67 F1 EE 2D ......x..*..g..-
adminserver | 0080: 77 C7 95 FC 03 C4 67 D2 1A D6 47 78 6D F3 FB CD w.....g...Gxm...
adminserver | 0090: 15 C9 67 18 99 FA 0A AE 24 BF 43 6C E9 0B 9F 1A ..g.....$.Cl....
adminserver | 00A0: 14 68 0A CD EA 98 BD 68 A1 D4 7A 65 33 88 F1 7B .h.....h..ze3...
adminserver | 00B0: 70 AF 6D 64 F5 34 D9 D6 96 F7 6F 0C 29 0A 97 E0 p.md.4....o.)...
adminserver | 00C0: 9E 66 59 F8 56 81 7F 43 B0 5A 6E F0 89 A2 80 47 .fY.V..C.Zn....G
adminserver | 00D0: DA 4C 84 5E A4 2F 9F CC 93 A0 90 6A 9F 93 77 2A .L.^./.....j..w*
adminserver | 00E0: D8 A2 10 68 9E A6 B6 97 FE 7D 26 35 8F CF D8 FA ...h......&5....
adminserver | 00F0: 0F 97 57 1D EC FD 6F A6 19 8A 95 DD F0 AC BA B6 ..W...o.........
adminserver |
adminserver | ] The system is vulnerable to security attacks, since the server private key is available to the public.>
adminserver | <Feb 7, 2021 12:11:23,516 PM UTC> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /u01/oracle/wlserver/server/lib/DemoTrust.jks.>
adminserver | <Feb 7, 2021 12:11:23,519 PM UTC> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /usr/java/jdk1.8.0_231-amd64/jre/lib/security/cacerts.>
adminserver | <Feb 7, 2021 12:11:23,523 PM UTC> <Alert> <Security> <BEA-090152> <Demo trusted CA certificate is being used in production mode: [
adminserver | [
adminserver | Version: V3
adminserver | Subject: CN=CertGenCA, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
adminserver | Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11
adminserver |
adminserver | Key: Sun RSA public key, 2048 bits
adminserver | modulus: 21569708395943251187594674016571604098921772745632282565929962814298138584591157613649992982592658748355964560637259269459381120165962674847997186601844952950794343884378508077250725387979264156405992230284901283444196168994202670671450098028002820729882379283494630302003296180454013575703696190719968922095992809718845192136877316024285273738556979086501184481229174883470885039602384578448109344178846134501578736532042806069180907098975317661162739134415281135882151855357804342112417305346131916129115886340854713286486175081106238445832240131690537019111854259217532593165348893830947166922845648303005469444649
adminserver | public exponent: 65537
adminserver | Validity: [From: Sat Dec 01 03:07:51 UTC 2012,
adminserver | To: Thu Dec 02 03:07:51 UTC 2032]
adminserver | Issuer: CN=CertGenCA, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
adminserver | SerialNumber: [ 40044886 c441ef3b 643a8066 409afca0]
adminserver |
adminserver | Certificate Extensions: 3
adminserver | [1]: ObjectId: 2.5.29.19 Criticality=true
adminserver | BasicConstraints:[
adminserver | CA:true
adminserver | PathLen:1
adminserver | ]
adminserver |
adminserver | [2]: ObjectId: 2.5.29.15 Criticality=true
adminserver | KeyUsage [
adminserver | Key_CertSign
adminserver | ]
adminserver |
adminserver | [3]: ObjectId: 2.5.29.14 Criticality=false
adminserver | SubjectKeyIdentifier [
adminserver | KeyIdentifier [
adminserver | 0000: 34 38 FD 45 D8 80 CF C7 D2 E8 DF 1D F8 A1 39 B0 48.E..........9.
adminserver | 0010: 11 88 00 6A ...j
adminserver | ]
adminserver | ]
adminserver |
adminserver | ]
adminserver | Algorithm: [SHA256withRSA]
adminserver | Signature:
adminserver | 0000: 17 69 74 CF CB 96 44 33 17 B3 70 0F 2A FF A8 63 .it...D3..p.*..c
adminserver | 0010: CC 7A C8 CD 74 59 99 DE 10 16 FE 3D 17 00 71 B8 .z..tY.....=..q.
adminserver | 0020: B0 FC C4 3F B6 B0 6D 77 78 9F 83 9B EA 22 A3 DA ...?..mwx...."..
adminserver | 0030: D7 35 00 D6 C5 F3 37 F1 7C 28 DF AA E8 2D 2A 13 .5....7..(...-*.
adminserver | 0040: 9C 38 63 B7 08 D2 0E 0D 20 93 86 3D A2 F0 86 B9 .8c..... ..=....
adminserver | 0050: 2B B4 6A 3F C6 FB 61 77 36 EE 60 07 BE C2 0E E4 +.j?..aw6.`.....
adminserver | 0060: 33 0C E8 08 B1 3A 25 DC 3B E2 47 30 F1 46 43 06 3....:%.;.G0.FC.
adminserver | 0070: 85 EE AB 3B 65 29 12 35 D4 D9 A8 EC 90 DB 60 6A ...;e).5......`j
adminserver | 0080: 4D 13 99 EE BD 29 AA BB 1F 96 C9 88 F3 E3 63 34 M....)........c4
adminserver | 0090: 73 75 D4 5D EE B7 26 CD 78 E9 AA 1E B8 42 15 01 su.]..&.x....B..
adminserver | 00A0: F3 D9 2A 64 C4 70 1D 1E E5 98 EF 1E 78 1F 6C DF ..*d.p......x.l.
adminserver | 00B0: 7D FF 4B DD 7A 53 B2 C8 0E 0D 27 27 40 DB 8D 10 ..K.zS....''@...
adminserver | 00C0: 47 5B 2E F4 74 89 85 2A 1B 6A 6A 3F 65 D9 25 2B G[..t..*.jj?e.%+
adminserver | 00D0: 93 A5 33 CE 03 CC 8E 64 E1 9F F1 3C A4 AB 0F C5 ..3....d...<....
adminserver | 00E0: 28 36 46 B9 F4 24 69 0A 38 E9 A6 73 92 68 AC 79 (6F..$i.8..s.h.y
adminserver | 00F0: F5 E1 D7 CB D8 FF FE 15 F7 B8 39 33 D3 66 03 17 ..........93.f..
adminserver |
adminserver | ]. The system is vulnerable to security attacks, since it trusts certificates signed by the demo trusted CA.>
adminserver | <Feb 7, 2021 12:11:23,531 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 127.0.0.1:7002 for protocols iiops, t3s, ldaps, https.>
adminserver | <Feb 7, 2021 12:11:23,532 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
adminserver | <Feb 7, 2021 12:11:23,532 PM UTC> <Notice> <WebLogicServer> <BEA-000329> <Started the WebLogic Server Administration Server "AdminServer" for domain "base_domain" running in production mode.>
adminserver | <Feb 7, 2021 12:11:23,532 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 172.18.0.2:7001 for protocols iiop, t3, ldap, snmp, http.>
adminserver | <Feb 7, 2021 12:11:23,533 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 172.18.0.2:7002 for protocols iiops, t3s, ldaps, https.>
adminserver | <Feb 7, 2021 12:11:23,533 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel[1]" is now listening on 127.0.0.1:8001 for protocols t3, http.>
adminserver | <Feb 7, 2021 12:11:23,534 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel" is now listening on 172.18.0.2:8001 for protocols t3, http.>
adminserver | <Feb 7, 2021 12:11:23,534 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 127.0.0.1:7002 for protocols iiops, t3s, ldaps, https.>
adminserver | <Feb 7, 2021 12:11:23,535 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
adminserver | <Feb 7, 2021 12:11:23,536 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 172.18.0.2:7001 for protocols iiop, t3, ldap, snmp, http.>
adminserver | <Feb 7, 2021 12:11:23,536 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 172.18.0.2:7002 for protocols iiops, t3s, ldaps, https.>
adminserver | <Feb 7, 2021 12:11:23,537 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel[1]" is now listening on 127.0.0.1:8001 for protocols t3, http.>
adminserver | <Feb 7, 2021 12:11:23,537 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel" is now listening on 172.18.0.2:8001 for protocols t3, http.>
adminserver | <Feb 7, 2021 12:11:23,538 PM UTC> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
adminserver | <Feb 7, 2021 12:11:23,544 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
adminserver | 2021-02-07 12:11:24.695/11.197 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from "jar:file:/u01/oracle/coherence/lib/coherence.jar!/tangosol-coherence.xml"
adminserver | 2021-02-07 12:11:24.734/11.235 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational overrides from "jar:file:/u01/oracle/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
adminserver | 2021-02-07 12:11:24.737/11.239 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/tangosol-coherence-override.xml" is not specified
adminserver | 2021-02-07 12:11:24.741/11.243 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "cache-factory-config.xml" is not specified
adminserver | 2021-02-07 12:11:24.744/11.246 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "cache-factory-builder-config.xml" is not specified
adminserver | 2021-02-07 12:11:24.747/11.249 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
adminserver |
adminserver | Oracle Coherence Version 12.2.1.4.0 Build 74888
adminserver | Grid Edition: Development mode
adminserver | Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
adminserver |
adminserver | 2021-02-07 12:11:24.818/11.320 Oracle Coherence GE 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Configured versioned, multi-cluster Management over ReST

Create Weblogic Docker domain with managed server using Docker compose

$
0
0

HOWTO

* Weblogic Docker image using Centos  https://danielveselka.blogspot.com/2021/02/create-oracle-weblogic-docker-images.html

* Docker compose https://danielveselka.blogspot.com/2020/10/create-weblogic-docker-domain-using.html

* Docker compose reference https://docs.docker.com/compose/reference/overview/ 

GitHub repo https://github.com/dveselka/weblogic/tree/master/docker-compose-managed-server 

 


 

Docker file for Weblogic domain

https://github.com/dveselka/weblogic/blob/master/docker-compose-managed-server/Dockerfile

FROM oracle/weblogic:12.2.1.4-generic

# Maintainer
# ----------
MAINTAINER Daniel Veselka

# WLS Configuration
# -----------------
ENV CUSTOM_DOMAIN_NAME="${CUSTOM_DOMAIN_NAME:-daveDomain}" \
CUSTOM_DOMAIN_ROOT="/app/domains" \
CUSTOM_ADMIN_PORT="${CUSTOM_ADMIN_PORT:-7001}" \
CUSTOM_ADMIN_NAME="${CUSTOM_ADMIN_NAME:-adminserver}" \
CUSTOM_ADMIN_HOST="${CUSTOM_ADMIN_HOST:-adminserver}" \
CUSTOM_MANAGED_SERVER_PORT="${CUSTOM_MANAGED_SERVER_PORT:-8001}" \
CUSTOM_MANAGED_SERVER_NAME_BASE="${CUSTOM_MANAGED_SERVER_NAME_BASE:-MS}" \
CUSTOM_CONFIGURED_MANAGED_SERVER_COUNT="${CUSTOM_CONFIGURED_MANAGED_SERVER_COUNT:-2}" \
CUSTOM_MANAGED_NAME="${CUSTOM_MANAGED_NAME:-MS1}" \
CUSTOM_CLUSTER_NAME="${CUSTOM_CLUSTER_NAME:-cluster1}" \
CUSTOM_CLUSTER_TYPE="${CUSTOM_CLUSTER_TYPE:-DYNAMIC}" \
CUSTOM_PRODUCTION_MODE_ENABLED="${CUSTOM_PRODUCTION_MODE_ENABLED:-prod}" \
PROPERTIES_FILE_DIR="/app/domains/properties" \
CUSTOM_JAVA_OPTIONS="-Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false -Dweblogic.rjvm.enableprotocolswitch=true" \
CUSTOM_PATH="$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/u01/oracle/container-scripts"

# Add files required to build this image
COPY --chown=oracle:oracle container-scripts/* /u01/oracle/container-scripts/

#Create directory where domain will be written to
USER root
RUN mkdir -p $CUSTOM_DOMAIN_ROOT && \
chown -R oracle:oracle $CUSTOM_DOMAIN_ROOT/.. && \
chmod -R a+xwr $CUSTOM_DOMAIN_ROOT/.. && \
chmod +x /u01/oracle/container-scripts/*

RUN ln -s /usr/java/latest/ /usr/java/jdk-8

USER oracle

VOLUME $CUSTOM_DOMAIN_ROOT

WORKDIR $ORACLE_HOME
CMD ["/u01/oracle/container-scripts/createWLSDomain.sh"]


Domain script modified to take values from env vars https://github.com/dveselka/weblogic/blob/master/docker-compose-managed-server/container-scripts/create-wls-domain.py

import os
import socket

def getEnvVar(var):
val=os.environ.get(var)
if val==None:
print "ERROR: Env var ",var, " not set."
sys.exit(1)
return val

# This python script is used to create a WebLogic domain
domain_name = getEnvVar("CUSTOM_DOMAIN_NAME")
admin_server_name = os.environ.get("CUSTOM_ADMIN_NAME")
admin_port = int(os.environ.get("CUSTOM_ADMIN_PORT"))
server_port = int(os.environ.get("CUSTOM_MANAGED_SERVER_PORT"))
managed_server_name_base = os.environ.get("CUSTOM_MANAGED_SERVER_NAME_BASE")
number_of_ms = int(os.environ.get("CUSTOM_CONFIGURED_MANAGED_SERVER_COUNT"))
domain_path = os.environ.get("CUSTOM_DOMAIN_HOME")
cluster_name = os.environ.get("CUSTOM_CLUSTER_NAME")
cluster_type = os.environ.get("CUSTOM_CLUSTER_TYPE")
production_mode_enabled = os.environ.get("CUSTOM_PRODUCTION_MODE_ENABLED")

username = getEnvVar("CUSTOM_WEBLOGIC_USERNAME")
password = getEnvVar("CUSTOM_WEBLOGIC_PASSWORD")

Docker compose file https://github.com/dveselka/weblogic/blob/master/docker-compose-managed-server/docker-compose.yml

 

version: "3.8"

networks:
&network wlsnet:
driver: bridge

services:
adminserver:
container_name: adminserver
hostname: adminserver
image: 12214-weblogic-domain-generic
restart: "no"
environment:
JAVA_HOME: "/usr/java/latest"
CUSTOM_PRODUCTION_MODE_ENABLED: "false"
CUSTOM_DOMAIN_NAME: daveDomain
CUSTOM_DOMAIN_ROOT: /app/domains
CUSTOM_DOMAIN_HOME: /app/domains/daveDomain
CUSTOM_WEBLOGIC_USERNAME: weblogic
CUSTOM_WEBLOGIC_PASSWORD: weblogic123
ports:
- "7001:7001"
- "9002:9002"
networks:
- *network
volumes:
- /app/domains:/app/domains:z


managedserver:
container_name: managedserver
image: 12214-weblogic-domain-generic
command: /u01/oracle/container-scripts/startManagedServer.sh
restart: "no"
environment:
JAVA_HOME: "/usr/java/latest"
CUSTOM_PRODUCTION_MODE_ENABLED: "false"
CUSTOM_DOMAIN_HOME: /app/domains/daveDomain
CUSTOM_WEBLOGIC_USERNAME: weblogic
CUSTOM_WEBLOGIC_PASSWORD: weblogic123
ports:
- "8001:8001"
depends_on:
- adminserver

networks:
- *network
volumes:
- /app/domains:/app/domains:z

 
Logs from Docker compose

[dave@dave docker-compose-managed-server]$ docker-compose up
Creating AdminContainer ... done
Creating managedserver ... done
Attaching to AdminContainer, managedserver
managedserver | Domain Home is: /u01/oracle/user_projects/domains/base_domain
AdminContainer | Domain Home is: /u01/oracle/user_projects/domains/base_domain
AdminContainer | /u01/oracle/properties/domain_security.properties
managedserver | Waiting for WebLogic Admin Server on AdminContainer/7001 to become available...
AdminContainer | /u01/oracle/properties/domain.properties
AdminContainer | Java Options: -Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false -Dweblogic.rjvm.enableprotocolswitch=true
AdminContainer | Starting the Admin Server
AdminContainer | ==========================
AdminContainer | .
AdminContainer | .
AdminContainer | JAVA Memory arguments: -Djava.security.egd=file:/dev/./urandom
AdminContainer | .
AdminContainer | CLASSPATH=/usr/java/jdk-8/lib/tools.jar:/u01/oracle/wlserver/server/lib/weblogic.jar:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/u01/oracle/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/u01/oracle/wlserver/common/derby/lib/derbynet.jar:/u01/oracle/wlserver/common/derby/lib/derbyclient.jar:/u01/oracle/wlserver/common/derby/lib/derby.jar
AdminContainer | .
AdminContainer | PATH=/u01/oracle/user_projects/domains/base_domain/bin:/u01/oracle/wlserver/server/bin:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/usr/java/jdk-8/jre/bin:/usr/java/jdk-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
AdminContainer | .
AdminContainer | ***************************************************
AdminContainer | * To start WebLogic Server, use a username and *
AdminContainer | * password assigned to an admin-level user. For *
AdminContainer | * server administration, use the WebLogic Server *
AdminContainer | * console at http://hostname:port/console *
AdminContainer | ***************************************************
AdminContainer | Starting WLS with line:
AdminContainer | /usr/java/jdk-8/bin/java -server -Djava.security.egd=file:/dev/./urandom -cp /u01/oracle/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/u01/oracle/wlserver/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false -Dweblogic.rjvm.enableprotocolswitch=true -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -javaagent:/u01/oracle/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/u01/oracle/wlserver/server -Dweblogic.home=/u01/oracle/wlserver/server weblogic.Server
AdminContainer | <Feb 7, 2021 1:53:32 PM UTC> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
AdminContainer | <Feb 7, 2021 1:53:32 PM UTC> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
AdminContainer | <Feb 7, 2021 1:53:33 PM UTC> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.231-b11 from Oracle Corporation.>
AdminContainer | <Feb 7, 2021 1:53:33 PM UTC> <Info> <RCM> <BEA-2165021> <"ResourceManagement" is not enabled in this JVM. Enable "ResourceManagement" to use the WebLogic Server "Resource Consumption Management" feature. To enable "ResourceManagement", you must specify the following JVM options in the WebLogic Server instance in which the JVM runs: -XX:+UnlockCommercialFeatures -XX:+ResourceManagement.>
AdminContainer | <Feb 7, 2021 1:53:33 PM UTC> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.2.1.4.0 Thu Sep 12 04:04:29 GMT 2019 1974621>
AdminContainer | <Feb 7, 2021 1:53:34 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
AdminContainer | <Feb 7, 2021 1:53:34 PM UTC> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
AdminContainer | <Feb 7, 2021 1:53:34 PM UTC> <Info> <WorkManager> <BEA-002942> <CMM memory level becomes 0. Setting standby thread pool size to 256.>
AdminContainer | <Feb 7, 2021 1:53:35,054 PM UTC> <Notice> <Log Management> <BEA-170019> <The server log file weblogic.logging.FileStreamHandler instance=1372879917
AdminContainer | Current log file=/u01/oracle/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log
AdminContainer | Rotation dir=/u01/oracle/user_projects/domains/base_domain/servers/AdminServer/logs
AdminContainer | is opened. All server side log events will be written to this file.>
AdminContainer | <Feb 7, 2021 1:53:35,538 PM UTC> <Notice> <Security> <BEA-090946> <Security pre-initializing using security realm: myrealm>
AdminContainer | <Feb 7, 2021 1:53:35,911 PM UTC> <Notice> <Security> <BEA-090947> <Security post-initializing using security realm: myrealm>
AdminContainer | <Feb 7, 2021 1:53:37,147 PM UTC> <Notice> <Security> <BEA-090082> <Security initialized using administrative security realm: myrealm>
AdminContainer | <Feb 7, 2021 1:53:37,580 PM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://172.19.0.2:7001/jndi/weblogic.management.mbeanservers.runtime.>
AdminContainer | <Feb 7, 2021 1:53:37,942 PM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://172.19.0.2:7001/jndi/weblogic.management.mbeanservers.domainruntime.>
AdminContainer | <Feb 7, 2021 1:53:38,007 PM UTC> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://172.19.0.2:7001/jndi/weblogic.management.mbeanservers.edit.>
AdminContainer | <Feb 7, 2021 1:53:38,738 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
AdminContainer | <Feb 7, 2021 1:53:38,738 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
AdminContainer | <Feb 7, 2021 1:53:38,776 PM UTC> <Notice> <Log Management> <BEA-170036> <The Logging monitoring service timer has started to check for logged message counts every 30 seconds.>
AdminContainer | <Feb 7, 2021 1:53:40,767 PM UTC> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
AdminContainer | <Feb 7, 2021 1:53:41,489 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
AdminContainer | <Feb 7, 2021 1:53:41,543 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
AdminContainer | <Feb 7, 2021 1:53:41,580 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 172.19.0.2:7001 for protocols iiop, t3, ldap, snmp, http.>
AdminContainer | <Feb 7, 2021 1:53:41,648 PM UTC> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file /u01/oracle/user_projects/domains/base_domain/security/DemoIdentity.jks.>
AdminContainer | <Feb 7, 2021 1:53:41,654 PM UTC> <Alert> <Security> <BEA-090153> <Demo identity certificate is used in
AdminContainer | <Feb 7, 2021 1:53:41,656 PM UTC> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /u01/oracle/wlserver/server/lib/DemoTrust.jks.>
AdminContainer | <Feb 7, 2021 1:53:41,658 PM UTC> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /usr/java/jdk1.8.0_231-amd64/jre/lib/security/cacerts.>
AdminContainer | <Feb 7, 2021 1:53:41,663 PM UTC> <Alert> <Security> <BEA-090152> <Demo trusted CA certificate is being used in
AdminContainer | <Feb 7, 2021 1:53:41,666 PM UTC> <Notice> <WebLogicServer> <BEA-000329> <Started the WebLogic Server Administration Server "AdminServer" for domain "base_domain" running in production mode.>
AdminContainer | <Feb 7, 2021 1:53:41,666 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 172.19.0.2:7002 for protocols iiops, t3s, ldaps, https.>
AdminContainer | <Feb 7, 2021 1:53:41,667 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 127.0.0.1:7002 for protocols iiops, t3s, ldaps, https.>
AdminContainer | <Feb 7, 2021 1:53:41,667 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
AdminContainer | <Feb 7, 2021 1:53:41,668 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel" is now listening on 172.19.0.2:8001 for protocols t3, http.>
AdminContainer | <Feb 7, 2021 1:53:41,668 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel[1]" is now listening on 127.0.0.1:8001 for protocols t3, http.>
AdminContainer | <Feb 7, 2021 1:53:41,669 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 172.19.0.2:7001 for protocols iiop, t3, ldap, snmp, http.>
AdminContainer | <Feb 7, 2021 1:53:41,669 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 172.19.0.2:7002 for protocols iiops, t3s, ldaps, https.>
AdminContainer | <Feb 7, 2021 1:53:41,670 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 127.0.0.1:7002 for protocols iiops, t3s, ldaps, https.>
AdminContainer | <Feb 7, 2021 1:53:41,670 PM UTC> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
AdminContainer | <Feb 7, 2021 1:53:41,671 PM UTC> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
AdminContainer | <Feb 7, 2021 1:53:41,672 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel" is now listening on 172.19.0.2:8001 for protocols t3, http.>
AdminContainer | <Feb 7, 2021 1:53:41,673 PM UTC> <Notice> <Server> <BEA-002613> <Channel "DaveChannel[1]" is now listening on 127.0.0.1:8001 for protocols t3, http.>
AdminContainer | <Feb 7, 2021 1:53:41,677 PM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
managedserver | WebLogic Admin Server is now available. Proceeding...
managedserver | Managed Server Name: MS1
managedserver | Managed Server Home: /u01/oracle/user_projects/domains/base_domain/servers/MS1
managedserver | Managed Server Security: /u01/oracle/user_projects/domains/base_domain/servers/MS1/security
managedserver | A properties file with the username and password needs to be supplied.
managedserver exited with code 0
AdminContainer | 2021-02-07 13:53:42.756/11.265 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from "jar:file:/u01/oracle/coherence/lib/coherence.jar!/tangosol-coherence.xml"
AdminContainer | 2021-02-07 13:53:42.797/11.306 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational overrides from "jar:file:/u01/oracle/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
AdminContainer | 2021-02-07 13:53:42.801/11.310 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/tangosol-coherence-override.xml" is not specified
AdminContainer | 2021-02-07 13:53:42.805/11.315 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "cache-factory-config.xml" is not specified
AdminContainer | 2021-02-07 13:53:42.808/11.318 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "cache-factory-builder-config.xml" is not specified
AdminContainer | 2021-02-07 13:53:42.811/11.320 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
AdminContainer |
AdminContainer | Oracle Coherence Version 12.2.1.4.0 Build 74888
AdminContainer | Grid Edition: Development mode
AdminContainer | Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
AdminContainer |
AdminContainer | 2021-02-07 13:53:42.888/11.397 Oracle Coherence GE 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Configured versioned, multi-cluster Management over ReST
AdminContainer | <Feb 7, 2021 1:54:11,563 PM UTC> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=AdminServer : Initializing callbacks>
AdminContainer | <Feb 7, 2021 1:54:11,566 PM UTC> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=AdminServer : Added MBeanServerConnection in DomainRuntimeServiceMBean >
AdminContainer | <Feb 7, 2021 1:54:11,567 PM UTC> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=AdminServer : Callback is done>
AdminContainer | <Feb 7, 2021 1:54:11,570 PM UTC> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=AdminServer : Connection already exists for the server. Did not attempt to connect to the server>
AdminContainer | <Feb 7, 2021 1:54:13,054 PM UTC> <Notice> <JMX> <BEA-149535> <JMX Resiliency Activity Server=All Servers : Resolving connection list DomainRuntimeServiceMBean>

Managed server start

dminserver      | <Feb 13, 2021 8:14:44,392 AM UTC> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.> 
managedserver | WebLogic Admin Server is now available. Proceeding...
managedserver | Managed Server Name: MS1
managedserver | Managed Server Home: /app/domains/daveDomain/servers/MS1
managedserver | Managed Server Security: /app/domains/daveDomain/servers/MS1/security
managedserver | Make directory /app/domains/daveDomain/servers/MS1/security to create boot.properties
managedserver | Java Options: -Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false -Dweblogic.rjvm.enableprotocolswitch=true
managedserver | Connecting to Admin Server at http://adminserver:7001
managedserver | .
managedserver | .
managedserver | JAVA Memory arguments: -Djava.security.egd=file:/dev/./urandom
managedserver | .
managedserver | CLASSPATH=/usr/java/jdk1.8.0_231-amd64/lib/tools.jar:/u01/oracle/wlserver/server/lib/weblogic.jar:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/u01/oracle/wlserver/modules/features/oracle.wls.common.nodemanager.jar:/u01/oracle/wlserver/common/derby/lib/derbyclient.jar:/u01/oracle/wlserver/common/derby/lib/derby.jar
managedserver | .
managedserver | PATH=/app/domains/daveDomain/bin:/u01/oracle/wlserver/server/bin:/u01/oracle/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/usr/java/jdk1.8.0_231-amd64/jre/bin:/usr/java/jdk1.8.0_231-amd64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin
managedserver | .
managedserver | ***************************************************
managedserver | * To start WebLogic Server, use a username and *
managedserver | * password assigned to an admin-level user. For *
managedserver | * server administration, use the WebLogic Server *
managedserver | * console at http://hostname:port/console *
managedserver | ***************************************************
managedserver | Starting WLS with line:
managedserver | /usr/java/jdk1.8.0_231-amd64/bin/java -server -Djava.security.egd=file:/dev/./urandom -cp /u01/oracle/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=MS1 -Djava.security.policy=/u01/oracle/wlserver/server/lib/weblogic.policy -Doracle.jdbc.fanEnabled=false -Dweblogic.StdoutDebugEnabled=false -Dweblogic.rjvm.enableprotocolswitch=true -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -javaagent:/u01/oracle/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/u01/oracle/wlserver/server -Dweblogic.home=/u01/oracle/wlserver/server -Dweblogic.management.server=http://adminserver:7001 weblogic.Server
adminserver | 2021-02-13 08:14:45.918/7.656 Oracle Coherence 12.2.1.4.0 <Info> (thread=[STANDBY] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from "jar:file:/u01/oracle/coherence/lib/coherence.jar!/tangosol-coherence.xml"

Docker network between standalone containers

$
0
0

 HOWTO

 

GitHub repo

https://github.com/dveselka/weblogic/tree/master/docker-compose-managed-server

Containers

 

 docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bb6155b895af 12214-weblogic-domain-generic "/u01/oracle/contain…" 3 minutes ago Up 3 minutes 0.0.0.0:8001->8001/tcp managedserver
edc43bd0ce1c 12214-weblogic-domain-generic "/u01/oracle/contain…" 3 minutes ago Up 3 minutes 0.0.0.0:7001->7001/tcp, 0.0.0.0:9002->9002/tcp adminserver

 

 Ping adminserver by hostname from managed server

$ docker exec -it managedserver /bin/bash
[oracle@bb6155b895af ~]$ ping adminserver
PING adminserver (172.19.0.2) 56(84) bytes of data.
64 bytes from adminserver.docker-compose-managed-server_wlsnet (172.19.0.2): icmp_seq=1 ttl=64 time=0.143 ms
64 bytes from adminserver.docker-compose-managed-server_wlsnet (172.19.0.2): icmp_seq=2 ttl=64 time=0.126 ms

Docker networks

 

[dave@dave ~]$ docker network ls
NETWORK ID NAME DRIVER SCOPE
f52862010f16 bridge bridge local
4d18d28369b0 docker-compose-managed-server_wlsnet bridge local
fc58b29d0364 docker-compose_wlsnet bridge local
f17fcc698c57 host host local
17497f49dcb2 none null local

 

Docker network for Weblogic servers

[dave@dave ~]$ docker inspect docker-compose-managed-server_wlsnet
[
{
"Name": "docker-compose-managed-server_wlsnet",
"Id": "4d18d28369b0ec5dae676239ab95a3f64a2389091f0b47929aec9ca19e4b958b",
"Created": "2021-02-13T08:46:13.300367764+01:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"bb6155b895af6f96341d1526d6e08597b3aab2156e29e1b8f90f980b44f0d198": {
"Name": "managedserver",
"EndpointID": "455729a26be89f9d37dde62a8b4b8e8a8fccfe248ee2425e574fb6f82ffa7ecb",
"MacAddress": "02:42:ac:13:00:03",
"IPv4Address": "172.19.0.3/16",
"IPv6Address": ""
},
"edc43bd0ce1cee7f9d1b9cc9a32b9868396794a9b0e6ab32196ac32aec04ac31": {
"Name": "adminserver",
"EndpointID": "3744588006fc91c958625a115b2db839fe7dd5c601f774d9b648d717ba300dd9",
"MacAddress": "02:42:ac:13:00:02",
"IPv4Address": "172.19.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "wlsnet",
"com.docker.compose.project": "docker-compose-managed-server",
"com.docker.compose.version": "1.27.4"
}
}
]

Weblogic servers

Weblogic Kubernetes Operator

JBoss Wildfly Kubernetes Operator

Upgrade minikube on Fedora 33

$
0
0

 Upgrade Docker, kubectl, minikube to latest version

Remove previous versions and start minikube

Installed versions 

 

[dave@dave ~]$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
[dave@dave ~]$ docker version
Client: Docker Engine - Community
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Git commit: 55c4c88
Built: Tue Mar 2 20:19:16 2021
OS/Arch: linux/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:16:56 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[dave@dave ~]$ which kubectl
/usr/local/bin/kubectl
[dave@dave ~]$ minikube version
minikube version: v1.18.1
commit: 09ee84d530de4a92f00f1c5dbc34cead092b95bc


 

Delete all previous versions to avoid errors on start

Exiting due to GUEST_START: wait 6m0s for node: wait for healthy API server: controlPlane never updated to v1.20.2



[dave@dave ~]$ rm -rf ~/.minikube/

dave@dave ~]$ minikube delete
🙄 "minikube" profile does not exist, trying anyways.
💀 Removed all traces of the "minikube" cluster.
[dave@dave ~]$ minikube start --driver=docker
😄 minikube v1.18.1 on Fedora 33
✨ Using the docker driver based on user configuration
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
💾 Downloading Kubernetes v1.20.2 preload ...
> preloaded-images-k8s-v9-v1....: 491.22 MiB / 491.22 MiB 100.00% 10.37 Mi
🔥 Creating docker container (CPUs=2, Memory=3900MB) ...
❗ Unable to create dedicated network, this might result in cluster IP change after restart: failed to create network after 20 attempts
🐳 Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v4
🌟 Enabled addons: storage-provisioner, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default




Check minikube cluster

[dave@dave Downloads]$ kubectl cluster-info
Kubernetes master is running at https://172.17.0.3:8443
KubeDNS is running at https://172.17.0.3:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.



k8s minikube addons

$
0
0

 HOWTO

 

Get addons list
[dave@dave ~]$ minikube addons list
|-----------------------------|----------|--------------|
| ADDON NAME | PROFILE | STATUS |
|-----------------------------|----------|--------------|
| ambassador | minikube | disabled |
| auto-pause | minikube | disabled |
| csi-hostpath-driver | minikube | disabled |
| dashboard | minikube | enabled ✅ |
| default-storageclass | minikube | enabled ✅ |
| efk | minikube | disabled |
| freshpod | minikube | disabled |
| gcp-auth | minikube | disabled |
| gvisor | minikube | disabled |
| helm-tiller | minikube | disabled |
| ingress | minikube | enabled ✅ |
| ingress-dns | minikube | disabled |
| istio | minikube | disabled |
| istio-provisioner | minikube | disabled |
| kubevirt | minikube | disabled |
| logviewer | minikube | disabled |
| metallb | minikube | disabled |
| metrics-server | minikube | disabled |
| nvidia-driver-installer | minikube | disabled |
| nvidia-gpu-device-plugin | minikube | disabled |
| olm | minikube | disabled |
| pod-security-policy | minikube | disabled |
| registry | minikube | disabled |
| registry-aliases | minikube | disabled |
| registry-creds | minikube | disabled |
| storage-provisioner | minikube | enabled ✅ |
| storage-provisioner-gluster | minikube | disabled |
| volumesnapshots | minikube | disabled |
|-----------------------------|----------|--------------|

enable metrics
[dave@dave ~]$ minikube addons enable metrics-server
▪ Using image k8s.gcr.io/metrics-server-amd64:v0.2.1
🌟 The 'metrics-server' addon is enabled


get metrics
[dave@dave ~]$ kubectl get pod,svc -n kube-system
NAME READY STATUS RESTARTS AGE
pod/coredns-74ff55c5b-vkbhb 1/1 Running 3 6d18h
pod/etcd-minikube 1/1 Running 2 5d21h
pod/ingress-nginx-admission-create-mqrgx 0/1 Completed 0 5d12h
pod/ingress-nginx-admission-patch-5hsm2 0/1 Completed 0 5d12h
pod/ingress-nginx-controller-65cf89dc4f-64d9n 1/1 Running 4 5d12h
pod/kube-apiserver-minikube 1/1 Running 2 5d21h
pod/kube-controller-manager-minikube 1/1 Running 3 6d18h
pod/kube-proxy-jfktf 1/1 Running 3 6d18h
pod/kube-scheduler-minikube 1/1 Running 3 6d18h
pod/metrics-server-56c4f8c9d6-q86vt 1/1 Running 0 10s
pod/storage-provisioner 1/1 Running 7 6d18h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/ingress-nginx-controller-admission ClusterIP 10.108.226.190 <none> 443/TCP 5d12h
service/kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 6d18h
service/metrics-server ClusterIP 10.103.175.49 <none> 443/TCP 10s

 

LDAP search

$
0
0

HOWTO

 

LDAP test server

LDAP Server Information (read-only access):

Server: ldap.forumsys.com  
Port: 389

Bind DN: cn=read-only-admin,dc=example,dc=com
Bind Password: password

All user passwords are password.

 

 Search using test  server

[dave@dave git]$ ldapsearch -W -h ldap.forumsys.com -D "cn=read-only-admin,dc=example,dc=com" -b "dc=example,dc=com""uid=Newton"
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: uid=Newton
# requesting: ALL
#

# newton, example.com
dn: uid=newton,dc=example,dc=com
sn: Newton
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
uid: newton
mail: newton@ldap.forumsys.com
cn: Isaac Newton

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Select attributes
[dave@dave git]$ ldapsearch -W -h ldap.forumsys.com -D "cn=read-only-admin,dc=example,dc=com" -b "dc=example,dc=com""uid=Newton" mail
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: uid=Newton
# requesting: mail
#

# newton, example.com
dn: uid=newton,dc=example,dc=com
mail: newton@ldap.forumsys.com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Search using Java https://github.com/dveselka/java-tutorial/blob/master/src/main/java/ldap/TestLDAP.java
package ldap;

import java.util.ArrayList;
import java.util.Properties;


import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.Attribute;
import javax.naming.Context;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;

public class TestLDAP {
private static final String CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";

private InitialDirContext ctx;
private String basedn;
private SearchControls ctrls;

private TestLDAP(String url, String user, String password, String b) throws NamingException {
ctx = TestLDAP.doConnect(url, user, password);
basedn = b.length() > 0 ? "," + b : b;
ctrls = new SearchControls();
}

public ArrayList<Attributes> search(String base, String filter) throws NamingException {
NamingEnumeration<SearchResult> ne = ctx.search(base + basedn, filter, ctrls);
ArrayList<Attributes> arr = new ArrayList<>();
while (ne.hasMore()) {
arr.add(ne.next().getAttributes());
}
return arr;
}

public Attributes get(String base) throws NamingException {
return ctx.getAttributes(base + basedn);
}

private static InitialDirContext doConnect(String url, String user, String password) throws NamingException {
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, CONTEXT_FACTORY);
props.put(Context.PROVIDER_URL, url);
props.put(Context.SECURITY_PRINCIPAL, user);
props.put(Context.SECURITY_CREDENTIALS, password);

return new InitialDirContext(props);
}

public static TestLDAP connect(String url, String user, String pass, String basedn) throws NamingException {
return new TestLDAP(url, user, pass, basedn);
}

public static boolean testConnection(String url, String user, String password) {
try {
return TestLDAP.doConnect(url, user, password) != null;
} catch (Exception e) {
return false;
}
}

public static void main(String[] args) {
try {
TestLDAP testLDAP = new TestLDAP("ldap://ldap.forumsys.com", "cn=read-only-admin,dc=example,dc=com",
"password", "dc=example,dc=com");
Attributes attributes = testLDAP.get("uid=Newton");

NamingEnumeration<? extends Attribute> allAttributes = attributes.getAll();
while (allAttributes.hasMore()) {
Attribute attribute = allAttributes.next();
System.out.println(attribute.getID() + "=" + attribute.get().toString());
}

} catch (NamingException e) {
e.printStackTrace();
}
}
}
Run code in Eclipse

Gradle test project

$
0
0

HOWTO

GitHub repo

Initialize project 

[dave@dave git]$ cd gradle-demo/
[dave@dave gradle-demo]$ gradle init

Select type of project to generate:
1: basic
2: application
3: library
4: Gradle plugin
Enter selection (default: basic) [1..4] 2

Select implementation language:
1: C++
2: Groovy
3: Java
4: Kotlin
5: Scala
6: Swift
Enter selection (default: Java) [1..6] 3

Split functionality across multiple subprojects?:
1: no - only one application project
2: yes - application and library projects
Enter selection (default: no - only one application project) [1..2] 2

Select build script DSL:
1: Groovy
2: Kotlin
Enter selection (default: Groovy) [1..2] 1

Project name (default: gradle-demo):
Source package (default: gradle.demo):

> Task :init
Get more help with your project: https://docs.gradle.org/7.0/samples/sample_building_java_applications_multi_project.html

BUILD SUCCESSFUL in 41s
2 actionable tasks: 2 executed

Project structure
[dave@dave gradle-demo]$ find
.
./gradle
./gradle/wrapper
./gradle/wrapper/gradle-wrapper.jar
./gradle/wrapper/gradle-wrapper.properties
./settings.gradle
./.gradle
./.gradle/configuration-cache
./.gradle/configuration-cache/gc.properties
./.gradle/7.0
./.gradle/7.0/fileChanges
./.gradle/7.0/fileChanges/last-build.bin
./.gradle/7.0/gc.properties
./.gradle/7.0/dependencies-accessors
./.gradle/7.0/dependencies-accessors/gc.properties
./.gradle/7.0/dependencies-accessors/dependencies-accessors.lock
./.gradle/7.0/vcsMetadata-1
./.gradle/7.0/executionHistory
./.gradle/7.0/executionHistory/executionHistory.lock
./.gradle/7.0/executionHistory/executionHistory.bin
./.gradle/7.0/fileHashes
./.gradle/7.0/fileHashes/fileHashes.lock
./.gradle/7.0/fileHashes/fileHashes.bin
./.gradle/buildOutputCleanup
./.gradle/buildOutputCleanup/buildOutputCleanup.lock
./.gradle/buildOutputCleanup/outputFiles.bin
./.gradle/buildOutputCleanup/cache.properties
./.gradle/checksums
./.gradle/checksums/checksums.lock
./.gradle/vcs-1
./.gradle/vcs-1/gc.properties
./gradlew.bat
./buildSrc
./buildSrc/build.gradle
./buildSrc/src
./buildSrc/src/main
./buildSrc/src/main/groovy
./buildSrc/src/main/groovy/gradle.demo.java-common-conventions.gradle
./buildSrc/src/main/groovy/gradle.demo.java-library-conventions.gradle
./buildSrc/src/main/groovy/gradle.demo.java-application-conventions.gradle

./app
./app/build.gradle
./app/src
./app/src/main
./app/src/main/java
./app/src/main/java/gradle
./app/src/main/java/gradle/demo
./app/src/main/java/gradle/demo/app
./app/src/main/java/gradle/demo/app/MessageUtils.java
./app/src/main/java/gradle/demo/app/App.java
./app/src/main/resources
./app/src/test
./app/src/test/java
./app/src/test/java/gradle
./app/src/test/java/gradle/demo
./app/src/test/java/gradle/demo/app
./app/src/test/java/gradle/demo/app/MessageUtilsTest.java
./app/src/test/resources
./.gitattributes
./utilities
./utilities/build.gradle
./utilities/src
./utilities/src/main
./utilities/src/main/java
./utilities/src/main/java/gradle
./utilities/src/main/java/gradle/demo
./utilities/src/main/java/gradle/demo/utilities
./utilities/src/main/java/gradle/demo/utilities/SplitUtils.java
./utilities/src/main/java/gradle/demo/utilities/StringUtils.java
./utilities/src/main/java/gradle/demo/utilities/JoinUtils.java
./utilities/src/main/resources
./utilities/src/test
./utilities/src/test/resources
./gradlew
./README.md
./list
./list/build.gradle
./list/src
./list/src/main
./list/src/main/java
./list/src/main/java/gradle
./list/src/main/java/gradle/demo
./list/src/main/java/gradle/demo/list
./list/src/main/java/gradle/demo/list/LinkedList.java
./list/src/main/resources
./list/src/test
./list/src/test/java
./list/src/test/java/gradle
./list/src/test/java/gradle/demo
./list/src/test/java/gradle/demo/list
./list/src/test/java/gradle/demo/list/LinkedListTest.java
./list/src/test/resources
./.gitignore

Main
[dave@dave gradle-demo]$ more settings.gradle 
/*
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user manual at https://docs.gradle.org/7.0/userguide/multi_project_builds.html
*/

rootProject.name = 'gradle-demo'
include('app', 'list', 'utilities')

Run tests
[dave@dave gradle-demo]$ ./gradlew check
Downloading https://services.gradle.org/distributions/gradle-7.0-bin.zip
..........10%...........20%...........30%..........40%...........50%...........60%...........70%..........80%...........90%...........100%

BUILD SUCCESSFUL in 32s
9 actionable tasks: 9 executed

Run application
[dave@dave gradle-demo]$ ./gradlew run

> Task :app:run
Hello World!

BUILD SUCCESSFUL in 989ms
6 actionable tasks: 1 executed, 5 up-to-date

Build
[dave@dave gradle-demo]$ ./gradlew build

BUILD SUCCESSFUL in 970ms
13 actionable tasks: 4 executed, 9 up-to-date

Publish
[dave@dave gradle-demo]$ ./gradlew build --scan

BUILD SUCCESSFUL in 4s
13 actionable tasks: 13 up-to-date

Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] yes

Gradle Terms of Service accepted.

Publishing build scan...
https://gradle.com/s/v7pfqpbcuendg

Create Azure VM using Terraform

$
0
0

HOWTO

 

Differences Between On-Premise, SaaS, PaaS, IaaS

GitHub

 Install Terraform on Fedora

https://learn.hashicorp.com/tutorials/terraform/install-cli

 

sudo dnf install -y dnf-plugins-core

sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo

sudo dnf -y install terraform


Install Azure CLI

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-yum


Verify installation

[dave@dave ~]$ terraform version
Terraform v0.13.5
[dave@dave ~]$ az version
{
"azure-cli": "2.14.2",
"azure-cli-core": "2.14.2",
"azure-cli-telemetry": "1.0.6",
"extensions": {}
}

Login via Azure CLI using own credentials

https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli

$ az login
[dave@dave azure]$ az account show
{
"environmentName": "AzureCloud",
"homeTenantId": "23432432423-2342423423",
"id": "3234234234-234234234",
"isDefault": true,
"managedByTenants": [],
"name": "Free Trial",
"state": "Enabled",
"tenantId": "234234234-234234234",
"user": {
"name": "daniel.veselka",
"type": "user"
}
}


Authenticate to Azure using service principal variables

https://docs.microsoft.com/en-us/azure/developer/terraform/get-started-cloud-shell#authenticate-via-azure-service-principal

Get values for service principal and store them into env vars ARM_* 

A Service Principal is an application within Azure Active Directory whose authentication tokens can be used as the client_id, client_secret, and tenant_id fields needed by Terraform (subscription_id can be independently recovered from your Azure account details).

Set subscription to use with Terraform

https://docs.microsoft.com/en-us/azure/developer/terraform/get-started-cloud-shell#set-the-current-azure-subscription


az account set --subscription="<subscription_id>"

Export Azure principle secrets variables

 https://www.terraform.io/docs/providers/azurerm/guides/service_principal_client_secret.html

$ export ARM_CLIENT_ID="00000000-0000-0000-0000-000000000000"
$ export ARM_CLIENT_SECRET="00000000-0000-0000-0000-000000000000"
$ export ARM_SUBSCRIPTION_ID="00000000-0000-0000-0000-000000000000"
$ export ARM_TENANT_ID="00000000-0000-0000-0000-000000000000"


Find Centos OS Azure image

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage

 az vm image list -l westeurope --publisher openlogic --offer centos --sku 8 --all -o table 
Offer Publisher Sku Urn Version
------------------------- ----------- --------------- ------------------------------------------------------------------ --------------
CentOS OpenLogic 8_3 OpenLogic:CentOS:8_3:8.3.2020120900 8.3.2020120900
CentOS OpenLogic 8_3 OpenLogic:CentOS:8_3:8.3.2021020400 8.3.2021020400
CentOS OpenLogic 8_3-gen2 OpenLogic:CentOS:8_3-gen2:8.3.2020120901 8.3.2020120901
CentOS OpenLogic 8_3-gen2 OpenLogic:CentOS:8_3-gen2:8.3.2021020401 8.3.2021020401

 

Install VSCode with Terraform extension

For VSCode installation see here  https://danielveselka.blogspot.com/2020/11/google-cloud-code-ide-extension.html 

https://github.com/hashicorp/vscode-terraform

 

Choose VM size

https://docs.microsoft.com/en-us/azure/virtual-machines/sizes-b-series-burstable

Create VM

https://docs.microsoft.com/en-us/azure/developer/terraform/create-linux-virtual-machine-with-infrastructure

 https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/examples/virtual-machines/linux/basic-ssh/main.tf

https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/examples/virtual-machines/linux/custom-data/main.tf

[dave@dave azure]$ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/tls...
- Finding latest version of hashicorp/azurerm...
- Installing hashicorp/tls v3.0.0...
- Installed hashicorp/tls v3.0.0 (signed by HashiCorp)
- Installing hashicorp/azurerm v2.36.0...
- Installed hashicorp/azurerm v2.36.0 (signed by HashiCorp)

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, we recommend adding version constraints in a required_providers block
in your configuration, with the constraint strings suggested below.

* hashicorp/azurerm: version = "~> 2.36.0"
* hashicorp/tls: version = "~> 3.0.0"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.


 Terraform plan

[dave@dave azure]$ terraform plan

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

# azurerm_linux_virtual_machine.daveterraformvm will be created
+ resource "azurerm_linux_virtual_machine""daveterraformvm" {
+ admin_username = "centos"
+ allow_extension_operations = true
+ computer_name = (known after apply)
+ disable_password_authentication = true
+ extensions_time_budget = "PT1H30M"
+ id = (known after apply)
+ location = "westeurope"
+ max_bid_price = -1
+ name = "dave_terraform_test"
+ network_interface_ids = (known after apply)
+ platform_fault_domain = -1
+ priority = "Regular"
+ private_ip_address = (known after apply)
+ private_ip_addresses = (known after apply)
+ provision_vm_agent = true
+ public_ip_address = (known after apply)
+ public_ip_addresses = (known after apply)
+ resource_group_name = "rg-dave-terraform-test"
+ size = "Standard_DS3_v2"
+ virtual_machine_id = (known after apply)
+ zone = (known after apply)

+ admin_ssh_key {
+ public_key = <<-EOT
ssh-rsa ererererererer dave@dave
EOT
+ username = "centos"
}

+ os_disk {
+ caching = "ReadWrite"
+ disk_size_gb = (known after apply)
+ name = (known after apply)
+ storage_account_type = "Premium_LRS"
+ write_accelerator_enabled = false
}

+ source_image_reference {
+ offer = "CentOS"
+ publisher = "OpenLogic"
+ sku = "8_3"
+ version = "latest"
}
}

# azurerm_network_interface.daveterraformnic will be created
+ resource "azurerm_network_interface""daveterraformnic" {
+ applied_dns_servers = (known after apply)
+ dns_servers = (known after apply)
+ enable_accelerated_networking = false
+ enable_ip_forwarding = false
+ id = (known after apply)
+ internal_dns_name_label = (known after apply)
+ internal_domain_name_suffix = (known after apply)
+ location = "westeurope"
+ mac_address = (known after apply)
+ name = "daveNIC"
+ private_ip_address = (known after apply)
+ private_ip_addresses = (known after apply)
+ resource_group_name = "rg-dave-terraform-test"
+ tags = {
+ "environment" = "Terraform Demo"
}
+ virtual_machine_id = (known after apply)

+ ip_configuration {
+ name = "daveNicConfiguration"
+ primary = (known after apply)
+ private_ip_address = (known after apply)
+ private_ip_address_allocation = "dynamic"
+ private_ip_address_version = "IPv4"
+ public_ip_address_id = (known after apply)
+ subnet_id = (known after apply)
}
}

# azurerm_network_interface_security_group_association.dave will be created
+ resource "azurerm_network_interface_security_group_association""dave" {
+ id = (known after apply)
+ network_interface_id = (known after apply)
+ network_security_group_id = (known after apply)
}

# azurerm_network_security_group.daveterraformnsg will be created
+ resource "azurerm_network_security_group""daveterraformnsg" {
+ id = (known after apply)
+ location = "westeurope"
+ name = "daveNetworkSecurityGroup"
+ resource_group_name = "rg-dave-terraform-test"
+ security_rule = [
+ {
+ access = "Allow"
+ description = ""
+ destination_address_prefix = "*"
+ destination_address_prefixes = []
+ destination_application_security_group_ids = []
+ destination_port_range = "22"
+ destination_port_ranges = []
+ direction = "Inbound"
+ name = "SSH"
+ priority = 1001
+ protocol = "Tcp"
+ source_address_prefix = "*"
+ source_address_prefixes = []
+ source_application_security_group_ids = []
+ source_port_range = "*"
+ source_port_ranges = []
},
]
+ tags = {
+ "environment" = "Terraform Demo"
}
}

# azurerm_public_ip.daveterraformpublicip will be created
+ resource "azurerm_public_ip""daveterraformpublicip" {
+ allocation_method = "Dynamic"
+ fqdn = (known after apply)
+ id = (known after apply)
+ idle_timeout_in_minutes = 4
+ ip_address = (known after apply)
+ ip_version = "IPv4"
+ location = "westeurope"
+ name = "davePublicIP"
+ resource_group_name = "rg-dave-terraform-test"
+ sku = "Basic"
+ tags = {
+ "environment" = "Terraform Demo"
}
}

# azurerm_resource_group.daveterraformgroup will be created
+ resource "azurerm_resource_group""daveterraformgroup" {
+ id = (known after apply)
+ location = "westeurope"
+ name = "rg-dave-terraform-test"
+ tags = {
+ "environment" = "Terraform Demo"
}
}

# azurerm_subnet.daveterraformsubnet will be created
+ resource "azurerm_subnet""daveterraformsubnet" {
+ address_prefix = (known after apply)
+ address_prefixes = [
+ "10.0.1.0/24",
]
+ enforce_private_link_endpoint_network_policies = false
+ enforce_private_link_service_network_policies = false
+ id = (known after apply)
+ name = "daveSubnet"
+ resource_group_name = "rg-dave-terraform-test"
+ virtual_network_name = "daveVnet"
}

# azurerm_virtual_network.daveterraformnetwork will be created
+ resource "azurerm_virtual_network""daveterraformnetwork" {
+ address_space = [
+ "10.0.0.0/16",
]
+ guid = (known after apply)
+ id = (known after apply)
+ location = "westeurope"
+ name = "daveVnet"
+ resource_group_name = "rg-dave-terraform-test"
+ subnet = (known after apply)
+ tags = {
+ "environment" = "Terraform Demo"
}
+ vm_protection_enabled = false
}

Plan: 8 to add, 0 to change, 0 to destroy.

 

Terraform apply

Create VM using https://github.com/dveselka/devops-terraform/blob/master/azure/main.tf

$ terraform apply
azurerm_resource_group.daveterraformgroup: Refreshing state... [id=/subscriptions/3434343-334/resourceGroups/rg-dave-terraform-test]
azurerm_virtual_network.daveterraformnetwork: Refreshing state... [id=/subscriptions/43443-434-3434/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/virtualNetworks/daveVnet]
azurerm_network_security_group.daveterraformnsg: Refreshing state... [id=/subscriptions/434343-43-43/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/networkSecurityGroups/daveNetworkSecurityGroup]
azurerm_public_ip.daveterraformpublicip: Refreshing state... [id=/subscriptions/343434-43434/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/publicIPAddresses/davePublicIP]
azurerm_subnet.daveterraformsubnet: Refreshing state... [id=/subscriptions/343434-43434/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/virtualNetworks/daveVnet/subnets/daveSubnet]
azurerm_network_interface.daveterraformnic: Refreshing state... [id=/subscriptions/3434-434343/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/networkInterfaces/daveNIC]
azurerm_network_interface_security_group_association.dave: Refreshing state... [id=/subscriptions/3434-434343/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/....

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the last "terraform apply":


Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or respond
to these changes.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

# azurerm_linux_virtual_machine.daveterraformvm will be created
+ resource "azurerm_linux_virtual_machine""daveterraformvm" {
+ admin_username = "centos"
+ allow_extension_operations = true
+ computer_name = (known after apply)
+ disable_password_authentication = true
+ extensions_time_budget = "PT1H30M"
+ id = (known after apply)
+ location = "westeurope"
+ max_bid_price = -1
+ name = "dave-terraform-test"
+ network_interface_ids = [
+ "/subscriptions/45454-54-54-545/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/networkInterfaces/daveNIC",
]
+ platform_fault_domain = -1
+ priority = "Regular"
+ private_ip_address = (known after apply)
+ private_ip_addresses = (known after apply)
+ provision_vm_agent = true
+ public_ip_address = (known after apply)
+ public_ip_addresses = (known after apply)
+ resource_group_name = "rg-dave-terraform-test"
+ size = "Standard_A2_v2"
+ virtual_machine_id = (known after apply)
+ zone = (known after apply)

+ admin_ssh_key {
+ public_key = <<-eot 0="" 1="" 2m49s="" above.="" accepted="" actions="" add="" added="" after="" apply="" approve.="" artrterteteteterte="" azure="" azurerm_linux_virtual_machine.daveterraformvm:="" be="" caching="ReadWrite" change="" changed="" code="" complete="" creating...="" creation="" dave="" described="" destroy.="" destroyed.="" disk_size_gb="(known" do="" elapsed="" eot="" id="/subscriptions/e535613a-7524-4b38-8915-ad04b02fe3d0/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Compute/virtualMachines/dave-terraform-test]" m0s="" m10s="" m20s="" m30s="" m40s="" m50s="" name="(known" offer="CentOS" only="" os_disk="" perform="" plan:="" publisher="OpenLogic" resources:="" s="" sku="8_3" source_image_reference="" ssh-rsa="" still="" storage_account_type="Standard_LRS" terraform="" the="" these="" to="" username="centos" version="latest" want="" will="" write_accelerator_enabled="false" yes="" you="">-eot>
azurerm_linux_virtual_machine.daveterraformvm: Creating... azurerm_linux_virtual_machine.daveterraformvm: Still creating... [10s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [20s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [30s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [40s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [50s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m0s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m10s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m20s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m30s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m40s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m50s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m0s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m10s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m20s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m30s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m40s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Creation complete after 2m49s [id=/subscriptions/34343-4343/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Compute/virtualMachines/dave-terraform-test] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. [dave@dave azure]$

 

 Check VM in Azure Console

https://portal.azure.com/



SSH into VM
[dave@dave azure]$ ssh centos@20.73.164.213
The authenticity of host '20.73.164.213 (20.73.164.213)' can't be established.
ECDSA key fingerprint is SHA256:ovtXmI52ndfouGE97PX4foS099J2lj91xie4cRQz8w8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '20.73.164.213' (ECDSA) to the list of known hosts.
Activate the web console with: systemctl enable --now cockpit.socket

[centos@dave-terraform-test ~]$ more /etc/redhat-release
CentOS Linux release 8.3.2011


Azure Analytics Services

$
0
0

 HOWTO

 

 

Azure DataBricks

 

Azure HDInsight

 

    Viewing all 181 articles
    Browse latest View live