From 88ace0fec44d5824e4a1203954909e3a8866bae8 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Tue, 19 Sep 2023 15:58:43 -0400 Subject: [PATCH 01/41] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index c2e6d90d35..186784e290 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # DO180-apps DO180 Repository for Sample Applications + +asdfasdfadf +sudo podman run -d --name jboss-eap-app -p 8080:8080 -p 9990:9990 -p 9999:9999 localhost/jboss-eap +sudo podman logs --tail=10 jboss-eap-app +sudo podman stop jboss-eap-app +sudo podman ps -a +sudo podman rm jboss-eap-app +sudo podman tag localhost/jboss-eap localhost/jboss-eap:6.4.v1 +sudo podman save -o localhost/jboss-eap.6.4.v1.tar localhost/jboss-eap:6.4.v1 +sudo podman images +sudo podman tag localhost/jboss-eap:6.4.v1 docker.io/haiduc2023/jboss-eap:6.4.v1 +sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 +sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 +gedit mysql.sh +sudo podman run -d --pod mypod --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 From c5159f085b8243d96aba7dc63a5b5a5396104128 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Tue, 19 Sep 2023 16:00:56 -0400 Subject: [PATCH 02/41] Update README.md --- README.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 186784e290..d0f08f68d5 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,16 @@ # DO180-apps -DO180 Repository for Sample Applications +DO180 Repository for Sample Applications -asdfasdfadf -sudo podman run -d --name jboss-eap-app -p 8080:8080 -p 9990:9990 -p 9999:9999 localhost/jboss-eap -sudo podman logs --tail=10 jboss-eap-app -sudo podman stop jboss-eap-app -sudo podman ps -a -sudo podman rm jboss-eap-app -sudo podman tag localhost/jboss-eap localhost/jboss-eap:6.4.v1 -sudo podman save -o localhost/jboss-eap.6.4.v1.tar localhost/jboss-eap:6.4.v1 -sudo podman images -sudo podman tag localhost/jboss-eap:6.4.v1 docker.io/haiduc2023/jboss-eap:6.4.v1 -sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 -sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 -gedit mysql.sh -sudo podman run -d --pod mypod --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 +sudo podman run -d --name jboss-eap-app -p 8080:8080 -p 9990:9990 -p 9999:9999 localhost/jboss-eap +sudo podman logs --tail=10 jboss-eap-app +sudo podman stop jboss-eap-app +sudo podman ps -a +sudo podman rm jboss-eap-app +sudo podman tag localhost/jboss-eap localhost/jboss-eap:6.4.v1 +sudo podman save -o localhost/jboss-eap.6.4.v1.tar localhost/jboss-eap:6.4.v1 +sudo podman images +sudo podman tag localhost/jboss-eap:6.4.v1 docker.io/haiduc2023/jboss-eap:6.4.v1 +sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 +sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 +gedit mysql.sh +sudo podman run -d --pod mypod --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 From 018173ba132d1f4e70d947355c51e1e9fc1aed5a Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Tue, 19 Sep 2023 16:03:33 -0400 Subject: [PATCH 03/41] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d0f08f68d5..f0c34bc9c7 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,6 @@ sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 gedit mysql.sh sudo podman run -d --pod mypod --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 + + +oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi From b4ec34d682159dca2ba915354e7793d31239c056 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Tue, 19 Sep 2023 16:21:16 -0400 Subject: [PATCH 04/41] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index f0c34bc9c7..a17c90cbb9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,27 @@ # DO180-apps DO180 Repository for Sample Applications +Dockerfile: +``` +# install JBoss EAP 6.4.0 +ADD jboss-eap-6.4.0.zip /opt/jboss/jboss-eap-6.4.0.zip +RUN unzip /opt/jboss/jboss-eap-6.4.0.zip +# set environment +ENV JBOSS_HOME /opt/jboss/jboss-eap-6.4 +# create JBoss console user +RUN $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent +# configure JBoss +RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0\"" >> $JBOSS_HOME/bin/standalone.conf + +# set permission folder +RUN chown -R jboss:jboss /opt/jboss + +# JBoss ports +EXPOSE 8080 9990 9999 +# start JBoss +ENTRYPOINT $JBOSS_HOME/bin/standalone.sh -c standalone-full-ha.xml +``` + sudo podman run -d --name jboss-eap-app -p 8080:8080 -p 9990:9990 -p 9999:9999 localhost/jboss-eap sudo podman logs --tail=10 jboss-eap-app sudo podman stop jboss-eap-app From f995c703ecf34b0175ff6d18ae3cbe7ed802c019 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Tue, 19 Sep 2023 16:26:47 -0400 Subject: [PATCH 05/41] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a17c90cbb9..b1dba093c2 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ EXPOSE 8080 9990 9999 ENTRYPOINT $JBOSS_HOME/bin/standalone.sh -c standalone-full-ha.xml ``` +sudo podman build -t jboss-eap . sudo podman run -d --name jboss-eap-app -p 8080:8080 -p 9990:9990 -p 9999:9999 localhost/jboss-eap sudo podman logs --tail=10 jboss-eap-app sudo podman stop jboss-eap-app From 779ba13311451daa1138e1aa95830355804c64ec Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 05:30:26 +0900 Subject: [PATCH 06/41] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b1dba093c2..4e1f78df97 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,18 @@ ENTRYPOINT $JBOSS_HOME/bin/standalone.sh -c standalone-full-ha.xml sudo podman build -t jboss-eap . sudo podman run -d --name jboss-eap-app -p 8080:8080 -p 9990:9990 -p 9999:9999 localhost/jboss-eap + sudo podman logs --tail=10 jboss-eap-app sudo podman stop jboss-eap-app sudo podman ps -a sudo podman rm jboss-eap-app + sudo podman tag localhost/jboss-eap localhost/jboss-eap:6.4.v1 sudo podman save -o localhost/jboss-eap.6.4.v1.tar localhost/jboss-eap:6.4.v1 sudo podman images sudo podman tag localhost/jboss-eap:6.4.v1 docker.io/haiduc2023/jboss-eap:6.4.v1 sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 + sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 gedit mysql.sh sudo podman run -d --pod mypod --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 From 6e2f0d2bc2c5818ffefcf68fe8799282b93df5c9 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Tue, 19 Sep 2023 16:51:02 -0400 Subject: [PATCH 07/41] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e1f78df97..fdf1fde0bc 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,11 @@ sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 gedit mysql.sh -sudo podman run -d --pod mypod --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 +``` +#!/bin/bash + +sudo podman run -d --pod mypod --name mydb2 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 +``` oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi From 4ff9fbf017c16924cd7c23755a4de793b7ddc24c Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 06:04:36 +0900 Subject: [PATCH 08/41] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdf1fde0bc..1adb7331ac 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ sudo podman images sudo podman tag localhost/jboss-eap:6.4.v1 docker.io/haiduc2023/jboss-eap:6.4.v1 sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 -sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 +sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 -v /home/student/local/mysql:/var/lib/mysql/data gedit mysql.sh ``` #!/bin/bash From 0b3522642eb9dea0f159d016adf80776618d2847 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 06:05:56 +0900 Subject: [PATCH 09/41] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1adb7331ac..a0a271a164 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ sudo podman images sudo podman tag localhost/jboss-eap:6.4.v1 docker.io/haiduc2023/jboss-eap:6.4.v1 sudo podman push docker.io/haiduc2023/jboss-eap:6.4.v1 -sudo podman run -d --name mydb -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 -v /home/student/local/mysql:/var/lib/mysql/data +sudo podman run -d --name mydb -v /home/student/local/mysql:/var/lib/mysql/data -p 30306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 gedit mysql.sh ``` #!/bin/bash From 01eb75854d41f07d0ad1caf3e742eabe80cad810 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 19:12:42 +0900 Subject: [PATCH 10/41] Create test.md --- test.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 test.md diff --git a/test.md b/test.md new file mode 100644 index 0000000000..a829b1190c --- /dev/null +++ b/test.md @@ -0,0 +1,60 @@ +3 + +Get last 10 lines of logs for container jboss-eap-app +Stop the container boss-eap-app +Remove the container jboss-eap-app + + +4 + +Add a tag "6.4.v1" to the image jboss-eap (Build in Test 1) +Save the image with new tag to tar file jbos-eap.6.4.v1.tar +Push the image with new tag "6.4.v1 to docker registry + + +5 +Run myg| container using Podman and image registry.access.redhat.com/rhscl/mysql-57-rhel7 +Name of the container mydb +Expose container port 3306 to port 30306 on local h +Pass the container parameter values +MYSQL_ROOT_PASSWORD=password +MYSQL USER=user1 +MYSQL_PASSWORD=password +MYSQL_DATABASE=books + +6 + +Create an mysql application as instructed below +Name of the app is mysql-app +Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7 +Parameters to be used MYSQL_USER-user +MYSQL_PASSWORD=password +MYSQL_DATABASE=books +All resources should have label "aap=mydbapp" + +7 + +Expose the service to url "mysaltestapptesturl.com" +Copy file mytestfile. txt from host to the mysql application path /tmp/ +Check pod logs +Login into application and check the version of mysq| + +8 + +Create mysql application as instructed below +Use mysql.son or mysql.yaml for application creation +Variable to be set +MYSQL_USER=user1 +MYSQL_PASSWORD=password +MYSQL_DATABASE=books + +9 + +Create Template from mysql. json or mysql. yaml file +Create mysql application as instructed below + • Use the template created + • Variable to be set +MYSQL_USER-user1 +MYSQL_PASSWORD=password +MYSQL_DATABASE=books +![image](https://github.com/haiduc2005/DO180-apps/assets/20736187/75a08470-459f-46ee-a19a-7e6bef97f22f) From f8fd25dc0d3b85abe209560ad1764ae4e9326392 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 19:13:10 +0900 Subject: [PATCH 11/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index a829b1190c..eb4190cd8a 100644 --- a/test.md +++ b/test.md @@ -57,4 +57,4 @@ Create mysql application as instructed below MYSQL_USER-user1 MYSQL_PASSWORD=password MYSQL_DATABASE=books -![image](https://github.com/haiduc2005/DO180-apps/assets/20736187/75a08470-459f-46ee-a19a-7e6bef97f22f) + From 63ce6d5bb8110d3ce0491f2fe0ba528e142f9bd1 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 19:16:12 +0900 Subject: [PATCH 12/41] Update test.md --- test.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test.md b/test.md index eb4190cd8a..7a769fb0b4 100644 --- a/test.md +++ b/test.md @@ -1,3 +1,23 @@ +1 + +Edit the Docker file in path /home/openshift ex180 practice/EX180 as instructed below and build an image with name iboss-eap +Copy the file /home/openshift_ex180 _ practice/iboss-eap-6.4.0 .zip from host to container image path /opt/jboss/. Unzip the copied file. + +Set ENV for BOSS HOME to /opt/boss/iboss-eap-6.4 +Create EAP user using $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent +Expose ports 8080,9990 and 9999 +Start JBOSS using $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha xml![image](https://github.com/haiduc2005/DO180-apps/assets/20736187/f636d304-82aa-4896-8151-d32594579f06) + + + +2 + +RUN container and use the image jboss-eap build in previous section. +Expose ports 8080 ,9990 and 9999 of containers to local host ports 8080,9990 and 9999 respectively. +Set name of the container as "boss-eap-app"![image](https://github.com/haiduc2005/DO180-apps/assets/20736187/d62ef616-c338-400c-bb28-994ab9b29849) + + + 3 Get last 10 lines of logs for container jboss-eap-app @@ -5,6 +25,7 @@ Stop the container boss-eap-app Remove the container jboss-eap-app + 4 Add a tag "6.4.v1" to the image jboss-eap (Build in Test 1) From f1fb2fa7366d88919ef969083ab7cfbd93a8dba8 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 19:17:42 +0900 Subject: [PATCH 13/41] Update test.md --- test.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/test.md b/test.md index 7a769fb0b4..83c0f13381 100644 --- a/test.md +++ b/test.md @@ -1,47 +1,47 @@ 1 -Edit the Docker file in path /home/openshift ex180 practice/EX180 as instructed below and build an image with name iboss-eap -Copy the file /home/openshift_ex180 _ practice/iboss-eap-6.4.0 .zip from host to container image path /opt/jboss/. Unzip the copied file. +Edit the Docker file in path /home/openshift ex180 practice/EX180 as instructed below and build an image with name iboss-eap +Copy the file /home/openshift_ex180 _ practice/iboss-eap-6.4.0 .zip from host to container image path /opt/jboss/. Unzip the copied file. -Set ENV for BOSS HOME to /opt/boss/iboss-eap-6.4 -Create EAP user using $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent -Expose ports 8080,9990 and 9999 -Start JBOSS using $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha xml![image](https://github.com/haiduc2005/DO180-apps/assets/20736187/f636d304-82aa-4896-8151-d32594579f06) +Set ENV for BOSS HOME to /opt/boss/iboss-eap-6.4 +Create EAP user using $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent +Expose ports 8080,9990 and 9999 +Start JBOSS using $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha xml 2 -RUN container and use the image jboss-eap build in previous section. -Expose ports 8080 ,9990 and 9999 of containers to local host ports 8080,9990 and 9999 respectively. -Set name of the container as "boss-eap-app"![image](https://github.com/haiduc2005/DO180-apps/assets/20736187/d62ef616-c338-400c-bb28-994ab9b29849) - +RUN container and use the image jboss-eap build in previous section. +Expose ports 8080 ,9990 and 9999 of containers to local host ports 8080,9990 and 9999 respectively. +Set name of the container as "boss-eap-app" + 3 -Get last 10 lines of logs for container jboss-eap-app -Stop the container boss-eap-app -Remove the container jboss-eap-app +Get last 10 lines of logs for container jboss-eap-app +Stop the container boss-eap-app +Remove the container jboss-eap-app 4 -Add a tag "6.4.v1" to the image jboss-eap (Build in Test 1) -Save the image with new tag to tar file jbos-eap.6.4.v1.tar -Push the image with new tag "6.4.v1 to docker registry +Add a tag "6.4.v1" to the image jboss-eap (Build in Test 1) +Save the image with new tag to tar file jbos-eap.6.4.v1.tar +Push the image with new tag "6.4.v1 to docker registry 5 -Run myg| container using Podman and image registry.access.redhat.com/rhscl/mysql-57-rhel7 -Name of the container mydb -Expose container port 3306 to port 30306 on local h -Pass the container parameter values -MYSQL_ROOT_PASSWORD=password -MYSQL USER=user1 -MYSQL_PASSWORD=password -MYSQL_DATABASE=books +Run myg| container using Podman and image registry.access.redhat.com/rhscl/mysql-57-rhel7 +Name of the container mydb +Expose container port 3306 to port 30306 on local h +Pass the container parameter values +MYSQL_ROOT_PASSWORD=password +MYSQL USER=user1 +MYSQL_PASSWORD=password +MYSQL_DATABASE=books 6 From cf6ed2cf77067ffef46cbddf78bf5ec37dcc8559 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 19:18:00 +0900 Subject: [PATCH 14/41] Update test.md --- test.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test.md b/test.md index 83c0f13381..4f0c28e49b 100644 --- a/test.md +++ b/test.md @@ -34,6 +34,8 @@ Push the image with new tag "6.4.v1 to docker registry 5 + + Run myg| container using Podman and image registry.access.redhat.com/rhscl/mysql-57-rhel7 Name of the container mydb Expose container port 3306 to port 30306 on local h From f8e6dfed8d5f137fad4d6e2237ed932e0be51198 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 20:28:48 +0900 Subject: [PATCH 15/41] Update test.md --- test.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.md b/test.md index 4f0c28e49b..a4cc07560e 100644 --- a/test.md +++ b/test.md @@ -1,9 +1,9 @@ 1 Edit the Docker file in path /home/openshift ex180 practice/EX180 as instructed below and build an image with name iboss-eap -Copy the file /home/openshift_ex180 _ practice/iboss-eap-6.4.0 .zip from host to container image path /opt/jboss/. Unzip the copied file. +Copy the file /home/openshift_ex180 _ practice/jboss-eap-6.4.0 .zip from host to container image path /opt/jboss/. Unzip the copied file. -Set ENV for BOSS HOME to /opt/boss/iboss-eap-6.4 +Set ENV for BOSS HOME to /opt/boss/jboss-eap-6.4 Create EAP user using $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent Expose ports 8080,9990 and 9999 Start JBOSS using $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha xml From 9410873148ed98199a5280701afa8a13cf049ffa Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 20:33:11 +0900 Subject: [PATCH 16/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index a4cc07560e..c6031a7b9f 100644 --- a/test.md +++ b/test.md @@ -6,7 +6,7 @@ Copy the file /home/openshift_ex180 _ practice/jboss-eap-6.4.0 .zip from host to Set ENV for BOSS HOME to /opt/boss/jboss-eap-6.4 Create EAP user using $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent Expose ports 8080,9990 and 9999 -Start JBOSS using $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha xml +Start JBOSS using $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha.xml From 9cd0f99bc751ad3234010a2b5e0133d5262ce60f Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 20:44:10 +0900 Subject: [PATCH 17/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index c6031a7b9f..84fa7e789a 100644 --- a/test.md +++ b/test.md @@ -14,7 +14,7 @@ Copy the file /home/openshift_ex180 _ practice/jboss-eap-6.4.0 .zip from host to RUN container and use the image jboss-eap build in previous section. Expose ports 8080 ,9990 and 9999 of containers to local host ports 8080,9990 and 9999 respectively. -Set name of the container as "boss-eap-app" +Set name of the container as "jboss-eap-app" From 143bb581b4c6bbe80e44d9cd7c77e757f4068912 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 20:49:39 +0900 Subject: [PATCH 18/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index 84fa7e789a..d820c74f35 100644 --- a/test.md +++ b/test.md @@ -29,7 +29,7 @@ Remove the container jboss-eap-app 4 Add a tag "6.4.v1" to the image jboss-eap (Build in Test 1) -Save the image with new tag to tar file jbos-eap.6.4.v1.tar +Save the image with new tag to tar file jboss-eap.6.4.v1.tar Push the image with new tag "6.4.v1 to docker registry From 90b6b6504c8f921b901a157cb6ac6c131c7f2841 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Wed, 20 Sep 2023 21:24:57 +0900 Subject: [PATCH 19/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index d820c74f35..d13b569b6c 100644 --- a/test.md +++ b/test.md @@ -41,7 +41,7 @@ Name of the container mydb Expose container port 3306 to port 30306 on local h Pass the container parameter values MYSQL_ROOT_PASSWORD=password -MYSQL USER=user1 +MYSQL_USER=user1 MYSQL_PASSWORD=password MYSQL_DATABASE=books From 711e4e3f7dba0c9d89300a1c14cc874dd759d89e Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 17:13:20 +0900 Subject: [PATCH 20/41] Update test.md --- test.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/test.md b/test.md index d13b569b6c..6f2393ec1e 100644 --- a/test.md +++ b/test.md @@ -47,37 +47,37 @@ MYSQL_DATABASE=books 6 -Create an mysql application as instructed below -Name of the app is mysql-app -Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7 -Parameters to be used MYSQL_USER-user -MYSQL_PASSWORD=password -MYSQL_DATABASE=books -All resources should have label "aap=mydbapp" +Create an mysql application as instructed below   +Name of the app is mysql-app   +Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7   +Parameters to be used MYSQL_USER-user   +MYSQL_PASSWORD=password   +MYSQL_DATABASE=books   +All resources should have label "aap=mydbapp"   7 -Expose the service to url "mysaltestapptesturl.com" -Copy file mytestfile. txt from host to the mysql application path /tmp/ -Check pod logs -Login into application and check the version of mysq| +Expose the service to url "mysaltestapptesturl.com"   +Copy file mytestfile. txt from host to the mysql application path /tmp/   +Check pod logs   +Login into application and check the version of mysq|   8 -Create mysql application as instructed below -Use mysql.son or mysql.yaml for application creation -Variable to be set -MYSQL_USER=user1 -MYSQL_PASSWORD=password -MYSQL_DATABASE=books +Create mysql application as instructed below   +Use mysql.son or mysql.yaml for application creation   +Variable to be set   +MYSQL_USER=user1   +MYSQL_PASSWORD=password   +MYSQL_DATABASE=books   9 -Create Template from mysql. json or mysql. yaml file -Create mysql application as instructed below - • Use the template created - • Variable to be set -MYSQL_USER-user1 -MYSQL_PASSWORD=password -MYSQL_DATABASE=books +Create Template from mysql. json or mysql. yaml file   +Create mysql application as instructed below   + • Use the template created   + • Variable to be set   +MYSQL_USER-user1   +MYSQL_PASSWORD=password   +MYSQL_DATABASE=books   From 6e8e48d34326f038a9ac8adbfc89d3292dadc909 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 17:16:32 +0900 Subject: [PATCH 21/41] Update test.md --- test.md | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/test.md b/test.md index 6f2393ec1e..17d81520c9 100644 --- a/test.md +++ b/test.md @@ -47,37 +47,40 @@ MYSQL_DATABASE=books 6 -Create an mysql application as instructed below   -Name of the app is mysql-app   -Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7   -Parameters to be used MYSQL_USER-user   -MYSQL_PASSWORD=password   -MYSQL_DATABASE=books   -All resources should have label "aap=mydbapp"   +Create an mysql application as instructed below +Name of the app is mysql-app + +Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7 + +Parameters to be +used MYSQL_USER-user +MYSQL_PASSWORD=password +MYSQL_DATABASE=books +All resources should have label "aap=mydbapp" 7 -Expose the service to url "mysaltestapptesturl.com"   -Copy file mytestfile. txt from host to the mysql application path /tmp/   -Check pod logs   -Login into application and check the version of mysq|   +Expose the service to url "mysaltestapptesturl.com" +Copy file mytestfile. txt from host to the mysql application path /tmp/ +Check pod logs +Login into application and check the version of mysq| 8 -Create mysql application as instructed below   -Use mysql.son or mysql.yaml for application creation   -Variable to be set   -MYSQL_USER=user1   -MYSQL_PASSWORD=password   -MYSQL_DATABASE=books   +Create mysql application as instructed below +Use mysql.son or mysql.yaml for application creation   +Variable to be set   +MYSQL_USER=user1   +MYSQL_PASSWORD=password   +MYSQL_DATABASE=books   9 -Create Template from mysql. json or mysql. yaml file   -Create mysql application as instructed below   - • Use the template created   - • Variable to be set   -MYSQL_USER-user1   -MYSQL_PASSWORD=password   -MYSQL_DATABASE=books   +Create Template from mysql. json or mysql. yaml file   +Create mysql application as instructed below   + • Use the template created   + • Variable to be set   +MYSQL_USER-user1   +MYSQL_PASSWORD=password   +MYSQL_DATABASE=books   From b86f718604abe72d313525766946f99f576a14f1 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 17:20:49 +0900 Subject: [PATCH 22/41] Update test.md --- test.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test.md b/test.md index 17d81520c9..0d2a15c8c3 100644 --- a/test.md +++ b/test.md @@ -53,9 +53,7 @@ Name of the app is mysql-app Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7 Parameters to be -used MYSQL_USER-user -MYSQL_PASSWORD=password -MYSQL_DATABASE=books +used MYSQL_USER=user MYSQL_PASSWORD=password MYSQL_DATABASE=books All resources should have label "aap=mydbapp" 7 From 4af4558b26c689b03c5b4c8431e2a696059b2fc5 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 18:22:20 +0900 Subject: [PATCH 23/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index 0d2a15c8c3..d2f01e623d 100644 --- a/test.md +++ b/test.md @@ -54,7 +54,7 @@ Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7 Parameters to be used MYSQL_USER=user MYSQL_PASSWORD=password MYSQL_DATABASE=books -All resources should have label "aap=mydbapp" +All resources should have label "app=mydbapp" 7 From 1465a1c05c9e128cffcee047ee899ec1fd88e03b Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 18:24:08 +0900 Subject: [PATCH 24/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index d2f01e623d..fb6257f0d9 100644 --- a/test.md +++ b/test.md @@ -50,7 +50,7 @@ MYSQL_DATABASE=books Create an mysql application as instructed below Name of the app is mysql-app -Use image registry.access.redhat.com/rhscl/mysq|-57-rhel7 +Use image registry.access.redhat.com/rhscl/mysql-57-rhel7 Parameters to be used MYSQL_USER=user MYSQL_PASSWORD=password MYSQL_DATABASE=books From fc57d1bf299fd22dca4e1fb081b2f724900718af Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 21:09:06 +0900 Subject: [PATCH 25/41] Update test.md --- test.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test.md b/test.md index fb6257f0d9..5a4e14dac4 100644 --- a/test.md +++ b/test.md @@ -68,9 +68,7 @@ Login into application and check the version of mysq| Create mysql application as instructed below Use mysql.son or mysql.yaml for application creation   Variable to be set   -MYSQL_USER=user1   -MYSQL_PASSWORD=password   -MYSQL_DATABASE=books   +MYSQL_USER=user1 MYSQL_PASSWORD=password MYSQL_DATABASE=books   9 @@ -78,7 +76,5 @@ Create Template from mysql. json or mysql. yaml file   Create mysql application as instructed below   • Use the template created   • Variable to be set   -MYSQL_USER-user1   -MYSQL_PASSWORD=password   -MYSQL_DATABASE=books   +MYSQL_USER-user1 MYSQL_PASSWORD=password MYSQL_DATABASE=books   From 76d0da2bb642d79ee860fd1b0ea097083ccb9551 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 08:17:24 -0400 Subject: [PATCH 26/41] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index a0a271a164..bf6df57773 100644 --- a/README.md +++ b/README.md @@ -44,5 +44,12 @@ gedit mysql.sh sudo podman run -d --pod mypod --name mydb2 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 ``` +oc new-app --name=mysql-app --docker-image=registry.access.redhat.com/rhscl/mysql-57-rhel7 -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books -l app=mydbapp --as-deployment-config + +oc expose svc mysql-app --hostname=mysaltestapptesturl.com +oc cp mytestfile.txt mysql-app-1-clcqx:/tmp/ +oc logs mysql-app-1-clcqx +oc get all +oc rsh mysql-app-1-clcqx oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi From aa2b098b8a21cb6f6cac3682c3e09e5c9f85995a Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 08:39:25 -0400 Subject: [PATCH 27/41] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index bf6df57773..c5fe90fe07 100644 --- a/README.md +++ b/README.md @@ -52,4 +52,7 @@ oc logs mysql-app-1-clcqx oc get all oc rsh mysql-app-1-clcqx +oc process -f mysql.yaml -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - + + oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi From 56bfcd6396e5f7d25731af1f1228220169592387 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 21:40:56 +0900 Subject: [PATCH 28/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index 5a4e14dac4..8e75d37b69 100644 --- a/test.md +++ b/test.md @@ -76,5 +76,5 @@ Create Template from mysql. json or mysql. yaml file   Create mysql application as instructed below   • Use the template created   • Variable to be set   -MYSQL_USER-user1 MYSQL_PASSWORD=password MYSQL_DATABASE=books   +MYSQL_USER=user1 MYSQL_PASSWORD=password MYSQL_DATABASE=books   From 96d1d430111292fe12709a18c7e98d642f23ca93 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 08:58:33 -0400 Subject: [PATCH 29/41] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5fe90fe07..91826ade27 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,8 @@ oc logs mysql-app-1-clcqx oc get all oc rsh mysql-app-1-clcqx -oc process -f mysql.yaml -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - +oc process -f mysql.yaml -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - +oc process mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi From ab23dd38e7b8a28ff0da8c8a8f7c7733f4fed199 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 09:17:30 -0400 Subject: [PATCH 30/41] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91826ade27..8cd999ceef 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ oc get all oc rsh mysql-app-1-clcqx oc process -f mysql.yaml -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - - +oc create -f mysql.yaml oc process mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi From 27ef5ad6a32c168f9cadff65fdeff6caae38b400 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 22:18:42 +0900 Subject: [PATCH 31/41] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8cd999ceef..a5809f87cf 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ oc get all oc rsh mysql-app-1-clcqx oc process -f mysql.yaml -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - + oc create -f mysql.yaml oc process mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - - oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi From 98d0405132ed324cfac9641f604b8b0f31ed0394 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 09:44:19 -0400 Subject: [PATCH 32/41] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a5809f87cf..4f265daddc 100644 --- a/README.md +++ b/README.md @@ -57,3 +57,6 @@ oc process -f mysql.yaml -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL oc create -f mysql.yaml oc process mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi + +oc delete pods --all +oc delete pods mysql-1-xxxxx From 0b24f8c00c8602252956403167858cc1f59fa173 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 21 Sep 2023 22:47:48 +0900 Subject: [PATCH 33/41] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4f265daddc..83488a05cc 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,5 @@ oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=myp oc delete pods --all oc delete pods mysql-1-xxxxx +# Create a new project with a display name and description +oc new-project web-team-dev --display-name="Web Team Development" --description="Development project for the web team." From 4fc1cd50b855f2a4409bbeeae290e8ca383fdca1 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Sun, 26 Nov 2023 18:01:54 +0900 Subject: [PATCH 34/41] Update README.md --- README.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/README.md b/README.md index 83488a05cc..9b09eeebd5 100644 --- a/README.md +++ b/README.md @@ -44,21 +44,4 @@ gedit mysql.sh sudo podman run -d --pod mypod --name mydb2 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user1 -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books registry.access.redhat.com/rhscl/mysql-57-rhel7 ``` -oc new-app --name=mysql-app --docker-image=registry.access.redhat.com/rhscl/mysql-57-rhel7 -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=books -l app=mydbapp --as-deployment-config -oc expose svc mysql-app --hostname=mysaltestapptesturl.com -oc cp mytestfile.txt mysql-app-1-clcqx:/tmp/ -oc logs mysql-app-1-clcqx -oc get all -oc rsh mysql-app-1-clcqx - -oc process -f mysql.yaml -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - - -oc create -f mysql.yaml -oc process mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=password -p MYSQL_DATABASE=books | oc create -f - -oc new-app --template=mysql-persistent -p MYSQL_USER=user1 -p MYSQL_PASSWORD=mypa55 -p MYSQL_DATABASE=testdb -p MYSQL_ROOT_PASSWORD=r00tpa55 -p VOLUME_CAPACITY=10Gi - -oc delete pods --all -oc delete pods mysql-1-xxxxx -# Create a new project with a display name and description -oc new-project web-team-dev --display-name="Web Team Development" --description="Development project for the web team." From fb1ff260a6b5dc498ef0d0cc1bba66f5f3cb7b14 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Sun, 26 Nov 2023 04:07:11 -0500 Subject: [PATCH 35/41] Create Dockerfile.md --- Dockerfile.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Dockerfile.md diff --git a/Dockerfile.md b/Dockerfile.md new file mode 100644 index 0000000000..3c509e09d5 --- /dev/null +++ b/Dockerfile.md @@ -0,0 +1,46 @@ +# dockerfile to build image for JBoss EAP 6.4 + +# start from rhel 7.2 +FROM ubi8 + +# file author / maintainer +MAINTAINER "FirstName LastName" "emailaddress@gmail.com" + +# update OS +RUN yum -y update && \ +yum -y install sudo openssh-clients unzip java-1.8.0-openjdk-devel && \ +yum clean all + +# enabling sudo group +# enabling sudo over ssh +RUN echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \ +sed -i 's/.*requiretty$/Defaults !requiretty/' /etc/sudoers + +# add a user for the application, with sudo permissions +RUN useradd -m jboss ; echo jboss: | chpasswd ; usermod -a -G wheel jboss + +# create workdir +RUN mkdir -p /opt/jboss + +WORKDIR /opt/jboss + +# install JBoss EAP 6.4.0 + +# set environment + +# create JBoss console user + +# configure JBoss +RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0\"" >> $JBOSS_HOME/bin/standalone.conf + +# set permission folder +RUN chown -R jboss:jboss /opt/jboss + +# JBoss ports + +# start JBoss + +USER jboss + +CMD /bin/bash + 45,1 底端 From 387f979b06c1d876832965ea3f4c2299d1a42f89 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Sun, 26 Nov 2023 18:08:20 +0900 Subject: [PATCH 36/41] Update Dockerfile.md --- Dockerfile.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile.md b/Dockerfile.md index 3c509e09d5..0ee3bf12e1 100644 --- a/Dockerfile.md +++ b/Dockerfile.md @@ -1,3 +1,4 @@ +``` # dockerfile to build image for JBoss EAP 6.4 # start from rhel 7.2 @@ -39,7 +40,7 @@ RUN chown -R jboss:jboss /opt/jboss # JBoss ports # start JBoss - +``` USER jboss CMD /bin/bash From 978580811f3ea1ac65c6c8c0b106b038b3b20406 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Sun, 26 Nov 2023 18:08:50 +0900 Subject: [PATCH 37/41] Update Dockerfile.md --- Dockerfile.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.md b/Dockerfile.md index 0ee3bf12e1..60ba72ebb9 100644 --- a/Dockerfile.md +++ b/Dockerfile.md @@ -40,8 +40,8 @@ RUN chown -R jboss:jboss /opt/jboss # JBoss ports # start JBoss -``` USER jboss CMD /bin/bash - 45,1 底端 + 45,1 底 +``` From c8a19e5bc07592c1ced2f64d68de05f08d8060d2 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Sun, 26 Nov 2023 04:57:09 -0500 Subject: [PATCH 38/41] Update test.md --- test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.md b/test.md index 8e75d37b69..68e59cd92a 100644 --- a/test.md +++ b/test.md @@ -3,7 +3,7 @@ Edit the Docker file in path /home/openshift ex180 practice/EX180 as instructed below and build an image with name iboss-eap Copy the file /home/openshift_ex180 _ practice/jboss-eap-6.4.0 .zip from host to container image path /opt/jboss/. Unzip the copied file. -Set ENV for BOSS HOME to /opt/boss/jboss-eap-6.4 +Set ENV for BOSS HOME to /opt/jboss/jboss-eap-6.4 Create EAP user using $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent Expose ports 8080,9990 and 9999 Start JBOSS using $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha.xml From 76a9141db6d30afa9ef674f988b26bef158f8141 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Sun, 26 Nov 2023 05:10:05 -0500 Subject: [PATCH 39/41] Update Dockerfile.md --- Dockerfile.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile.md b/Dockerfile.md index 60ba72ebb9..5209fe52fd 100644 --- a/Dockerfile.md +++ b/Dockerfile.md @@ -26,11 +26,12 @@ RUN mkdir -p /opt/jboss WORKDIR /opt/jboss # install JBoss EAP 6.4.0 - +ADD jboss-eap-6.4.0.zip /opt/jboss/jboss-eap-6.4.0.zip +RUN unzip /opt/jboss/jboss-eap-6.4.0.zip # set environment - +ENV JBOSS_HOME /opt/jboss/jboss-eap-6.4 # create JBoss console user - +RUN $JBOSS_HOME/bin/add-user.sh admin admin@2016 --silent # configure JBoss RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0\"" >> $JBOSS_HOME/bin/standalone.conf @@ -38,10 +39,11 @@ RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.addr RUN chown -R jboss:jboss /opt/jboss # JBoss ports - +EXPOSE 8080 9990 9999 # start JBoss +ENTRYPOINT $JBOSS_HOME/bin/standalone.sh-c standalone-full-ha.xml USER jboss CMD /bin/bash - 45,1 底 + ``` From 928715d3169c9674420e46e31e350d3b14f31662 Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 7 Dec 2023 12:42:09 +0900 Subject: [PATCH 40/41] Rename test.md to EXAM.md --- test.md => EXAM.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test.md => EXAM.md (100%) diff --git a/test.md b/EXAM.md similarity index 100% rename from test.md rename to EXAM.md From d2b3cd375bd8629eec6dde1b5c6df5e2a21ab63b Mon Sep 17 00:00:00 2001 From: haiduc2005 Date: Thu, 7 Dec 2023 12:46:02 +0900 Subject: [PATCH 41/41] Creating_Accessing-Containers_Networking --- Creating_Accessing-Containers_Networking | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Creating_Accessing-Containers_Networking diff --git a/Creating_Accessing-Containers_Networking b/Creating_Accessing-Containers_Networking new file mode 100644 index 0000000000..2524fe039b --- /dev/null +++ b/Creating_Accessing-Containers_Networking @@ -0,0 +1,32 @@ +Lab 1 -- Creating Containers +podman pull registry.access.redhat.com/ubi8/ubi-minimal:8.8 +podman images +podman run registry.access.redhat.com/ubi8/ubi-minimal:8.8 echo 'Hello Red Hat' +podman ps +podman run -e GREET=Hello -e NAME='Red Hat' registry.access.redhat.com/ubi8/ubi-minimal:8.8 printenv GREET NAME +podman run -d -p 8080:8080 registry.access.redhat.com/ubi8/httpd-24 +podman stop (id) +podman ps -a +podman rm (id) +podman rmi (id) + +Lab 2 -- Container Networking +podman network inspect podman +podman network create cities +podman network inspect cities +podman run --name times-app --network cities -p 8080:8080 -d docker.io/tsrana1/podman-info-times:v0.1 +podman inspect times-app -f '{{.NetworkSettings.Networks.cities.IPAddress}}' +podman run --rm --network cities registry.access.redhat.com/ubi8/ubi-minimal:8.5 curl -s http://IP_ADDRESS:8080/times/BKK +podman run --rm --network cities registry.access.redhat.com/ubi8/ubi-minimal:8.5 curl -s http://times-app:8080/times/BKK +podman run --name cities-app --network cities -p 8090:8090 -d -e TIMES_APP_URL=http://times-app:8080/times docker.io/tsrana1/podman-info-cities:v0.1 +curl http://localhost:8090/cities/MAD +curl http://localhost:8090/cities/SAN + +Lab 3 -- Accessing Containers +podman run --name nginx -d -p 8080:8080 docker.io/tsrana1/podman-nginx-helloworld +podman cp nginx:/var/log/nginx/error.log error.log +podman exec nginx ls /usr/share/nginx/html/public +podman cp nginx:/etc/nginx/nginx.conf nginx.conf +podman exec -it nginx bash +vim /etc/nginx/nginx.conf +podman exec nginx nginx -s reload