Why is Recipe used in Hybris? - sap-commerce-cloud

What is the purpose of installing recipe and the difference between using recipe and without using recipe in hybris?
I don't have wiki access so can anyone please explain. Thanks in advance

Hybris came up with this concept of recipe for automatic installation.
It is a gradle file, It will take care of installing all required extensions.
Depending on your requirement you can choose you recipe, There are more than 24 recipe (version 6.3) available.
If you want b2b accelerator you can go for b2b_acc
telco - b2c_telco
china - b2c_china
Or if you want to build everything from scratch you can go for platform_only

Recipe helps the process of automating the things. Suppose you are looking for b2c flavor of hybris commerce then you can use b2c_acc on 6.0 it will have all the required extension for b2c. Also if you want to setup some config details you can use it. for more details you can follow help.hybris.com.

Recipes are used to add required extensions to the hybris platform. For example, if you want to install the recipe 'b2c_acc', call the command 'install.bat -r b2c_acc'. This command go to the {HYBRIS_HOME}\installer\recipes\b2c_acc, and read the build.gradle file located in this folder.
When you open build.gradle file, you can see all the extensions that are required for this recipe. If there is no recipe concept, you must install all these extensions manually, but with recipes, you automated this manual installation.
Reference
https://www.linkedin.com/pulse/explore-power-recipes-sap-hybris-commerce-muhammad-haris-ahmed/

Related

Install addon in hybris

i am using hybris version 2005
I installed addon with this command
ant addoninstall -Daddonnames="notificationaddon" -DaddonStorefront.yacceleratorstorefront="myStorefront"
How can I run adon without using this command on all devices? Where should I add what settings
Afaik there is no need to install an addon on all "devices", the addoninstall call changes two files in the destination extension e.g. the storefront extension:
myStorefront/.classpath
myStorefront/extensioninfo.xml
These files are usually under source control, so if you commit them, every time the project is built there is an ant macro that copies the addon into the extension directory.
Additionally, the addon should be added to the localextensions.xml, usually there is an template for the local dev env and the production, both should be updated.
I understand by devices, you mean the servers? If this is right, then you do not have to run this on servers. Instead, let the CI script take care of this. Based on the deployment strategy, your script would automatically run this command and the addons get installed on the storefront.
Every Addon does different work and requires a different way of inclusion.
The add on has a file project.properties.template that contains the properties that become active once you install the addon.
The addon has build.xml that is used to build that along with the storefront extension, whenever called back.
The source code including the java and XML that gets compiled along with the storefront. An AddOn can override any resource in the storefront extension.
For further information, please visit the Addon Concept illustrated in SAP help portal.

New developer process for Hybris

I am working on learning Hybris. I have successfully install hybris, there are lots and lots of blogs out there that talk about getting the core hybris install with your own custom moduleds to make changes to, such as this one:
http://javainsimpleway.com/hybris-b2b-installation/
In the blog above the gentleman creates a mystore. The question I have is this: Once you have this all setup, you have made changes to the mystore modules and you want get those changes onto a new developers machine (or productions machine), who do you do it?
What I have tried, which does not work is this:
zipped up the bin/custom/mystore, config/local.properties, and localextensions.xml
followed his steps 1 thru 4
unzipped the files on the new machine
jumped down to step 12 where he does an ant clean all initialize
One difference between his process and mine is that I am adding some addon's. It is my impression that all those changes happen with custom/mystore, but to be safe between my steps 3 & 4 I have rerun the ant addoninstall for all four addon's.
The process I have documented, SmartEdit was not working and I found SAP's documentation about running ant npminstall because Hybris does not include npm-related 3rd party JavaScript libraries. This are blowing up when I go to run ant npminstall.
I really feel like I am trying to recreate the wheel here. I would imagine what I am trying to do is very common to any Hybris team, but I cannot find documentation on how to do it. Does anyone know of a blog out there that talks about how to migrate the source from one machine to another?
there are lots and lots of blogs out there that talk about getting the
core hybris install with your own custom moduleds to make changes to
Although they may be helpful, I would suggest you stick to official Hybris documentation (e.g. https://help.sap.com/viewer/4c33bf189ab9409e84e589295c36d96e/1905/en-US/8acc8a5a86691014a20781b3f738213e.html) which is quite rich.
Once you have this all setup, you have made changes to the mystore
modules and you want get those changes onto a new developers machine
(or productions machine), who do you do it?
For production deployment, please go through https://wiki.hybris.com/display/hybrisALF/Ant+Production+for+Continuous+Integration
However, for simply copying the things from one machine to another machine, whatever artefacts you have already copied to the target machine (after you have installed Hybris on the target machine), are correct. If you are working in a team, you typically set up an SCM (e.g. git, SVN etc.) code repository and then it becomes easier.
It is my impression that all those changes happen with custom/mystore
This is a wrong impression. When you run addon install it creates/updates the project.properties file in the addon; not in your custom/mystore. So, if the addon is part of the code repository (which is typically not the case unless it is a custom addon), anyone pulling your code on their machine will automatically get the addon project.properties and therefore they will not require to run addon install on their machines; otherwise, they need to run addon install on their machines. A workaround is to copy the content of the addon project.properties to the local.properties (and thus getting the changes to the target machine when the local.properties is copied to the target machine).
This are blowing up when I go to run ant npminstall.
Make sure to run ant npminstall as an admin user. Please check https://answers.sap.com/questions/12771768/smart-edit-unable-to-find-local-grunt.html for another option.

what is bundle installation script and its sole purpose in Netsuite?

what is bundle installation script in netsuite and its purpose. I tried it to
Suite Answers but could not figure out. Any help regarding to topic will be valuable.
thanks.
There is only two cases where I have seen it used.
To use it as part of license management. A bundle installation script can check with a third party system to check if the account where the bundle being installed has a valid license.
To check if the features that your bundle needs is activated or available in the account it is being installed on.
The bundle installation script can also be used for data migration, when the bundle is updated. ie Suppose in the newer version of the bundle, you are adding one new custom field. For the existing custom records in the customer account, if you want to default that custom field to a particular value, after the bundle update, then you can do the same via bundle installation script (Using the afterInstall hook)

How many type of "extension" hybris have?

I am new in hybris please tell me anyone how many type of "extension" hybris have?
Hybris Commerce comes with the following extensions, which you can use as a template for new extensions:
yempty
ycockpit
yaddon
ybackoffice
yacceleratorcore
yacceleratorfacades
yacceleratorstorefront
yacceleratorcockpits
yacceleratorinitialdata
yacceleratortest
ycommercewebservices
yacceleratorordermanagement
yacceleratorfulflmentprocess
yatddtests
ycommercewebserviceshmc
ycommercewebservicestest
ygroovy
yoccaddon
ysaporderfulfillment
ysapordermgmtb2baddon
ysapproductconfigb2baddon
yscala
yhacext
All hybris extensions have the same minimal structure :
/.externalToolBuilders directory
/.settings directory
/lib directory
/resources directory
/src directory
/testsrc directory
/web directory
.classpath file
.pmd file
.project file
.ruleset file
.springBeans file
buildcallbacks.xml
extensioninfo.xml file
project.properties file
external-dependencies.xml file
So there is only one type of extension.
You can then make some different "group" of extension :
your custom extensions in /custom
the extensions working in module, that have always, a core, a hmc and a web extension
the platform extensions in /platform
the business extensions in /bin
the template extensions, starting with 'y' anf containing an `extgen.propertiesfile. You can have the up to date list of template there
Actually there are two different types of extensions in Hybris:
Web extensions (webmodule) which expose an access url : yacceleratorstorefront, hmc, ...
Core extensions (coremodule) which basically contains logics : platform, yacceleratorcore, yacceleratorfacades,...
Note: And also some extensions can be both web and core at the same time.
Reference image
According to your answer
Core Extensions - Used for platform implementation
Web Extensions - Used for Storefront applications - Like facades,addons, etc.
Commerce Extensions - Like payment, fulfillments, etc.
Other usual types are stated below according to hybris commerce suite
I would say that depends on your config...
according to the previous comments you got you may also have a look at the documentation by SAP https://help.hybris.com
There is a complete capture about Getting started, Creating new Extensions with the core trail and so on. It may help you as well to understand which extensions are possible in which configuration-set according to the accelerator you've chosen and stuff :)

How can we add DLLs to an Install Shield "build" on the command line/at build time?

We would like to add DLLs to an install based on some external command
(We want to reuse a script/install shield configuration multiple times from a command line. We have a program that will be localized and the localization just requires an additional DLL be added to the target directory. Because of the additional size of the DLL(s) we do not want to put them all in one installer. )
So for example we want to programmatically build the following:
Just an English installer
A specific language installer (add one named DLL to the install listed above)
ALL languages installer (gets all DLLs in a particular directory - we don;t want to have to specify the name)
If there is a better way to do this then please speak up - we don't care how it is done. WE are new to Install Shield (And not very impressed frankly).
Does the command line perhaps take multiple "scripts" or sources in order to combine pieces? We're not fluent enough with the tool to understand the paradigms that are commonly used.
You need to look into the concept of release flags and product configurations. You can create a single installer project that builds a variety of different views to meet all of your requirements. I have one customer that I did this for where I build 57 install configurations from one installer baseline to support all of his variation points.

Resources