From 774604aa21f98f057eb6ce212a0d34d7b4df9054 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 20 Dec 2020 06:59:44 +0000 Subject: [PATCH 01/71] updated index.html --- src/main/webapp/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 17ed961..6d83e29 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,7 +1,7 @@ -

Welcome Page


+

Welcome flipkart users


Login
Register
- \ No newline at end of file + From 334b8a92371cb125618e2e6a6690ab64a09d7693 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 20 Dec 2020 20:48:16 +0530 Subject: [PATCH 02/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 6d83e29..7ecfcd6 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome flipkart users


+

Welcome bhanyayogaclasses.com users


Login
Register
From dc56f5f31456a46db25e2a1a76bcba0c07cd34f8 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Mon, 21 Dec 2020 09:10:33 +0530 Subject: [PATCH 03/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 7ecfcd6..e3f7647 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome bhanyayogaclasses.com users


+

Welcome xyz.com users


Login
Register
From 6dffa83de2f131d7563a3d384beceeb1dc10cb51 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Mon, 21 Dec 2020 09:15:54 +0530 Subject: [PATCH 04/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index e3f7647..6a2a909 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome xyz.com users


+

Welcome xyz.com users


Login
Register
From e14e9e48590ce704ee918720a2e885a1f9104e19 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 21 Jan 2021 12:33:00 +0530 Subject: [PATCH 05/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 6a2a909..a062b6f 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome xyz.com users


+

Welcome learnwithprojects.com users


Login
Register
From 09b742f7e49350c888ce4fe72c5fecf2b5bdbe8a Mon Sep 17 00:00:00 2001 From: root Date: Sun, 14 Feb 2021 05:56:51 +0000 Subject: [PATCH 06/71] src/main/webapp/index.html is updated --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index a062b6f..9eb26a6 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome learnwithprojects.com users


+

Welcome Students


Login
Register
From 734c0f61f09361c44bafccdce04cf02c5fcf1df4 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 14 Feb 2021 06:08:55 +0000 Subject: [PATCH 07/71] 2 file changed --- src/main/webapp/login.html | 2 +- src/main/webapp/register.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/login.html b/src/main/webapp/login.html index 0e5c651..b303220 100644 --- a/src/main/webapp/login.html +++ b/src/main/webapp/login.html @@ -1,7 +1,7 @@ -

Login Page

+

Please Login..

diff --git a/src/main/webapp/register.html b/src/main/webapp/register.html index dbc61a9..5ec44dd 100644 --- a/src/main/webapp/register.html +++ b/src/main/webapp/register.html @@ -1,6 +1,6 @@ -

Registration Form


+

Register here...


From 95d02ef1627503c12bc8fa785c5e3ebef33beac8 Mon Sep 17 00:00:00 2001 From: shreenivasm <59352181+shreenivasm@users.noreply.github.com> Date: Thu, 18 Feb 2021 20:40:13 +0530 Subject: [PATCH 08/71] Update register.html --- src/main/webapp/register.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/register.html b/src/main/webapp/register.html index 5ec44dd..b7bf225 100644 --- a/src/main/webapp/register.html +++ b/src/main/webapp/register.html @@ -1,6 +1,6 @@ -

Register here...


+

Signup here...


From 369560e1b288210f86994e9657589919f4ff8248 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 12 Mar 2021 17:46:29 +0530 Subject: [PATCH 09/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 9eb26a6..db19ee3 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome Students


+

Welccome to CGI.com


Login
Register
From 0df14c69dc2cc35d4aab118ba66f1d59c9621003 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 12 Mar 2021 17:58:31 +0530 Subject: [PATCH 10/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index db19ee3..0033443 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welccome to CGI.com


+

Welcome to CGI.com and Hope you All got lot of Learning from this class


Login
Register
From a0e626f99f38bedddc0f9e2a55284234dda85e1a Mon Sep 17 00:00:00 2001 From: rahul Date: Tue, 1 Jun 2021 03:04:15 +0000 Subject: [PATCH 11/71] index.html updated --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 0033443..939cdfc 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to CGI.com and Hope you All got lot of Learning from this class


+

Welcome Students...Hope you all are Learning from this class


Login
Register
From cfe2e24667fbd15fb9fb4f67899dde31bdb55422 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 1 Jun 2021 08:39:13 +0530 Subject: [PATCH 12/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 939cdfc..aadb80f 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome Students...Hope you all are Learning from this class


+

Welcome Students...


Login
Register
From 7d99b2d84d1ce6094dc519b7766ce5e41aea6a39 Mon Sep 17 00:00:00 2001 From: rahul Date: Thu, 3 Jun 2021 04:16:45 +0000 Subject: [PATCH 13/71] db details updated --- src/main/java/com/example/DbUtil.java | 4 ++-- src/main/java/com/example/application.properties | 4 ++-- src/main/webapp/WEB-INF/web.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 4fda626..343ac25 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,9 +9,9 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; + static String url = "jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/flipkart"; static String username = "admin"; - static String password = "test123test"; + static String password = "welcome1"; static { try { diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index fd3101a..f2b676e 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart +database.url=jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/flipkart database.username=admin -database.password=test123test +database.password=welcome1 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 249c9f6..9fd908e 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -10,11 +10,11 @@ dbPassword - welcome123 + welcome1 dbURL - jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/ dbName From 978008c4bb22bc9070c4179c72f602daa1e057ac Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 11 Jun 2021 10:13:01 +0530 Subject: [PATCH 14/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index aadb80f..0e3ade1 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome Students...


+

Hey students, welcome to lwplabs.com..Class will resume on 21st


Login
Register
From 5a50f8c419608373da8f5f60be2dc528938de114 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 27 Jun 2021 10:37:05 +0530 Subject: [PATCH 15/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 0e3ade1..95c48f9 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hey students, welcome to lwplabs.com..Class will resume on 21st


+

Hey students, welcome to lwplabs.com..


Login
Register
From 559596a56e21e17ffb81582c6c5150394c212b5f Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 21 Jul 2021 10:18:17 +0530 Subject: [PATCH 16/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 95c48f9..fca6dbe 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hey students, welcome to lwplabs.com..


+

Hey students, welcome to training.com


Login
Register
From 44d09babd6f9cb05f46a4a3a186cb47e71b0a725 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 23 Jul 2021 11:57:21 +0530 Subject: [PATCH 17/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index fca6dbe..2450c70 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hey students, welcome to training.com


+

Hey Students, welcome to tavisca123.com. Please Login Below..


Login
Register
From e564ec88b937a017437fa67ed66bc088a60b367d Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 24 Jul 2021 13:43:17 +0530 Subject: [PATCH 18/71] Create Jenkinsfile --- Jenkinsfile | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..3f19378 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,56 @@ +pipeline { + + agent any + + parameters { + choice choices: ['develop', 'release', 'master'], description: 'Please provide the branch name so that we can deploy', name: 'branch' + } + + triggers { + pollSCM 'H/2 * * * * ' + } + + tools { + maven 'maven-3.8.1' + } + + environment { + project_type = 'java' + DEPLOY_TO = 'production' + } + + stages { + + stage('git fetch') { + steps { + git branch: "${params.branch}", credentialsId: '4991f864-6845-456a-90df-f0f62edcdc79', url: 'https://github.com/mailrahulsre/java-db-Login.git' + } + } + stage('Build the code') { + when{ + environment name: 'project_type', value: 'java' + } + steps { + sh 'mvn -Dmaven.test.failure.ignore=true clean package' + echo "deploying to ${DEPLOY_TO} Env " + deploy adapters: [tomcat8(credentialsId: 'tavisca-tomcat-credentials', path: '', url: 'http://172.31.42.95:8080')], contextPath: 'login-release-branch', onFailure: false, war: '**/*.war' + } + } + + } + post { + always { + echo "You can always see me" + } + success { + echo "I am running because the job ran successfully" + //sh '/usr/local/bin/aws s3 cp /jenkins-home/workspace/stage-tavisca/target/LoginRegisterApp.war s3://9am-weekend-jul/$JOB_NAME/${BUILD_NUMBER}/' + } + unstable { + echo "Gear up ! The build is unstable. Try fix it" + } + failure { + echo "OMG ! The build failed" + } + } +} From 207bed168f74e4f1d4d412069f41e3e995c22db7 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 24 Jul 2021 14:18:07 +0530 Subject: [PATCH 19/71] Update Jenkinsfile --- Jenkinsfile | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3f19378..565b135 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,31 +1,26 @@ pipeline { - - agent any - - parameters { + agent any + parameters { choice choices: ['develop', 'release', 'master'], description: 'Please provide the branch name so that we can deploy', name: 'branch' - } - - triggers { + } + + triggers { pollSCM 'H/2 * * * * ' } - - tools { - maven 'maven-3.8.1' + tools { + maven 'maven' } - - environment { + environment { project_type = 'java' DEPLOY_TO = 'production' } - - stages { - - stage('git fetch') { + stages { + stage('git fetch') { steps { git branch: "${params.branch}", credentialsId: '4991f864-6845-456a-90df-f0f62edcdc79', url: 'https://github.com/mailrahulsre/java-db-Login.git' } - } + } + stage('Build the code') { when{ environment name: 'project_type', value: 'java' @@ -33,7 +28,7 @@ pipeline { steps { sh 'mvn -Dmaven.test.failure.ignore=true clean package' echo "deploying to ${DEPLOY_TO} Env " - deploy adapters: [tomcat8(credentialsId: 'tavisca-tomcat-credentials', path: '', url: 'http://172.31.42.95:8080')], contextPath: 'login-release-branch', onFailure: false, war: '**/*.war' + deploy adapters: [tomcat8(credentialsId: 'tomcat-cred', path: '', url: 'http://172.31.32.223:8080')], contextPath: 'login-release-branch', onFailure: false, war: '**/*.war' } } @@ -43,8 +38,15 @@ pipeline { echo "You can always see me" } success { + + + echo "I am running because the job ran successfully" - //sh '/usr/local/bin/aws s3 cp /jenkins-home/workspace/stage-tavisca/target/LoginRegisterApp.war s3://9am-weekend-jul/$JOB_NAME/${BUILD_NUMBER}/' + //sh '/usr/local/bin/aws s3 cp /jenkins-home/workspace/stage-tavisca/target/LoginRegisterApp.war s3://9am-weekend-jul/$JOB_NAME/${BUILD_NUMBER}/' + + + + } unstable { echo "Gear up ! The build is unstable. Try fix it" @@ -53,4 +55,5 @@ pipeline { echo "OMG ! The build failed" } } + } From 708ca5194921f2c47c913f8c9784afeb77e7bd84 Mon Sep 17 00:00:00 2001 From: rahul chaudhuri Date: Sun, 5 Sep 2021 05:57:00 +0000 Subject: [PATCH 20/71] added playbook, dockerfile, docker-stack.yml --- Dockerfile | 8 +++ ansible-playbook.yml | 121 +++++++++++++++++++++++++++++++++++++++++++ docker-stack.yml | 22 ++++++++ 3 files changed, 151 insertions(+) create mode 100644 Dockerfile create mode 100644 ansible-playbook.yml create mode 100644 docker-stack.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cdf7845 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +# Pull base image +FROM tomcat:8-jre8 + +# Maintainer +MAINTAINER "rahul" + +# copy war file on to container +COPY ./*.war /usr/local/tomcat/webapps diff --git a/ansible-playbook.yml b/ansible-playbook.yml new file mode 100644 index 0000000..ccbaa74 --- /dev/null +++ b/ansible-playbook.yml @@ -0,0 +1,121 @@ +--- +- name: Play1 for copying files + hosts: docker-master + become: yes + tasks: + - name: Create a directory if it does not exist + file: + path: /tmp/lwplabs-com + state: directory + mode: '0755' + owner: ansadmin + group: root + tags: + - create-dir + + - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server + copy: + src: /etc/ansible/lwplabs-com/ + dest: /tmp/lwplabs-com + owner: ansadmin + group: root + mode: '0777' + tags: + - copy_code + +- name: "Play 2- python installation" + hosts: docker-master + become: yes + tasks: + - name: Install Python 3.6 + yum: + name: python36 + state: present + register: out1 + tags: + - python-install + - debug: + var: out1 + + - name: alternatives + alternatives: + name: python + link: /usr/bin/python3.6 + path: /usr/bin/python3 + register: out2 + tags: + - python-alternatives + - debug: + var: out2 + +- name: "Play 3 Install Python packages and docker image push" + hosts: docker-master + become: yes + vars: + ansible_python_interpreter: /usr/bin/python3 + tasks: + - name: Install boto3 and botocore with pip3 module + pip: + name: + - boto + - boto3 + - botocore + - docker + #- docker-py + - jsondiff + - pyyaml + executable: pip3.6 + register: out3 + tags: docker-lib-install + - debug: + var: out3 + + - name: "Delete the docker image" + docker_image: + state: absent + force: yes + name: 127.0.0.1:5000/trainingwaleapp + tag: latest + register: out4 + tags: docker-image-deletion + - debug: + var: out4 + + - name: "Build an image and push it to a private repo" + docker_image: + build: + path: /tmp/lwplabs-com + name: 127.0.0.1:5000/lwplabsLogin + tag: latest + push: yes + nocache: yes + force: yes + register: out5 + tags: docker-image-build + - debug: + var: out5 + +- name: "Play 3 docker stack deploy" + hosts: docker-master + become: yes + tasks: + - name: Remove stack + docker_stack: + name: lwplabs + state: absent + tags: docker-stack-remove + + - name: sleep for 10 sec + shell: sleep 10 + + - name: Deploy stack from a compose file + docker_stack: + state: present + name: lwplabs + compose: + - /tmp/lwplabs-com/docker-stack.yml + register: out6 + tags: docker-stack-deploy + - debug: + var: out6 + diff --git a/docker-stack.yml b/docker-stack.yml new file mode 100644 index 0000000..c4a1dda --- /dev/null +++ b/docker-stack.yml @@ -0,0 +1,22 @@ +version: '3.9' + +services: + tomcat: + image: 127.0.0.1:5000/lwplabsLogin + #build: . + deploy: + replicas: 2 + placement: + max_replicas_per_node: 1 + restart_policy: + condition: on-failure + resources: + limits: + cpus: '0.50' + memory: 50M + reservations: + cpus: '0.25' + memory: 20M + ports: + - "8080:8080" + From 1f1015bf9e9cf7317fccab105759b2ea70df07f2 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 5 Sep 2021 11:57:29 +0530 Subject: [PATCH 21/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index ccbaa74..74a23fe 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -74,7 +74,7 @@ docker_image: state: absent force: yes - name: 127.0.0.1:5000/trainingwaleapp + name: 127.0.0.1:5000/lwplabsLogin tag: latest register: out4 tags: docker-image-deletion From 37bf276a4952323f70eb7dc89e283f56c646df7b Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 7 Sep 2021 10:02:35 +0530 Subject: [PATCH 22/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 74a23fe..4443c7a 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -15,7 +15,7 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: /etc/ansible/lwplabs-com/ + src: /etc/ansible/{{ job_name }}/ dest: /tmp/lwplabs-com owner: ansadmin group: root From 3928ca0efe51d8fa7385a13e74cb58d21b1d11d6 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 8 Sep 2021 09:35:54 +0530 Subject: [PATCH 23/71] Update ansible-playbook.yml --- ansible-playbook.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 4443c7a..e1f86ad 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -74,7 +74,7 @@ docker_image: state: absent force: yes - name: 127.0.0.1:5000/lwplabsLogin + name: 127.0.0.1:5000/lwplabslogin tag: latest register: out4 tags: docker-image-deletion @@ -85,7 +85,7 @@ docker_image: build: path: /tmp/lwplabs-com - name: 127.0.0.1:5000/lwplabsLogin + name: 127.0.0.1:5000/lwplabslogin tag: latest push: yes nocache: yes From 1dd36baf7b83df5571d19a055d07d014a74380bb Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 8 Sep 2021 09:36:34 +0530 Subject: [PATCH 24/71] changing image name lwplabsLogin to lwplabslogin --- docker-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-stack.yml b/docker-stack.yml index c4a1dda..c4c5894 100644 --- a/docker-stack.yml +++ b/docker-stack.yml @@ -2,7 +2,7 @@ version: '3.9' services: tomcat: - image: 127.0.0.1:5000/lwplabsLogin + image: 127.0.0.1:5000/lwplabslogin #build: . deploy: replicas: 2 From 31282426e6a7d9f0726a915315afda13fe651546 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 8 Sep 2021 09:51:59 +0530 Subject: [PATCH 25/71] Update docker-stack.yml --- docker-stack.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-stack.yml b/docker-stack.yml index c4c5894..5dcbb50 100644 --- a/docker-stack.yml +++ b/docker-stack.yml @@ -10,13 +10,15 @@ services: max_replicas_per_node: 1 restart_policy: condition: on-failure + delay: 5s + max_attempts: 3 + window: 120s resources: limits: cpus: '0.50' - memory: 50M + memory: 200M reservations: cpus: '0.25' - memory: 20M + memory: 100M ports: - "8080:8080" - From 00e8fcb5b3d4fb466df2cde472d6bcc4c081494a Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 8 Sep 2021 09:53:15 +0530 Subject: [PATCH 26/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 2450c70..214f8f1 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hey Students, welcome to tavisca123.com. Please Login Below..


+

Hey Students, I hope you liked the project. Please Login Below..


Login
Register
From 56764ac63f9dec38409aebada400ca0338b373d1 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 8 Sep 2021 09:55:35 +0530 Subject: [PATCH 27/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 214f8f1..0ce5aed 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hey Students, I hope you liked the project. Please Login Below..


+

Dear Students, I hope you liked the project. Please Login Below..


Login
Register
From a7b70ba8053a676bce2cb683a888dc3a12bec0c2 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 11 Sep 2021 09:40:53 +0530 Subject: [PATCH 28/71] Update ansible-playbook.yml --- ansible-playbook.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index e1f86ad..66bf4d1 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -5,7 +5,7 @@ tasks: - name: Create a directory if it does not exist file: - path: /tmp/lwplabs-com + path: /tmp/{{ job_name }} state: directory mode: '0755' owner: ansadmin @@ -16,7 +16,7 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: src: /etc/ansible/{{ job_name }}/ - dest: /tmp/lwplabs-com + dest: /tmp/{{ job_name }} owner: ansadmin group: root mode: '0777' @@ -84,7 +84,7 @@ - name: "Build an image and push it to a private repo" docker_image: build: - path: /tmp/lwplabs-com + path: /tmp/{{ job_name }} name: 127.0.0.1:5000/lwplabslogin tag: latest push: yes @@ -101,7 +101,7 @@ tasks: - name: Remove stack docker_stack: - name: lwplabs + name: {{ job_name }} state: absent tags: docker-stack-remove @@ -111,9 +111,9 @@ - name: Deploy stack from a compose file docker_stack: state: present - name: lwplabs + name: {{ job_name }} compose: - - /tmp/lwplabs-com/docker-stack.yml + - /tmp/{{ job_name }}/docker-stack.yml register: out6 tags: docker-stack-deploy - debug: From 36d527063af903f74cb43c1d3e63e35b8d106d74 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 11 Sep 2021 09:42:33 +0530 Subject: [PATCH 29/71] Update ansible-playbook.yml --- ansible-playbook.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 66bf4d1..7f5ef2e 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -101,7 +101,7 @@ tasks: - name: Remove stack docker_stack: - name: {{ job_name }} + name: "{{ job_name }}" state: absent tags: docker-stack-remove @@ -111,7 +111,7 @@ - name: Deploy stack from a compose file docker_stack: state: present - name: {{ job_name }} + name: "{{ job_name }}" compose: - /tmp/{{ job_name }}/docker-stack.yml register: out6 From 9ec0ce69c5ae834a6b0c06f2cea031094518d3d3 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 11 Sep 2021 09:49:56 +0530 Subject: [PATCH 30/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 0ce5aed..45d37da 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Dear Students, I hope you liked the project. Please Login Below..


+

Dear Students, Please Login


Login
Register
From 018d5ec6b886fcf69f40701361ac40e0ac4ec67f Mon Sep 17 00:00:00 2001 From: rahul Date: Sun, 12 Sep 2021 05:32:06 +0000 Subject: [PATCH 31/71] db details changed --- src/main/java/com/example/DbUtil.java | 6 +++--- src/main/java/com/example/application.properties | 6 +++--- src/main/webapp/WEB-INF/web.xml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 343ac25..3cae16c 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,9 +9,9 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/flipkart"; - static String username = "admin"; - static String password = "welcome1"; + static String url = "jdbc:mysql://homeloan.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan"; + static String username = "master"; + static String password = "Welcome123"; static { try { diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index f2b676e..ab7b7e7 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/flipkart -database.username=admin -database.password=welcome1 +database.url=jdbc:mysql://homeloan.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan +database.username=master +database.password=Welcome123 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 9fd908e..8a2544f 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -6,19 +6,19 @@ Archetype Created Web Application dbUser - admin + master dbPassword - welcome1 + Welcome123 dbURL - jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://homeloan.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/ dbName - flipkart + homeloan LoginServlet From 685824fb4bc8c0f81bc84bea56c81c7756a4e13c Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 12 Sep 2021 11:06:37 +0530 Subject: [PATCH 32/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 45d37da..a4f9e79 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Dear Students, Please Login


+

Dear Students, Please Login here...


Login
Register
From c1dfc47eecc70d7ae9ae7e29302cd3362acad5fe Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 22 Sep 2021 09:03:46 +0530 Subject: [PATCH 33/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index a4f9e79..b88224c 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Dear Students, Please Login here...


+

Dear Students, Please Login here to register for Devops Course...


Login
Register
From 91ae3df89178394484e24185a14811a4d2473409 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 2 Oct 2021 10:59:36 +0530 Subject: [PATCH 34/71] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ba52519..ef220b6 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,9 @@ mysql> use tempdb; mysql> create table user(name varchar(100),password varchar(100), address varchar(1000), age int, profession varchar(100)); mysql> select * from User; + +#Update files with the new database details + +## - /root/java-db-Login/src/main/webapp/WEB-INF/web.xml +## - /root/java-db-Login/src/main/java/com/example/application.properties +## - /root/java-db-Login/src/main/java/com/example/DbUtil.java From 307dbdf546e88b1253d04a7dd0ae83fc1fdcd908 Mon Sep 17 00:00:00 2001 From: rahul Date: Fri, 8 Oct 2021 12:06:11 +0000 Subject: [PATCH 35/71] trianz --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index b88224c..18261cd 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Dear Students, Please Login here to register for Devops Course...


+

Welcome to Triaz.com


Login
Register
From 8f378322df522d09cb86db80f8e39f8f699d8e15 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 17 Nov 2021 09:09:10 +0530 Subject: [PATCH 36/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 18261cd..5728bf3 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Triaz.com


+

Welcome to Docker Swarm Project


Login
Register
From 778fc497985e820c157cfbe18d00975179e03d97 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 18 Nov 2021 08:42:39 +0530 Subject: [PATCH 37/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 7f5ef2e..7a13464 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -86,7 +86,7 @@ build: path: /tmp/{{ job_name }} name: 127.0.0.1:5000/lwplabslogin - tag: latest + tag: "{{ tag_name }}" push: yes nocache: yes force: yes From f446098ca7ae8ad39f900c863c61e4d0db65968a Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 18 Nov 2021 08:46:41 +0530 Subject: [PATCH 38/71] Update docker-stack.yml --- docker-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-stack.yml b/docker-stack.yml index 5dcbb50..613d096 100644 --- a/docker-stack.yml +++ b/docker-stack.yml @@ -2,7 +2,7 @@ version: '3.9' services: tomcat: - image: 127.0.0.1:5000/lwplabslogin + image: 127.0.0.1:5000/lwplabslogin:latest #build: . deploy: replicas: 2 From 1205c728be9ebd4653edf8dd878a6af0f845d806 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 18 Nov 2021 08:49:42 +0530 Subject: [PATCH 39/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 5728bf3..eed2686 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Docker Swarm Project


+

Welcome to Docker Swarm Project. testing the image tagging


Login
Register
From df897dd016b76368eaea4f53890f90bd102db376 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 30 Nov 2021 11:49:22 +0530 Subject: [PATCH 40/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index eed2686..3c74ae9 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Docker Swarm Project. testing the image tagging


+

Welcome to DevOps class


Login
Register
From 78d942a85f43424cc5db6f041ec8e9891ee5e2c0 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 13 Jan 2022 12:10:58 +0530 Subject: [PATCH 41/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 3c74ae9..82a16d1 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to DevOps class


+

Welcome to world of Devops


Login
Register
From dde5378da5238666600bfbb423126c12245141d4 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 13 Jan 2022 12:14:56 +0530 Subject: [PATCH 42/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 82a16d1..2622181 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to world of Devops


+

Welcome to World of Devops. First Foundation Project


Login
Register
From 89d0e251a24673ba28472c18d1fdf9f5b0051b84 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 14 Jan 2022 09:23:35 +0530 Subject: [PATCH 43/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 2622181..69942b8 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to World of Devops. First Foundation Project


+

Welcome to World of Devops.


Login
Register
From d98c8ce5e4757c3cbda36c069587d7b9e1cd15c0 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 5 Feb 2022 10:54:03 +0530 Subject: [PATCH 44/71] Update ansible-playbook.yml --- ansible-playbook.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 7a13464..2187e58 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -5,7 +5,7 @@ tasks: - name: Create a directory if it does not exist file: - path: /tmp/{{ job_name }} + path: /tmp/{{ JOB_NAME }} state: directory mode: '0755' owner: ansadmin @@ -15,8 +15,8 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: /etc/ansible/{{ job_name }}/ - dest: /tmp/{{ job_name }} + src: /etc/ansible/{{ JOB_NAME }}/ + dest: /tmp/{{ JOB_NAME }} owner: ansadmin group: root mode: '0777' @@ -84,9 +84,9 @@ - name: "Build an image and push it to a private repo" docker_image: build: - path: /tmp/{{ job_name }} + path: /tmp/{{ JOB_NAME }} name: 127.0.0.1:5000/lwplabslogin - tag: "{{ tag_name }}" + tag: "{{ BUILD_NUMBER }}" push: yes nocache: yes force: yes @@ -101,7 +101,7 @@ tasks: - name: Remove stack docker_stack: - name: "{{ job_name }}" + name: "{{ JOB_NAME }}" state: absent tags: docker-stack-remove @@ -111,11 +111,10 @@ - name: Deploy stack from a compose file docker_stack: state: present - name: "{{ job_name }}" + name: "{{ JOB_NAME }}" compose: - - /tmp/{{ job_name }}/docker-stack.yml + - /tmp/{{ JOB_NAME }}/docker-stack.yml register: out6 tags: docker-stack-deploy - debug: var: out6 - From e13038aa7c1f010e04ae8454ac6ab292d36aaac8 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 5 Feb 2022 10:55:43 +0530 Subject: [PATCH 45/71] Create dev.ini --- dev.ini | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 dev.ini diff --git a/dev.ini b/dev.ini new file mode 100644 index 0000000..112042c --- /dev/null +++ b/dev.ini @@ -0,0 +1,2 @@ +[dockerMaster] +ip-172-31-84-198.ec2.internal ansible_user=ansadmin From f318ab6ec3c3415bceccac1b000f9f1e8c2bbc38 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 5 Feb 2022 10:57:25 +0530 Subject: [PATCH 46/71] Update ansible-playbook.yml --- ansible-playbook.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 2187e58..438fc61 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -1,6 +1,6 @@ --- - name: Play1 for copying files - hosts: docker-master + hosts: dockerMaster become: yes tasks: - name: Create a directory if it does not exist @@ -24,7 +24,7 @@ - copy_code - name: "Play 2- python installation" - hosts: docker-master + hosts: dockerMaster become: yes tasks: - name: Install Python 3.6 @@ -49,7 +49,7 @@ var: out2 - name: "Play 3 Install Python packages and docker image push" - hosts: docker-master + hosts: dockerMaster become: yes vars: ansible_python_interpreter: /usr/bin/python3 @@ -96,7 +96,7 @@ var: out5 - name: "Play 3 docker stack deploy" - hosts: docker-master + hosts: dockerMaster become: yes tasks: - name: Remove stack @@ -118,3 +118,4 @@ tags: docker-stack-deploy - debug: var: out6 + From fbece993520e4f5ce9377cb2cf51e33377290356 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:41:32 +0530 Subject: [PATCH 47/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 438fc61..a9020b4 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -15,7 +15,7 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: /etc/ansible/{{ JOB_NAME }}/ + src: {{ WORKSPACE }} dest: /tmp/{{ JOB_NAME }} owner: ansadmin group: root From 5c7194d7414621757638d624340c0559c873c477 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:43:32 +0530 Subject: [PATCH 48/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index a9020b4..94a90ff 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -15,7 +15,7 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: {{ WORKSPACE }} + src: "{{ WORKSPACE }}" dest: /tmp/{{ JOB_NAME }} owner: ansadmin group: root From af5f6e63fbdd448b2e27d9abfc7e6d2cc5d12320 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:45:24 +0530 Subject: [PATCH 49/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 94a90ff..e838e71 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -15,7 +15,7 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: "{{ WORKSPACE }}" + src: "{{ WORKSPACE }}"/ dest: /tmp/{{ JOB_NAME }} owner: ansadmin group: root From 757cb034a9b151a8907da65dd9e4e193a0a78620 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:46:34 +0530 Subject: [PATCH 50/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index e838e71..2055732 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -15,7 +15,7 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: "{{ WORKSPACE }}"/ + src: {{ WORKSPACE }}/ dest: /tmp/{{ JOB_NAME }} owner: ansadmin group: root From 4e04b689fecc3304fa8b5ab55a13c8034f089795 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:47:44 +0530 Subject: [PATCH 51/71] Update ansible-playbook.yml --- ansible-playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 2055732..a29009e 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -15,7 +15,7 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: {{ WORKSPACE }}/ + src: "{{ WORKSPACE }}/" dest: /tmp/{{ JOB_NAME }} owner: ansadmin group: root From 4f711eab86a137bdd7eab47c9d05539457add957 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:54:57 +0530 Subject: [PATCH 52/71] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cdf7845..d81a691 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ FROM tomcat:8-jre8 MAINTAINER "rahul" # copy war file on to container -COPY ./*.war /usr/local/tomcat/webapps +COPY target/*.war /usr/local/tomcat/webapps From 3d8fe7e5ae26bcfa2fe78774d698a33009aa1ac8 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 10:29:36 +0530 Subject: [PATCH 53/71] Update ansible-playbook.yml --- ansible-playbook.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index a29009e..339565a 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -86,7 +86,9 @@ build: path: /tmp/{{ JOB_NAME }} name: 127.0.0.1:5000/lwplabslogin - tag: "{{ BUILD_NUMBER }}" + tag: + - "{{ BUILD_NUMBER }}" + - latest push: yes nocache: yes force: yes From eb81793c22e4d6f32686f29d16613dfb52476dec Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 10:32:17 +0530 Subject: [PATCH 54/71] Update ansible-playbook.yml --- ansible-playbook.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 339565a..36fb559 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -86,9 +86,7 @@ build: path: /tmp/{{ JOB_NAME }} name: 127.0.0.1:5000/lwplabslogin - tag: - - "{{ BUILD_NUMBER }}" - - latest + tag: "latest" push: yes nocache: yes force: yes From 895521e5ade8931bdd6f35e41f611c6cd9c91670 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 10:48:05 +0530 Subject: [PATCH 55/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 69942b8..93a18c0 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to World of Devops.


+

Welcome to Devops class.


Login
Register
From b45c0f03d0a90853d0da7c0a26fdc1331e6687a3 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 10:49:34 +0530 Subject: [PATCH 56/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 93a18c0..4733dcc 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Devops class.


+

Welcome to Devops class............


Login
Register
From bce5a2f267766ba2cdbb538ea0666bc178b5da97 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 10:51:35 +0530 Subject: [PATCH 57/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 4733dcc..5bf837d 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Devops class............


+

Welcome to Devops.....


Login
Register
From bfd1c1fcf7a930c7dbb59c0d2e2fd2fe4542434e Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 12 Feb 2022 10:53:52 +0530 Subject: [PATCH 58/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 5bf837d..31ef6e3 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Devops.....


+

Welcome to Devops class major prject 7


Login
Register
From e3238d4e5dfb7796471a6449291619d5e11ec70e Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Mon, 28 Feb 2022 09:42:32 +0530 Subject: [PATCH 59/71] index.html updated --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 31ef6e3..b3c8d17 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Devops class major prject 7


+

POC for Devops Major Project 1


Login
Register
From c8e6f35efebb2c3a4ba493cc935be44e954ef638 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Mon, 25 Apr 2022 09:47:37 +0530 Subject: [PATCH 60/71] ansible host file and variable in playbook chnaged --- ansible-playbook.yml | 14 +++++++------- dev.ini | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 36fb559..81d5eb3 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -5,7 +5,7 @@ tasks: - name: Create a directory if it does not exist file: - path: /tmp/{{ JOB_NAME }} + path: /tmp/{{ job_name }} state: directory mode: '0755' owner: ansadmin @@ -15,8 +15,8 @@ - name: Copy the war file, dockerfile & lwplabs-com.yml to docker master server copy: - src: "{{ WORKSPACE }}/" - dest: /tmp/{{ JOB_NAME }} + src: "{{ ANSIBLE_WORKSPACE }}/" + dest: /tmp/{{ job_name }} owner: ansadmin group: root mode: '0777' @@ -84,7 +84,7 @@ - name: "Build an image and push it to a private repo" docker_image: build: - path: /tmp/{{ JOB_NAME }} + path: /tmp/{{ job_name }} name: 127.0.0.1:5000/lwplabslogin tag: "latest" push: yes @@ -101,7 +101,7 @@ tasks: - name: Remove stack docker_stack: - name: "{{ JOB_NAME }}" + name: "{{ job_name }}" state: absent tags: docker-stack-remove @@ -111,9 +111,9 @@ - name: Deploy stack from a compose file docker_stack: state: present - name: "{{ JOB_NAME }}" + name: "{{ job_name }}" compose: - - /tmp/{{ JOB_NAME }}/docker-stack.yml + - /tmp/{{ job_name }}/docker-stack.yml register: out6 tags: docker-stack-deploy - debug: diff --git a/dev.ini b/dev.ini index 112042c..7166cc4 100644 --- a/dev.ini +++ b/dev.ini @@ -1,2 +1,2 @@ [dockerMaster] -ip-172-31-84-198.ec2.internal ansible_user=ansadmin +172.31.95.176 ansible_user=ansadmin From 6ddc7404f8fa85a111d026676a087de671303cde Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 26 Apr 2022 09:25:09 +0530 Subject: [PATCH 61/71] Create jenkinsfile-majorproject7 --- jenkinsfile-majorproject7 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 jenkinsfile-majorproject7 diff --git a/jenkinsfile-majorproject7 b/jenkinsfile-majorproject7 new file mode 100644 index 0000000..a32937e --- /dev/null +++ b/jenkinsfile-majorproject7 @@ -0,0 +1,28 @@ +pipeline { + agent any + + tools { + maven 'maven' + } + + stages { + stage('Build') { + steps { + // Get some code from a GitHub repository + git branch: 'develop', credentialsId: 'ansadmin-key', url: 'https://github.com/mailrahulsre/java-db-Login.git' + + // Run Maven on a Unix agent. + sh "mvn -Dmaven.test.failure.ignore=true clean package" + + } + + post { + // If Maven was able to run the tests, even if some of the test + // failed, record the test results and archive the jar file. + success { + ansiblePlaybook credentialsId: 'ansadmin-key', disableHostKeyChecking: true, extras: '-e job_name=$JOB_NAME -e ANSIBLE_WORKSPACE=$WORKSPACE', forks: 5, installation: 'ansible', inventory: 'dev.ini', playbook: 'ansible-playbook.yml' + } + } + } + } +} From 9513872ebf028386111a92cd4fba28e956922275 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 10 Jun 2022 12:39:42 +0530 Subject: [PATCH 62/71] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index b3c8d17..9528bea 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

POC for Devops Major Project 1


+

Devops Major Project 1


Login
Register
From 641951bdc2a13c0ada58c1b650492d1214c78dc8 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Thu, 28 Jul 2022 00:59:37 -0400 Subject: [PATCH 63/71] dev.ini updated --- dev.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.ini b/dev.ini index 7166cc4..9fe72de 100644 --- a/dev.ini +++ b/dev.ini @@ -1,2 +1,2 @@ [dockerMaster] -172.31.95.176 ansible_user=ansadmin +ip-172-31-29-23 ansible_user=ansadmin From aeef9486b7c62b864401e87accd2ebde39eb00c6 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Wed, 17 Aug 2022 00:49:16 -0400 Subject: [PATCH 64/71] rds details changed --- src/main/java/com/example/DbUtil.java | 4 ++-- src/main/java/com/example/application.properties | 4 ++-- src/main/webapp/WEB-INF/web.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 3cae16c..6bc4740 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,8 +9,8 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://homeloan.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan"; - static String username = "master"; + static String url = "jdbc:mysql://lwplabs.cdo5uynfnrno.us-east-1.rds.amazonaws.com:3306/homeloan"; + static String username = "admin"; static String password = "Welcome123"; static { diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index ab7b7e7..f79965e 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://homeloan.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan -database.username=master +database.url=jdbc:mysql://lwplabs.cdo5uynfnrno.us-east-1.rds.amazonaws.com:3306/homeloan +database.username=admin database.password=Welcome123 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 8a2544f..1022cba 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -6,7 +6,7 @@ Archetype Created Web Application dbUser - master + admin dbPassword @@ -14,7 +14,7 @@ dbURL - jdbc:mysql://homeloan.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://lwplabs.cdo5uynfnrno.us-east-1.rds.amazonaws.com:3306/ dbName From dcfcaf1b2867a0f0b9cb83e997094d447f84ec76 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Sun, 4 Sep 2022 23:54:43 -0400 Subject: [PATCH 65/71] jenkins file for ansible project added --- Jenkinsfile-ansible-project | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Jenkinsfile-ansible-project diff --git a/Jenkinsfile-ansible-project b/Jenkinsfile-ansible-project new file mode 100644 index 0000000..36786d1 --- /dev/null +++ b/Jenkinsfile-ansible-project @@ -0,0 +1,32 @@ +pipeline { + agent any + + tools { + maven 'maven' + } + + + stages { + + stage('Fetch the code') { + steps { + git branch: 'develop', credentialsId: 'github-repo', url: 'https://github.com/devopscloudsre/java-db-Login.git' + } + } + + stage('Build') { + steps { + + sh 'mvn clean package' + } + + post { + // If Maven was able to run the tests, even if some of the test + // failed, record the test results and archive the jar file. + success { + s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'lwplabs', excludedFile: 'target', flatten: true, gzipFiles: false, keepForever: false, managedArtifacts: false, noUploadOnFailure: true, selectedRegion: 'us-east-1', showDirectlyInBrowser: false, sourceFile: '**/*.war', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 's3profile', userMetadata: [] + } + } + } + } +} From 56cd2311dc4349d19498daa67c60a00acb17ab67 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Sun, 4 Sep 2022 23:57:53 -0400 Subject: [PATCH 66/71] jenkins modified --- Jenkinsfile-ansible-project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-ansible-project b/Jenkinsfile-ansible-project index 36786d1..9c9ae83 100644 --- a/Jenkinsfile-ansible-project +++ b/Jenkinsfile-ansible-project @@ -8,7 +8,7 @@ pipeline { stages { - stage('Fetch the code') { + stage('Fetch the new code') { steps { git branch: 'develop', credentialsId: 'github-repo', url: 'https://github.com/devopscloudsre/java-db-Login.git' } From 1e53c028839bba4bef5c0c3154cae3ff38804bde Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Mon, 5 Sep 2022 23:00:04 -0400 Subject: [PATCH 67/71] dev.ini updated with new webserver group info --- dev.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev.ini b/dev.ini index 9fe72de..dd09056 100644 --- a/dev.ini +++ b/dev.ini @@ -1,2 +1,6 @@ [dockerMaster] ip-172-31-29-23 ansible_user=ansadmin + +[webservers] +172.31.83.173 +172.31.86.28 \ No newline at end of file From 14ce3dae9b2adf4a8f97a75dc948e62027d1b7fc Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Mon, 17 Oct 2022 23:38:26 -0400 Subject: [PATCH 68/71] db details changed --- src/main/java/com/example/DbUtil.java | 2 +- src/main/java/com/example/application.properties | 2 +- src/main/webapp/WEB-INF/web.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 6bc4740..4d943ba 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -11,7 +11,7 @@ public class DbUtil { static String driver = "com.mysql.cj.jdbc.Driver"; static String url = "jdbc:mysql://lwplabs.cdo5uynfnrno.us-east-1.rds.amazonaws.com:3306/homeloan"; static String username = "admin"; - static String password = "Welcome123"; + static String password = "admin123"; static { try { diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index f79965e..f363a03 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver database.url=jdbc:mysql://lwplabs.cdo5uynfnrno.us-east-1.rds.amazonaws.com:3306/homeloan database.username=admin -database.password=Welcome123 +database.password=admin123 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 1022cba..0de7b83 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -10,7 +10,7 @@ dbPassword - Welcome123 + admin123 dbURL From 60392e0991544582cde94366769fe8c476a8b0b7 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Fri, 16 Dec 2022 08:10:38 -0500 Subject: [PATCH 69/71] index.html added --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 9528bea..b00ccf1 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Devops Major Project 1


+

TVS Devops Major Project 1


Login
Register
From 2a2b9e07f18f518e98a21baa47351e4ed25fafe8 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Fri, 16 Dec 2022 08:17:54 -0500 Subject: [PATCH 70/71] change reverted --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index b00ccf1..9528bea 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

TVS Devops Major Project 1


+

Devops Major Project 1


Login
Register
From 92a1aaba9c7291db02f2ba2de95c786630ff0a8a Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Sat, 24 Dec 2022 09:04:10 -0500 Subject: [PATCH 71/71] new change updated --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 9528bea..998be19 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Devops Major Project 1


+

Devops Major Foundation Project 1


Login
Register