Single click deployment by jenkins

Standard

Scenario

Code is available at local git server. That same server is also hosting multiple tomcat. Jenkins build should pull the git to collect code, prepare mysql DB, execute ant target, finally place the resultant war file at particular webapps folder. Apart from all these build specific tasks, jenkins should shutdown the associated tomcat before ant task and start it again after placing the war file in webapps

Jenkins installation

On debian, add the official jenkins repo and add signature .

wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list
apt-get update

Read the rest of this entry

Advertisements

Setup local domains for intranet

Standard

Recently there was a requirement to configure local domains like simpsoft.local, jenkins.simpsoft.local etc.. for the development team. While this could be achieved simply by declaring IP-domain mapping at host machine (/etc/hosts), is not a good solution for a large web development team. dnsmasq is a little gem in Linux perfectly fits in this situation.

dnsmasq a local DNS server with forwarding to upstream DNS 

dnsmasq accepts DNS queries and either answers them from a small, local, cache or forwards them to a real, recursive, DNS server. dnsmasq is DHCP + local DNS with forwarding of all query types to upstream DNS + DNS caching + TFTP server. Being easy to configure it also has reputation for its light weight foot print. As a DHCP is already running in my envioronment, I only need its DNS capabilities. On a debian box install the server as root

apt-get install dnsmasq

Server’s static I.P. is 192.168.1.10        Read the rest of this entry

Xposed Framework on CM 12.1

Standard

What is Xposed Framework ?

Xposed is a framework for modules that change the behavior of the system and apps without touching any APKs. All the modification are done in memory, hence deactivating the module/s revert back the change/s followed by a reboot. Easy !! With Xposed modules a new level of android experience can be achieved.

This post shows how to install Xposed on CyanogenMod-12.1 As there is still no Official release of XposedInstaller and framework for L-5.1, super alpha version is used from xdadevelopers. Credit goes to the developers; @rovo89 for his original work Xposed framework, @romracer for bringing the Xposed framework to Android 5.1  and @C3C076 for his further contribution
 
Read the rest of this entry

CM 12.1 Beta 4 For AndroidOne gets bootloop with old UPDATE-SuperSU-v2.02.zip

Standard

Download UPDATE-SuperSU-v2.46.zip

Download CWM / TWRP installable ZIP from https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip

 
Recovery Mode

Boot into TWRP or CWM Recovery.  TWRP or CWM Recovery has inbuilt ADB functionality, hence ADB commands work while in recovery mode. Connect the device with computer through USB cable and run following command.

adb push UPDATE-SuperSU-v2.46.zip /external_sd/

The file is now available on SD card.  Flash and reboot

 
NOTE:

If you don’t have SD card then push the zip into internal storage with following command

adb push UPDATE-SuperSU-v2.46.zip /sdcard/

Don’t confuse with /sdcard , it actually points to the internal storage while /external_sd points to the external SD card.

Unlock, root and flash custom recovery on androidone, everything through linux

Standard
Warning : You may brick your device. Follow the instruction at your own risk.
Disclaimer: Unlocking your phone’s bootloader voids its warranty.

 

Prerequisite

 

1. Android Debug Bridge CLI tool and Android Fastboot protocol CLI tool. Easily available in debian via

apt-get install android-tools-adb android-tools-fastboot

2. Custom recovery

TWRP is used here. Read the rest of this entry