Switch to ARM architecture (M1 chip)

Edit on GitHub

This document explains how to install Spryker in Docker on a device with an ARM chip using demo shops versions 202108.0 or earlier.

The steps below should be followed after you have completed the Clone a Demo Shop and the Docker SDK section in the installation guides for development and demo modes.

To switch to ARM architecture, follow the steps:

Update Sass

Replace x86 based Sass with an ARM based one:

  1. In package.json, remove node-sass dependencies.
  2. Add sass and sass-loader dependencies.
...
"sass": "~1.32.13",
"sass-loader": "~10.2.0",
...
  1. Update @spryker/oryx-for-zed:
...
"@spryker/oryx-for-zed": "~2.11.5",
...
  1. In frontend/configs/development.js, add the implementation of options for saas-loader:
loader: 'sass-loader',
options: {
   implementation: require('sass'),
}
  1. Enter the Docker SDK CLI:
docker/sdk cli
  1. Update package-lock.json and install dependencies based on your package manager:
    • npm:
    npm install
    
    • yarn:
    yarn install
    
  2. Rebuild Yves:
npm run yves
  1. 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

  1. In the deploy file, enable the usage of the CSRF variable:
...
services:
  scheduler:
    csrf-protection-enabled: true
...
  1. 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'),
    ],
];
...

Once done, you can proceed with Configure and start the instance section of the installation guides.