/java_webpage_cicd

Java web page (.jsp) is deployed to a web server (TomCat) as a container using many CI/CD and DevOps tools.

Primary LanguageJava

This is my CI/CD DevOps Project #1!

This project was created for educational goals to learn CI/CD process in DevOps.

So who wanna try DevOps practices and tools?! ;)

The goal is to create automated pipeline from commit at GitHub to deployed web page on a server in internet.

With this source code you can deploy a simple web page (index.jsp) on a server in internet

Using tools:

  • docker

  • Maven

  • Jenkins

  • Ansible

Automated pipeline consist of:

  1. Take a code from GitHub
  2. Build a source code and get artifact - webpage.zip
  3. Deliver artifact to a server [Ansible-Server]
  4. At server we create a docker image of Tomcat web-server with our web page inside! And push it to Docker Hub!
  5. Run the container from our created image on all hosts using Ansible
  6. See our Java web page running!;)

 

How to use this project:

  1. Install Jenkins server on VM or any cloud instance [Jenkins-Server]
  2. Install Ansible server with Docker engine [Ansible-Server]
  3. Install any VM (or cloud instance) with Docker engine where you wanna run a web page in container [Docker-Server]. You can install any number of hosts. Configure inventory file - hosts! Configure ansible.cfg file!
  4. Make sure your Jenkins-Server have SSH access to Ansible-Server and Ansible-Server have SSH access to Docker-Server or any number of hosts (ansible should be properly configured with hosts)
  5. Create a Jenkins Job as showed in folder "Jenkins_Job_screenshots" to get deployable artifact webpage.zip on Ansible-Server and to run ansible playbooks on it
  6. Run the Jenkins Job & Enjoy!

to be continued...