├── Project 1 - Multitier Web Application Setup, Locally ├── Manual_provisioning │ ├── Vagrantfile │ ├── VprofileProjectSetup.pdf │ └── ubuntu-bionic-18.04-cloudimg-console.log ├── WebApp Local setup.png └── pom.xml ├── Project 10 - Microservices Demo ├── --approve ├── --attach-policy-arn ├── --cluster ├── --name ├── --namespace ├── --role-name ├── --role-only ├── grafana │ └── grafana.yaml └── release │ ├── istio-manifests.yaml │ └── kubernetes-manifests.yaml ├── Project 2 - Automated Setup of Multitier Application ├── Automated_provisioning │ ├── Vagrantfile │ ├── application.properties │ ├── backend.sh │ ├── memcache.sh │ ├── mysql.sh │ ├── nginx.sh │ ├── rabbitmq.sh │ ├── tomcat.sh │ └── tomcat_ubuntu.sh └── WebApp Automated Setup.png ├── Project 3 - List & Shift Migration on AWS Cloud ├── Architecture on AWS.png ├── Jenkinsfile ├── README.md ├── pom.xml ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.properties │ │ │ ├── db_backup.sql │ │ │ ├── logback.xml │ │ │ └── validation.properties │ │ └── webapp │ │ │ └── resources │ │ │ ├── Images │ │ │ ├── background.png │ │ │ ├── header.jpg │ │ │ ├── technologies │ │ │ │ ├── Ansible_logo.png │ │ │ │ ├── Vagrant.png │ │ │ │ ├── aws.png │ │ │ │ ├── docker.png │ │ │ │ ├── git.jpg │ │ │ │ ├── jenkins.png │ │ │ │ ├── puppet.jpg │ │ │ │ └── python-logo.png │ │ │ ├── user │ │ │ │ ├── giphy.gif │ │ │ │ ├── logo.png │ │ │ │ ├── user.png │ │ │ │ ├── user2.png │ │ │ │ └── user3.png │ │ │ ├── visualpath.png │ │ │ ├── visualpathlogo2.png │ │ │ └── visualpathlogo3.png │ │ │ ├── css │ │ │ ├── bootstrap.min.css │ │ │ ├── common.css │ │ │ ├── profile.css │ │ │ └── w3.css │ │ │ └── js │ │ │ └── bootstrap.min.js │ └── test │ │ └── java │ │ └── com │ │ └── visualpathit │ │ └── account │ │ ├── controllerTest │ │ ├── SampleTest.java │ │ └── UserControllerTest.java │ │ ├── modelTest │ │ ├── RoleTest.java │ │ └── UserTest.java │ │ └── setup │ │ └── StandaloneMvcTestViewResolver.java └── userdata │ ├── backend.sh │ ├── memcache.sh │ ├── mysql.sh │ ├── nginx.sh │ ├── rabbitmq.sh │ ├── tomcat.sh │ └── tomcat_ubuntu.sh ├── Project 4 - Rearchitecting Web Application on AWS Cloud ├── Jenkinsfile ├── README.md ├── pom.xml └── src │ ├── main │ ├── resources │ │ ├── application.properties │ │ ├── db_backup.sql │ │ ├── logback.xml │ │ └── validation.properties │ └── webapp │ │ └── resources │ │ ├── Images │ │ ├── technologies │ │ │ ├── Ansible_logo.png │ │ │ ├── Vagrant.png │ │ │ ├── aws.png │ │ │ ├── docker.png │ │ │ ├── git.jpg │ │ │ ├── jenkins.png │ │ │ ├── puppet.jpg │ │ │ └── python-logo.png │ │ ├── user │ │ │ ├── giphy.gif │ │ │ ├── logo.png │ │ │ ├── user.png │ │ │ ├── user2.png │ │ │ └── user3.png │ │ └── visualpath.png │ │ └── css │ │ ├── bootstrap.min.css │ │ ├── common.css │ │ ├── profile.css │ │ └── w3.css │ └── test │ └── java │ └── com │ └── visualpathit │ └── account │ ├── controllerTest │ ├── SampleTest.java │ └── UserControllerTest.java │ ├── modelTest │ ├── RoleTest.java │ └── UserTest.java │ └── setup │ └── StandaloneMvcTestViewResolver.java ├── Project 5 - Jenkins Installation └── Jenkinsfile ├── Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack ├── settings.xml └── target │ ├── classes │ ├── accountsdb.sql │ ├── com │ │ └── visualpathit │ │ │ └── account │ │ │ ├── controller │ │ │ └── UserController.class │ │ │ ├── model │ │ │ ├── Role.class │ │ │ └── User.class │ │ │ ├── repository │ │ │ ├── RoleRepository.class │ │ │ └── UserRepository.class │ │ │ └── validator │ │ │ └── UserValidator.class │ ├── logback.xml │ └── validation.properties │ └── test-classes │ └── com │ └── visualpathit │ └── account │ ├── controllerTest │ ├── SampleTest.class │ └── UserControllerTest.class │ ├── modelTest │ ├── RoleTest.class │ └── UserTest.class │ └── setup │ └── StandaloneMvcTestViewResolver.class ├── Project 7 - Continuous Integration on AWS └── Project 7 Architecture Diagram.jpeg ├── Project 8 - Ansible for AWS VPC ├── README.md ├── bastion-instance.yml ├── vars │ ├── bastion_setup │ └── vpc_setup └── vpc-setup.yml └── Project 9 - Ansible for complete stack setup ├── README.md ├── bastion-instance.yml ├── provision-stack └── group_vars │ └── hostsip ├── site.yml ├── vars ├── vpc-output_vars ├── vpc_setup └── vprostacksetup ├── vpc-setup.yml └── vpro-ec2-stack.yml /Project 1 - Multitier Web Application Setup, Locally/Manual_provisioning/Vagrantfile: -------------------------------------------------------------------------------- 1 | Vagrant.configure("2") do |config| 2 | config.hostmanager.enabled = true 3 | config.hostmanager.manage_host = true 4 | config.vm.box_download_insecure = true #added by Rolake for curl error 5 | 6 | ### Nginx VM ### 7 | config.vm.define "web01" do |web01| 8 | web01.vm.box = "ubuntu/bionic64" 9 | web01.vm.hostname = "web01" 10 | web01.vm.network "private_network", ip: "192.168.56.11" 11 | end 12 | 13 | ### tomcat vm ### 14 | config.vm.define "app01" do |app01| 15 | app01.vm.box = "geerlingguy/centos7" 16 | app01.vm.hostname = "app01" 17 | app01.vm.network "private_network", ip: "192.168.56.12" 18 | app01.vm.provider "virtualbox" do |vb| 19 | vb.memory = "1024" 20 | end 21 | end 22 | 23 | ### RabbitMQ vm #### 24 | config.vm.define "rmq01" do |rmq01| 25 | rmq01.vm.box = "geerlingguy/centos7" 26 | rmq01.vm.hostname = "rmq01" 27 | rmq01.vm.network "private_network", ip: "192.168.56.16" 28 | end 29 | 30 | ### Memcache vm #### 31 | config.vm.define "mc01" do |mc01| 32 | mc01.vm.box = "geerlingguy/centos7" 33 | mc01.vm.hostname = "mc01" 34 | mc01.vm.network "private_network", ip: "192.168.56.14" 35 | end 36 | 37 | ### DB vm #### 38 | config.vm.define "db01" do |db01| 39 | db01.vm.box = "geerlingguy/centos7" 40 | db01.vm.hostname = "db01" 41 | db01.vm.network "private_network", ip: "192.168.56.15" 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /Project 1 - Multitier Web Application Setup, Locally/Manual_provisioning/VprofileProjectSetup.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 1 - Multitier Web Application Setup, Locally/Manual_provisioning/VprofileProjectSetup.pdf -------------------------------------------------------------------------------- /Project 1 - Multitier Web Application Setup, Locally/WebApp Local setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 1 - Multitier Web Application Setup, Locally/WebApp Local setup.png -------------------------------------------------------------------------------- /Project 1 - Multitier Web Application Setup, Locally/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.visualpathit 5 | vprofile 6 | war 7 | v2 8 | Visualpathit VProfile Webapp 9 | http://maven.apache.org 10 | 11 | 4.2.0.RELEASE 12 | 4.0.2.RELEASE 13 | 1.8.2.RELEASE 14 | 4.3.11.Final 15 | 5.2.1.Final 16 | 5.1.36 17 | 1.4 18 | 1.2 19 | 4.10 20 | 1.1.3 21 | 1.8 22 | 1.8 23 | 24 | 25 | 26 | 27 | org.springframework 28 | spring-web 29 | ${spring.version} 30 | 31 | 32 | 33 | org.springframework 34 | spring-webmvc 35 | ${spring.version} 36 | 37 | 38 | 39 | org.springframework.security 40 | spring-security-web 41 | ${spring-security.version} 42 | 43 | 44 | 45 | org.springframework.security 46 | spring-security-config 47 | ${spring-security.version} 48 | 49 | 50 | 51 | org.hibernate 52 | hibernate-validator 53 | ${hibernate-validator.version} 54 | 55 | 56 | 57 | org.springframework.data 58 | spring-data-jpa 59 | ${spring-data-jpa.version} 60 | 61 | 62 | 63 | org.hibernate 64 | hibernate-entitymanager 65 | ${hibernate.version} 66 | 67 | 68 | 69 | mysql 70 | mysql-connector-java 71 | ${mysql-connector.version} 72 | 73 | 74 | 75 | commons-dbcp 76 | commons-dbcp 77 | ${commons-dbcp.version} 78 | 79 | 80 | 81 | javax.servlet 82 | jstl 83 | ${jstl.version} 84 | 85 | 86 | 87 | junit 88 | junit 89 | ${junit.version} 90 | test 91 | 92 | 93 | org.mockito 94 | mockito-core 95 | 1.9.5 96 | test 97 | 98 | 99 | org.springframework 100 | spring-test 101 | 3.2.3.RELEASE 102 | test 103 | 104 | 105 | javax.servlet 106 | javax.servlet-api 107 | 3.1.0 108 | provided 109 | 110 | 111 | ch.qos.logback 112 | logback-classic 113 | ${logback.version} 114 | 115 | 116 | org.hamcrest 117 | hamcrest-all 118 | 1.3 119 | test 120 | 121 | 122 | commons-fileupload 123 | commons-fileupload 124 | 1.3.1 125 | 126 | 127 | 128 | net.spy 129 | spymemcached 130 | 2.12.3 131 | 132 | 133 | commons-io 134 | commons-io 135 | 2.4 136 | 137 | 138 | 139 | org.springframework.amqp 140 | spring-rabbit 141 | 1.7.1.RELEASE 142 | 143 | 144 | 145 | com.rabbitmq 146 | amqp-client 147 | 4.0.2 148 | 149 | 150 | 151 | org.elasticsearch 152 | elasticsearch 153 | 5.6.4 154 | 155 | 156 | 157 | org.elasticsearch.client 158 | transport 159 | 5.6.4 160 | 161 | 162 | 163 | com.google.code.gson 164 | gson 165 | 2.8.2 166 | 167 | 168 | 169 | 170 | 171 | org.eclipse.jetty 172 | jetty-maven-plugin 173 | 9.2.11.v20150529 174 | 175 | 10 176 | 177 | / 178 | 179 | 180 | 181 | 182 | 183 | org.apache.maven.plugins 184 | maven-war-plugin 185 | 3.2.2 186 | 187 | 188 | org.jacoco 189 | jacoco-maven-plugin 190 | 0.8.4 191 | 192 | 193 | jacoco-initialize 194 | process-resources 195 | 196 | prepare-agent 197 | 198 | 199 | 200 | jacoco-site 201 | post-integration-test 202 | 203 | report 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/--approve: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 10 - Microservices Demo/--approve -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/--attach-policy-arn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 10 - Microservices Demo/--attach-policy-arn -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/--cluster: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 10 - Microservices Demo/--cluster -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/--name: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 10 - Microservices Demo/--name -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/--namespace: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 10 - Microservices Demo/--namespace -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/--role-name: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 10 - Microservices Demo/--role-name -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/--role-only: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 10 - Microservices Demo/--role-only -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/grafana/grafana.yaml: -------------------------------------------------------------------------------- 1 | datasources: 2 | datasources.yaml: 3 | apiVersion: 1 4 | datasources: 5 | - name: Prometheus 6 | type: prometheus 7 | url: http://prometheus-server.prometheus.svc.cluster.local 8 | access: proxy 9 | isDefault: true -------------------------------------------------------------------------------- /Project 10 - Microservices Demo/release/istio-manifests.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # ---------------------------------------------------------- 16 | # WARNING: This file is autogenerated. Do not manually edit. 17 | # ---------------------------------------------------------- 18 | 19 | # [START servicemesh_release_istio_manifests_microservices_demo] 20 | --- 21 | apiVersion: networking.istio.io/v1alpha3 22 | kind: Gateway 23 | metadata: 24 | name: frontend-gateway 25 | spec: 26 | selector: 27 | istio: ingressgateway # use Istio default gateway implementation 28 | servers: 29 | - port: 30 | number: 80 31 | name: http 32 | protocol: HTTP 33 | hosts: 34 | - "*" 35 | --- 36 | apiVersion: networking.istio.io/v1alpha3 37 | kind: VirtualService 38 | metadata: 39 | name: frontend-ingress 40 | spec: 41 | hosts: 42 | - "*" 43 | gateways: 44 | - frontend-gateway 45 | http: 46 | - route: 47 | - destination: 48 | host: frontend 49 | port: 50 | number: 80 51 | --- 52 | apiVersion: networking.istio.io/v1alpha3 53 | kind: ServiceEntry 54 | metadata: 55 | name: allow-egress-googleapis 56 | spec: 57 | hosts: 58 | - "accounts.google.com" # Used to get token 59 | - "*.googleapis.com" 60 | ports: 61 | - number: 80 62 | protocol: HTTP 63 | name: http 64 | - number: 443 65 | protocol: HTTPS 66 | name: https 67 | --- 68 | apiVersion: networking.istio.io/v1alpha3 69 | kind: ServiceEntry 70 | metadata: 71 | name: allow-egress-google-metadata 72 | spec: 73 | hosts: 74 | - metadata.google.internal 75 | addresses: 76 | - 169.254.169.254 # GCE metadata server 77 | ports: 78 | - number: 80 79 | name: http 80 | protocol: HTTP 81 | - number: 443 82 | name: https 83 | protocol: HTTPS 84 | --- 85 | apiVersion: networking.istio.io/v1alpha3 86 | kind: VirtualService 87 | metadata: 88 | name: frontend 89 | spec: 90 | hosts: 91 | - "frontend.default.svc.cluster.local" 92 | http: 93 | - route: 94 | - destination: 95 | host: frontend 96 | port: 97 | number: 80 98 | # [END servicemesh_release_istio_manifests_microservices_demo] 99 | -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/Vagrantfile: -------------------------------------------------------------------------------- 1 | Vagrant.configure("2") do |config| 2 | config.hostmanager.enabled = true 3 | config.hostmanager.manage_host = true 4 | 5 | ### DB vm #### 6 | config.vm.define "db01" do |db01| 7 | db01.vm.box = "geerlingguy/centos7" 8 | db01.vm.hostname = "db01" 9 | db01.vm.network "private_network", ip: "192.168.56.15" 10 | db01.vm.provision "shell", path: "mysql.sh" 11 | 12 | end 13 | 14 | ### Memcache vm #### 15 | config.vm.define "mc01" do |mc01| 16 | mc01.vm.box = "geerlingguy/centos7" 17 | mc01.vm.hostname = "mc01" 18 | mc01.vm.network "private_network", ip: "192.168.56.14" 19 | mc01.vm.provision "shell", path: "memcache.sh" 20 | end 21 | 22 | ### RabbitMQ vm #### 23 | config.vm.define "rmq01" do |rmq01| 24 | rmq01.vm.box = "geerlingguy/centos7" 25 | rmq01.vm.hostname = "rmq01" 26 | rmq01.vm.network "private_network", ip: "192.168.56.16" 27 | rmq01.vm.provision "shell", path: "rabbitmq.sh" 28 | end 29 | 30 | ### tomcat vm ### 31 | config.vm.define "app01" do |app01| 32 | app01.vm.box = "geerlingguy/centos7" 33 | app01.vm.hostname = "app01" 34 | app01.vm.network "private_network", ip: "192.168.56.12" 35 | app01.vm.provision "shell", path: "tomcat.sh" 36 | app01.vm.provider "virtualbox" do |vb| 37 | vb.memory = "1024" 38 | end 39 | end 40 | 41 | 42 | ### Nginx VM ### 43 | config.vm.define "web01" do |web01| 44 | web01.vm.box = "ubuntu/xenial64" 45 | web01.vm.hostname = "web01" 46 | web01.vm.network "private_network", ip: "192.168.56.11" 47 | web01.vm.provision "shell", path: "nginx.sh" 48 | end 49 | 50 | end 51 | -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/application.properties: -------------------------------------------------------------------------------- 1 | #JDBC Configutation for Database Connection 2 | jdbc.driverClassName=com.mysql.jdbc.Driver 3 | jdbc.url=jdbc:mysql://db01:3306/accounts?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull 4 | jdbc.username=admin 5 | jdbc.password=admin123 6 | 7 | #Memcached Configuration For Active and StandBy Host 8 | #For Active Host 9 | memcached.active.host=mc01 10 | memcached.active.port=11211 11 | #For StandBy Host 12 | memcached.standBy.host=127.0.0.2 13 | memcached.standBy.port=11211 14 | 15 | #RabbitMq Configuration 16 | rabbitmq.address=rmq01 17 | rabbitmq.port=5672 18 | rabbitmq.username=test 19 | rabbitmq.password=test 20 | 21 | #Elasticesearch Configuration 22 | elasticsearch.host =192.168.1.85 23 | elasticsearch.port =9300 24 | elasticsearch.cluster=vprofile 25 | elasticsearch.node=vprofilenode -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DATABASE_PASS='admin123' 3 | 4 | # MEmcache 5 | yum install epel-release -y 6 | yum install memcached -y 7 | systemctl start memcached 8 | systemctl enable memcached 9 | systemctl status memcached 10 | memcached -p 11211 -U 11111 -u memcached -d 11 | 12 | # Rabbit 13 | yum install socat -y 14 | yum install erlang -y 15 | yum install wget -y 16 | wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el7.noarch.rpm 17 | rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc 18 | yum update 19 | rpm -Uvh rabbitmq-server-3.6.10-1.el7.noarch.rpm 20 | systemctl start rabbitmq-server 21 | systemctl enable rabbitmq-server 22 | systemctl status rabbitmq-server 23 | echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config 24 | rabbitmqctl add_user rabbit bunny 25 | rabbitmqctl set_user_tags rabbit administrator 26 | systemctl restart rabbitmq-server 27 | 28 | # Mysql 29 | yum install mariadb-server -y 30 | 31 | #mysql_secure_installation 32 | sed -i 's/^127.0.0.1/0.0.0.0/' /etc/my.cnf 33 | 34 | # starting & enabling mariadb-server 35 | systemctl start mariadb 36 | systemctl enable mariadb 37 | 38 | #restore the dump file for the application 39 | mysqladmin -u root password "$DATABASE_PASS" 40 | mysql -u root -p"$DATABASE_PASS" -e "UPDATE mysql.user SET Password=PASSWORD('$DATABASE_PASS') WHERE User='root'" 41 | mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" 42 | mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User=''" 43 | mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'" 44 | mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 45 | mysql -u root -p"$DATABASE_PASS" -e "create database accounts" 46 | mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'localhost' identified by 'admin123'" 47 | mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'app01' identified by 'admin123'" 48 | mysql -u root -p"$DATABASE_PASS" accounts < /vagrant/vprofile-repo/src/main/resources/db_backup.sql 49 | mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 50 | 51 | # Restart mariadb-server 52 | systemctl restart mariadb -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/memcache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo yum install epel-release -y 3 | sudo yum install memcached -y 4 | sudo systemctl start memcached 5 | sudo systemctl enable memcached 6 | sudo systemctl status memcached 7 | sudo memcached -p 11211 -U 11111 -u memcached -d -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/mysql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DATABASE_PASS='admin123' 3 | sudo yum update -y 4 | sudo yum install epel-release -y 5 | sudo yum install git zip unzip -y 6 | sudo yum install mariadb-server -y 7 | 8 | 9 | # starting & enabling mariadb-server 10 | sudo systemctl start mariadb 11 | sudo systemctl enable mariadb 12 | cd /tmp/ 13 | git clone -b local-setup https://github.com/devopshydclub/vprofile-project.git 14 | #restore the dump file for the application 15 | sudo mysqladmin -u root password "$DATABASE_PASS" 16 | sudo mysql -u root -p"$DATABASE_PASS" -e "UPDATE mysql.user SET Password=PASSWORD('$DATABASE_PASS') WHERE User='root'" 17 | sudo mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" 18 | sudo mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User=''" 19 | sudo mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'" 20 | sudo mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 21 | sudo mysql -u root -p"$DATABASE_PASS" -e "create database accounts" 22 | sudo mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'localhost' identified by 'admin123'" 23 | sudo mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'%' identified by 'admin123'" 24 | sudo mysql -u root -p"$DATABASE_PASS" accounts < /tmp/vprofile-project/src/main/resources/db_backup.sql 25 | sudo mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 26 | 27 | # Restart mariadb-server 28 | sudo systemctl restart mariadb 29 | 30 | 31 | #starting the firewall and allowing the mariadb to access from port no. 3306 32 | sudo systemctl start firewalld 33 | sudo systemctl enable firewalld 34 | sudo firewall-cmd --get-active-zones 35 | sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent 36 | sudo firewall-cmd --reload 37 | sudo systemctl restart mariadb 38 | -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/nginx.sh: -------------------------------------------------------------------------------- 1 | # adding repository and installing nginx 2 | apt update 3 | apt install nginx -y 4 | cat < vproapp 5 | upstream vproapp { 6 | 7 | server app01:8080; 8 | 9 | } 10 | 11 | server { 12 | 13 | listen 80; 14 | 15 | location / { 16 | 17 | proxy_pass http://vproapp; 18 | 19 | } 20 | 21 | } 22 | 23 | EOT 24 | 25 | mv vproapp /etc/nginx/sites-available/vproapp 26 | rm -rf /etc/nginx/sites-enabled/default 27 | ln -s /etc/nginx/sites-available/vproapp /etc/nginx/sites-enabled/vproapp 28 | 29 | #starting nginx service and firewall 30 | systemctl start nginx 31 | systemctl enable nginx 32 | systemctl restart nginx 33 | -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/rabbitmq.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo yum install epel-release -y 3 | sudo yum update -y 4 | sudo yum install wget -y 5 | cd /tmp/ 6 | wget http://packages.erlang-solutions.com/erlang-solutions-2.0-1.noarch.rpm 7 | sudo rpm -Uvh erlang-solutions-2.0-1.noarch.rpm 8 | sudo yum -y install erlang socat 9 | curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash 10 | sudo yum install rabbitmq-server -y 11 | sudo systemctl start rabbitmq-server 12 | sudo systemctl enable rabbitmq-server 13 | sudo systemctl status rabbitmq-server 14 | sudo sh -c 'echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config' 15 | sudo rabbitmqctl add_user test test 16 | sudo rabbitmqctl set_user_tags test administrator 17 | sudo systemctl restart rabbitmq-server 18 | -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/tomcat.sh: -------------------------------------------------------------------------------- 1 | TOMURL="https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz" 2 | yum install java-1.8.0-openjdk -y 3 | yum install git maven wget -y 4 | cd /tmp/ 5 | wget $TOMURL -O tomcatbin.tar.gz 6 | EXTOUT=`tar xzvf tomcatbin.tar.gz` 7 | TOMDIR=`echo $EXTOUT | cut -d '/' -f1` 8 | useradd --shell /sbin/nologin tomcat 9 | rsync -avzh /tmp/$TOMDIR/ /usr/local/tomcat8/ 10 | chown -R tomcat.tomcat /usr/local/tomcat8 11 | 12 | rm -rf /etc/systemd/system/tomcat.service 13 | 14 | cat <> /etc/systemd/system/tomcat.service 15 | [Unit] 16 | Description=Tomcat 17 | After=network.target 18 | 19 | [Service] 20 | 21 | User=tomcat 22 | Group=tomcat 23 | 24 | WorkingDirectory=/usr/local/tomcat8 25 | 26 | #Environment=JRE_HOME=/usr/lib/jvm/jre 27 | Environment=JAVA_HOME=/usr/lib/jvm/jre 28 | 29 | Environment=CATALINA_PID=/var/tomcat/%i/run/tomcat.pid 30 | Environment=CATALINA_HOME=/usr/local/tomcat8 31 | Environment=CATALINE_BASE=/usr/local/tomcat8 32 | 33 | ExecStart=/usr/local/tomcat8/bin/catalina.sh run 34 | ExecStop=/usr/local/tomcat8/bin/shutdown.sh 35 | 36 | 37 | RestartSec=10 38 | Restart=always 39 | 40 | [Install] 41 | WantedBy=multi-user.target 42 | 43 | EOT 44 | 45 | systemctl daemon-reload 46 | systemctl start tomcat 47 | systemctl enable tomcat 48 | 49 | git clone -b local-setup https://github.com/devopshydclub/vprofile-project.git 50 | cd vprofile-project 51 | mvn install 52 | systemctl stop tomcat 53 | sleep 60 54 | rm -rf /usr/local/tomcat8/webapps/ROOT* 55 | cp target/vprofile-v2.war /usr/local/tomcat8/webapps/ROOT.war 56 | systemctl start tomcat 57 | sleep 120 58 | cp /vagrant/application.properties /usr/local/tomcat8/webapps/ROOT/WEB-INF/classes/application.properties 59 | systemctl restart tomcat 60 | -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/Automated_provisioning/tomcat_ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo apt update 3 | sudo apt upgrade -y 4 | sudo apt install openjdk-8-jdk -y 5 | sudo apt install tomcat8 tomcat8-admin tomcat8-docs tomcat8-common git -y 6 | -------------------------------------------------------------------------------- /Project 2 - Automated Setup of Multitier Application/WebApp Automated Setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 2 - Automated Setup of Multitier Application/WebApp Automated Setup.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/Architecture on AWS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/Architecture on AWS.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | 3 | agent any 4 | /* 5 | tools { 6 | maven "maven3" 7 | } 8 | */ 9 | environment { 10 | NEXUS_VERSION = "nexus3" 11 | NEXUS_PROTOCOL = "http" 12 | NEXUS_URL = "172.31.40.209:8081" 13 | NEXUS_REPOSITORY = "vprofile-release" 14 | NEXUS_REPO_ID = "vprofile-release" 15 | NEXUS_CREDENTIAL_ID = "nexuslogin" 16 | ARTVERSION = "${env.BUILD_ID}" 17 | } 18 | 19 | stages{ 20 | 21 | stage('BUILD'){ 22 | steps { 23 | sh 'mvn clean install -DskipTests' 24 | } 25 | post { 26 | success { 27 | echo 'Now Archiving...' 28 | archiveArtifacts artifacts: '**/target/*.war' 29 | } 30 | } 31 | } 32 | 33 | stage('UNIT TEST'){ 34 | steps { 35 | sh 'mvn test' 36 | } 37 | } 38 | 39 | stage('INTEGRATION TEST'){ 40 | steps { 41 | sh 'mvn verify -DskipUnitTests' 42 | } 43 | } 44 | 45 | stage ('CODE ANALYSIS WITH CHECKSTYLE'){ 46 | steps { 47 | sh 'mvn checkstyle:checkstyle' 48 | } 49 | post { 50 | success { 51 | echo 'Generated Analysis Result' 52 | } 53 | } 54 | } 55 | 56 | stage('CODE ANALYSIS with SONARQUBE') { 57 | 58 | environment { 59 | scannerHome = tool 'sonarscanner4' 60 | } 61 | 62 | steps { 63 | withSonarQubeEnv('sonar-pro') { 64 | sh '''${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=vprofile \ 65 | -Dsonar.projectName=vprofile-repo \ 66 | -Dsonar.projectVersion=1.0 \ 67 | -Dsonar.sources=src/ \ 68 | -Dsonar.java.binaries=target/test-classes/com/visualpathit/account/controllerTest/ \ 69 | -Dsonar.junit.reportsPath=target/surefire-reports/ \ 70 | -Dsonar.jacoco.reportsPath=target/jacoco.exec \ 71 | -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml''' 72 | } 73 | 74 | timeout(time: 10, unit: 'MINUTES') { 75 | waitForQualityGate abortPipeline: true 76 | } 77 | } 78 | } 79 | 80 | stage("Publish to Nexus Repository Manager") { 81 | steps { 82 | script { 83 | pom = readMavenPom file: "pom.xml"; 84 | filesByGlob = findFiles(glob: "target/*.${pom.packaging}"); 85 | echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}" 86 | artifactPath = filesByGlob[0].path; 87 | artifactExists = fileExists artifactPath; 88 | if(artifactExists) { 89 | echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version} ARTVERSION"; 90 | nexusArtifactUploader( 91 | nexusVersion: NEXUS_VERSION, 92 | protocol: NEXUS_PROTOCOL, 93 | nexusUrl: NEXUS_URL, 94 | groupId: pom.groupId, 95 | version: ARTVERSION, 96 | repository: NEXUS_REPOSITORY, 97 | credentialsId: NEXUS_CREDENTIAL_ID, 98 | artifacts: [ 99 | [artifactId: pom.artifactId, 100 | classifier: '', 101 | file: artifactPath, 102 | type: pom.packaging], 103 | [artifactId: pom.artifactId, 104 | classifier: '', 105 | file: "pom.xml", 106 | type: "pom"] 107 | ] 108 | ); 109 | } 110 | else { 111 | error "*** File: ${artifactPath}, could not be found"; 112 | } 113 | } 114 | } 115 | } 116 | 117 | 118 | } 119 | 120 | 121 | } 122 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/README.md: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | # 3 | - JDK 1.8 or later 4 | - Maven 3 or later 5 | - MySQL 5.6 or later 6 | 7 | # Technologies 8 | - Spring MVC 9 | - Spring Security 10 | - Spring Data JPA 11 | - Maven 12 | - JSP 13 | - MySQL 14 | # Database 15 | Here,we used Mysql DB 16 | MSQL DB Installation Steps for Linux ubuntu 14.04: 17 | - $ sudo apt-get update 18 | - $ sudo apt-get install mysql-server 19 | 20 | Then look for the file : 21 | - /src/main/resources/accountsdb 22 | - accountsdb.sql file is a mysql dump file.we have to import this dump to mysql db server 23 | - > mysql -u -p accounts < accountsdb.sql 24 | 25 | 26 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.visualpathit 5 | vprofile 6 | war 7 | v2 8 | Visualpathit VProfile Webapp 9 | http://maven.apache.org 10 | 11 | 4.2.0.RELEASE 12 | 4.0.2.RELEASE 13 | 1.8.2.RELEASE 14 | 4.3.11.Final 15 | 5.2.1.Final 16 | 5.1.36 17 | 1.4 18 | 1.2 19 | 4.10 20 | 1.1.3 21 | 1.8 22 | 1.8 23 | 24 | 25 | 26 | 27 | org.springframework 28 | spring-web 29 | ${spring.version} 30 | 31 | 32 | 33 | org.springframework 34 | spring-webmvc 35 | ${spring.version} 36 | 37 | 38 | 39 | org.springframework.security 40 | spring-security-web 41 | ${spring-security.version} 42 | 43 | 44 | 45 | org.springframework.security 46 | spring-security-config 47 | ${spring-security.version} 48 | 49 | 50 | 51 | org.hibernate 52 | hibernate-validator 53 | ${hibernate-validator.version} 54 | 55 | 56 | 57 | org.springframework.data 58 | spring-data-jpa 59 | ${spring-data-jpa.version} 60 | 61 | 62 | 63 | org.hibernate 64 | hibernate-entitymanager 65 | ${hibernate.version} 66 | 67 | 68 | 69 | mysql 70 | mysql-connector-java 71 | ${mysql-connector.version} 72 | 73 | 74 | 75 | commons-dbcp 76 | commons-dbcp 77 | ${commons-dbcp.version} 78 | 79 | 80 | 81 | javax.servlet 82 | jstl 83 | ${jstl.version} 84 | 85 | 86 | 87 | junit 88 | junit 89 | ${junit.version} 90 | test 91 | 92 | 93 | org.mockito 94 | mockito-core 95 | 1.9.5 96 | test 97 | 98 | 99 | org.springframework 100 | spring-test 101 | 3.2.3.RELEASE 102 | test 103 | 104 | 105 | javax.servlet 106 | javax.servlet-api 107 | 3.1.0 108 | provided 109 | 110 | 111 | ch.qos.logback 112 | logback-classic 113 | ${logback.version} 114 | 115 | 116 | org.hamcrest 117 | hamcrest-all 118 | 1.3 119 | test 120 | 121 | 122 | commons-fileupload 123 | commons-fileupload 124 | 1.3.1 125 | 126 | 127 | 128 | net.spy 129 | spymemcached 130 | 2.12.3 131 | 132 | 133 | commons-io 134 | commons-io 135 | 2.4 136 | 137 | 138 | 139 | org.springframework.amqp 140 | spring-rabbit 141 | 1.7.1.RELEASE 142 | 143 | 144 | 145 | com.rabbitmq 146 | amqp-client 147 | 4.0.2 148 | 149 | 150 | 151 | org.elasticsearch 152 | elasticsearch 153 | 5.6.4 154 | 155 | 156 | 157 | org.elasticsearch.client 158 | transport 159 | 5.6.4 160 | 161 | 162 | 163 | com.google.code.gson 164 | gson 165 | 2.8.2 166 | 167 | 168 | 169 | 170 | 171 | org.eclipse.jetty 172 | jetty-maven-plugin 173 | 9.2.11.v20150529 174 | 175 | 10 176 | 177 | / 178 | 179 | 180 | 181 | 182 | 183 | org.apache.maven.plugins 184 | maven-war-plugin 185 | 3.2.2 186 | 187 | 188 | org.jacoco 189 | jacoco-maven-plugin 190 | 0.8.4 191 | 192 | 193 | jacoco-initialize 194 | process-resources 195 | 196 | prepare-agent 197 | 198 | 199 | 200 | jacoco-site 201 | post-integration-test 202 | 203 | report 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #JDBC Configutation for Database Connection 2 | jdbc.driverClassName=com.mysql.jdbc.Driver 3 | jdbc.url=jdbc:mysql://db01.vprofile.in:3306/accounts?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull 4 | jdbc.username=admin 5 | jdbc.password=admin123 6 | 7 | #Memcached Configuration For Active and StandBy Host 8 | #For Active Host 9 | memcached.active.host=mc01.vprofile.in 10 | memcached.active.port=11211 11 | #For StandBy Host 12 | memcached.standBy.host=127.0.0.2 13 | memcached.standBy.port=11211 14 | 15 | #RabbitMq Configuration 16 | rabbitmq.address=rmq01.vprofile.in 17 | rabbitmq.port=5672 18 | rabbitmq.username=test 19 | rabbitmq.password=test 20 | 21 | #Elasticesearch Configuration 22 | elasticsearch.host =192.168.1.85 23 | elasticsearch.port =9300 24 | elasticsearch.cluster=vprofile 25 | elasticsearch.node=vprofilenode 26 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/resources/db_backup.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) 2 | -- 3 | -- Host: localhost Database: accounts 4 | -- ------------------------------------------------------ 5 | -- Server version 5.7.18-0ubuntu0.16.10.1 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `role` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `role`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!40101 SET character_set_client = utf8 */; 25 | CREATE TABLE `role` ( 26 | `id` int(11) NOT NULL AUTO_INCREMENT, 27 | `name` varchar(45) DEFAULT NULL, 28 | PRIMARY KEY (`id`) 29 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 30 | /*!40101 SET character_set_client = @saved_cs_client */; 31 | 32 | -- 33 | -- Dumping data for table `role` 34 | -- 35 | 36 | LOCK TABLES `role` WRITE; 37 | /*!40000 ALTER TABLE `role` DISABLE KEYS */; 38 | INSERT INTO `role` VALUES (1,'ROLE_USER'); 39 | /*!40000 ALTER TABLE `role` ENABLE KEYS */; 40 | UNLOCK TABLES; 41 | 42 | -- 43 | -- Table structure for table `user` 44 | -- 45 | 46 | DROP TABLE IF EXISTS `user`; 47 | /*!40101 SET @saved_cs_client = @@character_set_client */; 48 | /*!40101 SET character_set_client = utf8 */; 49 | CREATE TABLE `user` ( 50 | `id` int(11) NOT NULL AUTO_INCREMENT, 51 | `username` varchar(255) DEFAULT NULL, 52 | `userEmail` varchar(255) DEFAULT NULL, 53 | `profileImg` varchar(255) DEFAULT NULL, 54 | `profileImgPath` varchar(255) DEFAULT NULL, 55 | `dateOfBirth` varchar(255) DEFAULT NULL, 56 | `fatherName` varchar(255) DEFAULT NULL, 57 | `motherName` varchar(255) DEFAULT NULL, 58 | `gender` varchar(255) DEFAULT NULL, 59 | `maritalStatus` varchar(255) DEFAULT NULL, 60 | `permanentAddress` varchar(255) DEFAULT NULL, 61 | `tempAddress` varchar(255) DEFAULT NULL, 62 | `primaryOccupation` varchar(255) DEFAULT NULL, 63 | `secondaryOccupation` varchar(255) DEFAULT NULL, 64 | `skills` varchar(255) DEFAULT NULL, 65 | `phoneNumber` varchar(255) DEFAULT NULL, 66 | `secondaryPhoneNumber` varchar(255) DEFAULT NULL, 67 | `nationality` varchar(255) DEFAULT NULL, 68 | `language` varchar(255) DEFAULT NULL, 69 | `workingExperience` varchar(255) DEFAULT NULL, 70 | `password` varchar(255) DEFAULT NULL, 71 | PRIMARY KEY (`id`) 72 | ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; 73 | /*!40101 SET character_set_client = @saved_cs_client */; 74 | 75 | -- 76 | -- Dumping data for table `user` 77 | -- 78 | 79 | LOCK TABLES `user` WRITE; 80 | /*!40000 ALTER TABLE `user` DISABLE KEYS */; 81 | INSERT INTO `user` VALUES (7,'admin_vp','admin@visualpathit.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$0a7VdTr4rfCQqtsvpng6GuJnzUmQ7gZiHXgzGPgm5hkRa3avXgBLK'),(8,'WahidKhan','wahid.khan74@gmail.com',NULL,NULL,'28/03/1994','M Khan','R Khan','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','8888888888','8888888888','Indian','english','2 ','$2a$11$UgG9TkHcgl02LxlqxRHYhOf7Xv4CxFmFEgS0FpUdk42OeslI.6JAW'),(9,'Gayatri','gayatri@gmail.com',NULL,NULL,'20/06/1993','K','L','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','9999999999','9999999999','India','english','5','$2a$11$gwvsvUrFU.YirMM1Yb7NweFudLUM91AzH5BDFnhkNzfzpjG.FplYO'),(10,'WahidKhan2','wahid.khan741@gmail.com',NULL,NULL,'28/03/1994','M Khan','R Khan','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','7777777777','777777777','India','english','7','$2a$11$6oZEgfGGQAH23EaXLVZ2WOSKxcEJFnBSw2N2aghab0s2kcxSQwjhC'),(11,'KiranKumar','kiran@gmail.com',NULL,NULL,'8/12/1993','K K','RK','male','unMarried','California','James Street','Software Engineer','Software Engineer','Java HTML CSS ','1010101010','1010101010','India','english','10','$2a$11$EXwpna1MlFFlKW5ut1iVi.AoeIulkPPmcOHFO8pOoQt1IYU9COU0m'),(12,'Saikumar','sai@gmail.com',NULL,NULL,'20/06/1993','Sai RK','Sai AK','male','unMarried','California','US','Software Engineer','Software Engineer','Java HTML CSS AWS','8888888111','8888888111','India','english','8','$2a$11$pzWNzzR.HUkHzz2zhAgqOeCl0WaTgY33NxxJ7n0l.rnEqjB9JO7vy'),(13,'RamSai','ram@gmail.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$6BSmYPrT8I8b9yHmx.uTRu/QxnQM2vhZYQa8mR33aReWA4WFihyGK'); 82 | /*!40000 ALTER TABLE `user` ENABLE KEYS */; 83 | UNLOCK TABLES; 84 | 85 | -- 86 | -- Table structure for table `user_role` 87 | -- 88 | 89 | DROP TABLE IF EXISTS `user_role`; 90 | /*!40101 SET @saved_cs_client = @@character_set_client */; 91 | /*!40101 SET character_set_client = utf8 */; 92 | CREATE TABLE `user_role` ( 93 | `user_id` int(11) NOT NULL, 94 | `role_id` int(11) NOT NULL, 95 | PRIMARY KEY (`user_id`,`role_id`), 96 | KEY `fk_user_role_roleid_idx` (`role_id`), 97 | CONSTRAINT `fk_user_role_roleid` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, 98 | CONSTRAINT `fk_user_role_userid` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE 99 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 100 | /*!40101 SET character_set_client = @saved_cs_client */; 101 | 102 | -- 103 | -- Dumping data for table `user_role` 104 | -- 105 | 106 | LOCK TABLES `user_role` WRITE; 107 | /*!40000 ALTER TABLE `user_role` DISABLE KEYS */; 108 | INSERT INTO `user_role` VALUES (4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); 109 | /*!40000 ALTER TABLE `user_role` ENABLE KEYS */; 110 | UNLOCK TABLES; 111 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 112 | 113 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 114 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 115 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 116 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 117 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 118 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 119 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 120 | 121 | -- Dump completed on 2017-12-07 16:32:31 122 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %date{HH:mm:ss.SSS} [%thread] %-5level %logger{15}#%line %msg\n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/resources/validation.properties: -------------------------------------------------------------------------------- 1 | NotEmpty=This field is required. 2 | Size.userForm.username=Please use between 6 and 32 characters. 3 | Duplicate.userForm.username= User has already taken this Username. 4 | Size.userForm.password=Try one with at least 8 characters. 5 | Diff.userForm.passwordConfirm=These passwords don't match. -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/background.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/header.jpg -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/Ansible_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/Ansible_logo.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/Vagrant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/Vagrant.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/aws.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/docker.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/git.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/git.jpg -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/jenkins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/jenkins.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/puppet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/puppet.jpg -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/python-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/technologies/python-logo.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/giphy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/giphy.gif -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/logo.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/user.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/user2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/user2.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/user3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/user/user3.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/visualpath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/visualpath.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/visualpathlogo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/visualpathlogo2.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/visualpathlogo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/Images/visualpathlogo3.png -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/css/common.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 100px; 3 | padding-bottom: 50px; 4 | background-color: #ffffff; 5 | 6 | } 7 | form { 8 | border: 3px solid #204a87; 9 | } 10 | 11 | img.logo { 12 | display: block; 13 | margin-left: auto; 14 | margin-right: auto; 15 | width: 300px; 16 | height: 70px; 17 | 18 | } 19 | .form-signin { 20 | max-width: 330px; 21 | padding: 15px; 22 | margin: 0 auto; 23 | } 24 | .btn-custom,.btn-custom:hover, .btn-custom:focus, .btn-custom:active { 25 | border-radius: 0; 26 | color: #ffffff; 27 | background-color: #ef2929; 28 | border-color: #ef2929; 29 | 30 | } 31 | .btn-custom-LOGIN { 32 | border-radius: 0; 33 | color: #ffffff; 34 | height:3em; 35 | background-color: #26C6DA; 36 | border-color: #ef2929; 37 | 38 | } 39 | 40 | .form-signin .form-signin-heading, 41 | .form-signin .checkbox { 42 | margin-bottom: 10px; 43 | } 44 | 45 | .form-signin .checkbox { 46 | font-weight: normal; 47 | } 48 | 49 | .form-signin .form-control { 50 | position: relative; 51 | height: auto; 52 | -webkit-box-sizing: border-box; 53 | -moz-box-sizing: border-box; 54 | box-sizing: border-box; 55 | padding: 10px; 56 | font-size: 16px; 57 | } 58 | 59 | .form-signin .form-control:focus { 60 | z-index: 2; 61 | } 62 | 63 | .form-signin input { 64 | margin-top: 10px; 65 | border-bottom-right-radius: 0; 66 | border-bottom-left-radius: 0; 67 | } 68 | 69 | .form-signin button { 70 | margin-top: 10px; 71 | } 72 | 73 | .has-error { 74 | color: red 75 | } -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/css/profile.css: -------------------------------------------------------------------------------- 1 | .mainbody { 2 | background:#f0f0f0; 3 | } 4 | /* Special class on .container surrounding .navbar, used for positioning it into place. */ 5 | .navbar-wrapper { 6 | position: fixed; 7 | top: 0; 8 | left: 0; 9 | right: 0; 10 | z-index: 20; 11 | margin-left: -15px; 12 | margin-right: -15px; 13 | //background-color:#1C3B47; 14 | } 15 | .navbar-custom { 16 | background-color: #1C3B47; 17 | border-color: #E7E7E7; 18 | 19 | } 20 | 21 | /* Flip around the padding for proper display in narrow viewports */ 22 | .navbar-wrapper .container { 23 | padding-left: 0; 24 | padding-right: 0; 25 | } 26 | .navbar-wrapper .navbar { 27 | padding-left: 15px; 28 | padding-right: 15px; 29 | } 30 | 31 | .navbar-content 32 | { 33 | width:320px; 34 | padding: 15px; 35 | padding-bottom:0px; 36 | } 37 | .navbar-content:before, .navbar-content:after 38 | { 39 | display: table; 40 | content: ""; 41 | line-height: 0; 42 | } 43 | .navbar-nav.navbar-right:last-child { 44 | margin-right: 15px !important; 45 | } 46 | .navbar-footer 47 | { 48 | background-color:#DDD; 49 | } 50 | .navbar-brand,.navbar-toggle,.brand_network{ 51 | color: #FFFFFF; 52 | font-weight: bold; 53 | 54 | } 55 | .navbar-custom .navbar-nav > li > a { 56 | color:#FFFFFF; 57 | font-weight: bold; 58 | } 59 | .navbar-custom .navbar-toggle{ 60 | color: #f57900; 61 | background: #f57900; 62 | } 63 | .navbar-footer-content { padding:15px 15px 15px 15px; } 64 | .dropdown-menu { 65 | padding: 0px; 66 | overflow: hidden; 67 | } 68 | 69 | .brand_network { 70 | color: #9D9D9D; 71 | float: left; 72 | position: absolute; 73 | left: 70px; 74 | top: 30px; 75 | font-size: smaller; 76 | } 77 | 78 | .post-content { 79 | margin-left:58px; 80 | } 81 | 82 | .badge-important { 83 | margin-top: 3px; 84 | margin-left: 25px; 85 | position: absolute; 86 | } 87 | 88 | body { 89 | background-color: #e8e8e8; 90 | } 91 | //contact forms 92 | 93 | .container { 94 | max-width:700px; 95 | width:100%; 96 | margin:0 auto; 97 | position:relative; 98 | } 99 | 100 | #contact input[type="text"], #contact input[type="email"], #contact input[type="tel"], #contact input[type="url"], #contact textarea, #contact button[type="submit"] { font:400 12px/16px "Open Sans", Helvetica, Arial, sans-serif; } 101 | 102 | #contact,#technologies,#about { 103 | background:#F9F9F9; 104 | padding:25px; 105 | margin:50px 0; 106 | } 107 | 108 | #contact h3,#technologies h3,#about h3 { 109 | color: #F96; 110 | display: block; 111 | font-size: 30px; 112 | font-weight: 400; 113 | } 114 | 115 | #contact h4,#technologies h4,#about h4 { 116 | margin:5px 0 15px; 117 | display:block; 118 | font-size:13px; 119 | } 120 | 121 | fieldset { 122 | border: medium none !important; 123 | margin: 0 0 10px; 124 | min-width: 100%; 125 | padding: 0; 126 | width: 100%; 127 | } 128 | 129 | #contact input[type="text"], #contact input[type="email"], #contact input[type="tel"], #contact input[type="url"], #contact textarea { 130 | width:100%; 131 | border:1px solid #CCC; 132 | background:#FFF; 133 | margin:0 0 5px; 134 | padding:10px; 135 | } 136 | 137 | #contact input[type="text"]:hover, #contact input[type="email"]:hover, #contact input[type="tel"]:hover, #contact input[type="url"]:hover, #contact textarea:hover { 138 | -webkit-transition:border-color 0.3s ease-in-out; 139 | -moz-transition:border-color 0.3s ease-in-out; 140 | transition:border-color 0.3s ease-in-out; 141 | border:1px solid #AAA; 142 | } 143 | 144 | #contact textarea { 145 | height:100px; 146 | max-width:100%; 147 | resize:none; 148 | } 149 | 150 | #contact button[type="submit"] { 151 | cursor:pointer; 152 | width:100%; 153 | border:none; 154 | background:#0CF; 155 | color:#FFF; 156 | margin:0 0 5px; 157 | padding:10px; 158 | font-size:15px; 159 | } 160 | 161 | #contact button[type="submit"]:hover { 162 | background:#09C; 163 | -webkit-transition:background 0.3s ease-in-out; 164 | -moz-transition:background 0.3s ease-in-out; 165 | transition:background-color 0.3s ease-in-out; 166 | } 167 | 168 | #contact button[type="submit"]:active { box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.5); } 169 | 170 | #contact input:focus, #contact textarea:focus { 171 | outline:0; 172 | border:1px solid #999; 173 | } 174 | ::-webkit-input-placeholder { 175 | color:#888; 176 | } 177 | :-moz-placeholder { 178 | color:#888; 179 | } 180 | ::-moz-placeholder { 181 | color:#888; 182 | } 183 | :-ms-input-placeholder { 184 | color:#888; 185 | } 186 | blockquote{ 187 | display:block; 188 | background: #fff; 189 | padding: 15px 20px 15px 45px; 190 | margin: 0 0 20px; 191 | position: relative; 192 | 193 | /*Font*/ 194 | font-family: Georgia, serif; 195 | font-size: 16px; 196 | line-height: 1.2; 197 | color: #666; 198 | text-align: justify; 199 | 200 | /*Borders - (Optional)*/ 201 | border-left: 15px solid #c76c0c; 202 | border-right: 2px solid #c76c0c; 203 | 204 | /*Box Shadow - (Optional)*/ 205 | -moz-box-shadow: 2px 2px 15px #ccc; 206 | -webkit-box-shadow: 2px 2px 15px #ccc; 207 | box-shadow: 2px 2px 15px #ccc; 208 | } 209 | 210 | blockquote::before{ 211 | //content: "\201C"; /*Unicode for Left Double Quote*/ 212 | 213 | /*Font*/ 214 | font-family: Verdana,sans-serif; 215 | font-size: 60px; 216 | font-weight: bold; 217 | color: #1C3B47; 218 | 219 | /*Positioning*/ 220 | position: absolute; 221 | left: 25px; 222 | top:5px; 223 | } 224 | 225 | blockquote::after{ 226 | /*Reset to make sure*/ 227 | content: ""; 228 | } 229 | 230 | blockquote a{ 231 | text-decoration: none; 232 | background: #eee; 233 | cursor: pointer; 234 | padding: 0 4px; 235 | color: #c76c0c; 236 | } 237 | 238 | blockquote a:hover{ 239 | color: #1C3B47; 240 | } 241 | 242 | blockquote em{ 243 | font-style: italic; 244 | } -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/main/webapp/resources/css/w3.css: -------------------------------------------------------------------------------- 1 | /* W3.CSS 4.06 November 2017 by Jan Egil and Borge Refsnes */ 2 | html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} 3 | /* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ 4 | html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} 5 | article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block} 6 | audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} 7 | audio:not([controls]){display:none;height:0}[hidden],template{display:none} 8 | a{background-color:transparent;-webkit-text-decoration-skip:objects} 9 | a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} 10 | dfn{font-style:italic}mark{background:#ff0;color:#000} 11 | small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} 12 | sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}svg:not(:root){overflow:hidden} 13 | code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} 14 | button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold} 15 | button,input{overflow:visible}button,select{text-transform:none} 16 | button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button} 17 | button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner{border-style:none;padding:0} 18 | button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring{outline:1px dotted ButtonText} 19 | fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} 20 | legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} 21 | [type=checkbox],[type=radio]{padding:0} 22 | [type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} 23 | [type=search]{-webkit-appearance:textfield;outline-offset:-2px} 24 | [type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none} 25 | ::-webkit-input-placeholder{color:inherit;opacity:0.54} 26 | ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} 27 | /* End extract */ 28 | html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden} 29 | h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.w3-serif{font-family:serif} 30 | h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.w3-wide{letter-spacing:4px} 31 | hr{border:0;border-top:1px solid #eee;margin:20px 0} 32 | .w3-image{max-width:100%;height:auto}img{margin-bottom:-5px}a{color:inherit} 33 | .w3-table,.w3-table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.w3-table-all{border:1px solid #ccc} 34 | .w3-bordered tr,.w3-table-all tr{border-bottom:1px solid #ddd}.w3-striped tbody tr:nth-child(even){background-color:#f1f1f1} 35 | .w3-table-all tr:nth-child(odd){background-color:#fff}.w3-table-all tr:nth-child(even){background-color:#f1f1f1} 36 | .w3-hoverable tbody tr:hover,.w3-ul.w3-hoverable li:hover{background-color:#ccc}.w3-centered tr th,.w3-centered tr td{text-align:center} 37 | .w3-table td,.w3-table th,.w3-table-all td,.w3-table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} 38 | .w3-table th:first-child,.w3-table td:first-child,.w3-table-all th:first-child,.w3-table-all td:first-child{padding-left:16px} 39 | .w3-btn,.w3-button{border:none;display:inline-block;outline:0;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} 40 | .w3-btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)} 41 | .w3-btn,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} 42 | .w3-disabled,.w3-btn:disabled,.w3-button:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none} 43 | .w3-btn.w3-disabled:hover,.w3-btn:disabled:hover{box-shadow:none} 44 | .w3-badge,.w3-tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.w3-badge{border-radius:50%} 45 | .w3-ul{list-style-type:none;padding:0;margin:0}.w3-ul li{padding:8px 16px;border-bottom:1px solid #ddd}.w3-ul li:last-child{border-bottom:none} 46 | .w3-tooltip,.w3-display-container{position:relative}.w3-tooltip .w3-text{display:none}.w3-tooltip:hover .w3-text{display:inline-block} 47 | .w3-ripple:active{opacity:0.5}.w3-ripple{transition:opacity 0s} 48 | .w3-input{padding:8px;display:block;border:none;border-bottom:1px solid #ccc;width:100%} 49 | .w3-select{padding:9px 0;width:100%;border:none;border-bottom:1px solid #ccc} 50 | .w3-dropdown-click,.w3-dropdown-hover{position:relative;display:inline-block;cursor:pointer} 51 | .w3-dropdown-hover:hover .w3-dropdown-content{display:block;z-index:1} 52 | .w3-dropdown-hover:first-child,.w3-dropdown-click:hover{background-color:#ccc;color:#000} 53 | .w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000} 54 | .w3-dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0} 55 | .w3-check,.w3-radio{width:24px;height:24px;position:relative;top:6px} 56 | .w3-sidebar{height:100%;width:200px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} 57 | .w3-bar-block .w3-dropdown-hover,.w3-bar-block .w3-dropdown-click{width:100%} 58 | .w3-bar-block .w3-dropdown-hover .w3-dropdown-content,.w3-bar-block .w3-dropdown-click .w3-dropdown-content{min-width:100%} 59 | .w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;padding:8px 16px} 60 | .w3-main,#main{transition:margin-left .4s} 61 | .w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} 62 | .w3-modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} 63 | .w3-bar{width:100%;overflow:hidden}.w3-center .w3-bar{display:inline-block;width:auto} 64 | .w3-bar .w3-bar-item{padding:8px 16px;float:left;width:auto;border:none;outline:none;display:block} 65 | .w3-bar .w3-dropdown-hover,.w3-bar .w3-dropdown-click{position:static;float:left} 66 | .w3-bar .w3-button{white-space:normal} 67 | .w3-bar-block .w3-bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;outline:none;white-space:normal;float:none} 68 | .w3-bar-block.w3-center .w3-bar-item{text-align:center}.w3-block{display:block;width:100%} 69 | .w3-responsive{display:block;overflow-x:auto} 70 | .w3-container:after,.w3-container:before,.w3-panel:after,.w3-panel:before,.w3-row:after,.w3-row:before,.w3-row-padding:after,.w3-row-padding:before, 71 | .w3-cell-row:before,.w3-cell-row:after,.w3-clear:after,.w3-clear:before,.w3-bar:before,.w3-bar:after{content:"";display:table;clear:both} 72 | .w3-col,.w3-half,.w3-third,.w3-twothird,.w3-threequarter,.w3-quarter{float:left;width:100%} 73 | .w3-col.s1{width:8.33333%}.w3-col.s2{width:16.66666%}.w3-col.s3{width:24.99999%}.w3-col.s4{width:33.33333%} 74 | .w3-col.s5{width:41.66666%}.w3-col.s6{width:49.99999%}.w3-col.s7{width:58.33333%}.w3-col.s8{width:66.66666%} 75 | .w3-col.s9{width:74.99999%}.w3-col.s10{width:83.33333%}.w3-col.s11{width:91.66666%}.w3-col.s12{width:99.99999%} 76 | @media (min-width:601px){.w3-col.m1{width:8.33333%}.w3-col.m2{width:16.66666%}.w3-col.m3,.w3-quarter{width:24.99999%}.w3-col.m4,.w3-third{width:33.33333%} 77 | .w3-col.m5{width:41.66666%}.w3-col.m6,.w3-half{width:49.99999%}.w3-col.m7{width:58.33333%}.w3-col.m8,.w3-twothird{width:66.66666%} 78 | .w3-col.m9,.w3-threequarter{width:74.99999%}.w3-col.m10{width:83.33333%}.w3-col.m11{width:91.66666%}.w3-col.m12{width:99.99999%}} 79 | @media (min-width:993px){.w3-col.l1{width:8.33333%}.w3-col.l2{width:16.66666%}.w3-col.l3{width:24.99999%}.w3-col.l4{width:33.33333%} 80 | .w3-col.l5{width:41.66666%}.w3-col.l6{width:49.99999%}.w3-col.l7{width:58.33333%}.w3-col.l8{width:66.66666%} 81 | .w3-col.l9{width:74.99999%}.w3-col.l10{width:83.33333%}.w3-col.l11{width:91.66666%}.w3-col.l12{width:99.99999%}} 82 | .w3-content{max-width:980px;margin:auto}.w3-rest{overflow:hidden} 83 | .w3-cell-row{display:table;width:100%}.w3-cell{display:table-cell} 84 | .w3-cell-top{vertical-align:top}.w3-cell-middle{vertical-align:middle}.w3-cell-bottom{vertical-align:bottom} 85 | .w3-hide{display:none!important}.w3-show-block,.w3-show{display:block!important}.w3-show-inline-block{display:inline-block!important} 86 | @media (max-width:600px){.w3-modal-content{margin:0 10px;width:auto!important}.w3-modal{padding-top:30px} 87 | .w3-dropdown-hover.w3-mobile .w3-dropdown-content,.w3-dropdown-click.w3-mobile .w3-dropdown-content{position:relative} 88 | .w3-hide-small{display:none!important}.w3-mobile{display:block;width:100%!important}.w3-bar-item.w3-mobile,.w3-dropdown-hover.w3-mobile,.w3-dropdown-click.w3-mobile{text-align:center} 89 | .w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}} 90 | @media (max-width:768px){.w3-modal-content{width:500px}.w3-modal{padding-top:50px}} 91 | @media (min-width:993px){.w3-modal-content{width:900px}.w3-hide-large{display:none!important}.w3-sidebar.w3-collapse{display:block!important}} 92 | @media (max-width:992px) and (min-width:601px){.w3-hide-medium{display:none!important}} 93 | @media (max-width:992px){.w3-sidebar.w3-collapse{display:none}.w3-main{margin-left:0!important;margin-right:0!important}} 94 | .w3-top,.w3-bottom{position:fixed;width:100%;z-index:1}.w3-top{top:0}.w3-bottom{bottom:0} 95 | .w3-overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} 96 | .w3-display-topleft{position:absolute;left:0;top:0}.w3-display-topright{position:absolute;right:0;top:0} 97 | .w3-display-bottomleft{position:absolute;left:0;bottom:0}.w3-display-bottomright{position:absolute;right:0;bottom:0} 98 | .w3-display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} 99 | .w3-display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} 100 | .w3-display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} 101 | .w3-display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 102 | .w3-display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 103 | .w3-display-container:hover .w3-display-hover{display:block}.w3-display-container:hover span.w3-display-hover{display:inline-block}.w3-display-hover{display:none} 104 | .w3-display-position{position:absolute} 105 | .w3-circle{border-radius:50%} 106 | .w3-round-small{border-radius:2px}.w3-round,.w3-round-medium{border-radius:4px}.w3-round-large{border-radius:8px}.w3-round-xlarge{border-radius:16px}.w3-round-xxlarge{border-radius:32px} 107 | .w3-row-padding,.w3-row-padding>.w3-half,.w3-row-padding>.w3-third,.w3-row-padding>.w3-twothird,.w3-row-padding>.w3-threequarter,.w3-row-padding>.w3-quarter,.w3-row-padding>.w3-col{padding:0 8px} 108 | .w3-container,.w3-panel{padding:0.01em 16px}.w3-panel{margin-top:16px;margin-bottom:16px} 109 | .w3-code,.w3-codespan{font-family:Consolas,"courier new";font-size:16px} 110 | .w3-code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} 111 | .w3-codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} 112 | .w3-card,.w3-card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)} 113 | .w3-card-4,.w3-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} 114 | .w3-spin{animation:w3-spin 2s infinite linear}@keyframes w3-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} 115 | .w3-animate-fading{animation:fading 10s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} 116 | .w3-animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} 117 | .w3-animate-top{position:relative;animation:animatetop 0.4s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} 118 | .w3-animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} 119 | .w3-animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} 120 | .w3-animate-bottom{position:relative;animation:animatebottom 0.4s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} 121 | .w3-animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} 122 | .w3-animate-input{transition:width 0.4s ease-in-out}.w3-animate-input:focus{width:100%!important} 123 | .w3-opacity,.w3-hover-opacity:hover{opacity:0.60}.w3-opacity-off,.w3-hover-opacity-off:hover{opacity:1} 124 | .w3-opacity-max{opacity:0.25}.w3-opacity-min{opacity:0.75} 125 | .w3-greyscale-max,.w3-grayscale-max,.w3-hover-greyscale:hover,.w3-hover-grayscale:hover{filter:grayscale(100%)} 126 | .w3-greyscale,.w3-grayscale{filter:grayscale(75%)}.w3-greyscale-min,.w3-grayscale-min{filter:grayscale(50%)} 127 | .w3-sepia{filter:sepia(75%)}.w3-sepia-max,.w3-hover-sepia:hover{filter:sepia(100%)}.w3-sepia-min{filter:sepia(50%)} 128 | .w3-tiny{font-size:10px!important}.w3-small{font-size:12px!important}.w3-medium{font-size:15px!important}.w3-large{font-size:18px!important} 129 | .w3-xlarge{font-size:24px!important}.w3-xxlarge{font-size:36px!important}.w3-xxxlarge{font-size:48px!important}.w3-jumbo{font-size:64px!important} 130 | .w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}.w3-justify{text-align:justify!important}.w3-center{text-align:center!important} 131 | .w3-border-0{border:0!important}.w3-border{border:1px solid #ccc!important} 132 | .w3-border-top{border-top:1px solid #ccc!important}.w3-border-bottom{border-bottom:1px solid #ccc!important} 133 | .w3-border-left{border-left:1px solid #ccc!important}.w3-border-right{border-right:1px solid #ccc!important} 134 | .w3-topbar{border-top:6px solid #ccc!important}.w3-bottombar{border-bottom:6px solid #ccc!important} 135 | .w3-leftbar{border-left:6px solid #ccc!important}.w3-rightbar{border-right:6px solid #ccc!important} 136 | .w3-section,.w3-code{margin-top:16px!important;margin-bottom:16px!important} 137 | .w3-margin{margin:16px!important}.w3-margin-top{margin-top:16px!important}.w3-margin-bottom{margin-bottom:16px!important} 138 | .w3-margin-left{margin-left:16px!important}.w3-margin-right{margin-right:16px!important} 139 | .w3-padding-small{padding:4px 8px!important}.w3-padding{padding:8px 16px 8px 50px}.w3-padding-large{padding:12px 24px!important} 140 | .w3-padding-16{padding-top:16px!important;padding-bottom:16px!important}.w3-padding-24{padding-top:24px!important;padding-bottom:24px!important} 141 | .w3-padding-32{padding-top:32px!important;padding-bottom:32px!important}.w3-padding-48{padding-top:48px!important;padding-bottom:48px!important} 142 | .w3-padding-64{padding-top:64px!important;padding-bottom:64px!important} 143 | .w3-left{float:left!important}.w3-right{float:right!important} 144 | .w3-button:hover{color:#000!important;background-color:#ccc!important} 145 | .w3-transparent,.w3-hover-none:hover{background-color:transparent!important} 146 | .w3-hover-none:hover{box-shadow:none!important} 147 | /* Colors */ 148 | .w3-amber,.w3-hover-amber:hover{color:#000!important;background-color:#ffc107!important} 149 | .w3-aqua,.w3-hover-aqua:hover{color:#000!important;background-color:#00ffff!important} 150 | .w3-blue,.w3-hover-blue:hover{color:#fff!important;background-color:#2196F3!important} 151 | .w3-light-blue,.w3-hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} 152 | .w3-brown,.w3-hover-brown:hover{color:#fff!important;background-color:#795548!important} 153 | .w3-cyan,.w3-hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} 154 | .w3-blue-grey,.w3-hover-blue-grey:hover,.w3-blue-gray,.w3-hover-blue-gray:hover{color:#fff!important;background-color:#607d8b!important} 155 | .w3-green,.w3-hover-green:hover{color:#fff!important;background-color:#4CAF50!important} 156 | .w3-light-green,.w3-hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} 157 | .w3-indigo,.w3-hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} 158 | .w3-khaki,.w3-hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} 159 | .w3-lime,.w3-hover-lime:hover{color:#000!important;background-color:#cddc39!important} 160 | .w3-orange,.w3-hover-orange:hover{color:#000!important;background-color:#ff9800!important} 161 | .w3-deep-orange,.w3-hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} 162 | .w3-pink,.w3-hover-pink:hover{color:#fff!important;background-color:#e91e63!important} 163 | .w3-purple,.w3-hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} 164 | .w3-deep-purple,.w3-hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} 165 | .w3-red,.w3-hover-red:hover{color:#fff!important;background-color:#f44336!important} 166 | .w3-sand,.w3-hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} 167 | .w3-teal,.w3-hover-teal:hover{color:#fff!important;background-color:#009688!important} 168 | .w3-yellow,.w3-hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} 169 | .w3-white,.w3-hover-white:hover{color:#000!important;background-color:#fff!important} 170 | .w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important} 171 | .w3-grey,.w3-hover-grey:hover,.w3-gray,.w3-hover-gray:hover{color:#000!important;background-color:#9e9e9e!important} 172 | .w3-light-grey,.w3-hover-light-grey:hover,.w3-light-gray,.w3-hover-light-gray:hover{color:#000!important;background-color:#f1f1f1!important} 173 | .w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important} 174 | .w3-pale-red,.w3-hover-pale-red:hover{color:#000!important;background-color:#ffdddd!important} 175 | .w3-pale-green,.w3-hover-pale-green:hover{color:#000!important;background-color:#ddffdd!important} 176 | .w3-pale-yellow,.w3-hover-pale-yellow:hover{color:#000!important;background-color:#ffffcc!important} 177 | .w3-pale-blue,.w3-hover-pale-blue:hover{color:#000!important;background-color:#ddffff!important} 178 | .w3-text-amber,.w3-hover-text-amber:hover{color:#ffc107!important} 179 | .w3-text-aqua,.w3-hover-text-aqua:hover{color:#00ffff!important} 180 | .w3-text-blue,.w3-hover-text-blue:hover{color:#2196F3!important} 181 | .w3-text-light-blue,.w3-hover-text-light-blue:hover{color:#87CEEB!important} 182 | .w3-text-brown,.w3-hover-text-brown:hover{color:#795548!important} 183 | .w3-text-cyan,.w3-hover-text-cyan:hover{color:#00bcd4!important} 184 | .w3-text-blue-grey,.w3-hover-text-blue-grey:hover,.w3-text-blue-gray,.w3-hover-text-blue-gray:hover{color:#607d8b!important} 185 | .w3-text-green,.w3-hover-text-green:hover{color:#4CAF50!important} 186 | .w3-text-light-green,.w3-hover-text-light-green:hover{color:#8bc34a!important} 187 | .w3-text-indigo,.w3-hover-text-indigo:hover{color:#3f51b5!important} 188 | .w3-text-khaki,.w3-hover-text-khaki:hover{color:#b4aa50!important} 189 | .w3-text-lime,.w3-hover-text-lime:hover{color:#cddc39!important} 190 | .w3-text-orange,.w3-hover-text-orange:hover{color:#ff9800!important} 191 | .w3-text-deep-orange,.w3-hover-text-deep-orange:hover{color:#ff5722!important} 192 | .w3-text-pink,.w3-hover-text-pink:hover{color:#e91e63!important} 193 | .w3-text-purple,.w3-hover-text-purple:hover{color:#9c27b0!important} 194 | .w3-text-deep-purple,.w3-hover-text-deep-purple:hover{color:#673ab7!important} 195 | .w3-text-red,.w3-hover-text-red:hover{color:#f44336!important} 196 | .w3-text-sand,.w3-hover-text-sand:hover{color:#fdf5e6!important} 197 | .w3-text-teal,.w3-hover-text-teal:hover{color:#009688!important} 198 | .w3-text-yellow,.w3-hover-text-yellow:hover{color:#d2be0e!important} 199 | .w3-text-white,.w3-hover-text-white:hover{color:#fff!important} 200 | .w3-text-black,.w3-hover-text-black:hover{color:#000!important} 201 | .w3-text-grey,.w3-hover-text-grey:hover,.w3-text-gray,.w3-hover-text-gray:hover{color:#757575!important} 202 | .w3-text-light-grey,.w3-hover-text-light-grey:hover,.w3-text-light-gray,.w3-hover-text-light-gray:hover{color:#f1f1f1!important} 203 | .w3-text-dark-grey,.w3-hover-text-dark-grey:hover,.w3-text-dark-gray,.w3-hover-text-dark-gray:hover{color:#3a3a3a!important} 204 | .w3-border-amber,.w3-hover-border-amber:hover{border-color:#ffc107!important} 205 | .w3-border-aqua,.w3-hover-border-aqua:hover{border-color:#00ffff!important} 206 | .w3-border-blue,.w3-hover-border-blue:hover{border-color:#2196F3!important} 207 | .w3-border-light-blue,.w3-hover-border-light-blue:hover{border-color:#87CEEB!important} 208 | .w3-border-brown,.w3-hover-border-brown:hover{border-color:#795548!important} 209 | .w3-border-cyan,.w3-hover-border-cyan:hover{border-color:#00bcd4!important} 210 | .w3-border-blue-grey,.w3-hover-border-blue-grey:hover,.w3-border-blue-gray,.w3-hover-border-blue-gray:hover{border-color:#607d8b!important} 211 | .w3-border-green,.w3-hover-border-green:hover{border-color:#4CAF50!important} 212 | .w3-border-light-green,.w3-hover-border-light-green:hover{border-color:#8bc34a!important} 213 | .w3-border-indigo,.w3-hover-border-indigo:hover{border-color:#3f51b5!important} 214 | .w3-border-khaki,.w3-hover-border-khaki:hover{border-color:#f0e68c!important} 215 | .w3-border-lime,.w3-hover-border-lime:hover{border-color:#cddc39!important} 216 | .w3-border-orange,.w3-hover-border-orange:hover{border-color:#ff9800!important} 217 | .w3-border-deep-orange,.w3-hover-border-deep-orange:hover{border-color:#ff5722!important} 218 | .w3-border-pink,.w3-hover-border-pink:hover{border-color:#e91e63!important} 219 | .w3-border-purple,.w3-hover-border-purple:hover{border-color:#9c27b0!important} 220 | .w3-border-deep-purple,.w3-hover-border-deep-purple:hover{border-color:#673ab7!important} 221 | .w3-border-red,.w3-hover-border-red:hover{border-color:#f44336!important} 222 | .w3-border-sand,.w3-hover-border-sand:hover{border-color:#fdf5e6!important} 223 | .w3-border-teal,.w3-hover-border-teal:hover{border-color:#009688!important} 224 | .w3-border-yellow,.w3-hover-border-yellow:hover{border-color:#ffeb3b!important} 225 | .w3-border-white,.w3-hover-border-white:hover{border-color:#fff!important} 226 | .w3-border-black,.w3-hover-border-black:hover{border-color:#000!important} 227 | .w3-border-grey,.w3-hover-border-grey:hover,.w3-border-gray,.w3-hover-border-gray:hover{border-color:#9e9e9e!important} 228 | .w3-border-light-grey,.w3-hover-border-light-grey:hover,.w3-border-light-gray,.w3-hover-border-light-gray:hover{border-color:#f1f1f1!important} 229 | .w3-border-dark-grey,.w3-hover-border-dark-grey:hover,.w3-border-dark-gray,.w3-hover-border-dark-gray:hover{border-color:#616161!important} 230 | .w3-border-pale-red,.w3-hover-border-pale-red:hover{border-color:#ffe7e7!important}.w3-border-pale-green,.w3-hover-border-pale-green:hover{border-color:#e7ffe7!important} 231 | .w3-border-pale-yellow,.w3-hover-border-pale-yellow:hover{border-color:#ffffcc!important}.w3-border-pale-blue,.w3-hover-border-pale-blue:hover{border-color:#e7ffff!important} -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/test/java/com/visualpathit/account/controllerTest/SampleTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.controllerTest; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import org.junit.Test; 6 | 7 | public class SampleTest { 8 | @Test 9 | public void SampleTestHappyFlow(){ 10 | assertEquals("Hello".length(), 5); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/test/java/com/visualpathit/account/controllerTest/UserControllerTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.controllerTest; 2 | 3 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; 4 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; 5 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl; 6 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; 7 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; 8 | 9 | import org.junit.Before; 10 | import org.junit.Test; 11 | import org.mockito.InjectMocks; 12 | import org.mockito.Mock; 13 | import org.mockito.MockitoAnnotations; 14 | import org.springframework.test.web.servlet.MockMvc; 15 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 16 | 17 | import com.visualpathit.account.controller.UserController; 18 | import com.visualpathit.account.model.User; 19 | import com.visualpathit.account.service.UserService; 20 | import com.visualpathit.account.setup.StandaloneMvcTestViewResolver; 21 | 22 | 23 | public class UserControllerTest { 24 | 25 | @Mock 26 | private UserService controllerSer; 27 | @InjectMocks 28 | private UserController controller; 29 | private MockMvc mockMvc; 30 | 31 | @Before 32 | public void setup(){ 33 | MockitoAnnotations.initMocks(this); 34 | 35 | /*InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); 36 | viewResolver.setPrefix("/WEB-INF/views/"); 37 | viewResolver.setSuffix(".jsp"); 38 | */ 39 | mockMvc = MockMvcBuilders.standaloneSetup(controller) 40 | .setViewResolvers(new StandaloneMvcTestViewResolver()).build(); 41 | } 42 | 43 | @Test 44 | public void registrationTestforHappyFlow() throws Exception{ 45 | User user = new User(); 46 | mockMvc.perform(get("/registration")) 47 | .andExpect(status().isOk()) 48 | .andExpect(view().name("registration")) 49 | .andExpect(forwardedUrl("registration")); 50 | 51 | } 52 | @Test 53 | public void registrationTestforNullValueHappyFlow() throws Exception{ 54 | mockMvc.perform(get("/registration")) 55 | .andExpect(status().isOk()) 56 | .andExpect(view().name("registration")) 57 | .andExpect(forwardedUrl("registration")); 58 | 59 | } 60 | /*@Test 61 | public void registrationTestforPostValueHappyFlow() throws Exception{ 62 | String description =new String("Error String"); 63 | UserValidator userValidator; 64 | BindingResult bindingResult; 65 | when(userValidator.validate(new User(),bindingResult)) 66 | .thenThrow(bindingResult.hasErrors()); 67 | mockMvc.perform(post("/registration").contentType(MediaType.APPLICATION_FORM_URLENCODED) 68 | .param("userForm","userForm")) 69 | 70 | .andExpect(status().isOk()); 71 | //.andExpect(view().name("redirect:/welcome")) 72 | //.andExpect(forwardedUrl("redirect:/welcome")); 73 | 74 | }*/ 75 | @Test 76 | public void loginTestHappyFlow() throws Exception{ 77 | String error = "Your username and password is invalid"; 78 | mockMvc.perform(get("/login").param(error, error)) 79 | .andExpect(status().isOk()) 80 | .andExpect(view().name("login")) 81 | .andExpect(forwardedUrl("login")); 82 | 83 | } 84 | @Test 85 | public void welcomeTestHappyFlow() throws Exception{ 86 | mockMvc.perform(get("/welcome")) 87 | .andExpect(status().isOk()) 88 | .andExpect(view().name("welcome")) 89 | .andExpect(forwardedUrl("welcome")); 90 | 91 | } 92 | @Test 93 | public void welcomeAfterDirectLoginTestHappyFlow() throws Exception{ 94 | mockMvc.perform(get("/")) 95 | .andExpect(status().isOk()) 96 | .andExpect(view().name("welcome")) 97 | .andExpect(forwardedUrl("welcome")); 98 | 99 | } 100 | @Test 101 | public void indexTestHappyFlow() throws Exception{ 102 | mockMvc.perform(get("/index")) 103 | .andExpect(status().isOk()) 104 | .andExpect(view().name("index_home")) 105 | .andExpect(forwardedUrl("index_home")); 106 | 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/test/java/com/visualpathit/account/modelTest/RoleTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.modelTest; 2 | 3 | import junit.framework.Assert; 4 | 5 | import java.util.HashSet; 6 | import java.util.Set; 7 | 8 | import org.junit.After; 9 | import org.junit.Before; 10 | import org.junit.Test; 11 | 12 | import com.visualpathit.account.model.Role; 13 | import com.visualpathit.account.model.User; 14 | 15 | /** {@author waheedk} !*/ 16 | public class RoleTest { 17 | 18 | public static final Long EXPECTED_ID = 1L; 19 | public static final String EXPECTED_ROLENAME = "Admin"; 20 | public static final int EXPECTED_SIZE = 1; 21 | private Role role; 22 | @Before 23 | public void setUp() throws Exception { 24 | User user = new User(); 25 | user.setId(1L); 26 | user.setUsername("Wahidkhan74"); 27 | user.setPassword("Wahidkhan74"); 28 | user.setUserEmail("XXXXX@gmail.com"); 29 | 30 | Set users = new HashSet(); 31 | users.add(user); 32 | role = new Role(); 33 | role.setId(1L); 34 | role.setName("Admin"); 35 | role.setUsers(users); 36 | } 37 | 38 | @After 39 | public void tearDown() throws Exception { 40 | System.out.println("Test Completed"); 41 | 42 | } 43 | 44 | @Test 45 | public void testUserDetailsHappyFlow() throws Exception { 46 | Assert.assertEquals(EXPECTED_ID, role.getId()); 47 | Assert.assertEquals(EXPECTED_ROLENAME, role.getName()); 48 | Assert.assertEquals(EXPECTED_SIZE,role.getUsers().size()); 49 | 50 | } 51 | } -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/test/java/com/visualpathit/account/modelTest/UserTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.modelTest; 2 | 3 | import junit.framework.Assert; 4 | 5 | import java.util.HashSet; 6 | import java.util.Set; 7 | 8 | import org.junit.After; 9 | import org.junit.Before; 10 | import org.junit.Test; 11 | 12 | import com.visualpathit.account.model.Role; 13 | import com.visualpathit.account.model.User; 14 | 15 | /** {@author waheedk} !*/ 16 | public class UserTest { 17 | 18 | public static final Long EXPECTED_ID = 1L; 19 | public static final int EXPECTED_SIZE = 1; 20 | public static final String EXPECTED_USERNAME = "Wahidkhan74"; 21 | public static final String EXPECTED_PASSWD = "Wahidkhan74"; 22 | public static final String EXPECTED_USEREMAIL = "XXXXX@gmail.com"; 23 | private User user; 24 | @Before 25 | public void setUp() throws Exception { 26 | 27 | Role role = new Role(); 28 | role.setId(1L); 29 | role.setName("Admin"); 30 | Set roles = new HashSet(); 31 | roles.add(role); 32 | 33 | user = new User(); 34 | user.setId(1L); 35 | user.setUsername("Wahidkhan74"); 36 | user.setPassword("Wahidkhan74"); 37 | user.setUserEmail("XXXXX@gmail.com"); 38 | user.setRoles(roles); 39 | } 40 | 41 | @After 42 | public void tearDown() throws Exception { 43 | System.out.println("Test Completed"); 44 | 45 | } 46 | 47 | @Test 48 | public void testUserDetailsHappyFlow() throws Exception { 49 | Assert.assertEquals(EXPECTED_ID, user.getId()); 50 | Assert.assertEquals(EXPECTED_USERNAME, user.getUsername()); 51 | Assert.assertEquals(EXPECTED_PASSWD, user.getPassword()); 52 | Assert.assertEquals(EXPECTED_USEREMAIL, user.getUserEmail()); 53 | Assert.assertEquals(EXPECTED_SIZE,user.getRoles().size()); 54 | 55 | } 56 | } -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/src/test/java/com/visualpathit/account/setup/StandaloneMvcTestViewResolver.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.setup; 2 | 3 | import org.springframework.web.servlet.view.AbstractUrlBasedView; 4 | import org.springframework.web.servlet.view.InternalResourceView; 5 | import org.springframework.web.servlet.view.InternalResourceViewResolver; 6 | 7 | public class StandaloneMvcTestViewResolver extends InternalResourceViewResolver { 8 | 9 | public StandaloneMvcTestViewResolver() { 10 | super(); 11 | } 12 | 13 | @Override 14 | protected AbstractUrlBasedView buildView(final String viewName) throws Exception { 15 | final InternalResourceView view = (InternalResourceView) super.buildView(viewName); 16 | // prevent checking for circular view paths 17 | view.setPreventDispatchLoop(false); 18 | return view; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/userdata/backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DATABASE_PASS='admin123' 3 | 4 | # MEmcache 5 | yum install epel-release -y 6 | yum install memcached -y 7 | systemctl start memcached 8 | systemctl enable memcached 9 | systemctl status memcached 10 | memcached -p 11211 -U 11111 -u memcached -d 11 | 12 | # Rabbit 13 | yum install socat -y 14 | yum install erlang -y 15 | yum install wget -y 16 | wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el7.noarch.rpm 17 | rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc 18 | yum update 19 | rpm -Uvh rabbitmq-server-3.6.10-1.el7.noarch.rpm 20 | systemctl start rabbitmq-server 21 | systemctl enable rabbitmq-server 22 | systemctl status rabbitmq-server 23 | echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config 24 | rabbitmqctl add_user rabbit bunny 25 | rabbitmqctl set_user_tags rabbit administrator 26 | systemctl restart rabbitmq-server 27 | 28 | # Mysql 29 | yum install mariadb-server -y 30 | 31 | #mysql_secure_installation 32 | sed -i 's/^127.0.0.1/0.0.0.0/' /etc/my.cnf 33 | 34 | # starting & enabling mariadb-server 35 | systemctl start mariadb 36 | systemctl enable mariadb 37 | 38 | #restore the dump file for the application 39 | mysqladmin -u root password "$DATABASE_PASS" 40 | mysql -u root -p"$DATABASE_PASS" -e "UPDATE mysql.user SET Password=PASSWORD('$DATABASE_PASS') WHERE User='root'" 41 | mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" 42 | mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User=''" 43 | mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'" 44 | mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 45 | mysql -u root -p"$DATABASE_PASS" -e "create database accounts" 46 | mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'localhost' identified by 'admin123'" 47 | mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'app01' identified by 'admin123'" 48 | mysql -u root -p"$DATABASE_PASS" accounts < /vagrant/vprofile-repo/src/main/resources/db_backup.sql 49 | mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 50 | 51 | # Restart mariadb-server 52 | systemctl restart mariadb -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/userdata/memcache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo yum install epel-release -y 3 | sudo yum install memcached -y 4 | sudo systemctl start memcached 5 | sudo systemctl enable memcached 6 | sudo systemctl status memcached 7 | sudo memcached -p 11211 -U 11111 -u memcached -d -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/userdata/mysql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DATABASE_PASS='admin123' 3 | sudo yum update -y 4 | sudo yum install epel-release -y 5 | sudo yum install git zip unzip -y 6 | sudo yum install mariadb-server -y 7 | 8 | 9 | # starting & enabling mariadb-server 10 | sudo systemctl start mariadb 11 | sudo systemctl enable mariadb 12 | cd /tmp/ 13 | git clone -b vp-rem https://github.com/devopshydclub/vprofile-repo.git 14 | #restore the dump file for the application 15 | sudo mysqladmin -u root password "$DATABASE_PASS" 16 | sudo mysql -u root -p"$DATABASE_PASS" -e "UPDATE mysql.user SET Password=PASSWORD('$DATABASE_PASS') WHERE User='root'" 17 | sudo mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" 18 | sudo mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.user WHERE User=''" 19 | sudo mysql -u root -p"$DATABASE_PASS" -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'" 20 | sudo mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 21 | sudo mysql -u root -p"$DATABASE_PASS" -e "create database accounts" 22 | sudo mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'localhost' identified by 'admin123'" 23 | sudo mysql -u root -p"$DATABASE_PASS" -e "grant all privileges on accounts.* TO 'admin'@'%' identified by 'admin123'" 24 | sudo mysql -u root -p"$DATABASE_PASS" accounts < /tmp/vprofile-repo/src/main/resources/db_backup.sql 25 | sudo mysql -u root -p"$DATABASE_PASS" -e "FLUSH PRIVILEGES" 26 | 27 | # Restart mariadb-server 28 | sudo systemctl restart mariadb 29 | 30 | 31 | #starting the firewall and allowing the mariadb to access from port no. 3306 32 | sudo systemctl start firewalld 33 | sudo systemctl enable firewalld 34 | sudo firewall-cmd --get-active-zones 35 | sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent 36 | sudo firewall-cmd --reload 37 | sudo systemctl restart mariadb 38 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/userdata/nginx.sh: -------------------------------------------------------------------------------- 1 | # adding repository and installing nginx 2 | apt update 3 | apt install nginx -y 4 | cat < vproapp 5 | upstream vproapp { 6 | 7 | server appserver.com:8080; 8 | 9 | } 10 | 11 | server { 12 | 13 | listen 80; 14 | 15 | location / { 16 | 17 | proxy_pass http://vproapp; 18 | 19 | } 20 | 21 | } 22 | 23 | EOT 24 | 25 | mv vproapp /etc/nginx/sites-available/vproapp 26 | rm -rf /etc/nginx/sites-enabled/default 27 | ln -s /etc/nginx/sites-available/vproapp /etc/nginx/sites-enabled/vproapp 28 | 29 | #starting nginx service and firewall 30 | systemctl start nginx 31 | systemctl enable nginx 32 | systemctl restart nginx 33 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/userdata/rabbitmq.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo yum install epel-release -y 3 | sudo yum update -y 4 | sudo yum install wget -y 5 | cd /tmp/ 6 | wget http://packages.erlang-solutions.com/erlang-solutions-2.0-1.noarch.rpm 7 | sudo rpm -Uvh erlang-solutions-2.0-1.noarch.rpm 8 | sudo yum -y install erlang socat 9 | curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash 10 | sudo yum install rabbitmq-server -y 11 | sudo systemctl start rabbitmq-server 12 | sudo systemctl enable rabbitmq-server 13 | sudo systemctl status rabbitmq-server 14 | sudo sh -c 'echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config' 15 | sudo rabbitmqctl add_user test test 16 | sudo rabbitmqctl set_user_tags test administrator 17 | sudo systemctl restart rabbitmq-server 18 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/userdata/tomcat.sh: -------------------------------------------------------------------------------- 1 | TOMURL="https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz" 2 | yum install java-1.8.0-openjdk -y 3 | yum install git maven wget -y 4 | cd /tmp/ 5 | wget $TOMURL -O tomcatbin.tar.gz 6 | EXTOUT=`tar xzvf tomcatbin.tar.gz` 7 | TOMDIR=`echo $EXTOUT | cut -d '/' -f1` 8 | useradd --shell /sbin/nologin tomcat 9 | rsync -avzh /tmp/$TOMDIR/ /usr/local/tomcat8/ 10 | chown -R tomcat.tomcat /usr/local/tomcat8 11 | 12 | rm -rf /etc/systemd/system/tomcat.service 13 | 14 | cat <> /etc/systemd/system/tomcat.service 15 | [Unit] 16 | Description=Tomcat 17 | After=network.target 18 | 19 | [Service] 20 | User=tomcat 21 | WorkingDirectory=/usr/local/tomcat8 22 | Environment=JRE_HOME=/usr/lib/jvm/jre 23 | Environment=JAVA_HOME=/usr/lib/jvm/jre 24 | Environment=CATALINA_HOME=/usr/local/tomcat8 25 | Environment=CATALINE_BASE=/usr/local/tomcat8 26 | ExecStart=/usr/local/tomcat8/bin/catalina.sh run 27 | ExecStop=/usr/local/tomcat8/bin/shutdown.sh 28 | SyslogIdentifier=tomcat-%i 29 | 30 | [Install] 31 | WantedBy=multi-user.target 32 | EOT 33 | 34 | systemctl daemon-reload 35 | systemctl start tomcat 36 | systemctl enable tomcat 37 | 38 | git clone -b vp-rem https://github.com/devopshydclub/vprofile-repo.git 39 | cd vprofile-repo 40 | mvn install 41 | systemctl stop tomcat 42 | sleep 120 43 | rm -rf /usr/local/tomcat8/webapps/ROOT* 44 | cp target/vprofile-v2.war /usr/local/tomcat8/webapps/ROOT.war 45 | systemctl start tomcat 46 | sleep 300 47 | cp /vprofile-vm-data/application.properties /usr/local/tomcat8/webapps/ROOT/WEB-INF/classes/application.properties 48 | systemctl restart tomcat8 49 | -------------------------------------------------------------------------------- /Project 3 - List & Shift Migration on AWS Cloud/userdata/tomcat_ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo apt update 3 | sudo apt upgrade -y 4 | sudo apt install openjdk-8-jdk -y 5 | sudo apt install tomcat8 tomcat8-admin tomcat8-docs tomcat8-common git -y 6 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | 3 | agent any 4 | /* 5 | tools { 6 | maven "maven3" 7 | } 8 | */ 9 | environment { 10 | NEXUS_VERSION = "nexus3" 11 | NEXUS_PROTOCOL = "http" 12 | NEXUS_URL = "172.31.40.209:8081" 13 | NEXUS_REPOSITORY = "vprofile-release" 14 | NEXUS_REPO_ID = "vprofile-release" 15 | NEXUS_CREDENTIAL_ID = "nexuslogin" 16 | ARTVERSION = "${env.BUILD_ID}" 17 | } 18 | 19 | stages{ 20 | 21 | stage('BUILD'){ 22 | steps { 23 | sh 'mvn clean install -DskipTests' 24 | } 25 | post { 26 | success { 27 | echo 'Now Archiving...' 28 | archiveArtifacts artifacts: '**/target/*.war' 29 | } 30 | } 31 | } 32 | 33 | stage('UNIT TEST'){ 34 | steps { 35 | sh 'mvn test' 36 | } 37 | } 38 | 39 | stage('INTEGRATION TEST'){ 40 | steps { 41 | sh 'mvn verify -DskipUnitTests' 42 | } 43 | } 44 | 45 | stage ('CODE ANALYSIS WITH CHECKSTYLE'){ 46 | steps { 47 | sh 'mvn checkstyle:checkstyle' 48 | } 49 | post { 50 | success { 51 | echo 'Generated Analysis Result' 52 | } 53 | } 54 | } 55 | 56 | stage('CODE ANALYSIS with SONARQUBE') { 57 | 58 | environment { 59 | scannerHome = tool 'sonarscanner4' 60 | } 61 | 62 | steps { 63 | withSonarQubeEnv('sonar-pro') { 64 | sh '''${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=vprofile \ 65 | -Dsonar.projectName=vprofile-repo \ 66 | -Dsonar.projectVersion=1.0 \ 67 | -Dsonar.sources=src/ \ 68 | -Dsonar.java.binaries=target/test-classes/com/visualpathit/account/controllerTest/ \ 69 | -Dsonar.junit.reportsPath=target/surefire-reports/ \ 70 | -Dsonar.jacoco.reportsPath=target/jacoco.exec \ 71 | -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml''' 72 | } 73 | 74 | timeout(time: 10, unit: 'MINUTES') { 75 | waitForQualityGate abortPipeline: true 76 | } 77 | } 78 | } 79 | 80 | stage("Publish to Nexus Repository Manager") { 81 | steps { 82 | script { 83 | pom = readMavenPom file: "pom.xml"; 84 | filesByGlob = findFiles(glob: "target/*.${pom.packaging}"); 85 | echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}" 86 | artifactPath = filesByGlob[0].path; 87 | artifactExists = fileExists artifactPath; 88 | if(artifactExists) { 89 | echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version} ARTVERSION"; 90 | nexusArtifactUploader( 91 | nexusVersion: NEXUS_VERSION, 92 | protocol: NEXUS_PROTOCOL, 93 | nexusUrl: NEXUS_URL, 94 | groupId: pom.groupId, 95 | version: ARTVERSION, 96 | repository: NEXUS_REPOSITORY, 97 | credentialsId: NEXUS_CREDENTIAL_ID, 98 | artifacts: [ 99 | [artifactId: pom.artifactId, 100 | classifier: '', 101 | file: artifactPath, 102 | type: pom.packaging], 103 | [artifactId: pom.artifactId, 104 | classifier: '', 105 | file: "pom.xml", 106 | type: "pom"] 107 | ] 108 | ); 109 | } 110 | else { 111 | error "*** File: ${artifactPath}, could not be found"; 112 | } 113 | } 114 | } 115 | } 116 | 117 | 118 | } 119 | 120 | 121 | } 122 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/README.md: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | # 3 | - JDK 1.8 or later 4 | - Maven 3 or later 5 | - MySQL 5.6 or later 6 | 7 | # Technologies 8 | - Spring MVC 9 | - Spring Security 10 | - Spring Data JPA 11 | - Maven 12 | - JSP 13 | - MySQL 14 | # Database 15 | Here,we used Mysql DB 16 | MSQL DB Installation Steps for Linux ubuntu 14.04: 17 | - $ sudo apt-get update 18 | - $ sudo apt-get install mysql-server 19 | 20 | Then look for the file : 21 | - /src/main/resources/accountsdb 22 | - accountsdb.sql file is a mysql dump file.we have to import this dump to mysql db server 23 | - > mysql -u -p accounts < accountsdb.sql 24 | 25 | 26 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.visualpathit 5 | vprofile 6 | war 7 | v2 8 | Visualpathit VProfile Webapp 9 | http://maven.apache.org 10 | 11 | 4.2.0.RELEASE 12 | 4.0.2.RELEASE 13 | 1.8.2.RELEASE 14 | 4.3.11.Final 15 | 5.2.1.Final 16 | 5.1.36 17 | 1.4 18 | 1.2 19 | 4.10 20 | 1.1.3 21 | 1.8 22 | 1.8 23 | 24 | 25 | 26 | 27 | org.springframework 28 | spring-web 29 | ${spring.version} 30 | 31 | 32 | 33 | org.springframework 34 | spring-webmvc 35 | ${spring.version} 36 | 37 | 38 | 39 | org.springframework.security 40 | spring-security-web 41 | ${spring-security.version} 42 | 43 | 44 | 45 | org.springframework.security 46 | spring-security-config 47 | ${spring-security.version} 48 | 49 | 50 | 51 | org.hibernate 52 | hibernate-validator 53 | ${hibernate-validator.version} 54 | 55 | 56 | 57 | org.springframework.data 58 | spring-data-jpa 59 | ${spring-data-jpa.version} 60 | 61 | 62 | 63 | org.hibernate 64 | hibernate-entitymanager 65 | ${hibernate.version} 66 | 67 | 68 | 69 | mysql 70 | mysql-connector-java 71 | ${mysql-connector.version} 72 | 73 | 74 | 75 | commons-dbcp 76 | commons-dbcp 77 | ${commons-dbcp.version} 78 | 79 | 80 | 81 | javax.servlet 82 | jstl 83 | ${jstl.version} 84 | 85 | 86 | 87 | junit 88 | junit 89 | ${junit.version} 90 | test 91 | 92 | 93 | org.mockito 94 | mockito-core 95 | 1.9.5 96 | test 97 | 98 | 99 | org.springframework 100 | spring-test 101 | 3.2.3.RELEASE 102 | test 103 | 104 | 105 | javax.servlet 106 | javax.servlet-api 107 | 3.1.0 108 | provided 109 | 110 | 111 | ch.qos.logback 112 | logback-classic 113 | ${logback.version} 114 | 115 | 116 | org.hamcrest 117 | hamcrest-all 118 | 1.3 119 | test 120 | 121 | 122 | commons-fileupload 123 | commons-fileupload 124 | 1.3.1 125 | 126 | 127 | 128 | net.spy 129 | spymemcached 130 | 2.12.3 131 | 132 | 133 | commons-io 134 | commons-io 135 | 2.4 136 | 137 | 138 | 139 | org.springframework.amqp 140 | spring-rabbit 141 | 1.7.1.RELEASE 142 | 143 | 144 | 145 | com.rabbitmq 146 | amqp-client 147 | 4.0.2 148 | 149 | 150 | 151 | org.elasticsearch 152 | elasticsearch 153 | 5.6.4 154 | 155 | 156 | 157 | org.elasticsearch.client 158 | transport 159 | 5.6.4 160 | 161 | 162 | 163 | com.google.code.gson 164 | gson 165 | 2.8.2 166 | 167 | 168 | 169 | 170 | 171 | org.eclipse.jetty 172 | jetty-maven-plugin 173 | 9.2.11.v20150529 174 | 175 | 10 176 | 177 | / 178 | 179 | 180 | 181 | 182 | 183 | org.jacoco 184 | jacoco-maven-plugin 185 | 0.7.2.201409121644 186 | 187 | 188 | jacoco-initialize 189 | process-resources 190 | 191 | prepare-agent 192 | 193 | 194 | 195 | jacoco-site 196 | post-integration-test 197 | 198 | report 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #JDBC Configutation for Database Connection 2 | jdbc.driverClassName=com.mysql.jdbc.Driver 3 | jdbc.url=jdbc:mysql://vprofile-rds-mysql.clacmsizwwve.us-east-1.rds.amazonaws.com:3306/accounts?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull 4 | jdbc.username=admin 5 | jdbc.password=8VXbDY2h7ILUOwQWDqMn 6 | 7 | #Memcached Configuration For Active and StandBy Host 8 | #For Active Host 9 | memcached.active.host=vprofile-elasticache-svc.ohsezc.cfg.use1.cache.amazonaws.com 10 | memcached.active.port=11211 11 | #For StandBy Host 12 | memcached.standBy.host=127.0.0.2 13 | memcached.standBy.port=11211 14 | 15 | #RabbitMq Configuration 16 | rabbitmq.address=b-a9a1367d-6326-4712-84e5-9aff3999dc1b.mq.us-east-1.amazonaws.com 17 | rabbitmq.port=5671 18 | rabbitmq.username=rabbit 19 | rabbitmq.password=Blue7890bunny 20 | 21 | #Elasticesearch Configuration 22 | elasticsearch.host =192.168.1.85 23 | elasticsearch.port =9300 24 | elasticsearch.cluster=vprofile 25 | elasticsearch.node=vprofilenode 26 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/resources/db_backup.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) 2 | -- 3 | -- Host: localhost Database: accounts 4 | -- ------------------------------------------------------ 5 | -- Server version 5.7.18-0ubuntu0.16.10.1 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `role` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `role`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!40101 SET character_set_client = utf8 */; 25 | CREATE TABLE `role` ( 26 | `id` int(11) NOT NULL AUTO_INCREMENT, 27 | `name` varchar(45) DEFAULT NULL, 28 | PRIMARY KEY (`id`) 29 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 30 | /*!40101 SET character_set_client = @saved_cs_client */; 31 | 32 | -- 33 | -- Dumping data for table `role` 34 | -- 35 | 36 | LOCK TABLES `role` WRITE; 37 | /*!40000 ALTER TABLE `role` DISABLE KEYS */; 38 | INSERT INTO `role` VALUES (1,'ROLE_USER'); 39 | /*!40000 ALTER TABLE `role` ENABLE KEYS */; 40 | UNLOCK TABLES; 41 | 42 | -- 43 | -- Table structure for table `user` 44 | -- 45 | 46 | DROP TABLE IF EXISTS `user`; 47 | /*!40101 SET @saved_cs_client = @@character_set_client */; 48 | /*!40101 SET character_set_client = utf8 */; 49 | CREATE TABLE `user` ( 50 | `id` int(11) NOT NULL AUTO_INCREMENT, 51 | `username` varchar(255) DEFAULT NULL, 52 | `userEmail` varchar(255) DEFAULT NULL, 53 | `profileImg` varchar(255) DEFAULT NULL, 54 | `profileImgPath` varchar(255) DEFAULT NULL, 55 | `dateOfBirth` varchar(255) DEFAULT NULL, 56 | `fatherName` varchar(255) DEFAULT NULL, 57 | `motherName` varchar(255) DEFAULT NULL, 58 | `gender` varchar(255) DEFAULT NULL, 59 | `maritalStatus` varchar(255) DEFAULT NULL, 60 | `permanentAddress` varchar(255) DEFAULT NULL, 61 | `tempAddress` varchar(255) DEFAULT NULL, 62 | `primaryOccupation` varchar(255) DEFAULT NULL, 63 | `secondaryOccupation` varchar(255) DEFAULT NULL, 64 | `skills` varchar(255) DEFAULT NULL, 65 | `phoneNumber` varchar(255) DEFAULT NULL, 66 | `secondaryPhoneNumber` varchar(255) DEFAULT NULL, 67 | `nationality` varchar(255) DEFAULT NULL, 68 | `language` varchar(255) DEFAULT NULL, 69 | `workingExperience` varchar(255) DEFAULT NULL, 70 | `password` varchar(255) DEFAULT NULL, 71 | PRIMARY KEY (`id`) 72 | ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; 73 | /*!40101 SET character_set_client = @saved_cs_client */; 74 | 75 | -- 76 | -- Dumping data for table `user` 77 | -- 78 | 79 | LOCK TABLES `user` WRITE; 80 | /*!40000 ALTER TABLE `user` DISABLE KEYS */; 81 | INSERT INTO `user` VALUES (7,'admin_vp','admin@visualpathit.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$0a7VdTr4rfCQqtsvpng6GuJnzUmQ7gZiHXgzGPgm5hkRa3avXgBLK'),(8,'WahidKhan','wahid.khan74@gmail.com',NULL,NULL,'28/03/1994','M Khan','R Khan','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','8888888888','8888888888','Indian','english','2 ','$2a$11$UgG9TkHcgl02LxlqxRHYhOf7Xv4CxFmFEgS0FpUdk42OeslI.6JAW'),(9,'Gayatri','gayatri@gmail.com',NULL,NULL,'20/06/1993','K','L','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','9999999999','9999999999','India','english','5','$2a$11$gwvsvUrFU.YirMM1Yb7NweFudLUM91AzH5BDFnhkNzfzpjG.FplYO'),(10,'WahidKhan2','wahid.khan741@gmail.com',NULL,NULL,'28/03/1994','M Khan','R Khan','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','7777777777','777777777','India','english','7','$2a$11$6oZEgfGGQAH23EaXLVZ2WOSKxcEJFnBSw2N2aghab0s2kcxSQwjhC'),(11,'KiranKumar','kiran@gmail.com',NULL,NULL,'8/12/1993','K K','RK','male','unMarried','California','James Street','Software Engineer','Software Engineer','Java HTML CSS ','1010101010','1010101010','India','english','10','$2a$11$EXwpna1MlFFlKW5ut1iVi.AoeIulkPPmcOHFO8pOoQt1IYU9COU0m'),(12,'Saikumar','sai@gmail.com',NULL,NULL,'20/06/1993','Sai RK','Sai AK','male','unMarried','California','US','Software Engineer','Software Engineer','Java HTML CSS AWS','8888888111','8888888111','India','english','8','$2a$11$pzWNzzR.HUkHzz2zhAgqOeCl0WaTgY33NxxJ7n0l.rnEqjB9JO7vy'),(13,'RamSai','ram@gmail.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$6BSmYPrT8I8b9yHmx.uTRu/QxnQM2vhZYQa8mR33aReWA4WFihyGK'); 82 | /*!40000 ALTER TABLE `user` ENABLE KEYS */; 83 | UNLOCK TABLES; 84 | 85 | -- 86 | -- Table structure for table `user_role` 87 | -- 88 | 89 | DROP TABLE IF EXISTS `user_role`; 90 | /*!40101 SET @saved_cs_client = @@character_set_client */; 91 | /*!40101 SET character_set_client = utf8 */; 92 | CREATE TABLE `user_role` ( 93 | `user_id` int(11) NOT NULL, 94 | `role_id` int(11) NOT NULL, 95 | PRIMARY KEY (`user_id`,`role_id`), 96 | KEY `fk_user_role_roleid_idx` (`role_id`), 97 | CONSTRAINT `fk_user_role_roleid` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, 98 | CONSTRAINT `fk_user_role_userid` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE 99 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 100 | /*!40101 SET character_set_client = @saved_cs_client */; 101 | 102 | -- 103 | -- Dumping data for table `user_role` 104 | -- 105 | 106 | LOCK TABLES `user_role` WRITE; 107 | /*!40000 ALTER TABLE `user_role` DISABLE KEYS */; 108 | INSERT INTO `user_role` VALUES (4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1); 109 | /*!40000 ALTER TABLE `user_role` ENABLE KEYS */; 110 | UNLOCK TABLES; 111 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 112 | 113 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 114 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 115 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 116 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 117 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 118 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 119 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 120 | 121 | -- Dump completed on 2017-12-07 16:32:31 122 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %date{HH:mm:ss.SSS} [%thread] %-5level %logger{15}#%line %msg\n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/resources/validation.properties: -------------------------------------------------------------------------------- 1 | NotEmpty=This field is required. 2 | Size.userForm.username=Please use between 6 and 32 characters. 3 | Duplicate.userForm.username= User has already taken this Username. 4 | Size.userForm.password=Try one with at least 8 characters. 5 | Diff.userForm.passwordConfirm=These passwords don't match. -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/Ansible_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/Ansible_logo.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/Vagrant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/Vagrant.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/aws.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/docker.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/git.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/git.jpg -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/jenkins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/jenkins.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/puppet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/puppet.jpg -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/python-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/technologies/python-logo.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/giphy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/giphy.gif -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/logo.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/user.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/user2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/user2.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/user3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/user/user3.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/visualpath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/Images/visualpath.png -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/css/common.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 100px; 3 | padding-bottom: 50px; 4 | background-color: #ffffff; 5 | 6 | } 7 | form { 8 | border: 3px solid #204a87; 9 | } 10 | 11 | img.logo { 12 | display: block; 13 | margin-left: auto; 14 | margin-right: auto; 15 | width: 300px; 16 | height: 70px; 17 | 18 | } 19 | .form-signin { 20 | max-width: 330px; 21 | padding: 15px; 22 | margin: 0 auto; 23 | } 24 | .btn-custom,.btn-custom:hover, .btn-custom:focus, .btn-custom:active { 25 | border-radius: 0; 26 | color: #ffffff; 27 | background-color: #ef2929; 28 | border-color: #ef2929; 29 | 30 | } 31 | .btn-custom-LOGIN { 32 | border-radius: 0; 33 | color: #ffffff; 34 | height:3em; 35 | background-color: #26C6DA; 36 | border-color: #ef2929; 37 | 38 | } 39 | 40 | .form-signin .form-signin-heading, 41 | .form-signin .checkbox { 42 | margin-bottom: 10px; 43 | } 44 | 45 | .form-signin .checkbox { 46 | font-weight: normal; 47 | } 48 | 49 | .form-signin .form-control { 50 | position: relative; 51 | height: auto; 52 | -webkit-box-sizing: border-box; 53 | -moz-box-sizing: border-box; 54 | box-sizing: border-box; 55 | padding: 10px; 56 | font-size: 16px; 57 | } 58 | 59 | .form-signin .form-control:focus { 60 | z-index: 2; 61 | } 62 | 63 | .form-signin input { 64 | margin-top: 10px; 65 | border-bottom-right-radius: 0; 66 | border-bottom-left-radius: 0; 67 | } 68 | 69 | .form-signin button { 70 | margin-top: 10px; 71 | } 72 | 73 | .has-error { 74 | color: red 75 | } -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/css/profile.css: -------------------------------------------------------------------------------- 1 | .mainbody { 2 | background:#f0f0f0; 3 | } 4 | /* Special class on .container surrounding .navbar, used for positioning it into place. */ 5 | .navbar-wrapper { 6 | position: fixed; 7 | top: 0; 8 | left: 0; 9 | right: 0; 10 | z-index: 20; 11 | margin-left: -15px; 12 | margin-right: -15px; 13 | //background-color:#1C3B47; 14 | } 15 | .navbar-custom { 16 | background-color: #1C3B47; 17 | border-color: #E7E7E7; 18 | 19 | } 20 | 21 | /* Flip around the padding for proper display in narrow viewports */ 22 | .navbar-wrapper .container { 23 | padding-left: 0; 24 | padding-right: 0; 25 | } 26 | .navbar-wrapper .navbar { 27 | padding-left: 15px; 28 | padding-right: 15px; 29 | } 30 | 31 | .navbar-content 32 | { 33 | width:320px; 34 | padding: 15px; 35 | padding-bottom:0px; 36 | } 37 | .navbar-content:before, .navbar-content:after 38 | { 39 | display: table; 40 | content: ""; 41 | line-height: 0; 42 | } 43 | .navbar-nav.navbar-right:last-child { 44 | margin-right: 15px !important; 45 | } 46 | .navbar-footer 47 | { 48 | background-color:#DDD; 49 | } 50 | .navbar-brand,.navbar-toggle,.brand_network{ 51 | color: #FFFFFF; 52 | font-weight: bold; 53 | 54 | } 55 | .navbar-custom .navbar-nav > li > a { 56 | color:#FFFFFF; 57 | font-weight: bold; 58 | } 59 | .navbar-custom .navbar-toggle{ 60 | color: #f57900; 61 | background: #f57900; 62 | } 63 | .navbar-footer-content { padding:15px 15px 15px 15px; } 64 | .dropdown-menu { 65 | padding: 0px; 66 | overflow: hidden; 67 | } 68 | 69 | .brand_network { 70 | color: #9D9D9D; 71 | float: left; 72 | position: absolute; 73 | left: 70px; 74 | top: 30px; 75 | font-size: smaller; 76 | } 77 | 78 | .post-content { 79 | margin-left:58px; 80 | } 81 | 82 | .badge-important { 83 | margin-top: 3px; 84 | margin-left: 25px; 85 | position: absolute; 86 | } 87 | 88 | body { 89 | background-color: #e8e8e8; 90 | } 91 | //contact forms 92 | 93 | .container { 94 | max-width:700px; 95 | width:100%; 96 | margin:0 auto; 97 | position:relative; 98 | } 99 | 100 | #contact input[type="text"], #contact input[type="email"], #contact input[type="tel"], #contact input[type="url"], #contact textarea, #contact button[type="submit"] { font:400 12px/16px "Open Sans", Helvetica, Arial, sans-serif; } 101 | 102 | #contact,#technologies,#about { 103 | background:#F9F9F9; 104 | padding:25px; 105 | margin:50px 0; 106 | } 107 | 108 | #contact h3,#technologies h3,#about h3 { 109 | color: #F96; 110 | display: block; 111 | font-size: 30px; 112 | font-weight: 400; 113 | } 114 | 115 | #contact h4,#technologies h4,#about h4 { 116 | margin:5px 0 15px; 117 | display:block; 118 | font-size:13px; 119 | } 120 | 121 | fieldset { 122 | border: medium none !important; 123 | margin: 0 0 10px; 124 | min-width: 100%; 125 | padding: 0; 126 | width: 100%; 127 | } 128 | 129 | #contact input[type="text"], #contact input[type="email"], #contact input[type="tel"], #contact input[type="url"], #contact textarea { 130 | width:100%; 131 | border:1px solid #CCC; 132 | background:#FFF; 133 | margin:0 0 5px; 134 | padding:10px; 135 | } 136 | 137 | #contact input[type="text"]:hover, #contact input[type="email"]:hover, #contact input[type="tel"]:hover, #contact input[type="url"]:hover, #contact textarea:hover { 138 | -webkit-transition:border-color 0.3s ease-in-out; 139 | -moz-transition:border-color 0.3s ease-in-out; 140 | transition:border-color 0.3s ease-in-out; 141 | border:1px solid #AAA; 142 | } 143 | 144 | #contact textarea { 145 | height:100px; 146 | max-width:100%; 147 | resize:none; 148 | } 149 | 150 | #contact button[type="submit"] { 151 | cursor:pointer; 152 | width:100%; 153 | border:none; 154 | background:#0CF; 155 | color:#FFF; 156 | margin:0 0 5px; 157 | padding:10px; 158 | font-size:15px; 159 | } 160 | 161 | #contact button[type="submit"]:hover { 162 | background:#09C; 163 | -webkit-transition:background 0.3s ease-in-out; 164 | -moz-transition:background 0.3s ease-in-out; 165 | transition:background-color 0.3s ease-in-out; 166 | } 167 | 168 | #contact button[type="submit"]:active { box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.5); } 169 | 170 | #contact input:focus, #contact textarea:focus { 171 | outline:0; 172 | border:1px solid #999; 173 | } 174 | ::-webkit-input-placeholder { 175 | color:#888; 176 | } 177 | :-moz-placeholder { 178 | color:#888; 179 | } 180 | ::-moz-placeholder { 181 | color:#888; 182 | } 183 | :-ms-input-placeholder { 184 | color:#888; 185 | } 186 | blockquote{ 187 | display:block; 188 | background: #fff; 189 | padding: 15px 20px 15px 45px; 190 | margin: 0 0 20px; 191 | position: relative; 192 | 193 | /*Font*/ 194 | font-family: Georgia, serif; 195 | font-size: 16px; 196 | line-height: 1.2; 197 | color: #666; 198 | text-align: justify; 199 | 200 | /*Borders - (Optional)*/ 201 | border-left: 15px solid #c76c0c; 202 | border-right: 2px solid #c76c0c; 203 | 204 | /*Box Shadow - (Optional)*/ 205 | -moz-box-shadow: 2px 2px 15px #ccc; 206 | -webkit-box-shadow: 2px 2px 15px #ccc; 207 | box-shadow: 2px 2px 15px #ccc; 208 | } 209 | 210 | blockquote::before{ 211 | //content: "\201C"; /*Unicode for Left Double Quote*/ 212 | 213 | /*Font*/ 214 | font-family: Verdana,sans-serif; 215 | font-size: 60px; 216 | font-weight: bold; 217 | color: #1C3B47; 218 | 219 | /*Positioning*/ 220 | position: absolute; 221 | left: 25px; 222 | top:5px; 223 | } 224 | 225 | blockquote::after{ 226 | /*Reset to make sure*/ 227 | content: ""; 228 | } 229 | 230 | blockquote a{ 231 | text-decoration: none; 232 | background: #eee; 233 | cursor: pointer; 234 | padding: 0 4px; 235 | color: #c76c0c; 236 | } 237 | 238 | blockquote a:hover{ 239 | color: #1C3B47; 240 | } 241 | 242 | blockquote em{ 243 | font-style: italic; 244 | } -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/main/webapp/resources/css/w3.css: -------------------------------------------------------------------------------- 1 | /* W3.CSS 4.06 November 2017 by Jan Egil and Borge Refsnes */ 2 | html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} 3 | /* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ 4 | html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} 5 | article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block} 6 | audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} 7 | audio:not([controls]){display:none;height:0}[hidden],template{display:none} 8 | a{background-color:transparent;-webkit-text-decoration-skip:objects} 9 | a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} 10 | dfn{font-style:italic}mark{background:#ff0;color:#000} 11 | small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} 12 | sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}svg:not(:root){overflow:hidden} 13 | code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} 14 | button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold} 15 | button,input{overflow:visible}button,select{text-transform:none} 16 | button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button} 17 | button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner{border-style:none;padding:0} 18 | button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring{outline:1px dotted ButtonText} 19 | fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} 20 | legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} 21 | [type=checkbox],[type=radio]{padding:0} 22 | [type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} 23 | [type=search]{-webkit-appearance:textfield;outline-offset:-2px} 24 | [type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none} 25 | ::-webkit-input-placeholder{color:inherit;opacity:0.54} 26 | ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} 27 | /* End extract */ 28 | html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden} 29 | h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.w3-serif{font-family:serif} 30 | h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.w3-wide{letter-spacing:4px} 31 | hr{border:0;border-top:1px solid #eee;margin:20px 0} 32 | .w3-image{max-width:100%;height:auto}img{margin-bottom:-5px}a{color:inherit} 33 | .w3-table,.w3-table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.w3-table-all{border:1px solid #ccc} 34 | .w3-bordered tr,.w3-table-all tr{border-bottom:1px solid #ddd}.w3-striped tbody tr:nth-child(even){background-color:#f1f1f1} 35 | .w3-table-all tr:nth-child(odd){background-color:#fff}.w3-table-all tr:nth-child(even){background-color:#f1f1f1} 36 | .w3-hoverable tbody tr:hover,.w3-ul.w3-hoverable li:hover{background-color:#ccc}.w3-centered tr th,.w3-centered tr td{text-align:center} 37 | .w3-table td,.w3-table th,.w3-table-all td,.w3-table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} 38 | .w3-table th:first-child,.w3-table td:first-child,.w3-table-all th:first-child,.w3-table-all td:first-child{padding-left:16px} 39 | .w3-btn,.w3-button{border:none;display:inline-block;outline:0;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} 40 | .w3-btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)} 41 | .w3-btn,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} 42 | .w3-disabled,.w3-btn:disabled,.w3-button:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none} 43 | .w3-btn.w3-disabled:hover,.w3-btn:disabled:hover{box-shadow:none} 44 | .w3-badge,.w3-tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.w3-badge{border-radius:50%} 45 | .w3-ul{list-style-type:none;padding:0;margin:0}.w3-ul li{padding:8px 16px;border-bottom:1px solid #ddd}.w3-ul li:last-child{border-bottom:none} 46 | .w3-tooltip,.w3-display-container{position:relative}.w3-tooltip .w3-text{display:none}.w3-tooltip:hover .w3-text{display:inline-block} 47 | .w3-ripple:active{opacity:0.5}.w3-ripple{transition:opacity 0s} 48 | .w3-input{padding:8px;display:block;border:none;border-bottom:1px solid #ccc;width:100%} 49 | .w3-select{padding:9px 0;width:100%;border:none;border-bottom:1px solid #ccc} 50 | .w3-dropdown-click,.w3-dropdown-hover{position:relative;display:inline-block;cursor:pointer} 51 | .w3-dropdown-hover:hover .w3-dropdown-content{display:block;z-index:1} 52 | .w3-dropdown-hover:first-child,.w3-dropdown-click:hover{background-color:#ccc;color:#000} 53 | .w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000} 54 | .w3-dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0} 55 | .w3-check,.w3-radio{width:24px;height:24px;position:relative;top:6px} 56 | .w3-sidebar{height:100%;width:200px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} 57 | .w3-bar-block .w3-dropdown-hover,.w3-bar-block .w3-dropdown-click{width:100%} 58 | .w3-bar-block .w3-dropdown-hover .w3-dropdown-content,.w3-bar-block .w3-dropdown-click .w3-dropdown-content{min-width:100%} 59 | .w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;padding:8px 16px} 60 | .w3-main,#main{transition:margin-left .4s} 61 | .w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} 62 | .w3-modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} 63 | .w3-bar{width:100%;overflow:hidden}.w3-center .w3-bar{display:inline-block;width:auto} 64 | .w3-bar .w3-bar-item{padding:8px 16px;float:left;width:auto;border:none;outline:none;display:block} 65 | .w3-bar .w3-dropdown-hover,.w3-bar .w3-dropdown-click{position:static;float:left} 66 | .w3-bar .w3-button{white-space:normal} 67 | .w3-bar-block .w3-bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;outline:none;white-space:normal;float:none} 68 | .w3-bar-block.w3-center .w3-bar-item{text-align:center}.w3-block{display:block;width:100%} 69 | .w3-responsive{display:block;overflow-x:auto} 70 | .w3-container:after,.w3-container:before,.w3-panel:after,.w3-panel:before,.w3-row:after,.w3-row:before,.w3-row-padding:after,.w3-row-padding:before, 71 | .w3-cell-row:before,.w3-cell-row:after,.w3-clear:after,.w3-clear:before,.w3-bar:before,.w3-bar:after{content:"";display:table;clear:both} 72 | .w3-col,.w3-half,.w3-third,.w3-twothird,.w3-threequarter,.w3-quarter{float:left;width:100%} 73 | .w3-col.s1{width:8.33333%}.w3-col.s2{width:16.66666%}.w3-col.s3{width:24.99999%}.w3-col.s4{width:33.33333%} 74 | .w3-col.s5{width:41.66666%}.w3-col.s6{width:49.99999%}.w3-col.s7{width:58.33333%}.w3-col.s8{width:66.66666%} 75 | .w3-col.s9{width:74.99999%}.w3-col.s10{width:83.33333%}.w3-col.s11{width:91.66666%}.w3-col.s12{width:99.99999%} 76 | @media (min-width:601px){.w3-col.m1{width:8.33333%}.w3-col.m2{width:16.66666%}.w3-col.m3,.w3-quarter{width:24.99999%}.w3-col.m4,.w3-third{width:33.33333%} 77 | .w3-col.m5{width:41.66666%}.w3-col.m6,.w3-half{width:49.99999%}.w3-col.m7{width:58.33333%}.w3-col.m8,.w3-twothird{width:66.66666%} 78 | .w3-col.m9,.w3-threequarter{width:74.99999%}.w3-col.m10{width:83.33333%}.w3-col.m11{width:91.66666%}.w3-col.m12{width:99.99999%}} 79 | @media (min-width:993px){.w3-col.l1{width:8.33333%}.w3-col.l2{width:16.66666%}.w3-col.l3{width:24.99999%}.w3-col.l4{width:33.33333%} 80 | .w3-col.l5{width:41.66666%}.w3-col.l6{width:49.99999%}.w3-col.l7{width:58.33333%}.w3-col.l8{width:66.66666%} 81 | .w3-col.l9{width:74.99999%}.w3-col.l10{width:83.33333%}.w3-col.l11{width:91.66666%}.w3-col.l12{width:99.99999%}} 82 | .w3-content{max-width:980px;margin:auto}.w3-rest{overflow:hidden} 83 | .w3-cell-row{display:table;width:100%}.w3-cell{display:table-cell} 84 | .w3-cell-top{vertical-align:top}.w3-cell-middle{vertical-align:middle}.w3-cell-bottom{vertical-align:bottom} 85 | .w3-hide{display:none!important}.w3-show-block,.w3-show{display:block!important}.w3-show-inline-block{display:inline-block!important} 86 | @media (max-width:600px){.w3-modal-content{margin:0 10px;width:auto!important}.w3-modal{padding-top:30px} 87 | .w3-dropdown-hover.w3-mobile .w3-dropdown-content,.w3-dropdown-click.w3-mobile .w3-dropdown-content{position:relative} 88 | .w3-hide-small{display:none!important}.w3-mobile{display:block;width:100%!important}.w3-bar-item.w3-mobile,.w3-dropdown-hover.w3-mobile,.w3-dropdown-click.w3-mobile{text-align:center} 89 | .w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}} 90 | @media (max-width:768px){.w3-modal-content{width:500px}.w3-modal{padding-top:50px}} 91 | @media (min-width:993px){.w3-modal-content{width:900px}.w3-hide-large{display:none!important}.w3-sidebar.w3-collapse{display:block!important}} 92 | @media (max-width:992px) and (min-width:601px){.w3-hide-medium{display:none!important}} 93 | @media (max-width:992px){.w3-sidebar.w3-collapse{display:none}.w3-main{margin-left:0!important;margin-right:0!important}} 94 | .w3-top,.w3-bottom{position:fixed;width:100%;z-index:1}.w3-top{top:0}.w3-bottom{bottom:0} 95 | .w3-overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} 96 | .w3-display-topleft{position:absolute;left:0;top:0}.w3-display-topright{position:absolute;right:0;top:0} 97 | .w3-display-bottomleft{position:absolute;left:0;bottom:0}.w3-display-bottomright{position:absolute;right:0;bottom:0} 98 | .w3-display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} 99 | .w3-display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} 100 | .w3-display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} 101 | .w3-display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 102 | .w3-display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 103 | .w3-display-container:hover .w3-display-hover{display:block}.w3-display-container:hover span.w3-display-hover{display:inline-block}.w3-display-hover{display:none} 104 | .w3-display-position{position:absolute} 105 | .w3-circle{border-radius:50%} 106 | .w3-round-small{border-radius:2px}.w3-round,.w3-round-medium{border-radius:4px}.w3-round-large{border-radius:8px}.w3-round-xlarge{border-radius:16px}.w3-round-xxlarge{border-radius:32px} 107 | .w3-row-padding,.w3-row-padding>.w3-half,.w3-row-padding>.w3-third,.w3-row-padding>.w3-twothird,.w3-row-padding>.w3-threequarter,.w3-row-padding>.w3-quarter,.w3-row-padding>.w3-col{padding:0 8px} 108 | .w3-container,.w3-panel{padding:0.01em 16px}.w3-panel{margin-top:16px;margin-bottom:16px} 109 | .w3-code,.w3-codespan{font-family:Consolas,"courier new";font-size:16px} 110 | .w3-code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} 111 | .w3-codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} 112 | .w3-card,.w3-card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)} 113 | .w3-card-4,.w3-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} 114 | .w3-spin{animation:w3-spin 2s infinite linear}@keyframes w3-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} 115 | .w3-animate-fading{animation:fading 10s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} 116 | .w3-animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} 117 | .w3-animate-top{position:relative;animation:animatetop 0.4s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} 118 | .w3-animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} 119 | .w3-animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} 120 | .w3-animate-bottom{position:relative;animation:animatebottom 0.4s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} 121 | .w3-animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} 122 | .w3-animate-input{transition:width 0.4s ease-in-out}.w3-animate-input:focus{width:100%!important} 123 | .w3-opacity,.w3-hover-opacity:hover{opacity:0.60}.w3-opacity-off,.w3-hover-opacity-off:hover{opacity:1} 124 | .w3-opacity-max{opacity:0.25}.w3-opacity-min{opacity:0.75} 125 | .w3-greyscale-max,.w3-grayscale-max,.w3-hover-greyscale:hover,.w3-hover-grayscale:hover{filter:grayscale(100%)} 126 | .w3-greyscale,.w3-grayscale{filter:grayscale(75%)}.w3-greyscale-min,.w3-grayscale-min{filter:grayscale(50%)} 127 | .w3-sepia{filter:sepia(75%)}.w3-sepia-max,.w3-hover-sepia:hover{filter:sepia(100%)}.w3-sepia-min{filter:sepia(50%)} 128 | .w3-tiny{font-size:10px!important}.w3-small{font-size:12px!important}.w3-medium{font-size:15px!important}.w3-large{font-size:18px!important} 129 | .w3-xlarge{font-size:24px!important}.w3-xxlarge{font-size:36px!important}.w3-xxxlarge{font-size:48px!important}.w3-jumbo{font-size:64px!important} 130 | .w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}.w3-justify{text-align:justify!important}.w3-center{text-align:center!important} 131 | .w3-border-0{border:0!important}.w3-border{border:1px solid #ccc!important} 132 | .w3-border-top{border-top:1px solid #ccc!important}.w3-border-bottom{border-bottom:1px solid #ccc!important} 133 | .w3-border-left{border-left:1px solid #ccc!important}.w3-border-right{border-right:1px solid #ccc!important} 134 | .w3-topbar{border-top:6px solid #ccc!important}.w3-bottombar{border-bottom:6px solid #ccc!important} 135 | .w3-leftbar{border-left:6px solid #ccc!important}.w3-rightbar{border-right:6px solid #ccc!important} 136 | .w3-section,.w3-code{margin-top:16px!important;margin-bottom:16px!important} 137 | .w3-margin{margin:16px!important}.w3-margin-top{margin-top:16px!important}.w3-margin-bottom{margin-bottom:16px!important} 138 | .w3-margin-left{margin-left:16px!important}.w3-margin-right{margin-right:16px!important} 139 | .w3-padding-small{padding:4px 8px!important}.w3-padding{padding:8px 16px 8px 50px}.w3-padding-large{padding:12px 24px!important} 140 | .w3-padding-16{padding-top:16px!important;padding-bottom:16px!important}.w3-padding-24{padding-top:24px!important;padding-bottom:24px!important} 141 | .w3-padding-32{padding-top:32px!important;padding-bottom:32px!important}.w3-padding-48{padding-top:48px!important;padding-bottom:48px!important} 142 | .w3-padding-64{padding-top:64px!important;padding-bottom:64px!important} 143 | .w3-left{float:left!important}.w3-right{float:right!important} 144 | .w3-button:hover{color:#000!important;background-color:#ccc!important} 145 | .w3-transparent,.w3-hover-none:hover{background-color:transparent!important} 146 | .w3-hover-none:hover{box-shadow:none!important} 147 | /* Colors */ 148 | .w3-amber,.w3-hover-amber:hover{color:#000!important;background-color:#ffc107!important} 149 | .w3-aqua,.w3-hover-aqua:hover{color:#000!important;background-color:#00ffff!important} 150 | .w3-blue,.w3-hover-blue:hover{color:#fff!important;background-color:#2196F3!important} 151 | .w3-light-blue,.w3-hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} 152 | .w3-brown,.w3-hover-brown:hover{color:#fff!important;background-color:#795548!important} 153 | .w3-cyan,.w3-hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} 154 | .w3-blue-grey,.w3-hover-blue-grey:hover,.w3-blue-gray,.w3-hover-blue-gray:hover{color:#fff!important;background-color:#607d8b!important} 155 | .w3-green,.w3-hover-green:hover{color:#fff!important;background-color:#4CAF50!important} 156 | .w3-light-green,.w3-hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} 157 | .w3-indigo,.w3-hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} 158 | .w3-khaki,.w3-hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} 159 | .w3-lime,.w3-hover-lime:hover{color:#000!important;background-color:#cddc39!important} 160 | .w3-orange,.w3-hover-orange:hover{color:#000!important;background-color:#ff9800!important} 161 | .w3-deep-orange,.w3-hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} 162 | .w3-pink,.w3-hover-pink:hover{color:#fff!important;background-color:#e91e63!important} 163 | .w3-purple,.w3-hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} 164 | .w3-deep-purple,.w3-hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} 165 | .w3-red,.w3-hover-red:hover{color:#fff!important;background-color:#f44336!important} 166 | .w3-sand,.w3-hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} 167 | .w3-teal,.w3-hover-teal:hover{color:#fff!important;background-color:#009688!important} 168 | .w3-yellow,.w3-hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} 169 | .w3-white,.w3-hover-white:hover{color:#000!important;background-color:#fff!important} 170 | .w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important} 171 | .w3-grey,.w3-hover-grey:hover,.w3-gray,.w3-hover-gray:hover{color:#000!important;background-color:#9e9e9e!important} 172 | .w3-light-grey,.w3-hover-light-grey:hover,.w3-light-gray,.w3-hover-light-gray:hover{color:#000!important;background-color:#f1f1f1!important} 173 | .w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important} 174 | .w3-pale-red,.w3-hover-pale-red:hover{color:#000!important;background-color:#ffdddd!important} 175 | .w3-pale-green,.w3-hover-pale-green:hover{color:#000!important;background-color:#ddffdd!important} 176 | .w3-pale-yellow,.w3-hover-pale-yellow:hover{color:#000!important;background-color:#ffffcc!important} 177 | .w3-pale-blue,.w3-hover-pale-blue:hover{color:#000!important;background-color:#ddffff!important} 178 | .w3-text-amber,.w3-hover-text-amber:hover{color:#ffc107!important} 179 | .w3-text-aqua,.w3-hover-text-aqua:hover{color:#00ffff!important} 180 | .w3-text-blue,.w3-hover-text-blue:hover{color:#2196F3!important} 181 | .w3-text-light-blue,.w3-hover-text-light-blue:hover{color:#87CEEB!important} 182 | .w3-text-brown,.w3-hover-text-brown:hover{color:#795548!important} 183 | .w3-text-cyan,.w3-hover-text-cyan:hover{color:#00bcd4!important} 184 | .w3-text-blue-grey,.w3-hover-text-blue-grey:hover,.w3-text-blue-gray,.w3-hover-text-blue-gray:hover{color:#607d8b!important} 185 | .w3-text-green,.w3-hover-text-green:hover{color:#4CAF50!important} 186 | .w3-text-light-green,.w3-hover-text-light-green:hover{color:#8bc34a!important} 187 | .w3-text-indigo,.w3-hover-text-indigo:hover{color:#3f51b5!important} 188 | .w3-text-khaki,.w3-hover-text-khaki:hover{color:#b4aa50!important} 189 | .w3-text-lime,.w3-hover-text-lime:hover{color:#cddc39!important} 190 | .w3-text-orange,.w3-hover-text-orange:hover{color:#ff9800!important} 191 | .w3-text-deep-orange,.w3-hover-text-deep-orange:hover{color:#ff5722!important} 192 | .w3-text-pink,.w3-hover-text-pink:hover{color:#e91e63!important} 193 | .w3-text-purple,.w3-hover-text-purple:hover{color:#9c27b0!important} 194 | .w3-text-deep-purple,.w3-hover-text-deep-purple:hover{color:#673ab7!important} 195 | .w3-text-red,.w3-hover-text-red:hover{color:#f44336!important} 196 | .w3-text-sand,.w3-hover-text-sand:hover{color:#fdf5e6!important} 197 | .w3-text-teal,.w3-hover-text-teal:hover{color:#009688!important} 198 | .w3-text-yellow,.w3-hover-text-yellow:hover{color:#d2be0e!important} 199 | .w3-text-white,.w3-hover-text-white:hover{color:#fff!important} 200 | .w3-text-black,.w3-hover-text-black:hover{color:#000!important} 201 | .w3-text-grey,.w3-hover-text-grey:hover,.w3-text-gray,.w3-hover-text-gray:hover{color:#757575!important} 202 | .w3-text-light-grey,.w3-hover-text-light-grey:hover,.w3-text-light-gray,.w3-hover-text-light-gray:hover{color:#f1f1f1!important} 203 | .w3-text-dark-grey,.w3-hover-text-dark-grey:hover,.w3-text-dark-gray,.w3-hover-text-dark-gray:hover{color:#3a3a3a!important} 204 | .w3-border-amber,.w3-hover-border-amber:hover{border-color:#ffc107!important} 205 | .w3-border-aqua,.w3-hover-border-aqua:hover{border-color:#00ffff!important} 206 | .w3-border-blue,.w3-hover-border-blue:hover{border-color:#2196F3!important} 207 | .w3-border-light-blue,.w3-hover-border-light-blue:hover{border-color:#87CEEB!important} 208 | .w3-border-brown,.w3-hover-border-brown:hover{border-color:#795548!important} 209 | .w3-border-cyan,.w3-hover-border-cyan:hover{border-color:#00bcd4!important} 210 | .w3-border-blue-grey,.w3-hover-border-blue-grey:hover,.w3-border-blue-gray,.w3-hover-border-blue-gray:hover{border-color:#607d8b!important} 211 | .w3-border-green,.w3-hover-border-green:hover{border-color:#4CAF50!important} 212 | .w3-border-light-green,.w3-hover-border-light-green:hover{border-color:#8bc34a!important} 213 | .w3-border-indigo,.w3-hover-border-indigo:hover{border-color:#3f51b5!important} 214 | .w3-border-khaki,.w3-hover-border-khaki:hover{border-color:#f0e68c!important} 215 | .w3-border-lime,.w3-hover-border-lime:hover{border-color:#cddc39!important} 216 | .w3-border-orange,.w3-hover-border-orange:hover{border-color:#ff9800!important} 217 | .w3-border-deep-orange,.w3-hover-border-deep-orange:hover{border-color:#ff5722!important} 218 | .w3-border-pink,.w3-hover-border-pink:hover{border-color:#e91e63!important} 219 | .w3-border-purple,.w3-hover-border-purple:hover{border-color:#9c27b0!important} 220 | .w3-border-deep-purple,.w3-hover-border-deep-purple:hover{border-color:#673ab7!important} 221 | .w3-border-red,.w3-hover-border-red:hover{border-color:#f44336!important} 222 | .w3-border-sand,.w3-hover-border-sand:hover{border-color:#fdf5e6!important} 223 | .w3-border-teal,.w3-hover-border-teal:hover{border-color:#009688!important} 224 | .w3-border-yellow,.w3-hover-border-yellow:hover{border-color:#ffeb3b!important} 225 | .w3-border-white,.w3-hover-border-white:hover{border-color:#fff!important} 226 | .w3-border-black,.w3-hover-border-black:hover{border-color:#000!important} 227 | .w3-border-grey,.w3-hover-border-grey:hover,.w3-border-gray,.w3-hover-border-gray:hover{border-color:#9e9e9e!important} 228 | .w3-border-light-grey,.w3-hover-border-light-grey:hover,.w3-border-light-gray,.w3-hover-border-light-gray:hover{border-color:#f1f1f1!important} 229 | .w3-border-dark-grey,.w3-hover-border-dark-grey:hover,.w3-border-dark-gray,.w3-hover-border-dark-gray:hover{border-color:#616161!important} 230 | .w3-border-pale-red,.w3-hover-border-pale-red:hover{border-color:#ffe7e7!important}.w3-border-pale-green,.w3-hover-border-pale-green:hover{border-color:#e7ffe7!important} 231 | .w3-border-pale-yellow,.w3-hover-border-pale-yellow:hover{border-color:#ffffcc!important}.w3-border-pale-blue,.w3-hover-border-pale-blue:hover{border-color:#e7ffff!important} -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/test/java/com/visualpathit/account/controllerTest/SampleTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.controllerTest; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import org.junit.Test; 6 | 7 | public class SampleTest { 8 | @Test 9 | public void SampleTestHappyFlow(){ 10 | assertEquals("Hello".length(), 5); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/test/java/com/visualpathit/account/controllerTest/UserControllerTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.controllerTest; 2 | 3 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; 4 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; 5 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl; 6 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; 7 | import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; 8 | 9 | import org.junit.Before; 10 | import org.junit.Test; 11 | import org.mockito.InjectMocks; 12 | import org.mockito.Mock; 13 | import org.mockito.MockitoAnnotations; 14 | import org.springframework.test.web.servlet.MockMvc; 15 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 16 | 17 | import com.visualpathit.account.controller.UserController; 18 | import com.visualpathit.account.model.User; 19 | import com.visualpathit.account.service.UserService; 20 | import com.visualpathit.account.setup.StandaloneMvcTestViewResolver; 21 | 22 | 23 | public class UserControllerTest { 24 | 25 | @Mock 26 | private UserService controllerSer; 27 | @InjectMocks 28 | private UserController controller; 29 | private MockMvc mockMvc; 30 | 31 | @Before 32 | public void setup(){ 33 | MockitoAnnotations.initMocks(this); 34 | 35 | /*InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); 36 | viewResolver.setPrefix("/WEB-INF/views/"); 37 | viewResolver.setSuffix(".jsp"); 38 | */ 39 | mockMvc = MockMvcBuilders.standaloneSetup(controller) 40 | .setViewResolvers(new StandaloneMvcTestViewResolver()).build(); 41 | } 42 | 43 | @Test 44 | public void registrationTestforHappyFlow() throws Exception{ 45 | User user = new User(); 46 | mockMvc.perform(get("/registration")) 47 | .andExpect(status().isOk()) 48 | .andExpect(view().name("registration")) 49 | .andExpect(forwardedUrl("registration")); 50 | 51 | } 52 | @Test 53 | public void registrationTestforNullValueHappyFlow() throws Exception{ 54 | mockMvc.perform(get("/registration")) 55 | .andExpect(status().isOk()) 56 | .andExpect(view().name("registration")) 57 | .andExpect(forwardedUrl("registration")); 58 | 59 | } 60 | /*@Test 61 | public void registrationTestforPostValueHappyFlow() throws Exception{ 62 | String description =new String("Error String"); 63 | UserValidator userValidator; 64 | BindingResult bindingResult; 65 | when(userValidator.validate(new User(),bindingResult)) 66 | .thenThrow(bindingResult.hasErrors()); 67 | mockMvc.perform(post("/registration").contentType(MediaType.APPLICATION_FORM_URLENCODED) 68 | .param("userForm","userForm")) 69 | 70 | .andExpect(status().isOk()); 71 | //.andExpect(view().name("redirect:/welcome")) 72 | //.andExpect(forwardedUrl("redirect:/welcome")); 73 | 74 | }*/ 75 | @Test 76 | public void loginTestHappyFlow() throws Exception{ 77 | String error = "Your username and password is invalid"; 78 | mockMvc.perform(get("/login").param(error, error)) 79 | .andExpect(status().isOk()) 80 | .andExpect(view().name("login")) 81 | .andExpect(forwardedUrl("login")); 82 | 83 | } 84 | @Test 85 | public void welcomeTestHappyFlow() throws Exception{ 86 | mockMvc.perform(get("/welcome")) 87 | .andExpect(status().isOk()) 88 | .andExpect(view().name("welcome")) 89 | .andExpect(forwardedUrl("welcome")); 90 | 91 | } 92 | @Test 93 | public void welcomeAfterDirectLoginTestHappyFlow() throws Exception{ 94 | mockMvc.perform(get("/")) 95 | .andExpect(status().isOk()) 96 | .andExpect(view().name("welcome")) 97 | .andExpect(forwardedUrl("welcome")); 98 | 99 | } 100 | @Test 101 | public void indexTestHappyFlow() throws Exception{ 102 | mockMvc.perform(get("/index")) 103 | .andExpect(status().isOk()) 104 | .andExpect(view().name("index_home")) 105 | .andExpect(forwardedUrl("index_home")); 106 | 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/test/java/com/visualpathit/account/modelTest/RoleTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.modelTest; 2 | 3 | import junit.framework.Assert; 4 | 5 | import java.util.HashSet; 6 | import java.util.Set; 7 | 8 | import org.junit.After; 9 | import org.junit.Before; 10 | import org.junit.Test; 11 | 12 | import com.visualpathit.account.model.Role; 13 | import com.visualpathit.account.model.User; 14 | 15 | /** {@author waheedk} !*/ 16 | public class RoleTest { 17 | 18 | public static final Long EXPECTED_ID = 1L; 19 | public static final String EXPECTED_ROLENAME = "Admin"; 20 | public static final int EXPECTED_SIZE = 1; 21 | private Role role; 22 | @Before 23 | public void setUp() throws Exception { 24 | User user = new User(); 25 | user.setId(1L); 26 | user.setUsername("Wahidkhan74"); 27 | user.setPassword("Wahidkhan74"); 28 | user.setUserEmail("XXXXX@gmail.com"); 29 | 30 | Set users = new HashSet(); 31 | users.add(user); 32 | role = new Role(); 33 | role.setId(1L); 34 | role.setName("Admin"); 35 | role.setUsers(users); 36 | } 37 | 38 | @After 39 | public void tearDown() throws Exception { 40 | System.out.println("Test Completed"); 41 | 42 | } 43 | 44 | @Test 45 | public void testUserDetailsHappyFlow() throws Exception { 46 | Assert.assertEquals(EXPECTED_ID, role.getId()); 47 | Assert.assertEquals(EXPECTED_ROLENAME, role.getName()); 48 | Assert.assertEquals(EXPECTED_SIZE,role.getUsers().size()); 49 | 50 | } 51 | } -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/test/java/com/visualpathit/account/modelTest/UserTest.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.modelTest; 2 | 3 | import junit.framework.Assert; 4 | 5 | import java.util.HashSet; 6 | import java.util.Set; 7 | 8 | import org.junit.After; 9 | import org.junit.Before; 10 | import org.junit.Test; 11 | 12 | import com.visualpathit.account.model.Role; 13 | import com.visualpathit.account.model.User; 14 | 15 | /** {@author waheedk} !*/ 16 | public class UserTest { 17 | 18 | public static final Long EXPECTED_ID = 1L; 19 | public static final int EXPECTED_SIZE = 1; 20 | public static final String EXPECTED_USERNAME = "Wahidkhan74"; 21 | public static final String EXPECTED_PASSWD = "Wahidkhan74"; 22 | public static final String EXPECTED_USEREMAIL = "XXXXX@gmail.com"; 23 | private User user; 24 | @Before 25 | public void setUp() throws Exception { 26 | 27 | Role role = new Role(); 28 | role.setId(1L); 29 | role.setName("Admin"); 30 | Set roles = new HashSet(); 31 | roles.add(role); 32 | 33 | user = new User(); 34 | user.setId(1L); 35 | user.setUsername("Wahidkhan74"); 36 | user.setPassword("Wahidkhan74"); 37 | user.setUserEmail("XXXXX@gmail.com"); 38 | user.setRoles(roles); 39 | } 40 | 41 | @After 42 | public void tearDown() throws Exception { 43 | System.out.println("Test Completed"); 44 | 45 | } 46 | 47 | @Test 48 | public void testUserDetailsHappyFlow() throws Exception { 49 | Assert.assertEquals(EXPECTED_ID, user.getId()); 50 | Assert.assertEquals(EXPECTED_USERNAME, user.getUsername()); 51 | Assert.assertEquals(EXPECTED_PASSWD, user.getPassword()); 52 | Assert.assertEquals(EXPECTED_USEREMAIL, user.getUserEmail()); 53 | Assert.assertEquals(EXPECTED_SIZE,user.getRoles().size()); 54 | 55 | } 56 | } -------------------------------------------------------------------------------- /Project 4 - Rearchitecting Web Application on AWS Cloud/src/test/java/com/visualpathit/account/setup/StandaloneMvcTestViewResolver.java: -------------------------------------------------------------------------------- 1 | package com.visualpathit.account.setup; 2 | 3 | import org.springframework.web.servlet.view.AbstractUrlBasedView; 4 | import org.springframework.web.servlet.view.InternalResourceView; 5 | import org.springframework.web.servlet.view.InternalResourceViewResolver; 6 | 7 | public class StandaloneMvcTestViewResolver extends InternalResourceViewResolver { 8 | 9 | public StandaloneMvcTestViewResolver() { 10 | super(); 11 | } 12 | 13 | @Override 14 | protected AbstractUrlBasedView buildView(final String viewName) throws Exception { 15 | final InternalResourceView view = (InternalResourceView) super.buildView(viewName); 16 | // prevent checking for circular view paths 17 | view.setPreventDispatchLoop(false); 18 | return view; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Project 5 - Jenkins Installation/Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | stages { 4 | stage('Fetch code') { 5 | steps { 6 | git branch: 'paac', url: 'https://github.com/devopshydclub/vprofile-project.git' 7 | } 8 | } 9 | stage('Build') { 10 | steps { 11 | sh 'mvn install' 12 | } 13 | } 14 | stage('Test') { 15 | steps { 16 | sh 'mvn test' 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | ${SNAP_REPO} 9 | ${NEXUS_USER} 10 | ${NEXUS_PASS} 11 | 12 | 13 | ${RELEASE_REPO} 14 | ${NEXUS_USER} 15 | ${NEXUS_PASS} 16 | 17 | 18 | ${CENTRAL_REPO} 19 | ${NEXUS_USER} 20 | ${NEXUS_PASS} 21 | 22 | 23 | ${NEXUS_GRP_REPO} 24 | ${NEXUS_USER} 25 | ${NEXUS_PASS} 26 | 27 | 28 | 29 | 30 | 31 | ${CENTRAL_REPO} 32 | ${CENTRAL_REPO} 33 | http://${NEXUSIP}:${NEXUSPORT}/repository/${NEXUS_GRP_REPO}/ 34 | * 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/accountsdb.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) 2 | -- 3 | -- Host: localhost Database: accounts 4 | -- ------------------------------------------------------ 5 | -- Server version 5.7.18-0ubuntu0.16.10.1 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `role` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `role`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!40101 SET character_set_client = utf8 */; 25 | CREATE TABLE `role` ( 26 | `id` int(11) NOT NULL AUTO_INCREMENT, 27 | `name` varchar(45) DEFAULT NULL, 28 | PRIMARY KEY (`id`) 29 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 30 | /*!40101 SET character_set_client = @saved_cs_client */; 31 | 32 | -- 33 | -- Dumping data for table `role` 34 | -- 35 | 36 | LOCK TABLES `role` WRITE; 37 | /*!40000 ALTER TABLE `role` DISABLE KEYS */; 38 | INSERT INTO `role` VALUES (1,'ROLE_USER'); 39 | /*!40000 ALTER TABLE `role` ENABLE KEYS */; 40 | UNLOCK TABLES; 41 | 42 | -- 43 | -- Table structure for table `user` 44 | -- 45 | 46 | DROP TABLE IF EXISTS `user`; 47 | /*!40101 SET @saved_cs_client = @@character_set_client */; 48 | /*!40101 SET character_set_client = utf8 */; 49 | CREATE TABLE `user` ( 50 | `id` int(11) NOT NULL AUTO_INCREMENT, 51 | `username` varchar(255) DEFAULT NULL, 52 | `userEmail` varchar(255) DEFAULT NULL, 53 | `password` varchar(255) DEFAULT NULL, 54 | PRIMARY KEY (`id`) 55 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 56 | /*!40101 SET character_set_client = @saved_cs_client */; 57 | 58 | -- 59 | -- Dumping data for table `user` 60 | -- 61 | 62 | LOCK TABLES `user` WRITE; 63 | /*!40000 ALTER TABLE `user` DISABLE KEYS */; 64 | INSERT INTO `user` VALUES (4,'admin_vp','admin@visualpathit.com','$2a$11$DSEIKJNrgPjG.iCYUwErvOkREtC67mqzQ.ogkZbc/KOW1OPOpZfY6'); 65 | /*!40000 ALTER TABLE `user` ENABLE KEYS */; 66 | UNLOCK TABLES; 67 | 68 | -- 69 | -- Table structure for table `user_role` 70 | -- 71 | 72 | DROP TABLE IF EXISTS `user_role`; 73 | /*!40101 SET @saved_cs_client = @@character_set_client */; 74 | /*!40101 SET character_set_client = utf8 */; 75 | CREATE TABLE `user_role` ( 76 | `user_id` int(11) NOT NULL, 77 | `role_id` int(11) NOT NULL, 78 | PRIMARY KEY (`user_id`,`role_id`), 79 | KEY `fk_user_role_roleid_idx` (`role_id`), 80 | CONSTRAINT `fk_user_role_roleid` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, 81 | CONSTRAINT `fk_user_role_userid` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE 82 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 83 | /*!40101 SET character_set_client = @saved_cs_client */; 84 | 85 | -- 86 | -- Dumping data for table `user_role` 87 | -- 88 | 89 | LOCK TABLES `user_role` WRITE; 90 | /*!40000 ALTER TABLE `user_role` DISABLE KEYS */; 91 | INSERT INTO `user_role` VALUES (4,1); 92 | /*!40000 ALTER TABLE `user_role` ENABLE KEYS */; 93 | UNLOCK TABLES; 94 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 95 | 96 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 97 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 98 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 99 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 100 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 101 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 102 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 103 | 104 | -- Dump completed on 2017-08-28 10:50:51 105 | -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/controller/UserController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/controller/UserController.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/model/Role.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/model/Role.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/model/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/model/User.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/repository/RoleRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/repository/RoleRepository.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/repository/UserRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/repository/UserRepository.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/validator/UserValidator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/com/visualpathit/account/validator/UserValidator.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %date{HH:mm:ss.SSS} [%thread] %-5level %logger{15}#%line %msg\n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/classes/validation.properties: -------------------------------------------------------------------------------- 1 | NotEmpty=This field is required. 2 | Size.userForm.username=Please use between 6 and 32 characters. 3 | Duplicate.userForm.username= User has already taken this Username. 4 | Size.userForm.password=Try one with at least 8 characters. 5 | Diff.userForm.passwordConfirm=These passwords don't match. -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/controllerTest/SampleTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/controllerTest/SampleTest.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/controllerTest/UserControllerTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/controllerTest/UserControllerTest.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/modelTest/RoleTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/modelTest/RoleTest.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/modelTest/UserTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/modelTest/UserTest.class -------------------------------------------------------------------------------- /Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/setup/StandaloneMvcTestViewResolver.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 6 - Continuous Integration using Jenkins, Nexus, Sonarqube and Slack/target/test-classes/com/visualpathit/account/setup/StandaloneMvcTestViewResolver.class -------------------------------------------------------------------------------- /Project 7 - Continuous Integration on AWS/Project 7 Architecture Diagram.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 7 - Continuous Integration on AWS/Project 7 Architecture Diagram.jpeg -------------------------------------------------------------------------------- /Project 8 - Ansible for AWS VPC/README.md: -------------------------------------------------------------------------------- 1 | # ansible-aws-vpc -------------------------------------------------------------------------------- /Project 8 - Ansible for AWS VPC/bastion-instance.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Setup Vprofile Bastion Host 3 | hosts: localhost 4 | connection: local 5 | gather_facts: no 6 | tasks: 7 | - name: Import VPC setup variable 8 | include_vars: vars/bastion_setup 9 | 10 | - name: Import VPC setup Variable 11 | include_vars: vars/output_vars 12 | 13 | - name: Create vprofile ec2 key 14 | ec2_key: 15 | name: "{{ keyName }}" 16 | region: "{{ region }}" 17 | register: key_out 18 | 19 | - name: Save private key into file bastion-key.pem 20 | copy: 21 | content: "{{ key_out.key.private_key }}" 22 | dest: "./bastion-key.pem" 23 | mode: 0600 24 | when: key_out.changed 25 | 26 | - name: Create Sec Grp for Bastion Host 27 | ec2_group: 28 | name: Bastion-host-sg 29 | description: Allow port 22 from everywhere and all port within sg 30 | vpc_id: "{{ vpcid }}" 31 | region: "{{ region }}" 32 | rules: 33 | - proto: tcp 34 | from_port: 22 35 | to_port: 22 36 | cidr_ip: "{{ MYIP }}" 37 | register: BastionSG_out 38 | 39 | - name: Creating Bastion Host 40 | ec2: 41 | key_name: "{{ keyName }}" 42 | region: "{{ region }}" 43 | instance_type: "{{ instanceType }}" 44 | image: "{{ bastion_ami }}" 45 | wait: yes 46 | wait_timeout: 300 47 | instance_tags: 48 | Name: "Bastion_host" 49 | Project: Vprofile 50 | Owner: DevOps Team 51 | exact_count: 1 52 | count_tag: 53 | Name: "Bastion_host" 54 | Project: Vprofile 55 | Owner: DevOps Team 56 | group_id: "{{ BastionSG_out.group_id }}" 57 | vpc_subnet_id: "{{ pubsub1id }}" 58 | assign_public_ip: yes 59 | register: bastionHost_out -------------------------------------------------------------------------------- /Project 8 - Ansible for AWS VPC/vars/bastion_setup: -------------------------------------------------------------------------------- 1 | bastion_ami: ami-083eed19fc801d7a4 2 | region: us-east-2 3 | MYIP: 192.168.154.67/32 4 | keyName: ansible-key 5 | instanceType: t2.micro -------------------------------------------------------------------------------- /Project 8 - Ansible for AWS VPC/vars/vpc_setup: -------------------------------------------------------------------------------- 1 | vpc_name: "Vprofile-vpc" 2 | 3 | #VPC Range 4 | vpcCidr: '172.20.0.0./16' 5 | 6 | #Subnets Range 7 | PubSub1Cidr: 172.20.1.0/24 8 | PubSub2Cidr: 172.20.2.0/24 9 | PubSub3Cidr: 172.20.3.0/24 10 | PrivSub1Cidr: 172.20.4.0/24 11 | PrivSub2Cidr: 172.20.5.0/24 12 | PrivSub3Cidr: 172.20.6.0/24 13 | 14 | #Region Name 15 | region: "us-east-2" 16 | 17 | #Zone Names 18 | zone1: us-east-2a 19 | zone2: us-east-2b 20 | zone3: us-east-2c 21 | 22 | state: present -------------------------------------------------------------------------------- /Project 8 - Ansible for AWS VPC/vpc-setup.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: False 4 | tasks: 5 | - name: Import VPC Variables 6 | include_vars: vars/vpc_setup 7 | 8 | - name: Create Vprofile VPC 9 | ec2_vpc_net: 10 | name: "{{vpc_name}}" 11 | cidr_block: "{{vpcCidr}}" 12 | region: "{{region}}" 13 | dns_support: yes 14 | dns_hostnames: yes 15 | tenancy: default 16 | state: "{{state}}" 17 | register: vpcout 18 | 19 | - name: create Public Subnet 1 in Zone1 20 | ec2_vpc_subnet: 21 | vpc_id: "{{vpcout.vpc.id}}" 22 | region: "{{region}}" 23 | az: "{{zone1}}" 24 | state: "{{state}}" 25 | cidr: "{{PubSub1Cidr}}" 26 | map_public: yes 27 | tags: 28 | Name: vprofile-pubsub1 29 | register: pubsub1_out 30 | 31 | - name: create Public Subnet 2 in Zone2 32 | ec2_vpc_subnet: 33 | vpc_id: "{{vpcout.vpc.id}}" 34 | region: "{{region}}" 35 | az: "{{zone2}}" 36 | state: "{{state}}" 37 | cidr: "{{PubSub2Cidr}}" 38 | map_public: yes 39 | tags: 40 | Name: vprofile-pubsub2 41 | register: pubsub2_out 42 | 43 | - name: create Public Subnet 3 in Zone3 44 | ec2_vpc_subnet: 45 | vpc_id: "{{vpcout.vpc.id}}" 46 | region: "{{region}}" 47 | az: "{{zone3}}" 48 | state: "{{state}}" 49 | cidr: "{{PubSub3Cidr}}" 50 | map_public: yes 51 | tags: 52 | Name: vprofile-pubsub3 53 | register: pubsub3_out 54 | 55 | - name: create Private Subnet 1 in Zone1 56 | ec2_vpc_subnet: 57 | vpc_id: "{{vpcout.vpc.id}}" 58 | region: "{{region}}" 59 | az: "{{zone1}}" 60 | state: "{{state}}" 61 | cidr: "{{PrivSub1Cidr}}" 62 | map_public: yes 63 | tags: 64 | Name: vprofile-privsub1 65 | register: privsub1_out 66 | 67 | - name: create Private Subnet 2 in Zone2 68 | ec2_vpc_subnet: 69 | vpc_id: "{{vpcout.vpc.id}}" 70 | region: "{{region}}" 71 | az: "{{zone2}}" 72 | state: "{{state}}" 73 | cidr: "{{PrivSub2Cidr}}" 74 | map_public: yes 75 | tags: 76 | Name: vprofile-privsub2 77 | register: privsub2_out 78 | 79 | - name: create Private Subnet 3 in Zone3 80 | ec2_vpc_subnet: 81 | vpc_id: "{{vpcout.vpc.id}}" 82 | region: "{{region}}" 83 | az: "{{zone3}}" 84 | state: "{{state}}" 85 | cidr: "{{PrivSub3Cidr}}" 86 | map_public: yes 87 | tags: 88 | Name: vprofile-privsub3 89 | register: privsub3_out 90 | 91 | - name: Internet Gateway Setup 92 | ec2_vpc_igw: 93 | vpc_id: "{{vpcout.vpc.id}}" 94 | region: "{{region}}" 95 | state: "{{state}}" 96 | tags: 97 | Name: vprofile-igw 98 | register: igw_out 99 | 100 | - name: Setup Public Subnet Route Table 101 | ec2_vpc_route_table: 102 | vpc_id: "{{vpcout.vpc.id}}" 103 | region: "{{region}}" 104 | tags: 105 | Name: Vprofile-PubRT 106 | subnets: 107 | - "{{ pubsub1_out.subnet.id }}" 108 | - "{{ pubsub2_out.subnet.id }}" 109 | - "{{ pubsub3_out.subnet.id }}" 110 | routes: 111 | - dest: 0.0.0.0/0 112 | gateway_id: "{{ igw_out.gateway_id }}" 113 | register: pubRT_out 114 | 115 | - name: Create NAT gateway and allocate new EIP if to it if it does not exist yet in the subnet 116 | ec2_vpc_nat_gateway: 117 | subnet_id: "{{ pubsub1_out.subnet.id }}" 118 | region: "{{region}}" 119 | state: "{{state}}" 120 | wait: yes 121 | if_exist_do_not_create: yes 122 | register: NATGW_out 123 | 124 | - name: Setup Private Subnet Route Table 125 | ec2_vpc_route_table: 126 | vpc_id: "{{vpcout.vpc.id}}" 127 | region: "{{region}}" 128 | tags: 129 | Name: Vprofile-PrivRT 130 | subnets: 131 | - "{{ privsub1_out.subnet.id }}" 132 | - "{{ privsub2_out.subnet.id }}" 133 | routes: 134 | - dest: 0.0.0.0/0 135 | gateway_id: "{{ NATGW_out.nat_gateway_id }}" 136 | register: privRT_out 137 | 138 | - debug: 139 | var: "{{item}}" 140 | loop: 141 | - vpcout.vpc.id 142 | - pubsub1_out.subnet.id 143 | - pubsub2_out.subnet.id 144 | - pubsub3_out.subnet.id 145 | - privsub1_out.subnet.id 146 | - privsub2_out.subnet.id 147 | - privsub3_out.subnet.id 148 | - igw_out.gateway_id 149 | - pubRT_out.route_table.id 150 | - NATGW_out.nat_gateway_id 151 | - privRT_out.route_table.id 152 | 153 | - set_fact: 154 | vpcid: "{{ vpcout.vpc.id }}" 155 | pubsub1id: "{{ pubsub1_out.subnet.id }}" 156 | pubsub2id: "{{ pubsub2_out.subnet.id }}" 157 | pubsub3id: "{{ pubsub3_out.subnet.id }}" 158 | privsub1id: "{{ privsub1_out.subnet.id }}" 159 | privsub2id: "{{ privsub2_out.subnet.id }}" 160 | privsub3id: "{{ privsub3_out.subnet.id }}" 161 | igwid: "{{ igw_out.gateway_id }}" 162 | pubRTid: "{{ pubRT_out.route_table.id }}" 163 | NATGWid: "{{ NATGW_out.nat_gateway_id }}" 164 | privRTid: "{{ privRT_out.route_table.id }}" 165 | cacheable: yes 166 | 167 | - name: Create variables file for vpc output 168 | copy: 169 | content: "vpcid: {{ vpcout.vpc.id }}\npubsub1id: {{ pubsub1_out.subnet.id }}\npubsub2id: {{ pubsub2_out.subnet.id }}\npubsub3id: {{ pubsub3_out.subnet.id }}\nprivsub1id: {{ privsub1_out.subnet.id }}\nprivsub2id: {{ privsub2_out.subnet.id }}\nprivsub3id: {{ privsub3_out.subnet.id }}\nigwid: {{ igw_out.gateway_id }}\npubRTid: {{ pubRT_out.route_table.id }}\nNATGWid: {{ NATGW_out.nat_gateway_id }}\nprivRTid: {{ privRT_out.route_table.id }}" 170 | 171 | dest: vars/output_vars -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/README.md: -------------------------------------------------------------------------------- 1 | # ansible-aws-vpc -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/bastion-instance.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Setup Vprofile Bastion Host 3 | hosts: localhost 4 | connection: local 5 | gather_facts: no 6 | tasks: 7 | - name: Import VPC setup variable 8 | include_vars: vars/vpc_setup 9 | 10 | - name: Import VPC setup Variable 11 | include_vars: vars/output_vars 12 | 13 | - name: Create vprofile ec2 key 14 | ec2_key: 15 | name: "{{ keyName }}" 16 | region: "{{ region }}" 17 | register: key_out 18 | 19 | - name: Save private key into file bastion-key.pem 20 | copy: 21 | content: "{{ key_out.key.private_key }}" 22 | dest: "./bastion-key.pem" 23 | mode: 0600 24 | when: key_out.changed 25 | 26 | - name: Create Sec Grp for Bastion Host 27 | ec2_group: 28 | name: Bastion-host-sg 29 | description: Allow port 22 from everywhere and all port within sg 30 | vpc_id: "{{ vpcid }}" 31 | region: "{{ region }}" 32 | rules: 33 | - proto: tcp 34 | from_port: 22 35 | to_port: 22 36 | cidr_ip: "{{ MYIP }}" 37 | register: BastionSG_out 38 | 39 | - name: Creating Bastion Host 40 | ec2: 41 | key_name: "{{ keyName }}" 42 | region: "{{ region }}" 43 | instance_type: "{{ instanceType }}" 44 | image: "{{ bastion_ami }}" 45 | wait: yes 46 | wait_timeout: 300 47 | instance_tags: 48 | Name: "Bastion_host" 49 | Project: Vprofile 50 | Owner: DevOps Team 51 | exact_count: 1 52 | count_tag: 53 | Name: "Bastion_host" 54 | Project: Vprofile 55 | Owner: DevOps Team 56 | group_id: "{{ BastionSG_out.group_id }}" 57 | vpc_subnet_id: "{{ pubsub1id }}" 58 | assign_public_ip: yes 59 | register: bastionHost_out 60 | 61 | - name: Insert/Update "BastionSGid" in vars/vpc-output_vars 62 | blockinfile: 63 | path: vars/vpc-output_vars 64 | backup: yes 65 | block: | 66 | BastionSGid: {{BastionSG_out.group_id}} -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/provision-stack/group_vars/hostsip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RolakeAnifowose/DevOpsProjects/e2ad4d19b09f2f397ffaab87b1fa10920ac64beb/Project 9 - Ansible for complete stack setup/provision-stack/group_vars/hostsip -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/site.yml: -------------------------------------------------------------------------------- 1 | - import_playbook: vpc-setup.yml 2 | - import_playbook: bastion-instance.yml -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/vars/vpc-output_vars: -------------------------------------------------------------------------------- 1 | region: us-east-2 2 | vpcid: vpc-0bec7655919554e0d 3 | pubsub1id: subnet-0509bdf8b4f616565 4 | pubsub2id: subnet-07403281e96341cf8 5 | pubsub3id: subnet-0079d1c4a750e0836 6 | privsub1id: subnet-02264f55a6c930cc0 7 | privsub2id: subnet-0f697e4cb82f0803e 8 | privsub3id: subnet-0fccc70f90665c8fd 9 | igwid: igw-0f001fd29324cc012 10 | pubRTid: rtb-06531150a5be2472b 11 | NATGWid: nat-0d1caea75ea309071 12 | BastionSGid: sg-06e602c65ce83a014 -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/vars/vpc_setup: -------------------------------------------------------------------------------- 1 | vpc_name: "Vprofile-vpc" 2 | 3 | #VPC Range 4 | vpcCidr: '172.20.0.0./16' 5 | 6 | #Subnets Range 7 | PubSub1Cidr: 172.20.1.0/24 8 | PubSub2Cidr: 172.20.2.0/24 9 | PubSub3Cidr: 172.20.3.0/24 10 | PrivSub1Cidr: 172.20.4.0/24 11 | PrivSub2Cidr: 172.20.5.0/24 12 | PrivSub3Cidr: 172.20.6.0/24 13 | 14 | #Region Name 15 | region: "us-east-2" 16 | 17 | #Zone Names 18 | zone1: us-east-2a 19 | zone2: us-east-2b 20 | zone3: us-east-2c 21 | 22 | state: present 23 | 24 | #Bastion Vars 25 | bastion_ami: ami-083eed19fc801d7a4 26 | MYIP: 192.168.154.67/32 27 | keyName: ansible-key 28 | instanceType: t2.micro -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/vars/vprostacksetup: -------------------------------------------------------------------------------- 1 | nginx_ami: ami-06c4532923d4ba1ec 2 | tomcat_ami: ami-06c4532923d4ba1ec 3 | memcache_ami: ami-06c4532923d4ba1ec 4 | rmq_ami: ami-06c4532923d4ba1ec 5 | mysql_ami: ami-06c4532923d4ba1ec 6 | -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/vpc-setup.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: False 4 | tasks: 5 | - name: Import VPC Variables 6 | include_vars: vars/vpc_setup 7 | 8 | - name: Create Vprofile VPC 9 | ec2_vpc_net: 10 | name: "{{vpc_name}}" 11 | cidr_block: "{{vpcCidr}}" 12 | region: "{{region}}" 13 | dns_support: yes 14 | dns_hostnames: yes 15 | tenancy: default 16 | state: "{{state}}" 17 | register: vpcout 18 | 19 | - name: create Public Subnet 1 in Zone1 20 | ec2_vpc_subnet: 21 | vpc_id: "{{vpcout.vpc.id}}" 22 | region: "{{region}}" 23 | az: "{{zone1}}" 24 | state: "{{state}}" 25 | cidr: "{{PubSub1Cidr}}" 26 | map_public: yes 27 | tags: 28 | Name: vprofile-pubsub1 29 | register: pubsub1_out 30 | 31 | - name: create Public Subnet 2 in Zone2 32 | ec2_vpc_subnet: 33 | vpc_id: "{{vpcout.vpc.id}}" 34 | region: "{{region}}" 35 | az: "{{zone2}}" 36 | state: "{{state}}" 37 | cidr: "{{PubSub2Cidr}}" 38 | map_public: yes 39 | tags: 40 | Name: vprofile-pubsub2 41 | register: pubsub2_out 42 | 43 | - name: create Public Subnet 3 in Zone3 44 | ec2_vpc_subnet: 45 | vpc_id: "{{vpcout.vpc.id}}" 46 | region: "{{region}}" 47 | az: "{{zone3}}" 48 | state: "{{state}}" 49 | cidr: "{{PubSub3Cidr}}" 50 | map_public: yes 51 | tags: 52 | Name: vprofile-pubsub3 53 | register: pubsub3_out 54 | 55 | - name: create Private Subnet 1 in Zone1 56 | ec2_vpc_subnet: 57 | vpc_id: "{{vpcout.vpc.id}}" 58 | region: "{{region}}" 59 | az: "{{zone1}}" 60 | state: "{{state}}" 61 | cidr: "{{PrivSub1Cidr}}" 62 | map_public: yes 63 | tags: 64 | Name: vprofile-privsub1 65 | register: privsub1_out 66 | 67 | - name: create Private Subnet 2 in Zone2 68 | ec2_vpc_subnet: 69 | vpc_id: "{{vpcout.vpc.id}}" 70 | region: "{{region}}" 71 | az: "{{zone2}}" 72 | state: "{{state}}" 73 | cidr: "{{PrivSub2Cidr}}" 74 | map_public: yes 75 | tags: 76 | Name: vprofile-privsub2 77 | register: privsub2_out 78 | 79 | - name: create Private Subnet 3 in Zone3 80 | ec2_vpc_subnet: 81 | vpc_id: "{{vpcout.vpc.id}}" 82 | region: "{{region}}" 83 | az: "{{zone3}}" 84 | state: "{{state}}" 85 | cidr: "{{PrivSub3Cidr}}" 86 | map_public: yes 87 | tags: 88 | Name: vprofile-privsub3 89 | register: privsub3_out 90 | 91 | - name: Internet Gateway Setup 92 | ec2_vpc_igw: 93 | vpc_id: "{{vpcout.vpc.id}}" 94 | region: "{{region}}" 95 | state: "{{state}}" 96 | tags: 97 | Name: vprofile-igw 98 | register: igw_out 99 | 100 | - name: Setup Public Subnet Route Table 101 | ec2_vpc_route_table: 102 | vpc_id: "{{vpcout.vpc.id}}" 103 | region: "{{region}}" 104 | tags: 105 | Name: Vprofile-PubRT 106 | subnets: 107 | - "{{ pubsub1_out.subnet.id }}" 108 | - "{{ pubsub2_out.subnet.id }}" 109 | - "{{ pubsub3_out.subnet.id }}" 110 | routes: 111 | - dest: 0.0.0.0/0 112 | gateway_id: "{{ igw_out.gateway_id }}" 113 | register: pubRT_out 114 | 115 | - name: Create NAT gateway and allocate new EIP if to it if it does not exist yet in the subnet 116 | ec2_vpc_nat_gateway: 117 | subnet_id: "{{ pubsub1_out.subnet.id }}" 118 | region: "{{region}}" 119 | state: "{{state}}" 120 | wait: yes 121 | if_exist_do_not_create: yes 122 | register: NATGW_out 123 | 124 | - name: Setup Private Subnet Route Table 125 | ec2_vpc_route_table: 126 | vpc_id: "{{vpcout.vpc.id}}" 127 | region: "{{region}}" 128 | tags: 129 | Name: Vprofile-PrivRT 130 | subnets: 131 | - "{{ privsub1_out.subnet.id }}" 132 | - "{{ privsub2_out.subnet.id }}" 133 | routes: 134 | - dest: 0.0.0.0/0 135 | gateway_id: "{{ NATGW_out.nat_gateway_id }}" 136 | register: privRT_out 137 | 138 | - debug: 139 | var: "{{item}}" 140 | loop: 141 | - vpcout.vpc.id 142 | - pubsub1_out.subnet.id 143 | - pubsub2_out.subnet.id 144 | - pubsub3_out.subnet.id 145 | - privsub1_out.subnet.id 146 | - privsub2_out.subnet.id 147 | - privsub3_out.subnet.id 148 | - igw_out.gateway_id 149 | - pubRT_out.route_table.id 150 | - NATGW_out.nat_gateway_id 151 | - privRT_out.route_table.id 152 | 153 | - set_fact: 154 | vpcid: "{{ vpcout.vpc.id }}" 155 | pubsub1id: "{{ pubsub1_out.subnet.id }}" 156 | pubsub2id: "{{ pubsub2_out.subnet.id }}" 157 | pubsub3id: "{{ pubsub3_out.subnet.id }}" 158 | privsub1id: "{{ privsub1_out.subnet.id }}" 159 | privsub2id: "{{ privsub2_out.subnet.id }}" 160 | privsub3id: "{{ privsub3_out.subnet.id }}" 161 | igwid: "{{ igw_out.gateway_id }}" 162 | pubRTid: "{{ pubRT_out.route_table.id }}" 163 | NATGWid: "{{ NATGW_out.nat_gateway_id }}" 164 | privRTid: "{{ privRT_out.route_table.id }}" 165 | cacheable: yes 166 | 167 | - name: Create variables file for vpc output 168 | copy: 169 | content: "region: {{ region }}\nvpcid: {{ vpcout.vpc.id }}\npubsub1id: {{ pubsub1_out.subnet.id }}\npubsub2id: {{ pubsub2_out.subnet.id }}\npubsub3id: {{ pubsub3_out.subnet.id }}\nprivsub1id: {{ privsub1_out.subnet.id }}\nprivsub2id: {{ privsub2_out.subnet.id }}\nprivsub3id: {{ privsub3_out.subnet.id }}\nigwid: {{ igw_out.gateway_id }}\npubRTid: {{ pubRT_out.route_table.id }}\nNATGWid: {{ NATGW_out.nat_gateway_id }}\nprivRTid: {{ privRT_out.route_table.id }}\n" 170 | dest: vars/vpc-output_vars -------------------------------------------------------------------------------- /Project 9 - Ansible for complete stack setup/vpro-ec2-stack.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Setup Vprofile Stack 3 | hosts: localhost 4 | connection: local 5 | gather_facts: no 6 | tasks: 7 | - name: Import VPC setup Variable 8 | include_vars: vars/vpc-output_vars 9 | 10 | - name: Import vprofile setup Variable 11 | include_vars: vars/vprostacksetup 12 | 13 | - name: Create vprofile ec2 key 14 | ec2_key: 15 | name: vprokey 16 | region: "{{region}}" 17 | register: vprokey_out 18 | 19 | - name: Save private key into file loginkey_vpro.pem 20 | copy: 21 | content: "{{vprokey_out.key.private_key}}" 22 | dest: "./loginkey_vpro.pem" 23 | mode: 0600 24 | when: vprokey_out.changed 25 | 26 | - name: Create Securiry Group for Load Balancer 27 | ec2_group: 28 | name: vproELB-sg 29 | description: Allow port 80 from everywhere and all port within sg 30 | region: "{{region}}" 31 | vpc_id: "{{vpcid}}" 32 | rules: 33 | - proto: tcp 34 | from_port: 80 35 | to_port: 80 36 | cidr_ip: 0.0.0.0/0 37 | register: vproELBSG_out 38 | 39 | - name: Create Securiry Group for Vprofile Stack 40 | ec2_group: 41 | name: vproStack-sg 42 | description: Allow port 22 from everywhere and all port within sg 43 | region: "{{region}}" 44 | vpc_id: "{{vpcid}}" 45 | purge_rules: no 46 | rules: 47 | - proto: tcp 48 | from_port: 80 49 | to_port: 80 50 | group_id: "{{vproELBSG_out.group_id}}" 51 | 52 | - proto: tcp 53 | from_port: 22 54 | to_port: 22 55 | group_id: "{{BastionSGid}}" 56 | register: vproStackSG_out 57 | 58 | - name: Update Securiry Group with its own sg id 59 | ec2_group: 60 | name: vproStack-sg 61 | description: Allow port 22 from everywhere and all port within sg 62 | region: "{{region}}" 63 | vpc_id: "{{vpcid}}" 64 | purge_rules: no 65 | rules: 66 | - proto: all 67 | group_id: "{{vproStackSG_out.group_id}}" 68 | 69 | - name: Creating Nginx web01 70 | ec2: 71 | key_name: vprokey 72 | region: "{{region}}" 73 | instance_type: t2.micro 74 | image: "{{nginx_ami}}" 75 | wait: yes 76 | wait_timeout: 300 77 | instance_tags: 78 | Name: "web01" 79 | Project: Vprofile 80 | Owner: DevOps Team 81 | exact_count: 1 82 | count_tag: 83 | Name: "web01" 84 | Project: Vprofile 85 | Owner: DevOps Team 86 | group_id: "{{vproStackSG_out.group_id}}" 87 | vpc_subnet_id: "{{privsub1id}}" 88 | register: web01_out 89 | 90 | - name: Creating tomcat app01 91 | ec2: 92 | key_name: vprokey 93 | region: "{{region}}" 94 | instance_type: t2.micro 95 | image: "{{tomcat_ami}}" 96 | wait: yes 97 | wait_timeout: 300 98 | instance_tags: 99 | Name: "app01" 100 | Project: Vprofile 101 | Owner: DevOps Team 102 | exact_count: 1 103 | count_tag: 104 | Name: "app01" 105 | Project: Vprofile 106 | Owner: DevOps Team 107 | group_id: "{{vproStackSG_out.group_id}}" 108 | vpc_subnet_id: "{{privsub1id}}" 109 | register: app01_out 110 | 111 | - name: Creating memcache mc01 112 | ec2: 113 | key_name: vprokey 114 | region: "{{region}}" 115 | instance_type: t2.micro 116 | image: "{{memcache_ami}}" 117 | wait: yes 118 | wait_timeout: 300 119 | instance_tags: 120 | Name: "mc01" 121 | Project: Vprofile 122 | Owner: DevOps Team 123 | exact_count: 1 124 | count_tag: 125 | Name: "mc01" 126 | Project: Vprofile 127 | Owner: DevOps Team 128 | group_id: "{{vproStackSG_out.group_id}}" 129 | vpc_subnet_id: "{{privsub1id}}" 130 | register: mc01_out 131 | 132 | - name: Creating RabbitMQ rmq01 133 | ec2: 134 | key_name: vprokey 135 | region: "{{region}}" 136 | instance_type: t2.micro 137 | image: "{{rmq_ami}}" 138 | wait: yes 139 | wait_timeout: 300 140 | instance_tags: 141 | Name: "rmq01" 142 | Project: Vprofile 143 | Owner: DevOps Team 144 | exact_count: 1 145 | count_tag: 146 | Name: "rmq01" 147 | Project: Vprofile 148 | Owner: DevOps Team 149 | group_id: "{{vproStackSG_out.group_id}}" 150 | vpc_subnet_id: "{{privsub1id}}" 151 | register: rmq01_out 152 | 153 | - name: Creating Mysql db01 154 | ec2: 155 | key_name: vprokey 156 | region: "{{region}}" 157 | instance_type: t2.micro 158 | image: "{{mysql_ami}}" 159 | wait: yes 160 | wait_timeout: 300 161 | instance_tags: 162 | Name: "db01" 163 | Project: Vprofile 164 | Owner: DevOps Team 165 | exact_count: 1 166 | count_tag: 167 | Name: "db01" 168 | Project: Vprofile 169 | Owner: DevOps Team 170 | group_id: "{{vproStackSG_out.group_id}}" 171 | vpc_subnet_id: "{{privsub1id}}" 172 | register: db01_out 173 | 174 | - debug: 175 | var: db01_out.tagged_instances[0].id 176 | 177 | - local_action: 178 | module: ec2_elb_lb 179 | name: "vprofile-elb" 180 | region: "{{region}}" 181 | state: present 182 | instance_ids: 183 | - "{{ web01_out.tagged_instances[0].id }}" 184 | purge_instance_ids: true 185 | security_group_ids: "{{ vproELBSG_out.group_id }}" 186 | subnets: 187 | - "{{ pubsub1id }}" 188 | - "{{ pubsub2id }}" 189 | - "{{ pubsub3id }}" 190 | listeners: 191 | - protocol: http # options are http, https, ssl, tcp 192 | load_balancer_port: 80 193 | instance_port: 80 194 | 195 | - name: Insert/Update Hosts IP & Name in file provision-stack/group_vars/hostsip 196 | blockinfile: 197 | path: provision-stack/group_vars/hostsip 198 | block: | 199 | web01_ip: {{ web01_out.tagged_instances[0].private_ip }} 200 | app01_ip: {{ app01_out.tagged_instances[0].private_ip }} 201 | rmq01_ip: {{ rmq01_out.tagged_instances[0].private_ip }} 202 | mc01_ip: {{ mc01_out.tagged_instances[0].private_ip }} 203 | db01_ip: {{ db01_out.tagged_instances[0].private_ip }} 204 | 205 | - name: Copy login key to provision_stack directory 206 | copy: 207 | src: loginkey_vpro.pem 208 | dest: provision-stack/loginkey_vpro.pem 209 | mode: '0400' 210 | 211 | - name: Insert/Update Inventory file provision-stack/inventory-vpro 212 | blockinfile: 213 | path: provision-stack/inventory-vpro 214 | block: | 215 | web01 ansible_host={{ web01_out.tagged_instances[0].private_ip }} 216 | app01 ansible_host={{ app01_out.tagged_instances[0].private_ip }} 217 | rmq01 ansible_host={{ rmq01_out.tagged_instances[0].private_ip }} 218 | mc01 ansible_host={{ mc01_out.tagged_instances[0].private_ip }} 219 | db01 ansible_host={{ db01_out.tagged_instances[0].private_ip }} 220 | cntl ansible_host=127.0.0.1 ansible_connection=local 221 | 222 | [websrvgrp] 223 | web01 224 | 225 | [appsrvgrp] 226 | app01 227 | 228 | [rmqsrvgrp] 229 | rmq01 230 | 231 | [mcsrvgrp] 232 | mc01 233 | 234 | [dbsrvgrp] 235 | db01 236 | 237 | [control] 238 | cntl 239 | 240 | [stack_inst:children] 241 | websrvgrp 242 | appsrvgrp 243 | rmqsrvgrp 244 | mcsrvgrp 245 | dbsrvgrp 246 | 247 | [stack_inst:vars] 248 | ansible_user=ubuntu 249 | ansible_ssh_private_key_file=loginkey_vpro.pem 250 | #ansible_python_interpreter=/usr/bin/python3 --------------------------------------------------------------------------------