How to create usergroup in hybris | step by step to create usergroups in Hybris | beginners hybris developer

Users are different types of people that access your store whether it be an administrator, customer, or shopper. Users can be assigned to Groups
Groups within Hybris commerce are a simple way to organize your users, or customers. Yet, the feature is powerful and versatile, and it can be used to further extend your offerings to select groups of users. Members of an administrative group may have the rights to manage all, or part of your store. Additionally, non-admin group members can be given special pricing, payment methods, shipping options, taxation, subscriptions, and more.
Below steps you follow to create usergroup in hybris
1.       Hmc  > User > User Groups



In above there is various type of user group  that available like B2B usergroup  in hybris and you can create
2.         
Now you fill all details in above and click on create button

3.       You can also apply personalization for your usergroup in Personalization tab as below




How to configure Jenkins with with Git Hub for linux /windows enviornment - Hybris build process

Hello Friends,

As you already know Jenkins is a software use for continuous integration. Jenkins will be installed on a server where the central build will take place.

Also you know about GIT hub which is use for repository

From project point of view it is very important to know how Jenkins used with Git hub so lets discuss about.
Today will explain how to integrate Jenkins in Linux with private GIT Hub.

After install Jenkins you need to configure so please follow below steps

Note: below configuration given for Linux/Unix environment. If your environment is window then just open what graphical image given and then configure


1.     Configuring the GIT plugin in Jenkins:

Jenkins à Manage Jenkins à Manage Plugins
Make sure Jenkins GIT Client Plugin and Jenkins GIT plugins are installed.




2.     Configure GIT in server (if it is install on Linux enviornment):

Login to Jenkins server via puty
Execute the following command - sudo yum install git-all


3.     Configure GIT executable path:

Jenkins àMange JenkinsàConfigure System
Enter the git executable path(git installed to the server in previous step)
My case the path is /usr/bin/git, change accordingly



4.     SSH Configuration:

Login to Jenkins server via putty
Execute the following commad - sudo -u jenkins ssh-keygen -t rsa
Enter the details accordingly, Passphrase is optional if required then enter some string.
This will create private and public keys under /var/lib/jenkins/.ssh (default files are id_rsa and id_rsa.pub)

5.     Configuring Credential:
Login to Jenkins console --> Jenkins Credentials
Click on add a domain – Enter some name(better git hub host name)
Click on Add credential
Enter the user name as Jenkins(the user that runs the jenkins)
Select From the Jenkins master ~/.ssh



6.     Configure deployment key in GIT:

Login to GIT and click on Profile Settings
Click on SSH Keys – Enter the content of id_rsa.pub(cat id_rsa.pub) to Key filed
Click on add key.







7.     Configure the Job:

Configure the GIT URL and select the credential name created in the previous step
Specify the branch to be build.






Explain Performance Tuning of Hybris Platform must know for hybris Architect / Solution Architect

Hello Friends,
Lets today discuss about hybris performance related things which can very usefull when you are going for Hybris interview for senior position like Architect / hybris solution architect
So below point you must be know

1. Enable JMX Remote monitoring:
Remote JMX monitoring will help us to monitor the server resources (e.g. memory usage and CPU usage) through JMX client such as VisualVM.
Open <<HYBRIS_HOME>>/conf/local.properties and make sure the following properties are added as part of tomcat.generaloptions .
-Dcom.sun.management.jmxremote.port=50055 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -



Memory usage also can be monitored from admin console
Monitoring à Memory



2. JVM Tuning:
The default JVM parameters are not optimal for running large applications. So the parameters (e.g. memory and GC) should be tuned for optimal performance of the application.
Create a folder crash under <<HYBRIS_HOME>>
Open <<HYBRIS_HOME>>/conf/local.properties and replace the variable java.mem with the java.mem=6G
Open <<HYBRIS_HOME>>/conf/local.properties replace tomcat.generaloptions with the following data
tomcat.generaloptions=-Xmx6G -Xms6G -XX:MaxPermSize=1G -XX:NewRatio=1 -XX:SurvivorRatio=12 -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=8 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/hybris/crash/hybris_java.hprof -Xloggc:/app/hybris/crash/hybris_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -ea -Dcom.sun.management.jmxremote.port=50055 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}" ${jvm.crashHack}
Change the XX:HeapDumpPath and –Xloggc path accordingly

a. Apply the required load to the system – Apache JMeter can be used to load the request to the system.
b.  Monitor the system resources like CPU, Memory and threads using VisualVM while load is applied to the system
c.Change the memory parameters and GC parameters based on the above test result.

If you provide too little memory to an application it will run out of memory. The JVM will not be able to free up memory space at the rate that your application needs it. In this scenario JVM will throw an OutOfMemoryError and shut down completely
The above three steps should be repeated to achieve the optimum system performance by applying different values for the parameters.
3. Thread Tuning:
Modify the thread parameters based on the system performance.
Open <<HYBRIS_HOME>>/bin/platform/ project.properties and replace the following property values.
tomcat.acceptcount=150
tomcat.maxthreads=300
Change the counts accordingly.
Open <<HYBRIS_HOME>>/ config/tomcat/conf/server.xml
And replace the below content
Old
<Connector port="${tomcat.http.port}"
maxHttpHeaderSize="8192"
maxThreads="${tomcat.maxthreads}"
protocol="org.apache.coyote.http11.Http11Protocol"
executor="hybrisExecutor"
enableLookups="false"
acceptCount="100"
connectionTimeout="20000"
URIEncoding="UTF-8"
disableUploadTimeout="true" />
New
<Connector port="${tomcat.http.port}"
maxHttpHeaderSize="8192"
maxThreads="${tomcat.maxthreads}"
protocol="org.apache.coyote.http11.Http11Protocol"
executor="hybrisExecutor"
enableLookups="false"
acceptCount="150"
connectionTimeout="20000"
URIEncoding="UTF-8"
disableUploadTimeout="true" />
Change the acceptCount="150" accordingly

4. Improve Caching:
Open <<HYBRIS_HOME>>/ bin/platform/project.properties
Replace cache.main property value with cache.main=50000

5. Thread Dumps:
Thread Dump is a snapshot taken at a given time which provides with a complete listing of all created Java Threads. The thread dump can be analyzed to determine the bottleneck or blocking threads.
Different tools can be used to analyze the thread dumps e.g. Samurai and IBM Thread and Monitor Dump Analyzer for Java.
Thread Dump can be generated from admin console
Monitoring à Thread Dump


Click on Download button to download the current thread dump.

6. JDBC Logging:
Sometimes the application will be very slow due to slow running queries. Analyzing the slower running queries using JDBC logging and create the indexes wherever required can drastically improve performance.
Monitoring à Database à JDBC logging



Click on Start logging and click on Stop logging after particular time.
Click on Download log

Click on JDBC log analysis à Analyze to find out the details on the queries executed