Sunday, February 26, 2017

DevOps toolchain configuration



How to configure Git & GitHub in Eclipse


How to trigger build automatically in Jenkins


How to configure a Maven Build in Jenkins


How to configure SonarQube in Jenkins


How to configure Cucumber in Eclipse & Jenkins


How to deploys code into Docker containers using Jenkins


How to configure puppet master & puppet agent


How to configure Nagios server and Nagios host


Tuesday, February 21, 2017

Continuous Testing - Integrating Cucumber Maven Project in Jenkins

DevOps: Continuous Testing - Cucumber


Create a Maven project in Eclipse

Create a maven project -> Create a simple project -> Update group ID, artefact ID -> Update pom.xml with latest cucumber – Junit dependency xml tag-> Update pom.xml with latest cucumber – Java dependency xml tag -> Update pom.xml with latest maven – Junit dependencies xml tag-> Update pom.xml with latest maven - selenium dependency xml tag-> Press ^S ->


Create a cucumber feature file

Add the plugin from https://cucumber.io/cucumber-eclipse/update-site -> Create feature file in a separate folder - > Add feature syntax given, when & then -> Add a test package -> Add a class in test package with syntax @RunWith(Cucumber.class) & @CucumberOptions(features=””,glue={“”} -> Add feature location and add step definition as glue -> Run the project as cucumber feature to get skeleton step code -> Create a step definition package – Add a class -> Add feature skeleton code in the step definition class -> Modify the skeleton code -> run the project as junit test -> Run as maven project with goal as (clean build) ->


Create a Maven build job in Jenkins

Create a Maven project in Jenkins –> Update the pom.xml location -> Run the maven project with option clean & install.


Tuesday, February 7, 2017

Continuous Monitoring - Configuring Nagios Server and Nagios Host in Docker Containers

DevOps:Continuous Monitoring:Nagios in Docker Containers


Install Nagio server image in docker container

Select a Nagios image -> download the image (docker pull appcontainers/Nagios) -> Create the docker container (docker run -d -it --name nagiosserver -h nagios -p 8181:80 appcontainers/Nagios) -> Configure a Nagio user in Nagios server command prompt (htpasswd -c -b /etc/nagios/passwd username password) -> Login to Nagios server from browser with the help of user created in previous step (http://localhost:8181/nagios/) ->


Install & configure a Nagios host in docker container

Download a server(ubuntu/centos) image (docker pull nuagebec/Ubuntu) -> Create the docker container (docker run -d -p 0.0.0.0:2222:22 nuagebec/Ubuntu)-> Install NRPE server plugin in the server container (sudo apt-get install nagios-nrpe-server nagios-plugins)-> Update server address and port in nrpe.cfg file (server_address=172.17.0.02, server_port=8181) ->


Configure Nagios host in Nagios server

Update server folder location in Nagios.cfg file in Nagios server (cfg_dir=/etc/nagios/servers) -> Add server folder in Nagios server (mkdir -p /etc/nagios/servers ) -> Create a configuration file in Nagios host and save in the server folder (vim /etc/nagios/servers/ubuntu_host.cfg ) ->


Test the Nagios host configuration update

Restart NRPE service server in Nagios host (service nagios-nrpe-server restart)-> Restart Nagios service in Nagios server (service nagios restart)-> Open the Nagios server browser and verify Nagios host has been added.