Skip to content

Local development setup ‐ macOS Sonoma (14.6)

SeongTae Jeong edited this page Sep 23, 2024 · 9 revisions

These are the steps for setting up a development environment on macOS Sonoma (14.6) ARM64.

The asdf runtime version manager is used for installing Python and NodeJS.

Set up the prerequisites

Install Homebrew

Use the standard Homebrew installation approach:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Chromium, the MS SQL and MySQL clients, and pwgen

$ brew install chromium freetds mysql-client pwgen
$ cat <<EOF >> ~/.zshrc
# Add the MySQL client to the path, for Redash
PATH=\$PATH:/opt/homebrew/opt/mysql-client/bin

# Instruct Puppeteer to use the version of Chromium installed by Homebrew, for Redash
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH="/opt/homebrew/bin/chromium"
EOF

If Chromium is not running properly, please see the following to reinstall it:

$ brew rm --cask chromium
$ brew install --cask chromium --no-quarantin

Install asdf

$ brew install coreutils curl git
$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
$ cat <<EOF >> ~/.zshrc
. "\$HOME/.asdf/asdf.sh"
fpath=(\${ASDF_DIR}/completions \$fpath)
autoload -Uz compinit && compinit
EOF

Then start a new terminal session so the above change is active.

Install Docker Desktop

Download and install Docker Desktop

Allow Rosetta to be installed during the installation where it asks for confirmation.

Verify docker works

Important

The Docker Desktop application needs to be running (even in the background) for docker commands to work.

$ docker run hello-world

What next

From here on follow the Local Development Setup instructions for Debian 12, from the "Clone the Redash source code" step onwards.

That will ensure your local development environment works for Redash development, and all of the Redash tests (including Cypress) should work correctly.

When running through the Cypress tests (as per the page here), you don't need to install the Debian/Ubuntu dependencies (ie sudo apt install ...) mentioned on that page. The Cypress tests work on macOS without that stuff.

Clone this wiki locally