├── README.md ├── project-1 ├── Images │ ├── Apache2 status.PNG │ ├── Curl localhost.PNG │ ├── Disable default apache site.PNG │ ├── Homepage.PNG │ ├── PHP Version.PNG │ ├── PHP.PNG │ └── a2ensite projectlamp.PNG ├── Project1.md └── README.md ├── project-10 ├── Images │ ├── Architecture.PNG │ ├── Nginx LB.PNG │ ├── associate elastic IP.PNG │ ├── create elastic IP.PNG │ ├── https-http port.PNG │ ├── install certbot.PNG │ ├── install nginx.PNG │ ├── nginx status.PNG │ ├── nginx-conf.PNG │ ├── public elastic IP.PNG │ └── update etc-hosts.PNG ├── README.md └── project10.md ├── project-11 ├── Images │ ├── ansible client as jump server.PNG │ ├── ansible configuration.PNG │ ├── ansible version.PNG │ ├── checking build on server.PNG │ ├── checking the ansible build.PNG │ ├── create repo.PNG │ ├── final architecture.PNG │ ├── git clone ansible.PNG │ ├── install ansible.PNG │ ├── new architecture.PNG │ ├── run ansible playbook.PNG │ ├── ssh-add -l.PNG │ └── webhook.PNG ├── README.md └── project11.md ├── project-12 ├── Images │ ├── build step.PNG │ ├── build trigger.PNG │ ├── create directory and permission.PNG │ ├── create roles.PNG │ ├── final architecture.PNG │ ├── install copy artifact.PNG │ ├── name project.PNG │ ├── running ansible playbook for site.PNG │ ├── testing build.PNG │ ├── uat servers.PNG │ ├── view.PNG │ └── web-uat server.PNG ├── README.md └── project12.md ├── project-13 ├── Images │ ├── ansible playbook running.PNG │ ├── edit database credentials.PNG │ ├── edit webservers.PNG │ ├── final play.PNG │ ├── install apache and nginx.PNG │ └── roles.PNG ├── README.md └── project13.md ├── project-14 ├── Images │ ├── CI-CD for nginx and DB cont'd.PNG │ ├── CI-CD for nginx and DB.PNG │ ├── add configuration to sonar-scanner.PNG │ ├── add deploy clean up.PNG │ ├── ansible-config.PNG │ ├── artifactory playbook.PNG │ ├── blueocean deploy and clean up.PNG │ ├── blueocean setup.PNG │ ├── build for CI inventory.PNG │ ├── build now.PNG │ ├── choose repo.PNG │ ├── ci-cd architecture.PNG │ ├── configure ansible-config.PNG │ ├── configure artifactory on jenkins.PNG │ ├── configure sonarqube on jenkins.PNG │ ├── create homestead database and user.PNG │ ├── create homestead database and user2.PNG │ ├── create jenkinsfile.PNG │ ├── database created.PNG │ ├── deployment to dev env.PNG │ ├── echo building stage.PNG │ ├── edit bind address.PNG │ ├── edit the env-sample.PNG │ ├── error due to DB connection.PNG │ ├── execute unit test.PNG │ ├── feature-jenkinspipeline.PNG │ ├── generate pipeline syntax1.PNG │ ├── generate pipeline syntax2.PNG │ ├── generate token.PNG │ ├── install ansible plugin.PNG │ ├── install php and dependencies.PNG │ ├── install sonarqube scanner.PNG │ ├── installing sonarqube.PNG │ ├── jenkins-ansible connection.PNG │ ├── jforg homepage.PNG │ ├── new pipeline.PNG │ ├── no deploy to dev env.PNG │ ├── open ports for artifactory.PNG │ ├── php db connection successfull.PNG │ ├── phploc graph.PNG │ ├── phploc not installed.PNG │ ├── plot build.PNG │ ├── sonarqube dashboard.PNG │ ├── sonarqube error.PNG │ ├── sonarqube login.PNG │ ├── todo app.PNG │ ├── todo to artifactory.PNG │ └── token for sonarqube.PNG ├── README.md └── project14.md ├── project-15 ├── Images │ ├── KMS created.PNG │ ├── access points for tooling and wordpress.PNG │ ├── adding rules.PNG │ ├── all redhat servers.PNG │ ├── architecture diagram.PNG │ ├── attache the igw to a VPC.PNG │ ├── auto-scaling groups.PNG │ ├── create NAT gateway.PNG │ ├── create TCS-igw.PNG │ ├── create a new VPC.PNG │ ├── create bastion SG.PNG │ ├── create db subnet group.PNG │ ├── create tcs-webserver-ami.PNG │ ├── creating Access point.PNG │ ├── creating EFS.PNG │ ├── creating database tooling and wordpress.PNG │ ├── creating database.PNG │ ├── creating target groups.PNG │ ├── domain creation.PNG │ ├── enable dns hostname.PNG │ ├── launch template.PNG │ ├── loadbalancers.PNG │ ├── mounting the EFS to webserver.PNG │ ├── private subnet created.PNG │ ├── route 53 records.PNG │ ├── self signed certificate for nginx.PNG │ └── tooling webpage.PNG ├── Installation.md ├── README.md └── project15.md ├── project-16 ├── Images │ ├── PBL folder.PNG │ ├── admin access.PNG │ ├── aws s3 ls.PNG │ ├── code refactoring.PNG │ ├── create IAM user.PNG │ ├── creation of subnets terraform plan.PNG │ ├── final creation.PNG │ ├── install boto3.PNG │ ├── terraform apply for VPC.PNG │ ├── terraform bucket.PNG │ ├── terraform console.PNG │ └── terraform init.PNG ├── README.md └── project16.md ├── project-17 ├── Images │ ├── Architecture.PNG │ ├── VPC-NAT-IGW.PNG │ ├── addition of tags.PNG │ ├── create private subnets.PNG │ └── final apply.PNG ├── README.md └── project17.md ├── project-18 ├── Images │ ├── state list.PNG │ ├── state list2.PNG │ ├── terraform plan.PNG │ ├── terraform plan1.PNG │ ├── terraform plan2.PNG │ └── terraform plan3.PNG ├── README.md └── project18.md ├── project-19 ├── Images │ ├── access-key and ID.PNG │ ├── ansible-graph.PNG │ ├── apply finished.PNG │ ├── bastion AMI.PNG │ ├── create organization.PNG │ ├── created AMI.PNG │ ├── first apply.PNG │ ├── nginx AMI.PNG │ ├── terraform cloud plan.PNG │ ├── terraform destroy.PNG │ ├── tooling site.PNG │ ├── update terraform auto.PNG │ ├── update variables.PNG │ ├── wordpress.PNG │ └── workspace.PNG ├── README.md └── project19.md ├── project-2 ├── Images │ ├── Curl Localhost.PNG │ ├── MySQL query output.PNG │ ├── MySQL.PNG │ ├── Mysql Test_user.PNG │ ├── Nginx Status.PNG │ ├── PHP code.PNG │ ├── Todo_list page.PNG │ ├── Welcome to Nginx.PNG │ ├── nginx ok.PNG │ ├── php info.PNG │ └── php nano.PNG ├── Project2.md └── README.md ├── project-20 ├── Images │ ├── container with created network.PNG │ ├── create and run script.PNG │ ├── create network.PNG │ ├── docker build -t.PNG │ ├── docker exec.PNG │ ├── docker image ls.PNG │ ├── docker login.PNG │ ├── docker ps.PNG │ ├── docker pull mysql.PNG │ ├── docker run app.PNG │ ├── docker stop and rm.PNG │ ├── docker tag and push.PNG │ ├── docker-compose.PNG │ ├── docker-compose1.PNG │ ├── git clone tooling.PNG │ ├── image pushed.PNG │ ├── mysql-client.PNG │ ├── php build.PNG │ ├── php-todo site.PNG │ ├── practice 1 clone.PNG │ ├── prepare db schema.PNG │ └── tooling site.PNG ├── README.md └── project20.md ├── project-21 ├── Images │ ├── DHCP tag.PNG │ ├── Kubectl version.PNG │ ├── Test AWS cli.PNG │ ├── certificates and keys.PNG │ ├── client certificate.PNG │ ├── cluster info and namespace.PNG │ ├── containerd status.PNG │ ├── create subnet.PNG │ ├── dhcp-vpc.PNG │ ├── encryption file.PNG │ ├── etcd running.PNG │ ├── get nodes.PNG │ ├── health status.PNG │ ├── k8-vpcs.PNG │ ├── kube-apiserver status.PNG │ ├── kube-controller-manager status.PNG │ ├── kubelet status.PNG │ ├── listeners.PNG │ ├── load balancers.PNG │ ├── master nodes.PNG │ ├── master-0 ls.PNG │ ├── master-1 ls.PNG │ ├── master-2 ls.PNG │ ├── register targets.PNG │ ├── route tables.PNG │ ├── sending kubeconfig to master.PNG │ ├── sending kubeconfig to worker.PNG │ ├── target group.PNG │ ├── target status.PNG │ └── worker nodes.PNG ├── README.md └── project21.md ├── project-22 ├── Images │ ├── EKS cluster.PNG │ ├── create deployment.PNG │ ├── create nginx-pod.PNG │ ├── darey.io page.PNG │ ├── dns lb.PNG │ ├── dns working.PNG │ ├── exec deployment.PNG │ ├── get svc.PNG │ ├── install vim.PNG │ ├── lb tags.PNG │ ├── nginx-service.PNG │ ├── rs.PNG │ ├── welcome to nginx.PNG │ ├── worker nodes.PNG │ └── worker nodes1.PNG ├── README.md └── project22.md ├── project-23 ├── Images │ ├── apply deployment.PNG │ ├── create cluster.PNG │ ├── create volume.PNG │ ├── describe a pod -o wide.PNG │ ├── edit pod file.PNG │ ├── exec deploy.PNG │ ├── get storageclass.PNG │ ├── node region.PNG │ ├── pvc pending.PNG │ ├── vbm.PNG │ ├── volume attached.PNG │ └── volume created.PNG ├── README.md └── project23.md ├── project-24 ├── Images │ ├── Artifactory.png │ ├── Jenkins password.png │ ├── Prometheus pods running.png │ ├── add grafana repo.png │ ├── add prometheus repo.png │ ├── artifactory install.png │ ├── artifactory login page.png │ ├── artifactory pods running.png │ ├── expose jenkins svc.png │ ├── expose prometheus svc.png │ ├── grafana homepage.png │ ├── grafana install.png │ ├── grafana login page.png │ ├── helm add jenkins repo.PNG │ ├── helm install jenkins.PNG │ ├── helm install.png │ ├── helm list.png │ ├── helm ls.png │ ├── helm repo update.PNG │ ├── homepage Prometheus.png │ ├── install prometheus.png │ ├── jenkins logged in.png │ ├── jenkins login page.png │ ├── kubectl describe jenkins-0.png │ ├── kubectl get logs jenkins.png │ ├── kubectl get pods.png │ ├── password for grafana.png │ ├── unseal secrets on vault.png │ └── vault operator keys.png └── Project24.md ├── project-25 ├── Images │ ├── Artifactory helm install.PNG │ ├── Artifactory-License.png │ ├── Artifactory-helm-page.png │ ├── Installation of KOPS.PNG │ ├── Ready Nodes.PNG │ ├── Select-artifactory-chart.png │ ├── artifactory pods ready.PNG │ ├── artifactory-get-started-1.png │ ├── artifactory-get-started-10.png │ ├── artifactory-get-started-11.png │ ├── artifactory-get-started-12.png │ ├── artifactory-get-started-13.png │ ├── artifactory-get-started-2.png │ ├── artifactory-get-started-3.png │ ├── artifactory-get-started-4.png │ ├── artifactory-get-started-5.png │ ├── artifactory-get-started-6.png │ ├── artifactory-get-started-7.png │ ├── artifactory-get-started-8.png │ ├── artifactory-get-started-9.png │ ├── artifactory-nginx-service-output.png │ ├── artifactory-nginx-service-output2.png │ ├── artifactory-tls-padlocked.png │ ├── cert-manager-1.jpeg │ ├── cert-manager-1.png │ ├── cert-manager-high-level-overview.svg │ ├── chrome-certificates-1.png │ ├── chrome-certificates-2.png │ ├── chrome-certificates-3.png │ ├── chrome-certificates-4.png │ ├── click-default-values.png │ ├── click-install.png │ ├── click-versions.png │ ├── create-r53-record--cname.png │ ├── create-r53-record-1.png │ ├── create-r53-record-alias-1.png │ ├── create-r53-record-alias-2.png │ ├── create-r53-record-cname-2.png │ ├── dns-checker.png │ ├── download-values.png │ ├── hosted-zone.png │ ├── ingress-classic-load-balancer.png │ ├── ingress.svg │ ├── insecure-web-2.png │ ├── insecure-web-3.png │ ├── insecure-web-4.png │ ├── insecure-web-5.png │ ├── insecure-web-6.png │ ├── insecure-web.png │ ├── jfrog-getting-started.png │ ├── jfrog-page.png │ ├── nginx-service-type.png │ ├── nginx-service.png │ ├── nginx-values-yaml.png │ ├── nginx-values.png │ ├── pods.png │ ├── search-artifactory-on-artifact-hub.png │ ├── search-values.png │ ├── see-versions.png │ └── services.png └── Project25.md ├── project-3 ├── Images │ ├── Add IP Address.PNG │ ├── Aws instance.PNG │ ├── Creating a DB.PNG │ ├── GET request.PNG │ ├── Install nodejs.PNG │ ├── Mlab cluster.PNG │ ├── Run app.PNG │ ├── Todo app.PNG │ ├── Update and Upgrade.PNG │ ├── add proxy.png │ ├── connect ip address.PNG │ ├── connection string.PNG │ ├── database connected.PNG │ ├── dotenv install.PNG │ ├── inbound security group.PNG │ ├── install concurrently.PNG │ ├── install express.PNG │ ├── install nodemon.PNG │ ├── install postman.PNG │ ├── mpm -v.PNG │ ├── node -v.PNG │ ├── node index.js │ ├── npm init.PNG │ ├── npm run dev.PNG │ ├── package script.png │ ├── react app client.PNG │ ├── react app.png │ ├── todo.PNG │ ├── todoDB.PNG │ └── welcome to Express.PNG ├── README.md └── project3.md ├── project-4 ├── Images │ ├── Mongodb Status.png │ ├── Mongodb install.png │ ├── body-parser npm.PNG │ ├── install express.PNG │ ├── install nodejs.png │ ├── mkdir book.PNG │ ├── node server.PNG │ ├── npm init.PNG │ ├── npm install.PNG │ └── successful link.PNG ├── README.md └── project4.md ├── project-5 ├── Images │ ├── AWS instances.PNG │ ├── Alter User.PNG │ ├── Client Architecture.PNG │ ├── Create a user on mysql.PNG │ ├── Edit bind-address.PNG │ ├── create database.PNG │ ├── grant all privileges.PNG │ ├── mysql secure installation.PNG │ ├── mysql-client install.PNG │ ├── mysql-server install.PNG │ ├── remote from mysql-client.PNG │ ├── security group.PNG │ ├── show databases.PNG │ └── status mysql.PNG ├── README.md └── project5.md ├── project-6 ├── Images │ ├── RedHat Instance.PNG │ ├── all mounts.PNG │ ├── attach volume.PNG │ ├── available partitions.PNG │ ├── configure database.PNG │ ├── connection successful on my webserver.PNG │ ├── create volumes.PNG │ ├── database bd.PNG │ ├── db servers.PNG │ ├── dependcies install.PNG │ ├── disk attched to volume.PNG │ ├── format logical volumes.PNG │ ├── install php.PNG │ ├── list block disk.PNG │ ├── logical volume status.PNG │ ├── logical volumes.PNG │ ├── lsblk.PNG │ ├── lvm install.PNG │ ├── mount for wordpress webserver.PNG │ ├── mount var-log.PNG │ ├── mysql webserver install.PNG │ ├── mysql-server install.PNG │ ├── pvcreate.PNG │ ├── pvs verify.PNG │ ├── restart mysqld.PNG │ ├── restore logs.PNG │ ├── rsync.PNG │ ├── sudo blkid.PNG │ ├── sudo start httpd.PNG │ ├── systemctl reload.PNG │ ├── test and reload daemon.PNG │ ├── vgcreate.PNG │ ├── vgdisplay.PNG │ ├── volume group status.PNG │ ├── volumes attached.PNG │ ├── wordpress.PNG │ ├── xvdf.PNG │ └── yum install update.PNG ├── README.md └── project6.md ├── project-7 ├── Images │ ├── Configure access to NFS.PNG │ ├── DB create user and database.PNG │ ├── DB-server mysql install.PNG │ ├── NFS volume list.PNG │ ├── admin-tooling page.PNG │ ├── all instances created.PNG │ ├── application diagram.PNG │ ├── apply tooling script.PNG │ ├── bind-address.PNG │ ├── copy html to var.PNG │ ├── create mnt folders.PNG │ ├── edit mysqld.PNG │ ├── format xfs.PNG │ ├── fstab.PNG │ ├── gdisk utility.PNG │ ├── git clone.PNG │ ├── install git.PNG │ ├── install lvm2.PNG │ ├── install mysql on web server.PNG │ ├── install nfs utility on webserver.PNG │ ├── install nfs-server and enable service.PNG │ ├── login page.PNG │ ├── lvcreate.PNG │ ├── mount all.PNG │ ├── mount and target the nfs server.PNG │ ├── mount httpd.PNG │ ├── mount logs.PNG │ ├── mysql port.PNG │ ├── nfs volumes.PNG │ ├── partition created.PNG │ ├── permissions.PNG │ ├── pvcreate.PNG │ ├── repo.PNG │ ├── selinux disabled.PNG │ ├── sudo lvmdiskscan.PNG │ ├── sudo lvs.PNG │ ├── sudo mysql.PNG │ ├── sudo pvs.PNG │ ├── tcp and udp.PNG │ ├── update website configuration.PNG │ ├── verify nfs mounted.PNG │ └── vgcreate.PNG ├── README.md └── project7.md ├── project-8 ├── Images │ ├── Enable modules.PNG │ ├── TCp port 80.PNG │ ├── apache install and libxml2.PNG │ ├── apache load-balancer instance.PNG │ ├── apache2 running.PNG │ ├── architecture for project 8.PNG │ ├── configure loadbalancer.PNG │ ├── curl web2.PNG │ ├── logs.PNG │ ├── sudo vi etc-hosts.PNG │ └── update LB.PNG ├── README.md └── project8.md └── project-9 ├── Images ├── add new item.PNG ├── archive 2.PNG ├── build complete.PNG ├── build triggers.PNG ├── build.PNG ├── change permissions.PNG ├── changes made to master branch.PNG ├── complete.PNG ├── configure jenkins to retrieve source code.PNG ├── copy link for code.PNG ├── installed suggested plugin.PNG ├── jenkins architecture.PNG ├── jenkins login page.PNG ├── jenkins server.PNG ├── jenkins status.PNG ├── plugins install.PNG ├── port 80.PNG ├── publish over ssh configuration.PNG ├── publish over ssh.PNG ├── send build artifact over ssh.PNG ├── source code mgt.PNG ├── syntax.PNG └── welcome to jenkins.PNG ├── README.md └── project9.md /README.md: -------------------------------------------------------------------------------- 1 | # DevOps_Projects 2 | 3 | Darey.io Project Based Learning 4 | 5 | The following projects will be implemented: 6 | 7 | 1. ***AWS-LAMP-STACK IMPLEMENTATION*** 8 | 9 | 2. ***LEMP STACK IMPLEMENTATION*** 10 | 11 | 3. ***MERN WEB STACK IMPLEMENTATION*** 12 | 13 | 4. ***MEAN STACK IMPLEMENTATION*** 14 | 15 | 5. ***IMPLEMENT A CLIENT SERVER ARCHITECTURE USING MYSQL DATABASE MANAGEMENT SYSTEM (DBMS)*** 16 | 17 | 6. ***WEB SOLUTION WITH WORDPRESS*** 18 | 19 | 7. ***DEVOPS TOOLING WEBSITE SOLUTION*** 20 | 21 | 8. ***LOAD BALANCER SOLUTION WITH APACHE*** 22 | 23 | 9. ***CONTINOUS INTEGRATION PIPELINE FOR TOOLING WEBSITE*** 24 | 25 | 10. ***LOAD BALANCER SOLUTION WITH NGINX AND SSL/TLS*** 26 | 27 | 11. ***ANSIBLE CONFIGURATION MANAGEMENT (Automate project 7 to 10)*** 28 | 29 | 12. ***ANSIBLE REFACTORING AND STATIC ASSIGNMENTS (IMPORTS AND ROLES)*** 30 | 31 | 13. ***ANSIBLE DYNAMIC ASSIGNMENTS (INCLUDE) AND COMMUNITY ROLES*** 32 | 33 | 34 | 14. ***EXPERIENCE CONTINUOUS INTEGRATION WITH JENKINS | ANSIBLE | ARTIFACTORY | SONARQUBE | PHP*** 35 | 36 | 37 | 15. ***AWS CLOUD SOLUTION FOR 2 COMPANY WEBSITES USING A REVERSE PROXY TECHNOLOGY*** 38 | 39 | 16. ***AUTOMATE INFRASTRUCTURE WITH IAC USING TERRAFORM PART 1*** 40 | 41 | 17. ***AUTOMATE INFRASTRUCTURE WITH IAC USING TERRAFORM. PART 2*** 42 | 43 | 18. ***AUTOMATE INFRASTRUCTURE WITH IAC USING TERRAFORM. PART 3 --Refactoring*** 44 | 45 | 19. ***Automate Infrastructure With IaC using Terraform – Terraform Cloud*** 46 | 47 | 20. ***MIGRATION TO THE СLOUD WITH CONTAINERIZATION PART 1 - DOCKER & DOCKER COMPOSE*** 48 | 49 | 21. ***ORCHESTRATING CONTAINERS ACROSS MULTIPLE VIRTUAL SERVERS WITH KUBERNETES. PART 1*** 50 | 51 | 22. ***DEPLOYING APPLICATIONS INTO KUBERNETES CLUSTER*** 52 | 53 | 23. ***PERSISTING DATA IN KUBERNETES*** 54 | 55 | 24. ***BUILDING ELASTIC KUBERNETES SERVICE (EKS) WITH TERRAFORM*** 56 | 57 | 25. ***PACKAGING CONTAINERIZED APPLICATION WITH HELM CHARTS*** 58 | -------------------------------------------------------------------------------- /project-1/Images/Apache2 status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-1/Images/Apache2 status.PNG -------------------------------------------------------------------------------- /project-1/Images/Curl localhost.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-1/Images/Curl localhost.PNG -------------------------------------------------------------------------------- /project-1/Images/Disable default apache site.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-1/Images/Disable default apache site.PNG -------------------------------------------------------------------------------- /project-1/Images/Homepage.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-1/Images/Homepage.PNG -------------------------------------------------------------------------------- /project-1/Images/PHP Version.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-1/Images/PHP Version.PNG -------------------------------------------------------------------------------- /project-1/Images/PHP.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-1/Images/PHP.PNG -------------------------------------------------------------------------------- /project-1/Images/a2ensite projectlamp.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-1/Images/a2ensite projectlamp.PNG -------------------------------------------------------------------------------- /project-1/Project1.md: -------------------------------------------------------------------------------- 1 | # DOCUMENTATION For AWS LAMP STACK IMPLEMENTATION 2 | ## This Project shows how to implement LAMP(Linux,Apache,Mysql,PhP) on AWS 3 | 4 | Before launching the Ubuntu virtual machine we need to install some dependencies on our local machine 5 | 6 | - [Install OpenSSH](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell#tabpanel_1_powershell) 7 | 8 | - [OpenSSH Key Management](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement#user-key-generation) 9 | 10 | - [Gooogle](https://google.com) 11 | 12 | 13 | This dependcies help to authenticate your laptop to have access to the server and github easily 14 | 15 | After launching the Ubuntu Virtual machine on AWS Account, Update it using; 16 | 17 | **`sudo apt update`** 18 | 19 | After the update is completed, following the instruction fromt the task assigned 20 | 21 | Install Apache using Ubuntu’s package manager ‘apt’: 22 | 23 | **`sudo apt install apache2`** 24 | 25 | To verify that apache2 is running as a Service in our ubuntu instance, use following command: 26 | 27 | **`sudo systemctl status apache2`** 28 | 29 | Below is the outcome of the apache status, which shows it is running and active 30 | 31 | ![Apache status](./Images/Apache2%20status.PNG) 32 | 33 | **Verify apache2 webpage is accessible from the server** 34 | 35 | **`curl http://localhost:80 36 | or curl http://:80`** 37 | 38 | ![Localhost status](./Images/Curl%20localhost.PNG) 39 | 40 | 41 | ## .............................. INSTALLING MSQL................................ 42 | 43 | --- 44 | 45 | 46 | Install Mysql on the ubuntu server. 47 | 48 | **`$ sudo apt install mysql-server -y`** 49 | 50 | 51 | Log into the MySQL console 52 | 53 | **`sudo mysql`** 54 | 55 | configure a database user on and set login password for Mysql 56 | 57 | **`ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'PassWord.1';`** 58 | 59 | Exit the shell with **`Exit`** 60 | 61 | Start MYSQL Interactive script, this will prompt you to configure the validate password plugin. 62 | 63 | **`sudo mysql_secure_installation`** 64 | 65 | Confirm ability to login to Mysql by running the commmand. 66 | 67 | **`sudo mysql -p`** 68 | 69 | To exit the MySQL console, type: 70 | 71 | **`mysql> exit`** 72 | 73 | 74 | 75 | ## ................................ INSTALLING PHP .................................. 76 | --- 77 | 78 | 79 | We will install 3 packages namely php, libapache2-mod-php, php-mysql. run this command to install all packages listed. 80 | 81 | **`sudo apt install php libapache2-mod-php php-mysql`** 82 | 83 | Confirm the php version 84 | 85 | **`php -v`** 86 | 87 | ![Php version](./Images/PHP%20Version.PNG) 88 | 89 | At this point we have successfully installed all 4 applications that make up the lamp stack 90 | 91 | - [x] Linux 92 | - [x] Apache Http Server 93 | - [x] MySQL 94 | - [x] PHP 95 | 96 | ## ...........CREATING A VIRTUAL HOST FOR YOUR WEBSITE USING APACHE ......... 97 | 98 | We will setup a virtual host to test the PHP script, virtual host enables you to setup multiple websites on a single server. 99 | 100 | Create the directory for projectlamp using ‘mkdir’ command 101 | 102 | **`sudo mkdir /var/www/projectlamp`** 103 | 104 | Next, assign ownership of the directory with your current system user: 105 | 106 | **`sudo chown -R $USER:$USER /var/www/projectlamp`** 107 | 108 | Create and open a new configuration file in Apache’s sites-available directory. 109 | 110 | **`sudo vi /etc/apache2/sites-available/projectlamp.conf`** 111 | 112 | ``` 113 | 114 | ServerName projectlamp 115 | ServerAlias www.projectlamp 116 | ServerAdmin webmaster@localhost 117 | DocumentRoot /var/www/projectlamp 118 | ErrorLog ${APACHE_LOG_DIR}/error.log 119 | CustomLog ${APACHE_LOG_DIR}/access.log combined 120 | 121 | ``` 122 | 123 | list the new file in the sites-available directory. 124 | 125 | **`sudo ls /etc/apache2/sites-available`** 126 | 127 | The output of the above command should be similar to this below 128 | 129 | ``` 130 | 000-default.conf default-ssl.conf projectlamp.conf 131 | ``` 132 | Thus, we have set /var/www/projectlampl as the root directory for Projectlamp. 133 | 134 | Let us enable the new virtual host with the a2ensite command 135 | 136 | **`sudo a2ensite projectlamp`** 137 | 138 | ![Enable projectlamp site](./Images/a2ensite%20projectlamp.PNG) 139 | 140 | Disable the default site with a2dissite command 141 | 142 | **`sudo a2dissite 000-default`** 143 | 144 | ![Disable default apache site](./Images/Disable%20default%20apache%20site.PNG) 145 | 146 | 147 | Run the below command to check for syntax errors in the configuration file. 148 | 149 | **`sudo apache2ctl configtest`** 150 | 151 | Reload Apache service for changes to take efffect 152 | 153 | **`sudo systemctl reload apache2`** 154 | 155 | **Create an index file in the projectlamp folder.** 156 | ``` 157 | sudo echo 'Hello LAMP from hostname' $(curl -s http://169.254.169.254/latest/meta-data/public-hostname) 'with public IP' $(curl -s http://169.254.169.254/latest/meta-data/public-ipv4) > /var/www/projectlamp/index.html 158 | ``` 159 | 160 | Go to your browser and try to open your website URL using IP address: 161 | 162 | **`http://:80`** 163 | 164 | 165 | Prefarrably you can also use the DNS name, the port is optional as it defaults to 80. 166 | 167 | **`http://:80`** 168 | 169 | 170 | ![Homepage index.html](./Images/Homepage.PNG) 171 | 172 | 173 | 174 | ## .............................ENABLE PHP ON THE WEBSITE....................... 175 | --- 176 | 177 | With the default DirectoryIndex settings on Apache, the index.html file takes precedence, lets modify this and give precedence to the index.php file. 178 | 179 | We need to edit the /etc/apache2/mods-enabled/dir.conf file and change the order in which the index.php file is listed within the DirectoryIndex directive: 180 | 181 | **`sudo vim /etc/apache2/mods-enabled/dir.conf`** 182 | 183 | ``` 184 | 185 | #Change this: 186 | #DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm 187 | #To this: 188 | DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm 189 | 190 | ``` 191 | 192 | Save and close the file, The Apache service needs to be restarted for the changes to take effect. 193 | 194 | **`sudo systemctl reload apache2`** 195 | 196 | Create a new file named index.php inside the projectlamp root folder: 197 | 198 | **`vim /var/www/projectlamp/index.php`** 199 | 200 | ``` 201 | 118 | 119 | 4. Configure Nginx to recognize your new domain name 120 | Update your nginx.conf with server_name www. instead of server_name www.domain.com 121 | 122 | 123 | 5. Install certbot and request for an SSL/TLS certificate 124 | Make sure snapd service is active and running 125 | 126 | ``` 127 | sudo systemctl status snapd 128 | ``` 129 | 130 | Install certbot 131 | 132 | ``` 133 | sudo snap install --classic certbot 134 | ``` 135 | 136 | ![certbot install](./Images/install%20certbot.PNG) 137 | 138 | Request your certificate (just follow the certbot instructions – you will need to choose which domain you want your certificate to be issued for, domain name will be looked up from nginx.conf file so make sure you have updated it on step 4). 139 | 140 | 141 | ``` 142 | sudo ln -s /snap/bin/certbot /usr/bin/certbot 143 | sudo certbot --nginx 144 | ``` 145 | 146 | 147 | Test secured access to your Web Solution by trying to reach https:// 148 | 149 | You shall be able to access your website by using HTTPS protocol (that uses TCP port 443) and see a padlock pictogram in your browser’s search string. 150 | 151 | 152 | Click on the padlock icon and you can see the details of the certificate issued for your website. 153 | 154 | 155 | 6. Set up periodical renewal of your SSL/TLS certificate 156 | 157 | 158 | By default, LetsEncrypt certificate is valid for 90 days, so it is recommended to renew it at least every 60 days or more frequently. 159 | 160 | 161 | You can test renewal command in dry-run mode 162 | 163 | ``` 164 | sudo certbot renew --dry-run 165 | ``` 166 | 167 | Best pracice is to have a scheduled job that to run renew command periodically. Let us configure a cronjob to run the command twice a day. 168 | 169 | 170 | To do so, lets edit the crontab file with the following command: 171 | 172 | ``` 173 | crontab -e 174 | ``` 175 | 176 | Add following line: 177 | 178 | ``` 179 | * */12 * * * root /usr/bin/certbot renew > /dev/null 2>&1 180 | ``` 181 | 182 | You can always change the interval of this cronjob if twice a day is too often by adjusting schedule expression. 183 | 184 | 185 | -------------------------------------------------------------------------------- /project-11/Images/ansible client as jump server.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/ansible client as jump server.PNG -------------------------------------------------------------------------------- /project-11/Images/ansible configuration.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/ansible configuration.PNG -------------------------------------------------------------------------------- /project-11/Images/ansible version.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/ansible version.PNG -------------------------------------------------------------------------------- /project-11/Images/checking build on server.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/checking build on server.PNG -------------------------------------------------------------------------------- /project-11/Images/checking the ansible build.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/checking the ansible build.PNG -------------------------------------------------------------------------------- /project-11/Images/create repo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/create repo.PNG -------------------------------------------------------------------------------- /project-11/Images/final architecture.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/final architecture.PNG -------------------------------------------------------------------------------- /project-11/Images/git clone ansible.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/git clone ansible.PNG -------------------------------------------------------------------------------- /project-11/Images/install ansible.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/install ansible.PNG -------------------------------------------------------------------------------- /project-11/Images/new architecture.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/new architecture.PNG -------------------------------------------------------------------------------- /project-11/Images/run ansible playbook.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/run ansible playbook.PNG -------------------------------------------------------------------------------- /project-11/Images/ssh-add -l.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/ssh-add -l.PNG -------------------------------------------------------------------------------- /project-11/Images/webhook.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-11/Images/webhook.PNG -------------------------------------------------------------------------------- /project-11/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-11 2 | 3 | ANSIBLE CONFIGURATION MANAGEMENT – AUTOMATE PROJECT 7 TO 10 -------------------------------------------------------------------------------- /project-12/Images/build step.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/build step.PNG -------------------------------------------------------------------------------- /project-12/Images/build trigger.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/build trigger.PNG -------------------------------------------------------------------------------- /project-12/Images/create directory and permission.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/create directory and permission.PNG -------------------------------------------------------------------------------- /project-12/Images/create roles.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/create roles.PNG -------------------------------------------------------------------------------- /project-12/Images/final architecture.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/final architecture.PNG -------------------------------------------------------------------------------- /project-12/Images/install copy artifact.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/install copy artifact.PNG -------------------------------------------------------------------------------- /project-12/Images/name project.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/name project.PNG -------------------------------------------------------------------------------- /project-12/Images/running ansible playbook for site.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/running ansible playbook for site.PNG -------------------------------------------------------------------------------- /project-12/Images/testing build.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/testing build.PNG -------------------------------------------------------------------------------- /project-12/Images/uat servers.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/uat servers.PNG -------------------------------------------------------------------------------- /project-12/Images/view.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/view.PNG -------------------------------------------------------------------------------- /project-12/Images/web-uat server.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-12/Images/web-uat server.PNG -------------------------------------------------------------------------------- /project-12/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-12 2 | 3 | ANSIBLE REFACTORING AND STATIC ASSIGNMENTS (IMPORTS AND ROLES) -------------------------------------------------------------------------------- /project-13/Images/ansible playbook running.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-13/Images/ansible playbook running.PNG -------------------------------------------------------------------------------- /project-13/Images/edit database credentials.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-13/Images/edit database credentials.PNG -------------------------------------------------------------------------------- /project-13/Images/edit webservers.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-13/Images/edit webservers.PNG -------------------------------------------------------------------------------- /project-13/Images/final play.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-13/Images/final play.PNG -------------------------------------------------------------------------------- /project-13/Images/install apache and nginx.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-13/Images/install apache and nginx.PNG -------------------------------------------------------------------------------- /project-13/Images/roles.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-13/Images/roles.PNG -------------------------------------------------------------------------------- /project-13/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-13 2 | 3 | ANSIBLE DYNAMIC ASSIGNMENTS (INCLUDE) AND COMMUNITY ROLES 4 | -------------------------------------------------------------------------------- /project-13/project13.md: -------------------------------------------------------------------------------- 1 | ## **ANSIBLE DYNAMIC ASSIGNMENTS (INCLUDE) AND COMMUNITY ROLES** 2 | --- 3 | 4 | **INTRODUCING DYNAMIC ASSIGNMENT INTO OUR STRUCTURE** 5 | 6 | 7 | 1. In your https://github.com//ansible-config-mgt GitHub repository start a new branch and call it `dynamic-assignments`. 8 | 9 | 2. Create a new folder, name it `dynamic-assignments`. Then inside this folder, create a new file and name it `env-vars.yml`. We will instruct `site.yml` to include this playbook later. 10 | 11 | Your GitHub shall have following structure by now. 12 | 13 | Note: Depending on what method you used in the previous project you may have or not have `roles` folder in your GitHub repository – if you used ansible-galaxy, then roles directory was only created on your `Jenkins-Ansible` server locally. It is recommended to have all the codes managed and tracked in GitHub, so you might want to recreate this structure manually in this case. 14 | 15 | ``` 16 | ├── dynamic-assignments 17 | │ └── env-vars.yml 18 | ├── inventory 19 | │ └── dev 20 | └── stage 21 | └── uat 22 | └── prod 23 | └── playbooks 24 | └── site.yml 25 | └── roles (optional folder) 26 | └──...(optional subfolders & files) 27 | └── static-assignments 28 | └── common.yml 29 | ``` 30 | 31 | Since we will be using the same Ansible to configure multiple environments, and each of these environments will have certain unique attributes, such as servername, ip-address etc., we will need a way to set values to variables per specific environment. 32 | 33 | For this reason, we will now create a folder to keep each environment’s variables file. Therefore, create a new folder env-vars, then for each environment, create new YAML files which we will use to set variables. 34 | 35 | Your layout should now look like this. 36 | 37 | ``` 38 | ├── dynamic-assignments 39 | │ └── env-vars.yml 40 | ├── env-vars 41 | └── dev.yml 42 | └── stage.yml 43 | └── uat.yml 44 | └── prod.yml 45 | ├── inventory 46 | └── dev 47 | └── stage 48 | └── uat 49 | └── prod 50 | ├── playbooks 51 | └── site.yml 52 | └── static-assignments 53 | └── common.yml 54 | └── webservers.yml 55 | ``` 56 | 57 | ![roles created](./Images/roles.PNG) 58 | 59 | Now paste the instruction below into the env-vars.yml file. 60 | 61 | ``` 62 | --- 63 | - name: collate variables from env specific file, if it exists 64 | hosts: all 65 | tasks: 66 | - name: looping through list of available files 67 | include_vars: "{{ item }}" 68 | with_first_found: 69 | - files: 70 | - dev.yml 71 | - stage.yml 72 | - prod.yml 73 | - uat.yml 74 | paths: 75 | - "{{ playbook_dir }}/../env-vars" 76 | tags: 77 | - always 78 | ``` 79 | 80 | 81 | 82 | 83 | ## UPDATE SITE.YML WITH DYNAMIC ASSIGNMENTS 84 | 85 | 86 | Update site.yml with dynamic assignments 87 | 88 | Update `site.yml` file to make use of the dynamic assignment. (At this point, we cannot test it yet. We are just setting the stage for what is yet to come. So hang on to your hats) 89 | 90 | site.yml should now look like this. 91 | 92 | ``` 93 | --- 94 | - hosts: all 95 | - name: Include dynamic variables 96 | tasks: 97 | import_playbook: ../static-assignments/common.yml 98 | include: ../dynamic-assignments/env-vars.yml 99 | tags: 100 | - always 101 | 102 | - hosts: webservers 103 | - name: Webserver assignment 104 | import_playbook: ../static-assignments/webservers.yml 105 | ``` 106 | 107 | 108 | ## Community Roles 109 | 110 | 111 | Now it is time to create a role for MySQL database – it should install the MySQL package, create a database and configure users. But why should we re-invent the wheel? There are tons of roles that have already been developed by other open source engineers out there. These roles are actually production ready, and dynamic to accomodate most of Linux flavours. With Ansible Galaxy again, we can simply download a ready to use ansible role, and keep going. 112 | 113 | Download Mysql Ansible Role 114 | 115 | We will be using a MySQL role developed by geerlingguy 116 | 117 | 118 | Inside `roles` directory create your new MySQL role with `ansible-galaxy install geerlingguy.mysql -p .` and rename the folder to `mysql` 119 | 120 | ``` 121 | mv geerlingguy.mysql/ mysql 122 | ``` 123 | 124 | Inside `roles` directory create your new MySQL role with `ansible-galaxy install geerlingguy.nginx -p .` and rename the folder to `nginxRole` 125 | 126 | 127 | ``` 128 | mv geerlingguy.nginx/ nginxRole 129 | ``` 130 | 131 | 132 | Inside `roles` directory create your new MySQL role with `ansible-galaxy install geerlingguy.apache -p .` and rename the folder to `apacheRole` 133 | 134 | 135 | ``` 136 | mv geerlingguy.apache/ apacheRole 137 | ``` 138 | 139 | ![install nginx and apache roles](./Images/install%20apache%20and%20nginx.PNG) 140 | 141 | 142 | ## LOAD BALANCER ROLES 143 | 144 | We want to be able to choose which Load Balancer to use, Nginx or Apache, so we need to have two roles respectively: 145 | 146 | 1. Nginx 147 | 148 | 2. Apache 149 | 150 | 151 | ## **Important Hints:** 152 | 153 | * Since you cannot use both **Nginx** and **Apache** load balancer, you need to add a condition to enable either one – this is where you can make use of variables. 154 | 155 | * Declare a variable in `defaults/main.yml` file inside the Nginx and Apache roles. Name each variables `enable_nginx_lb` and `enable_apache_lb` respectively. 156 | 157 | * Set both values to false like this `enable_nginx_lb: false` and `enable_apache_lb: false`. 158 | 159 | * Declare another variable in both roles `load_balancer_is_required` and set its value to `false` as well 160 | 161 | * Update both assignment and site.yml files respectively 162 | 163 | `loadbalancers.yml` file 164 | ``` 165 | - hosts: lb 166 | roles: 167 | - { role: nginx, when: enable_nginx_lb and load_balancer_is_required } 168 | - { role: apache, when: enable_apache_lb and load_balancer_is_required } 169 | ``` 170 | `site.yml` file 171 | ``` 172 | 173 | - name: Loadbalancers assignment 174 | hosts: lb 175 | - import_playbook: ../static-assignments/loadbalancers.yml 176 | when: load_balancer_is_required 177 | ``` 178 | 179 | Now you can make use of `env-vars\uat.yml` file to define which loadbalancer to use in UAT environment by setting respective environmental variable to `true`. 180 | 181 | You will activate load balancer, and enable `nginx` by setting these in the respective environment’s env-vars file. 182 | 183 | ``` 184 | enable_nginx_lb: true 185 | load_balancer_is_required: true 186 | ``` 187 | 188 | The same must work with `apache` LB, so you can switch it by setting respective environmental variable to `true` and other to `false`. 189 | 190 | 191 | Run Playbook using: 192 | 193 | ``` 194 | ansible-playbook -i inventory/uat.yml playbooks/site.yml 195 | ``` 196 | 197 | 198 | ![Ansible playbook](./Images/ansible%20playbook%20running.PNG) 199 | 200 | 201 | ![final play](./Images/final%20play.PNG) 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /project-14/Images/CI-CD for nginx and DB cont'd.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/CI-CD for nginx and DB cont'd.PNG -------------------------------------------------------------------------------- /project-14/Images/CI-CD for nginx and DB.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/CI-CD for nginx and DB.PNG -------------------------------------------------------------------------------- /project-14/Images/add configuration to sonar-scanner.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/add configuration to sonar-scanner.PNG -------------------------------------------------------------------------------- /project-14/Images/add deploy clean up.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/add deploy clean up.PNG -------------------------------------------------------------------------------- /project-14/Images/ansible-config.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/ansible-config.PNG -------------------------------------------------------------------------------- /project-14/Images/artifactory playbook.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/artifactory playbook.PNG -------------------------------------------------------------------------------- /project-14/Images/blueocean deploy and clean up.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/blueocean deploy and clean up.PNG -------------------------------------------------------------------------------- /project-14/Images/blueocean setup.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/blueocean setup.PNG -------------------------------------------------------------------------------- /project-14/Images/build for CI inventory.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/build for CI inventory.PNG -------------------------------------------------------------------------------- /project-14/Images/build now.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/build now.PNG -------------------------------------------------------------------------------- /project-14/Images/choose repo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/choose repo.PNG -------------------------------------------------------------------------------- /project-14/Images/ci-cd architecture.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/ci-cd architecture.PNG -------------------------------------------------------------------------------- /project-14/Images/configure ansible-config.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/configure ansible-config.PNG -------------------------------------------------------------------------------- /project-14/Images/configure artifactory on jenkins.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/configure artifactory on jenkins.PNG -------------------------------------------------------------------------------- /project-14/Images/configure sonarqube on jenkins.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/configure sonarqube on jenkins.PNG -------------------------------------------------------------------------------- /project-14/Images/create homestead database and user.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/create homestead database and user.PNG -------------------------------------------------------------------------------- /project-14/Images/create homestead database and user2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/create homestead database and user2.PNG -------------------------------------------------------------------------------- /project-14/Images/create jenkinsfile.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/create jenkinsfile.PNG -------------------------------------------------------------------------------- /project-14/Images/database created.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/database created.PNG -------------------------------------------------------------------------------- /project-14/Images/deployment to dev env.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/deployment to dev env.PNG -------------------------------------------------------------------------------- /project-14/Images/echo building stage.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/echo building stage.PNG -------------------------------------------------------------------------------- /project-14/Images/edit bind address.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/edit bind address.PNG -------------------------------------------------------------------------------- /project-14/Images/edit the env-sample.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/edit the env-sample.PNG -------------------------------------------------------------------------------- /project-14/Images/error due to DB connection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/error due to DB connection.PNG -------------------------------------------------------------------------------- /project-14/Images/execute unit test.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/execute unit test.PNG -------------------------------------------------------------------------------- /project-14/Images/feature-jenkinspipeline.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/feature-jenkinspipeline.PNG -------------------------------------------------------------------------------- /project-14/Images/generate pipeline syntax1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/generate pipeline syntax1.PNG -------------------------------------------------------------------------------- /project-14/Images/generate pipeline syntax2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/generate pipeline syntax2.PNG -------------------------------------------------------------------------------- /project-14/Images/generate token.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/generate token.PNG -------------------------------------------------------------------------------- /project-14/Images/install ansible plugin.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/install ansible plugin.PNG -------------------------------------------------------------------------------- /project-14/Images/install php and dependencies.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/install php and dependencies.PNG -------------------------------------------------------------------------------- /project-14/Images/install sonarqube scanner.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/install sonarqube scanner.PNG -------------------------------------------------------------------------------- /project-14/Images/installing sonarqube.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/installing sonarqube.PNG -------------------------------------------------------------------------------- /project-14/Images/jenkins-ansible connection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/jenkins-ansible connection.PNG -------------------------------------------------------------------------------- /project-14/Images/jforg homepage.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/jforg homepage.PNG -------------------------------------------------------------------------------- /project-14/Images/new pipeline.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/new pipeline.PNG -------------------------------------------------------------------------------- /project-14/Images/no deploy to dev env.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/no deploy to dev env.PNG -------------------------------------------------------------------------------- /project-14/Images/open ports for artifactory.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/open ports for artifactory.PNG -------------------------------------------------------------------------------- /project-14/Images/php db connection successfull.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/php db connection successfull.PNG -------------------------------------------------------------------------------- /project-14/Images/phploc graph.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/phploc graph.PNG -------------------------------------------------------------------------------- /project-14/Images/phploc not installed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/phploc not installed.PNG -------------------------------------------------------------------------------- /project-14/Images/plot build.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/plot build.PNG -------------------------------------------------------------------------------- /project-14/Images/sonarqube dashboard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/sonarqube dashboard.PNG -------------------------------------------------------------------------------- /project-14/Images/sonarqube error.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/sonarqube error.PNG -------------------------------------------------------------------------------- /project-14/Images/sonarqube login.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/sonarqube login.PNG -------------------------------------------------------------------------------- /project-14/Images/todo app.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/todo app.PNG -------------------------------------------------------------------------------- /project-14/Images/todo to artifactory.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/todo to artifactory.PNG -------------------------------------------------------------------------------- /project-14/Images/token for sonarqube.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-14/Images/token for sonarqube.PNG -------------------------------------------------------------------------------- /project-14/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-14 2 | 3 | EXPERIENCE CONTINUOUS INTEGRATION WITH JENKINS | ANSIBLE | ARTIFACTORY | SONARQUBE | PHP -------------------------------------------------------------------------------- /project-15/Images/KMS created.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/KMS created.PNG -------------------------------------------------------------------------------- /project-15/Images/access points for tooling and wordpress.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/access points for tooling and wordpress.PNG -------------------------------------------------------------------------------- /project-15/Images/adding rules.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/adding rules.PNG -------------------------------------------------------------------------------- /project-15/Images/all redhat servers.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/all redhat servers.PNG -------------------------------------------------------------------------------- /project-15/Images/architecture diagram.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/architecture diagram.PNG -------------------------------------------------------------------------------- /project-15/Images/attache the igw to a VPC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/attache the igw to a VPC.PNG -------------------------------------------------------------------------------- /project-15/Images/auto-scaling groups.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/auto-scaling groups.PNG -------------------------------------------------------------------------------- /project-15/Images/create NAT gateway.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/create NAT gateway.PNG -------------------------------------------------------------------------------- /project-15/Images/create TCS-igw.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/create TCS-igw.PNG -------------------------------------------------------------------------------- /project-15/Images/create a new VPC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/create a new VPC.PNG -------------------------------------------------------------------------------- /project-15/Images/create bastion SG.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/create bastion SG.PNG -------------------------------------------------------------------------------- /project-15/Images/create db subnet group.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/create db subnet group.PNG -------------------------------------------------------------------------------- /project-15/Images/create tcs-webserver-ami.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/create tcs-webserver-ami.PNG -------------------------------------------------------------------------------- /project-15/Images/creating Access point.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/creating Access point.PNG -------------------------------------------------------------------------------- /project-15/Images/creating EFS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/creating EFS.PNG -------------------------------------------------------------------------------- /project-15/Images/creating database tooling and wordpress.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/creating database tooling and wordpress.PNG -------------------------------------------------------------------------------- /project-15/Images/creating database.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/creating database.PNG -------------------------------------------------------------------------------- /project-15/Images/creating target groups.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/creating target groups.PNG -------------------------------------------------------------------------------- /project-15/Images/domain creation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/domain creation.PNG -------------------------------------------------------------------------------- /project-15/Images/enable dns hostname.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/enable dns hostname.PNG -------------------------------------------------------------------------------- /project-15/Images/launch template.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/launch template.PNG -------------------------------------------------------------------------------- /project-15/Images/loadbalancers.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/loadbalancers.PNG -------------------------------------------------------------------------------- /project-15/Images/mounting the EFS to webserver.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/mounting the EFS to webserver.PNG -------------------------------------------------------------------------------- /project-15/Images/private subnet created.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/private subnet created.PNG -------------------------------------------------------------------------------- /project-15/Images/route 53 records.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/route 53 records.PNG -------------------------------------------------------------------------------- /project-15/Images/self signed certificate for nginx.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/self signed certificate for nginx.PNG -------------------------------------------------------------------------------- /project-15/Images/tooling webpage.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-15/Images/tooling webpage.PNG -------------------------------------------------------------------------------- /project-15/Installation.md: -------------------------------------------------------------------------------- 1 | ## Installation Commands for setting up Webserver, NGINX and Bation AMIs 2 | # 3 | 4 | - create security group first 5 | - create certificate 6 | - create ALB 7 | - create Launch template 8 | - create Austocaling 9 | 10 | 11 | 12 | # Bastion ami installation 13 | # 14 | yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 15 | 16 | yum install -y dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm 17 | 18 | yum install wget vim python3 telnet htop git mysql net-tools chrony -y 19 | 20 | systemctl start chronyd 21 | 22 | systemctl enable chronyd 23 | # 24 | # Nginx ami installation 25 | ``` 26 | yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 27 | 28 | yum install -y dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm 29 | 30 | yum install wget vim python3 telnet htop git mysql net-tools chrony -y 31 | 32 | systemctl start chronyd 33 | 34 | systemctl enable chronyd 35 | ``` 36 | ### configure selinux policies for the webservers and nginx servers 37 | ``` 38 | setsebool -P httpd_can_network_connect=1 39 | setsebool -P httpd_can_network_connect_db=1 40 | setsebool -P httpd_execmem=1 41 | setsebool -P httpd_use_nfs 1 42 | ``` 43 | ## This section will instll amazon efs utils for mounting the target on the Elastic file system 44 | ``` 45 | git clone https://github.com/aws/efs-utils 46 | 47 | cd efs-utils 48 | 49 | yum install -y make 50 | 51 | yum install -y rpm-build 52 | 53 | make rpm 54 | 55 | yum install -y ./build/amazon-efs-utils*rpm 56 | ``` 57 | ### Seting up self-signed certificate for the nginx instance 58 | ``` 59 | sudo mkdir /etc/ssl/private 60 | 61 | sudo chmod 700 /etc/ssl/private 62 | 63 | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/ACS.key -out /etc/ssl/certs/ACS.crt 64 | 65 | sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 66 | ``` 67 | # 68 | 69 | # webserver ami installation 70 | ``` 71 | yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 72 | 73 | yum install -y dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm 74 | 75 | yum install wget vim python3 telnet htop git mysql net-tools chrony -y 76 | 77 | systemctl start chronyd 78 | 79 | systemctl enable chronyd 80 | ``` 81 | ## configure selinux policies for the webservers and nginx servers 82 | ``` 83 | setsebool -P httpd_can_network_connect=1 84 | setsebool -P httpd_can_network_connect_db=1 85 | setsebool -P httpd_execmem=1 86 | setsebool -P httpd_use_nfs 1 87 | ``` 88 | ## this section will instll amazon efs utils for mounting the target on the Elastic file system 89 | ``` 90 | git clone https://github.com/aws/efs-utils 91 | 92 | cd efs-utils 93 | 94 | yum install -y make 95 | 96 | yum install -y rpm-build 97 | 98 | make rpm 99 | 100 | yum install -y ./build/amazon-efs-utils*rpm 101 | ``` 102 | 103 | ## seting up self-signed certificate for the apache webserver instance 104 | ``` 105 | yum install -y mod_ssl 106 | 107 | openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/ACS.key -x509 -days 365 -out /etc/pki/tls/certs/ACS.crt 108 | 109 | vi /etc/httpd/conf.d/ssl.conf 110 | ``` 111 | 112 | 113 | 114 | 115 | # Login into the RDS instnace and create database for wordpress and tooling wordpress and tooling database 116 | mysql -h acs-database.cdqpbjkethv0.us-east-1.rds.amazonaws.com -u ACSadmin -p 117 | 118 | CREATE DATABASE toolingdb; 119 | CREATE DATABASE wordpressdb; 120 | 121 | 122 | # References 123 | [IP ranges](https://ipinfo.io/ips) 124 | 125 | [ssh-gent forwarding on mobaxterm](http://docs.gcc.rug.nl/hyperchicken/ssh-agent-forwarding-mobaxterm/) 126 | 127 | [Nginx reverse proxy server](https://www.nginx.com/resources/glossary/reverse-proxy-server/) 128 | 129 | [Underdstanding ec2 user data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) 130 | 131 | [Manually installing the Amazon EFS client](https://docs.aws.amazon.com/efs/latest/ug/installing-amazon-efs-utils.html#installing-other-distro) 132 | 133 | [creating target groups for AWS Loadbalancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html) 134 | 135 | [Self-Signed SSL Certificate for Apache](https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-on-centos-8) 136 | 137 | [Create a Self-Signed SSL Certificate for Nginx](https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-on-centos-7) -------------------------------------------------------------------------------- /project-15/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-15 2 | 3 | AWS CLOUD SOLUTION FOR 2 COMPANY WEBSITES USING A REVERSE PROXY TECHNOLOGY -------------------------------------------------------------------------------- /project-16/Images/PBL folder.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/PBL folder.PNG -------------------------------------------------------------------------------- /project-16/Images/admin access.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/admin access.PNG -------------------------------------------------------------------------------- /project-16/Images/aws s3 ls.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/aws s3 ls.PNG -------------------------------------------------------------------------------- /project-16/Images/code refactoring.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/code refactoring.PNG -------------------------------------------------------------------------------- /project-16/Images/create IAM user.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/create IAM user.PNG -------------------------------------------------------------------------------- /project-16/Images/creation of subnets terraform plan.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/creation of subnets terraform plan.PNG -------------------------------------------------------------------------------- /project-16/Images/final creation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/final creation.PNG -------------------------------------------------------------------------------- /project-16/Images/install boto3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/install boto3.PNG -------------------------------------------------------------------------------- /project-16/Images/terraform apply for VPC.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/terraform apply for VPC.PNG -------------------------------------------------------------------------------- /project-16/Images/terraform bucket.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/terraform bucket.PNG -------------------------------------------------------------------------------- /project-16/Images/terraform console.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/terraform console.PNG -------------------------------------------------------------------------------- /project-16/Images/terraform init.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-16/Images/terraform init.PNG -------------------------------------------------------------------------------- /project-16/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-16 2 | 3 | AUTOMATE INFRASTRUCTURE WITH IAC USING TERRAFORM PART 1 -------------------------------------------------------------------------------- /project-17/Images/Architecture.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-17/Images/Architecture.PNG -------------------------------------------------------------------------------- /project-17/Images/VPC-NAT-IGW.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-17/Images/VPC-NAT-IGW.PNG -------------------------------------------------------------------------------- /project-17/Images/addition of tags.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-17/Images/addition of tags.PNG -------------------------------------------------------------------------------- /project-17/Images/create private subnets.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-17/Images/create private subnets.PNG -------------------------------------------------------------------------------- /project-17/Images/final apply.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-17/Images/final apply.PNG -------------------------------------------------------------------------------- /project-17/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-17 2 | 3 | AUTOMATE INFRASTRUCTURE WITH IAC USING TERRAFORM. PART 2 -------------------------------------------------------------------------------- /project-18/Images/state list.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-18/Images/state list.PNG -------------------------------------------------------------------------------- /project-18/Images/state list2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-18/Images/state list2.PNG -------------------------------------------------------------------------------- /project-18/Images/terraform plan.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-18/Images/terraform plan.PNG -------------------------------------------------------------------------------- /project-18/Images/terraform plan1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-18/Images/terraform plan1.PNG -------------------------------------------------------------------------------- /project-18/Images/terraform plan2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-18/Images/terraform plan2.PNG -------------------------------------------------------------------------------- /project-18/Images/terraform plan3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-18/Images/terraform plan3.PNG -------------------------------------------------------------------------------- /project-18/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-18 2 | 3 | AUTOMATE INFRASTRUCTURE WITH IAC USING TERRAFORM. PART 3 --Refactoring -------------------------------------------------------------------------------- /project-18/project18.md: -------------------------------------------------------------------------------- 1 | # AUTOMATING INFRASTRUCTURE WITH IAC USING TERRAFORM PART 3 – REFACTORING 2 | 3 | ## INTRODUCTION 4 | 5 | In continuation to Project 17, the entire code is refactored inorder to simplify the code using a Terraform tool called Module. 6 | 7 | The following outlines detailed step taken to achieve this: 8 | 9 | 10 | # STEP: Configuring A Backend On The S3 Bucket 11 | 12 | By default the Terraform state is stored locally, to store it remotely on AWS using S3 bucket as the backend and also making use of DynamoDB as the State Locking the following setup is done: 13 | 14 | - Creating a file called Backend.tf and entering the following code: 15 | 16 | ``` 17 | resource "aws_s3_bucket" "terraform-state" { 18 | bucket = "tony-terraform" 19 | force_destroy = true 20 | } 21 | resource "aws_s3_bucket_versioning" "version" { 22 | bucket = aws_s3_bucket.terraform-state.id 23 | versioning_configuration { 24 | status = "Enabled" 25 | } 26 | } 27 | resource "aws_s3_bucket_server_side_encryption_configuration" "first" { 28 | bucket = aws_s3_bucket.terraform-state.id 29 | rule { 30 | apply_server_side_encryption_by_default { 31 | sse_algorithm = "AES256" 32 | } 33 | } 34 | } 35 | ``` 36 | 37 | - Adding the following code which creates a DynamoDB table to handle locks and perform consistency checks: 38 | 39 | ``` 40 | resource "aws_dynamodb_table" "terraform_locks" { 41 | name = "terraform-locks" 42 | billing_mode = "PAY_PER_REQUEST" 43 | hash_key = "LockID" 44 | attribute { 45 | name = "LockID" 46 | type = "S" 47 | } 48 | } 49 | ``` 50 | - Since Terraform expects that both S3 bucket and DynamoDB resources are already created before configuring the backend, executing terraform apply command: 51 | 52 | 53 | ![](./Images/terraform%20plan.PNG) 54 | 55 | ![](./Images/terraform%20plan1.PNG) 56 | 57 | ![](./Images/state%20list.PNG) 58 | 59 | 60 | 61 | The implementation of terraform modularization for this project can be found in this repository: 62 | 63 | 64 | [Terraform-modular-code-repo](https://github.com/Tonybesto/TCS-Modular-Terraform-Architecture) 65 | -------------------------------------------------------------------------------- /project-19/Images/access-key and ID.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/access-key and ID.PNG -------------------------------------------------------------------------------- /project-19/Images/ansible-graph.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/ansible-graph.PNG -------------------------------------------------------------------------------- /project-19/Images/apply finished.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/apply finished.PNG -------------------------------------------------------------------------------- /project-19/Images/bastion AMI.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/bastion AMI.PNG -------------------------------------------------------------------------------- /project-19/Images/create organization.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/create organization.PNG -------------------------------------------------------------------------------- /project-19/Images/created AMI.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/created AMI.PNG -------------------------------------------------------------------------------- /project-19/Images/first apply.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/first apply.PNG -------------------------------------------------------------------------------- /project-19/Images/nginx AMI.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/nginx AMI.PNG -------------------------------------------------------------------------------- /project-19/Images/terraform cloud plan.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/terraform cloud plan.PNG -------------------------------------------------------------------------------- /project-19/Images/terraform destroy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/terraform destroy.PNG -------------------------------------------------------------------------------- /project-19/Images/tooling site.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/tooling site.PNG -------------------------------------------------------------------------------- /project-19/Images/update terraform auto.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/update terraform auto.PNG -------------------------------------------------------------------------------- /project-19/Images/update variables.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/update variables.PNG -------------------------------------------------------------------------------- /project-19/Images/wordpress.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/wordpress.PNG -------------------------------------------------------------------------------- /project-19/Images/workspace.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-19/Images/workspace.PNG -------------------------------------------------------------------------------- /project-19/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-19 2 | Automate Infrastructure With IaC using Terraform – Terraform Cloud -------------------------------------------------------------------------------- /project-19/project19.md: -------------------------------------------------------------------------------- 1 | # Automate Infrastructure With IaC using Terraform – Terraform Cloud 2 | 3 | ### [Link to Code](https://github.com/Tonybesto/TCS-Packer-Terraform-Setup.git) 4 | # 5 | 6 | 7 | [In project 18 ](https://github.com/Tonybesto/DevOps_Projects/blob/main/project-18/project18.md), we refactored our terraform codes into modules and as a result the introduction of modules into our codebase helped save time and reduce costly errors by re-using configuration written either by yourself, other members of your team, or other Terraform practitioners who have published modules for you to use. 8 | 9 | We require AMIs that are preconfigured with necessary packages for our applications to run on specific servers. 10 | 11 | ![](../project-15/Images/architecture%20diagram.PNG) 12 | 13 | In this project, we will be introducing two new concepts 14 | - **Packer** 15 | - **Terraform Cloud** 16 | # 17 | ## What is Packer? 18 | # 19 | Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. 20 | # 21 | 22 | ## Step 1. Creating Bastion, Nginx, Tooling and Wordpress AMIs 23 | # 24 | We write packer code which helps us create AMIs for each of the following mentioned servers. A sample of the code can be found here: [packer code setup](https://github.com/Tonybesto/TCS-Packer-Terraform-Setup/tree/main/AMI) 25 | 26 | For each of the following `.pkr.hcl` files, we run the following commands 27 | ``` 28 | - packer fmt .pkr.hcl 29 | - packer validate .pkr.hcl 30 | - packer build .pkr.hcl 31 | ``` 32 | 33 | ![](./Images/bastion%20AMI.PNG) 34 | ![](./Images/nginx%20AMI.PNG) 35 | ![](./Images/created%20AMI.PNG) 36 | ![](./img/4.all_amis.jpg) 37 | # 38 | 39 | ## Step 2. Setting Up Infrastructures using Terraform Cloud 40 | # 41 | In this project, we changed the backend from S3 to a remote backend using Terraform Cloud. TF Cloud manages all state in our applications and carries out tf plan , tf validate and applies our infrastructures as required. 42 | 43 | To do this, we setup an organization on terraform cloud and a workspace and link our workspace to our repository. On every commit, a webhook is triggered on terraform cloud and plans or applies our terrraform code based on need. 44 | 45 | 46 | ![](./Images/terraform%20cloud%20plan.PNG) 47 | ![](./Images/first%20apply.PNG) 48 | 49 | ## Step 3. Ansible Dynamic Inventory 50 | # 51 | A dynamic inventory is a script written in Python, PHP, or any other programming language. It comes in handy in cloud environments such as AWS where IP addresses change once a virtual server is stopped and started again. 52 | 53 | We make use of dynamic inventory to get Ip address of our servers created based on their tag names and hence we are able to run the required role on each server. 54 | ![](./Images/ansible-graph.PNG) 55 | 56 | 57 | # 58 | 59 | ## Step 4. Checking Successful 60 | # 61 | ![](./Images/tooling%20site.PNG) 62 | ![](./Images/wordpress.PNG) 63 | # 64 | 65 | ## Step 5. Destroying Resources 66 | # 67 | ![](./Images/terraform%20destroy.PNG) 68 | # -------------------------------------------------------------------------------- /project-2/Images/Curl Localhost.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/Curl Localhost.PNG -------------------------------------------------------------------------------- /project-2/Images/MySQL query output.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/MySQL query output.PNG -------------------------------------------------------------------------------- /project-2/Images/MySQL.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/MySQL.PNG -------------------------------------------------------------------------------- /project-2/Images/Mysql Test_user.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/Mysql Test_user.PNG -------------------------------------------------------------------------------- /project-2/Images/Nginx Status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/Nginx Status.PNG -------------------------------------------------------------------------------- /project-2/Images/PHP code.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/PHP code.PNG -------------------------------------------------------------------------------- /project-2/Images/Todo_list page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/Todo_list page.PNG -------------------------------------------------------------------------------- /project-2/Images/Welcome to Nginx.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/Welcome to Nginx.PNG -------------------------------------------------------------------------------- /project-2/Images/nginx ok.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/nginx ok.PNG -------------------------------------------------------------------------------- /project-2/Images/php info.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/php info.PNG -------------------------------------------------------------------------------- /project-2/Images/php nano.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-2/Images/php nano.PNG -------------------------------------------------------------------------------- /project-2/README.md: -------------------------------------------------------------------------------- 1 | # AWS-LEMP-STACK-Project2 2 | 3 | LEMP Stack implementation on AWS 4 | -------------------------------------------------------------------------------- /project-20/Images/container with created network.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/container with created network.PNG -------------------------------------------------------------------------------- /project-20/Images/create and run script.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/create and run script.PNG -------------------------------------------------------------------------------- /project-20/Images/create network.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/create network.PNG -------------------------------------------------------------------------------- /project-20/Images/docker build -t.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker build -t.PNG -------------------------------------------------------------------------------- /project-20/Images/docker exec.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker exec.PNG -------------------------------------------------------------------------------- /project-20/Images/docker image ls.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker image ls.PNG -------------------------------------------------------------------------------- /project-20/Images/docker login.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker login.PNG -------------------------------------------------------------------------------- /project-20/Images/docker ps.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker ps.PNG -------------------------------------------------------------------------------- /project-20/Images/docker pull mysql.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker pull mysql.PNG -------------------------------------------------------------------------------- /project-20/Images/docker run app.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker run app.PNG -------------------------------------------------------------------------------- /project-20/Images/docker stop and rm.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker stop and rm.PNG -------------------------------------------------------------------------------- /project-20/Images/docker tag and push.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker tag and push.PNG -------------------------------------------------------------------------------- /project-20/Images/docker-compose.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker-compose.PNG -------------------------------------------------------------------------------- /project-20/Images/docker-compose1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/docker-compose1.PNG -------------------------------------------------------------------------------- /project-20/Images/git clone tooling.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/git clone tooling.PNG -------------------------------------------------------------------------------- /project-20/Images/image pushed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/image pushed.PNG -------------------------------------------------------------------------------- /project-20/Images/mysql-client.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/mysql-client.PNG -------------------------------------------------------------------------------- /project-20/Images/php build.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/php build.PNG -------------------------------------------------------------------------------- /project-20/Images/php-todo site.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/php-todo site.PNG -------------------------------------------------------------------------------- /project-20/Images/practice 1 clone.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/practice 1 clone.PNG -------------------------------------------------------------------------------- /project-20/Images/prepare db schema.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/prepare db schema.PNG -------------------------------------------------------------------------------- /project-20/Images/tooling site.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-20/Images/tooling site.PNG -------------------------------------------------------------------------------- /project-20/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-20 2 | 3 | MIGRATION TO THE СLOUD WITH CONTAINERIZATION. PART 1 - DOCKER & DOCKER COMPOSE -------------------------------------------------------------------------------- /project-21/Images/DHCP tag.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/DHCP tag.PNG -------------------------------------------------------------------------------- /project-21/Images/Kubectl version.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/Kubectl version.PNG -------------------------------------------------------------------------------- /project-21/Images/Test AWS cli.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/Test AWS cli.PNG -------------------------------------------------------------------------------- /project-21/Images/certificates and keys.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/certificates and keys.PNG -------------------------------------------------------------------------------- /project-21/Images/client certificate.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/client certificate.PNG -------------------------------------------------------------------------------- /project-21/Images/cluster info and namespace.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/cluster info and namespace.PNG -------------------------------------------------------------------------------- /project-21/Images/containerd status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/containerd status.PNG -------------------------------------------------------------------------------- /project-21/Images/create subnet.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/create subnet.PNG -------------------------------------------------------------------------------- /project-21/Images/dhcp-vpc.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/dhcp-vpc.PNG -------------------------------------------------------------------------------- /project-21/Images/encryption file.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/encryption file.PNG -------------------------------------------------------------------------------- /project-21/Images/etcd running.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/etcd running.PNG -------------------------------------------------------------------------------- /project-21/Images/get nodes.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/get nodes.PNG -------------------------------------------------------------------------------- /project-21/Images/health status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/health status.PNG -------------------------------------------------------------------------------- /project-21/Images/k8-vpcs.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/k8-vpcs.PNG -------------------------------------------------------------------------------- /project-21/Images/kube-apiserver status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/kube-apiserver status.PNG -------------------------------------------------------------------------------- /project-21/Images/kube-controller-manager status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/kube-controller-manager status.PNG -------------------------------------------------------------------------------- /project-21/Images/kubelet status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/kubelet status.PNG -------------------------------------------------------------------------------- /project-21/Images/listeners.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/listeners.PNG -------------------------------------------------------------------------------- /project-21/Images/load balancers.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/load balancers.PNG -------------------------------------------------------------------------------- /project-21/Images/master nodes.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/master nodes.PNG -------------------------------------------------------------------------------- /project-21/Images/master-0 ls.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/master-0 ls.PNG -------------------------------------------------------------------------------- /project-21/Images/master-1 ls.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/master-1 ls.PNG -------------------------------------------------------------------------------- /project-21/Images/master-2 ls.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/master-2 ls.PNG -------------------------------------------------------------------------------- /project-21/Images/register targets.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/register targets.PNG -------------------------------------------------------------------------------- /project-21/Images/route tables.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/route tables.PNG -------------------------------------------------------------------------------- /project-21/Images/sending kubeconfig to master.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/sending kubeconfig to master.PNG -------------------------------------------------------------------------------- /project-21/Images/sending kubeconfig to worker.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/sending kubeconfig to worker.PNG -------------------------------------------------------------------------------- /project-21/Images/target group.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/target group.PNG -------------------------------------------------------------------------------- /project-21/Images/target status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/target status.PNG -------------------------------------------------------------------------------- /project-21/Images/worker nodes.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-21/Images/worker nodes.PNG -------------------------------------------------------------------------------- /project-21/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-21 2 | 3 | ORCHESTRATING CONTAINERS ACROSS MULTIPLE VIRTUAL SERVERS WITH KUBERNETES. PART 1 -------------------------------------------------------------------------------- /project-22/Images/EKS cluster.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/EKS cluster.PNG -------------------------------------------------------------------------------- /project-22/Images/create deployment.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/create deployment.PNG -------------------------------------------------------------------------------- /project-22/Images/create nginx-pod.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/create nginx-pod.PNG -------------------------------------------------------------------------------- /project-22/Images/darey.io page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/darey.io page.PNG -------------------------------------------------------------------------------- /project-22/Images/dns lb.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/dns lb.PNG -------------------------------------------------------------------------------- /project-22/Images/dns working.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/dns working.PNG -------------------------------------------------------------------------------- /project-22/Images/exec deployment.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/exec deployment.PNG -------------------------------------------------------------------------------- /project-22/Images/get svc.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/get svc.PNG -------------------------------------------------------------------------------- /project-22/Images/install vim.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/install vim.PNG -------------------------------------------------------------------------------- /project-22/Images/lb tags.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/lb tags.PNG -------------------------------------------------------------------------------- /project-22/Images/nginx-service.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/nginx-service.PNG -------------------------------------------------------------------------------- /project-22/Images/rs.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/rs.PNG -------------------------------------------------------------------------------- /project-22/Images/welcome to nginx.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/welcome to nginx.PNG -------------------------------------------------------------------------------- /project-22/Images/worker nodes.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/worker nodes.PNG -------------------------------------------------------------------------------- /project-22/Images/worker nodes1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-22/Images/worker nodes1.PNG -------------------------------------------------------------------------------- /project-22/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-22 2 | 3 | DEPLOYING APPLICATIONS INTO KUBERNETES CLUSTER -------------------------------------------------------------------------------- /project-22/project22.md: -------------------------------------------------------------------------------- 1 | # DEPLOYING APPLICATIONS INTO KUBERNETES CLUSTER 2 | 3 | ## INTRODUCTION 4 | 5 | This project demonstrates how containerised applications are deployed as pods in Kubernetes and how to access the application from the browser. 6 | 7 | Create cluster using AWS EKS using the following link [here](https://github.com/weaveworks/eksctl) 8 | 9 | ![](./Images/EKS%20cluster.PNG) 10 | ![](./Images/worker%20nodes.PNG) 11 | ![](./Images/worker%20nodes1.PNG) 12 | 13 | ## STEP 1: Creating A Pod For The Nginx Application 14 | 15 | - Creating nginx pod by applying the manifest file: 16 | 17 | `nginx-pod.yaml` manifest file shown below 18 | 19 | ``` 20 | apiVersion: v1 21 | kind: Pod 22 | metadata: 23 | name: nginx-pod 24 | labels: 25 | app: nginx-pod 26 | spec: 27 | containers: 28 | - image: nginx:latest 29 | name: nginx-pod 30 | ports: 31 | - containerPort: 80 32 | protocol: TCP 33 | ``` 34 | 35 | `kubectl apply -f nginx-pod.yaml` 36 | 37 | `kubectl get pods` 38 | 39 | `kubectl describe pod nginx-pod` 40 | 41 | ![](./Images/create%20nginx-pod.PNG) 42 | 43 | 44 | 45 | ## ACCESSING THE APP FROM THE BROWSER 46 | 47 | Now you have a running Pod. What’s next? 48 | 49 | The ultimate goal of any solution is to access it either through a web portal or some application (e.g., mobile app). We have a Pod with Nginx container, so we need to access it from the browser. But all you have is a running Pod that has its own IP address which cannot be accessed through the browser. To achieve this, we need another Kubernetes object called Service to accept our request and pass it on to the Pod. 50 | 51 | A service is an object that accepts requests on behalf of the Pods and forwards it to the Pod’s IP address. If you run the command below, you will be able to see the Pod’s IP address. But there is no way to reach it directly from the outside world. 52 | 53 | `kubectl get pod nginx-pod -o wide` 54 | 55 | 56 | 57 | Let us create a service to access the **Nginx Pod** 58 | 59 | 1. Create a Service yaml manifest file: 60 | 61 | ``` 62 | sudo cat < 249 | 250 | 251 | Welcome to DAREY.IO! 252 | 259 | 260 | 261 |

Welcome to DAREY.IO!

262 |

I love experiencing Kubernetes

263 | 264 |

Learning by doing is absolutely the best strategy at 265 | www.darey.io.
266 | for skills acquisition 267 | www.darey.io.

268 | 269 |

Thank you for learning from DAREY.IO

270 | 271 | 272 | ``` 273 | 274 | ![](./Images/install%20vim.PNG) 275 | 276 | ![](./Images/darey.io%20page.PNG) 277 | 278 | 279 | 280 | -------------------------------------------------------------------------------- /project-23/Images/apply deployment.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/apply deployment.PNG -------------------------------------------------------------------------------- /project-23/Images/create cluster.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/create cluster.PNG -------------------------------------------------------------------------------- /project-23/Images/create volume.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/create volume.PNG -------------------------------------------------------------------------------- /project-23/Images/describe a pod -o wide.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/describe a pod -o wide.PNG -------------------------------------------------------------------------------- /project-23/Images/edit pod file.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/edit pod file.PNG -------------------------------------------------------------------------------- /project-23/Images/exec deploy.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/exec deploy.PNG -------------------------------------------------------------------------------- /project-23/Images/get storageclass.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/get storageclass.PNG -------------------------------------------------------------------------------- /project-23/Images/node region.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/node region.PNG -------------------------------------------------------------------------------- /project-23/Images/pvc pending.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/pvc pending.PNG -------------------------------------------------------------------------------- /project-23/Images/vbm.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/vbm.PNG -------------------------------------------------------------------------------- /project-23/Images/volume attached.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/volume attached.PNG -------------------------------------------------------------------------------- /project-23/Images/volume created.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-23/Images/volume created.PNG -------------------------------------------------------------------------------- /project-23/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-23 2 | 3 | PERSISTING DATA IN KUBERNETES -------------------------------------------------------------------------------- /project-23/project23.md: -------------------------------------------------------------------------------- 1 | # PERSISTING DATA IN KUBERNETES 2 | 3 | The pods created in Kubernetes are ephemeral, they don't run for long. When a pod dies, any data that is not part of the container image will be lost when the container is restarted because Kubernetes is best at managing stateless applications which means it does not manage data persistence. To ensure data persistent, the PersistentVolume resource is implemented to acheive this. 4 | 5 | The following outlines the steps: 6 | 7 | ## STEP 1: Setting Up AWS Elastic Kubernetes Service With EKSCTL 8 | 9 | - Downloading and extracting the latest release of eksctl with the following command: 10 | ``` 11 | curl --silent --location 12 | "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp 13 | ``` 14 | 15 | - Moving the extracted binary to /usr/local/bin: 16 | 17 | ``` 18 | sudo mv /tmp/eksctl /usr/local/bin 19 | ``` 20 | 21 | - Testing the installation was successful with the following command: 22 | ``` 23 | eksctl version 24 | ``` 25 | 26 | 27 | - setting up EKS cluster with the command line 28 | 29 | ``` 30 | eksctl create cluster \ 31 | --name prj23 \ 32 | --version 1.24 \ 33 | --region us-east-1 \ 34 | --nodegroup-name worker-nodes \ 35 | --node-type t2.medium \ 36 | --nodes 2 37 | ``` 38 | 39 | ![](./Images/create%20cluster.PNG) 40 | 41 | 42 | # STEP 2: Creating Persistent Volume Manually For The Nginx Application 43 | 44 | ``` 45 | sudo cat < 64 | 65 | 66 | BalancerMember http://:80 loadfactor=5 timeout=1 67 | BalancerMember http://:80 loadfactor=5 timeout=1 68 | ProxySet lbmethod=bytraffic 69 | # ProxySet lbmethod=byrequests 70 | 71 | 72 | ProxyPreserveHost On 73 | ProxyPass / balancer://mycluster/ 74 | ProxyPassReverse / balancer://mycluster/ 75 | 76 | #Restart apache server 77 | 78 | sudo systemctl restart apache2 79 | ``` 80 | 81 | ![configure loadbalancer](./Images/configure%20loadbalancer.PNG) 82 | 83 | 84 | bytraffic balancing method will distribute incoming load between your Web Servers according to current traffic load. We can control in which proportion the traffic must be distributed by loadfactor parameter. 85 | 86 | 87 | Verify that our configuration works – try to access your LB’s public IP address or Public DNS name from your browser: 88 | http:///index.php 89 | Note: If in the Project-7 you mounted /var/log/httpd/ from your Web Servers to the NFS server – unmount them and make sure that each Web Server has its own log directory. 90 | 91 | Open two ssh/Putty consoles for both Web Servers and run following command: 92 | 93 | **`sudo tail -f /var/log/httpd/access_log`** 94 | 95 | ![logs](./Images/logs.PNG) 96 | 97 | Try to refresh your browser page http:///index.php several times and make sure that both servers receive HTTP GET requests from your LB – new records must appear in each server’s log file. The number of requests to each server will be approximately the same since we set loadfactor to the same value for both servers – it means that traffic will be disctributed evenly between them. 98 | 99 | 100 | If you have configured everything correctly – your users will not even notice that their requests are served by more than one server. 101 | 102 | 103 | 104 | ## Optional Step – Configure Local DNS Names Resolution 105 | 106 | Sometimes it is tedious to remember and switch between IP addresses, especially if you have a lot of servers under your management. 107 | What we can do, is to configure local domain name resolution. The easiest way is to use /etc/hosts file, although this approach is not very scalable, but it is very easy to configure and shows the concept well. So let us configure IP address to domain name mapping for our LB. 108 | 109 | ``` 110 | #Open this file on your LB server 111 | 112 | sudo vi /etc/hosts 113 | 114 | #Add 2 records into this file with Local IP address and arbitrary name for both of your Web Servers 115 | 116 | Web1 117 | Web2 118 | ``` 119 | 120 | 121 | Now you can update your LB config file with those names instead of IP addresses. 122 | 123 | ``` 124 | BalancerMember http://Web1:80 loadfactor=5 timeout=1 125 | BalancerMember http://Web2:80 loadfactor=5 timeout=1 126 | ``` 127 | ![etc-hosts](./Images/sudo%20vi%20etc-hosts.PNG) 128 | 129 | You can try to curl your Web Servers from LB locally curl 130 | 131 | http://Web1 or curl http://Web2 – it shall work. 132 | 133 | ![curl](./Images/curl%20web2.PNG) 134 | 135 | Remember, this is only internal configuration and it is also local to your LB server, these names will neither be ‘resolvable’ from other servers internally nor from the Internet. 136 | 137 | ### THANK YOU!!!! -------------------------------------------------------------------------------- /project-9/Images/add new item.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/add new item.PNG -------------------------------------------------------------------------------- /project-9/Images/archive 2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/archive 2.PNG -------------------------------------------------------------------------------- /project-9/Images/build complete.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/build complete.PNG -------------------------------------------------------------------------------- /project-9/Images/build triggers.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/build triggers.PNG -------------------------------------------------------------------------------- /project-9/Images/build.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/build.PNG -------------------------------------------------------------------------------- /project-9/Images/change permissions.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/change permissions.PNG -------------------------------------------------------------------------------- /project-9/Images/changes made to master branch.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/changes made to master branch.PNG -------------------------------------------------------------------------------- /project-9/Images/complete.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/complete.PNG -------------------------------------------------------------------------------- /project-9/Images/configure jenkins to retrieve source code.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/configure jenkins to retrieve source code.PNG -------------------------------------------------------------------------------- /project-9/Images/copy link for code.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/copy link for code.PNG -------------------------------------------------------------------------------- /project-9/Images/installed suggested plugin.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/installed suggested plugin.PNG -------------------------------------------------------------------------------- /project-9/Images/jenkins architecture.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/jenkins architecture.PNG -------------------------------------------------------------------------------- /project-9/Images/jenkins login page.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/jenkins login page.PNG -------------------------------------------------------------------------------- /project-9/Images/jenkins server.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/jenkins server.PNG -------------------------------------------------------------------------------- /project-9/Images/jenkins status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/jenkins status.PNG -------------------------------------------------------------------------------- /project-9/Images/plugins install.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/plugins install.PNG -------------------------------------------------------------------------------- /project-9/Images/port 80.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/port 80.PNG -------------------------------------------------------------------------------- /project-9/Images/publish over ssh configuration.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/publish over ssh configuration.PNG -------------------------------------------------------------------------------- /project-9/Images/publish over ssh.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/publish over ssh.PNG -------------------------------------------------------------------------------- /project-9/Images/send build artifact over ssh.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/send build artifact over ssh.PNG -------------------------------------------------------------------------------- /project-9/Images/source code mgt.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/source code mgt.PNG -------------------------------------------------------------------------------- /project-9/Images/syntax.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/syntax.PNG -------------------------------------------------------------------------------- /project-9/Images/welcome to jenkins.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tonybesto/DevOps_Projects/c59a615d4a0adb23115da7600bdcef2d625b8eef/project-9/Images/welcome to jenkins.PNG -------------------------------------------------------------------------------- /project-9/README.md: -------------------------------------------------------------------------------- 1 | # PBL-Project-9 2 | 3 | CONTINOUS INTEGRATION PIPELINE FOR TOOLING WEBSITE 4 | --------------------------------------------------------------------------------