Installing SAP Hybris (6.X) (6.0 to 6.6) CommerceNote: - For demonstration / development Install Hybris locally,But for production You may have a distributed system to setup.1) System Requirements: CPUDual Core (i5 – Min)Quad Core (i7 – Recommended)RAM8 GB (Min)16 GB (Reco)Hard Disk10 GB (Min)20 GB (Reco)Note:- For Production, HD 40GB (Min) 40GB (Reco)2) Downloading Hybris (6.X) (6.0 / 6.2 / 6.4 / 6.6 ) and Unpacking PackagesMethod 1 Software Downloads Enter Credentials & Search 4Hybris 6.X & Download (Size 2GB). Extract ZIP archives & see C:\Softwares\HYBRISCOMM62\hybrisNote: - Don’t use spaces in paths, because build fails.For unzip, you can also use “jar -xvf zipfilename ” (Use this only in Windows, Not in Unix).Method 2 DownloadMethod 3 DownloadNote: - Set “ANT” Path-- My Computer -- Advanced System Settings -- Advanced -- Environment Variables -ANT HOME C:\Softwares\ ATH ;%ANT HOME%\bin;3) Download Java (1.8) & Set PATHSetup the Java Home PATH in environment variables. You can download JDK downloads/jdk8-downloads-2133151.html & Install.-- My Computer -- Environment Variables, addJAVA HOME C:\Program Files\Java\ jdk1.8.0 102PATH %JAVA HOME%\bin;4) Installing IDE (Eclipse – STS) It is good to use Spring Tool Suite (STS) IDE Eclipse.Download & Use "STS.exe" file (OR)If you already have Eclipse & want to install STS then Eclipse Help Install New SoftwareLocation e4.6/5) Installing Hybris Using Installer Recipes (b2b acc / b2c acc / b2c telco / b2c acc oms/ )Recipe helps process of automating the things. You are looking for b2c flavor of hybris commerce thenyou can use b2c acc & it will have all the required extension for b2c.Installer is a Gradle-based project written in Groovy & simplifies installing hybris. Installer is anautomated script that takes care of creating directories, moving files, updating configuration andproperties files, and initializing the system.Contact us for more information [email protected] (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)

Installer recipes are for Demo / Dev purposes only. Don’t used for production systems.Recipe concept is available from Hybris 5.5 versions.Q: Explain Creating Installer Recipes? Hybris installer is Gradle-based project written in Groovy.It simplifies installing the hybris commerce suite. File Name build.gradleTo install flavors (B2C Accelerator / Telco Accelerator / Datahub / ), developers create recipes.A recipe contains: a. 3 Mandatory Tasks a. Setup Invoked by default if no task is specified with install command. It installsrecipe & copies files.b. Initialize Initializes the recipes application.c. Start Start the application.b. Calls required plugins You must reference & invoke plugins that requires for your recipe.E.g.: - installer-platform-plaugin.jar, installer-addon-plugin.jar & installer-coreplus-plugin.jarc. Local Properties Specify any local properties that requires in your recipe.d. Extensions You must include all required extensions in your recipe.e. Database Configuration f. Web archivesg. Server information. Example Apache Tomcat.Note: - Content of installer recipes varies depending on what flavor of hybris commerce is to beinstalled. Mandatory content is “setup, initialize & start”. Depending on flavor of hybris commercesuite, installer recipe may require additional info such as: - Plugins, Extensions, Properties & Servers.Q: How to create Your Installer Recipe? Step 1 Using Groovy, write your Installer recipe (Following the info. provided in Installer Recipes).Step 2 Create folder in /hybris/installer/recipes/. Name of recipe must same as name of your folder.Step 3 Create README.txt. Tell about recipe & commands required to setup, initiate & start recipe.Step 4 Save your recipe as a build.gradle file in the recipe's folderQ: What Installer Do? It's automated script that takes care of: (1) Directory Creation(2) Moving files(3) Updating Configuration & Properties files(4) System InitializationQ: Where to find Recipe names C:\Softwares\HYBRISCOMM62\installer\recipesQ: How to know more about Recipe Installation C:\Softwares\HYBRISCOMM62\installer\ReadmeQ: What extensions comes with Recipe C:\HYBRISCOMM62\installer\recipes\b2b acc\build.gradleNote: - Go to “C:\Softwares\HYBRISCOMM62\hybris” – You can only bin folder.Q: Install / Setup Recipe C:\Softwares\HYBRISCOMM62\installer install.bat -r b2c accQ: Initialize Recipe C:\Softwares\HYBRISCOMM62\installer install.bat -r b2c acc initializeQ: Start Recipe C:\Softwares\HYBRISCOMM62\installer install.bat -r b2c acc startNote: - Go to “C:\Softwares\HYBRISCOMM62\hybris” – Creates 5 folders (config, data, log, roles &temp).Contact us for more information [email protected] (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)

Note: - Inside config, we see localextensions.xml with all extensions specified in given recipe.Q: Explain Hybris directory structure? (or) What is there in each folder?Bin Contains all the extensions. (Binary files stored here).Log We can find the server / jdbc log hereTemp Some temp files and junk files are available hereData Holds hsql db (Hyper – Default) related files & schema ( It has all config files. Instead modifying files in platform folder, modify them in theconfig folder (localextensions.xml / If you are sure what you doing, then youcan also do in platform folder.Q: Can we do changes in bin\platform\ & bin\platform\ extensions.xml?Ans: - Generally we should not touch any of existing extensions including platform extension.So alternate for “platform\” is “\hybris\config\”And alternate for “platform\extensions.xml” is “\hybris\config\localextensions.xml”Going forward, please do your changes inside “\hybris\config\” &“\hybris\config\localextensions.xml”6) Customizing the Accelerator / Extensions modulegen & extgen tools – Optional7) To start Hybris Commerce – You must do 2 things (a) Build & (b) InitializationQ: Why we need to build SAP Hybris Commerce?(1) Hybris is extendable complex solution. During build, all referenced components are integrated.(2) Runtime files and configuration files are created, prepared, and validated.(3) Some parts of Hybris are compiled, such as: - Service Layer & Other Hybris Components8) How to Build Hybris eCommerce? We have ANT / Gradle / Maven (Use it for Data Hub).Step 1 Setup Apache Ant.Q: What is the purpose of Build Tool? It is program / script used for automating list of tasksthat software developer do in their day-day Like: (1) Compiling Source code into Binary code(2) Generates & compiles Model classes based on definitions in "*-items.xml" file(3) Running tests(4) Deployment to production systems(5) It builds every extension listed (or) referenced by "localextensions.xml".Contact us for more information [email protected] (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)

Q: What is Ant Tool for automating the software build processes.Hybris contains pre-bundled Apache Ant.C:\Softwares\HYBRISCOMM62\hybris\bin\platform setantenv.batNote: - If Unix / MAC then use “run”Step 2 Build SAP Hybris CommerceQ: What are Ant Build Targets (1) all (2) clean (3) modulegen (4) extgen (5) initialize (6) -pNote: - You can see list of build targets in “build.xml” file.C:\Softwares\HYBRISCOMM62\hybris\bin\platform ant clean allQ: What are the ways to build Application? 1st Way – ant clean all It do 2 things: 1) It checks required folders (log/data/config/roles/temp) structure is available / not?a. If available, then it skips creating the foldersb. It not available, then it creates the folders2) It checks the build (.class/.java/Files generated)a. If there is a build, then it delete & recreate it againb. If there is no build, then it creates build from the scratchnd2 Way – ant all It’s lazy. This assume that folder structures already available.So it directly goes to the build process.If build is already there, then it just modifies it.If build not there already, then it creates build from scratch.Note: - “ant all” – Just focus on 2nd step (*.class, *.java files will be generated).Q: When to use “ant clean all” & when to use “ant all” Use ant clean all during the first timesetup or if some changes are not reflecting even after doing ant all.Ant all is faster than ant clean all for the above reasons.Note: - Once build is Successful, do below steps based on the need.Step 3 Setting Up / Change Functional Range – Optional1 Add/Remove extensions from your Hybris installation (Do using localextensions.xml).Do changes in “/config/localextensions.xml” instead of “/platform/extensions.xml”.2 Configuring extensions through a set of properties (Do this using file).Do changes in "/config/" instead of "/platform/".Contact us for more information [email protected] (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)

Step 4 Setting Up Commerce Infrastructure Services (CIS) – OptionalConsists of a number of web applications that provide a RESTful interface for accessing thirdparty services. Each service is focused on a particular business function, such as shipping, taxcalculation, or fraud detection, and can be executed separately from the others.Step 5 Providing Custom Database Configuration – OptionalHybris by default use HSQLDB. If you want to change to different database (MySQL / Oracle /MS SQL Server / HANA DB) then do it in “/config/” file.Note: - We also need to check corresponding driver {HYBRIS BIN DIR}/platform/lib/dbdriverMySQL Connector No Longer Shipped with hybris Commerce Suite. So we have to add it.HANA allows column-based style, apart from traditional row-based data true (It is recommended)If we don’t define any DB related configuration inside file then HSQL DB configurationinside platform/ file will be considered and HSQL DB will be connected.Q: How do we know different DB (Oracle / MySQL / HANA / MS SQL Server / ) Connectivity Details?Open “\hybris\bin\platform\” file & you can find all the details: -Note: - Take above entries & put in “/config/” file and change host & details.Step 6 Starting the Application Server & Deploying the Application – OptionalHybris Server by default has pre-configured application server based on Apache Tomcat. Hybrisallows 3rd-party application servers (WebLogic/tcServer/ .). Do these changes inside“/config/”.Step 7 How to start Hybris m hybrisserver.batNote: - In case of Unix, you can use “/”.Q: How to stop Hybris Server? CTRL C(Don’t use close button, bcoz some threads / processes still might be running).9) Initializing SAP Hybris CommerceQ: Why to do the Initialization During the initialization, the database tables, the type system,and the mandatory system data are created.Contact us for more information [email protected] (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)

Note: - Go to “C:\Softwares\HYBRISCOMM62\hybris\data\hsqldb” & see what is therebefore Initialization & after Initialization.hAC Open browser http://localhost:9001 (OR) https://localhost:9002Credentials admin & nimda) InitializationNote: - Initialize may takes close to 1 Hour (Because, this brings all tables/mandatory data / ).Q: Try to avoid 3 things while initialization in happening? (1) Don’t close the browser(2) Don’t go sleep mode(3) Don’t stop the server.Note: - Hybris can also be initialized using “ant initialize”.Note: - After initialization is done – U want to find URL’s for all types of consoles & cockpitsthen “localhost:9001/mcc” with user name admin & pwd nimda (MCC Multi ChannelCockpit)Q: How this user comes? While in initialization, there will be Users table created with somerows of data. Hence we can use those records / rows / users for login. You can see theinformation in “ / mydb.log”.Q: How to see what extensions are installed Go to hAC – Platform – Extensions10) Setup URL Mappings in Host file for default Sites: You can see Info roperties”.Go to “C:\Windows\System32\drivers\etc” apparel.local127.0.0.1 electronics.localNow Access Sites te apparel-de(B2C ?site apparel-uk(B2C ont/powertools/?site powertools (B2B Site).Q: When you initialize Hybris from ant, what actions are executed? all running cronjobsDelete & recreate the DB DB is never deleted by SAP Hybris.Delete all known tables Hybris will delete only tables he knows from its type definition.Import all project dataQ: Changing Hybris configuration from file of your platform project is bad because ? doesn’t follow SAP Hybris licenceIt makes future updates harder Keeping Configurations OOB is recommended.The file is already too bigThis file is ignored after you create a new config folder from itContact us for more information [email protected] (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)