Rootconf Pune edition

On security, network engineering and distributed systems

Web-based booking application

Submitted by Amit Nijhawan (@anijhawa) on Jul 2, 2019

Section: Workshop Category: DevOps Status: Rejected

Abstract

I am going to expalin The project in DevOps - Build Real World Processes is a web-based online booking application.I will explain the THE INFRASTRUCTURE which I have used in my applicatio using dev ops , will eloborate more into CONTINUOUS INTEGRATION, CONTINUOUS DELIVERY, CONTINUOUS MASTER INTEGRATION, CONTINUOUS MASTER INTEGRATION.

It contains the following components:
Environment Number of machines Purpose

Client 1 Mimics the developer machine used to write the application code. Also used for running
Ansible against the other environments.
Testing 2 The application server hosting the web application and the database server hosting the
backend database
Production 2 The application server, the database server.
THE TOOLS THAT ARE USED
➤ Vagrant for infrastructure provisioning
➤ Ansible for configuration management
➤ Git for version control, GitHub as a central repository
➤ Jenkins as a CI/CD tool

Outline

I am going to present the use of dev ops tool in my web-based booking application. In my Workshop I will try to exaplain teh tools that are used:

➤ Vagrant for infrastructure provisioning
➤ Ansible for configuration management
➤ Git for version control, GitHub as a central repository
➤ Jenkins as a CI/CD tool

I will show all the steps like below:

THE INFRASTRUCTURE:

The client machine is a Centos 7 Vagrant machine with the following components:
➤ Ansible
➤ Git
The application server is a Centos 7 Vagrant machine with the following components:
➤ Apache
➤ PHP 7
➤ Git
➤ Swift application (the CodeIgniter project used)
The database server is a Centos 7 Vagrant machine with the following:


The CI/CD server is an Ubuntu Vagrant machine containing the following:


MySQL
Jenkins with the following plugins:
➤ SSH host
➤ GitHub
➤ PHPUnit testing tool
➤ Selenium Python web driver
A testing environment will contain a clone of the application and database machines to be used by Jenkins

CONTINUOUS TESTING:

Create a new job called swift-feature
➤ In Source Code Management select Git
➤ Add the repository URL: xxxxxxxxxx
➤ Choose the feature branch
➤ In the Build triggers click on Poll SCM and specify the desired schedule
➤ In the Build are select a new build step and choose shell script. Add the following:

cd application/tests/

phpunit
➤ In the post build actions choose publish Unit test result and add the following application/tests/build/logs/junit.xml
➤ Save the job
➤ Test it by making changes and pushing them to GitHub and running the job.

CONTINUOUS INTEGRATION:

The integration job will always run after the feature job runs.
➤ It will only take an action if the feature job succeeds (the tests pass).
➤ The job will merge the changes done to the feature branch to the integration branch and push those changes to GitHub.
➤ Add a descriptive name for the job. Let’s say feature_integration

CONTINUOUS DELIVERY:

The second job will work after the previous one is complete and will actually deploy the changes to the development
environment.
➤ Before we can do that we need to create an SSH site to define the machine where the code will be delivered for further
testing. In Manage Jenkins choose configure Jenkins and go to SSH remote sites.
➤ Add the details of the SSH machine including the credentials and the remote location.
➤ Now create a new job that is copied from feature_integration but with the following changes:
➤ Build after feature_integration
➤ Build execute shell will contain only the testing phase
➤ The second build step will be execute SSH script on remote hosts. Choose the SSH site already configured and add
the following commands:

cd /var/www/html/CodeIgniter-3.1.5/

git checkout integration

git pull

Requirements

They should bring laptop to hands-on the project.

Speaker bio

I am a Senior Technical Support Engineer at Red Hat. My domain is Java and Middleware Technologies and container technology.I have a good experince dev ops and used in many products and projects.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('You need to be a participant to comment.') }}

{{ formTitle }}
{{ gettext('Post a comment...') }}
{{ gettext('New comment') }}

{{ errorMsg }}