Installing in Demo mode on MacOS and Linux
Edit on GitHubThis document describes the procedure of installing Spryker in Demo Mode on MacOS and Linux.
Install Docker prerequisites on MacOS and Linux
To install Docker prerequisites, follow one of the guides:
Clone a Demo Shop and the Docker SDK
-
Open a terminal.
-
Create a new folder and navigate into it.
-
Depending on the desired Demo Shop:
- Clone the B2C repository:
git clone https://github.com/spryker-shop/b2c-demo-shop.git -b 202204.0-p1 --single-branch ./b2c-demo-shop
- Clone the B2B repository:
git clone https://github.com/spryker-shop/b2b-demo-shop.git -b 202204.0-p1 --single-branch ./b2b-demo-shop
-
Depending on the cloned repository, navigate into the cloned folder:
- B2C repository:
cd b2c-demo-shop
- B2B repository:
cd b2b-demo-shop
Make sure that you are in the correct folder by running the pwd
command.
- Clone the Docker SDK repository into the same folder:
git clone https://github.com/spryker/docker-sdk.git --single-branch docker
Optional: Switch to ARM architecture
Follow the steps in this section if you are installing on a device with an ARM chip, like Apple M1. Otherwise, configure and start the instance.
Update Sass
Replace x86 based Sass with an ARM based one:
- In
package.json
, removenode-sass
dependencies. - Add
sass
andsass-loader
dependencies:
...
"sass": "~1.32.13",
"sass-loader": "~10.2.0",
...
- Update
@spryker/oryx-for-zed
:
...
"@spryker/oryx-for-zed": "~2.11.5",
...
- In
frontend/configs/development.js
, add configuration forsaas-loader
:
loader: 'sass-loader',
options: {
implementation: require('sass'),
}
- Enter the Docker SDK CLI:
docker/sdk cli
- Update
package-lock.json
and install dependencies based on your package manager:- npm:
npm install
- yarn:
yarn install
- Rebuild Yves:
npm run yves
- Rebuild Zed:
npm run zed
Update RabbitMQ and Jenkins services
In the deploy file, update RabbitMQ and Jenkins to ARM supporting versions. Example:
services:
...
broker:
engine: rabbitmq
version: '3.9'
api:
username: 'spryker'
password: 'secret'
endpoints:
queue.spryker.local:
localhost:5672:
protocol: tcp
...
scheduler:
engine: jenkins
version: '2.324'
endpoints:
scheduler.spryker.local:
...
Enable Jenkins CSRF protection
- In the deploy file, enable the usage of the CSRF variable:
...
services:
scheduler:
csrf-protection-enabled: true
...
- In the config file, enable Jenkins CSRF protection by defining the CSRF variable:
...
$config[SchedulerJenkinsConstants::JENKINS_CONFIGURATION] = [
SchedulerConfig::SCHEDULER_JENKINS => [
SchedulerJenkinsConfig::SCHEDULER_JENKINS_CSRF_ENABLED => (bool)getenv('SPRYKER_JENKINS_CSRF_PROTECTION_ENABLED'),
],
];
...
Configure and start the instance
- Bootstrap the local Docker setup for demo:
docker/sdk bootstrap
Once you finish the setup, you don’t need to run bootstrap
to start the instance. You only need to run it after:
- Docker SDK version update.
- Deploy file update.
- Once the job finishes, build and start the instance:
docker/sdk up
- Update the
hosts
file:
echo "127.0.0.1 zed.de.spryker.local yves.de.spryker.local glue.de.spryker.local zed.at.spryker.local yves.at.spryker.local glue.at.spryker.local zed.us.spryker.local yves.us.spryker.local glue.us.spryker.local mail.spryker.local scheduler.spryker.local queue.spryker.local backoffice.de.spryker.local" | sudo tee -a /etc/hosts
If needed, add corresponding entries for other stores. For example, if you are going to have a US store, add the following entries: zed.us.spryker.local glue.us.spryker.local yves.us.spryker.local
Depending on the hardware performance, the first project launch can take up to 20 minutes.
Endpoints
To ensure that the installation is successful, make sure you can access the following endpoints.
APPLICATION | ENDPOINTS |
---|---|
The Storefront | yves.de.spryker.local, yves.at.spryker.local, yves.us.spryker.local |
the Back Office | zed.de.spryker.local, zed.at.spryker.local, zed.us.spryker.local |
Glue API | glue.de.spryker.local, glue.at.spryker.local, glue.us.spryker.local |
Jenkins (scheduler) | scheduler.spryker.local |
RabbitMQ UI (queue manager) | queue.spryker.local |
Mailhog UI (email catcher) | mail.spryker.local |
To access RabbitMQ UI, use spryker
as a username and secret
as a password. You can adjust the credentials in deploy.yml
. See Deploy file reference - 1.0 to learn about the Deploy file.
Getting the list of useful commands
To get the full and up-to-date list of commands, run docker/sdk help
.
Next steps
Thank you!
For submitting the form