Setting up SVN Environment & maintaining multiple instances , managing configuration properties in Hybris
One of the crucial aspect is maintaining the version system for any project. In terms of development Hybris projects have the same life cycle like other projects. Different environments like SIT, UAT, etc.. have to be maintained. Providing a local development environment is equally important.
It is not always advisable to put everything in SVN ,as the size of OOB Hybrid is huge.Hybris development environment keeps on improvising everyday thus reducing the effort of its developers.
The best practices to version Hybris projects are as follows,
- While versioning the software use only customized extensions put inside a custom folder.
- Pass local.properties, local.extensions to the developers.
- Maintain a copy of local.properties, local.extensions on the local servers like SIT, UAT, etc..
- Hybris software is wrapped around custom folder on each environment.
- Media folder can either be maintained locally or can be stored in an SVN
- Production environment is normally connected to SVN. Rather local copy is taken from SVN and deployed using Bamboo,etc..
Running Multiple Hybris in one machine
Basically Hybris is shipped with a bundled tomcat.
How to run multiple tomcat in one machine?
Till the maximum size of the memory ,we can run as many instance of hybris. We need to make sure that each version of Hybris uses its own ports.
Make the below ports unique for each instance
The problem is how to manage configuration for multiple instances.
The approach is to use apache tomcat to create specific environment variable. This approach copies files from one common file to environment specific file and merge them together to create complete local.properties.file.
Follow the below steps for configuration,
- Create a folder inside Hybris config directory.
- Place properties in each one of the local files as per environment related variables. The property that has same value across environment will go to common local property file.
- Create a build.xml file inside config project.
- Now we will create an environment specific property file.
- Run the file and pass the environment name.
Now we have a flexible solution to configure Hybris system more efficiently. For further queries regarding environment set up, contact us on email@example.com.