The project aims to fast set up a dev environment for those who want to learn SAP Spartacus. Please follow the steps bellow to set up the box
- SAP Commerce 2005 Zip
- Oracle VM VirtualBox
- Unzip SAP Commerce 2005 Zip
- Create a folder an name it as you want, note that folder will contain Sparatucs files
- Mount SAP folder with Vagrant folder, to do that :
- Open Vagrantfile
- Replace [SAP_COMMERCE_PATH] with your 'SAP Commerce 2005' path
config.vm.synced_folder "[SAP_COMMERCE_PATH]", "/tmp/hybris",
id: "hybris"
- Mount Spartacus folder with Vagrant folder, to do that :
- Open Vagrantfile
- Replace [SPARTACUS_PATH] with the path of the folder that you have created before ( step 2 )
config.vm.synced_folder "[SPARTACUS_PATH]", "/tmp/spartacusStore",
id: "spartacus"
- Start the box :
vagrant --initAll up --provision
- Build & start Hybris :
#access to the box
vagrant ssh
#set ant env
cd /tmp/hybris/bin/platform
. ./setantenv.sh
#generate hybris folders ( config, data,log..)
ant
#exit the box
exit
#reload the box to import medias & continue the installation
vagrant --importMedias --setConfig reload --provision
#access to the box
vagrant ssh
#set ant env
cd /tmp/hybris/bin/platform
. ./setantenv.sh
#run clean all
ant clean all
#start Hybris
./hybrisserver.sh
- Build & start Spartacus
#access to the box in a new shell ( keep that for hybris open )
vagrant ssh
cd /tmp/spartacusStore
#start Sparatcus
sudo yarn start --host 0.0.0.0 --port 4200
- Access to Spartacus
http://localhost:4200/electronics-spa/en/USD/
- You can run hybris in debug mode, so you can debug from the host on port 8000, you just need to run the hybris server in debug mode :
./hybrisserver.sh debug
- The sparatacus files are generated in the host machine, so you can create your own angualr components or customize Spartacus ones ;)