Wednesday 17 December 2014

Adding new user in Openshift Origin

Problem: Adding a new user account in OpenShift origin

Solution: Login to openshift machine as root user and go to command prompt. Run the command htpasswd

FYI- The same command can be used to update user password.
Example: Adding mario user
 
[root@broker ~]# htpasswd /etc/openshift/htpasswd mario
New password:
Re-type new password:
Adding password for user mario

In vi Up Arrow and Down Arrow is showing special charchters- Ubuntu

Problem: While using vi editor in ubuntu when i entered in to instert mode using i command. Using up and down arrows is showing special characters instead of navigating to up and down.

Solution:
 Create a file named ".vimrc" under your home directory and add the content "set nocompatible".

Example:



 
mario@ubuntu:~$ touch .vimrc
mario@ubuntu:~$ pwd
/home/mario
mario@ubuntu:~$ echo "set nocompatible" > .vimrc

Logging all the http request and response that is coming to Jetty Server

Problem: Logging all the http request and response that is coming to Jetty Server

Prerequisite:  Configure logback as your logging frame work

Solution:
Refer variables fullRequest and fullResponse in your  logback-access.xml

Snippet
 
 
        ${OPENSHIFT_SPRINGJETTYONODE_DIR}/logs/access.log
        
            logs/access-%i.log.gz
            1
            3
        

        
            20MB
        
        
            %fullRequest%n%n%fullResponse