mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-11 22:49:54 +00:00
* Adjust `package.json`s to pnpm * Convert resolutions (pnpm doesn't support `**/` syntax) It also removes resolutions that are no longer relevant. * Convert `yarn.lock` to `pnpm-lock.yaml` with `pnpm import` * Always add `e/web/teleport` workspace to the lockfile * Adjust `jest` to new node_modules structure * Adjust `storybook` to new node_modules structure * Replace `toHaveStyleRule` with `toHaveStyle` `jest-styled-components` package is no longer global, so `toHaveStyleRule` matchers is not recognized by TS. We use them only in three places, so it's simpler to convert them to `toHaveStyle`. * Adjust README files * Adjust GHA workflows * Adjust build assets * Remove remaining `yarn` mentions I don't think anyone uses the debug configuration for electron (and we don't have `start-electron` script for a long time). * `corepack enable` -> `corepack enable pnpm` * Automatically enable pnpm when running `make build/teleport` * Run `pnpm import` again * Run `pnpm dedupe` * Add `yarn.lock` to .gitignore * Link to pnpm installation docs * Add a better comment for `transformIgnorePatterns` * Make pattern for `shared` stories more specific * Change `corepack enable pnpm` in readmes * Run `pnpm import && pnpm dedupe` again
3.5 KiB
3.5 KiB
MacOS environment setup
The instructions below are provided as in a best-effort basis. PRs with corrections and updates are welcome!
-
Install Homebrew
-
Goversion from go.mod-
Follow official instructions to install
Go- On an M1 Mac, download ARM64 installer from https://go.dev/dl/
- Download the installer for
<version from go.mod> - After installing, don't forget to
export PATH="/usr/local/go/bin:$PATH"in~/.zprofile - If you need other go versions, see https://go.dev/doc/manage-install
- You will need to add
export PATH="$HOME/go/bin:$PATH"to the~/.zprofile
- You will need to add
-
Or install required version of
Gowith homebrew:
# if we are not on the latest, you might need to install like this: # brew install go@<version from go.mod>, i.e. 1.16 # # check which version will be installed by running: # brew info go brew install go -
-
RustandCargoversion from build.assets/Makefile (search for RUST_VERSION):- Follow official instructions to install
rustup- Or install with homebrew:
brew install rustup- Initialize Rustup
rustup-init # # accept defaults # # Once command finishes successfully, you might need to add # # export PATH="$HOME/.cargo/bin:$PATH" # # into ~/.zprofile and run: # # . ~/.zprofile # # or open a new shell- Install the required version
rustup toolchain install <version from build.assets/versions.mk> cd <teleport.git> rustup override set <version from build.assets/versions.mk> rustc --version # rustc <version from build.assets/versions.mk> - Follow official instructions to install
-
To install
libfido2(pullsopenssl 3as dependency)brew install libfido2 -
To install
pkg-configbrew install pkg-config -
To install tools for building the UI:
brew install node corepackcorepack enable pnpm- The
RustandCargoversion in build.assets/Makefile (search forRUST_VERSION) are required. - The
wasm-packversion in build.assets/Makefile (search forWASM_PACK_VERSION) is required:curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
Local Tests Dependencies
To run a full test suite locally, you will need
-
helmandhelm-unittestpluginbrew install helm helm plugin install https://github.com/quintush/helm-unittest -
bats-coreversion from build.assets/Dockerfile (search forbats-core)curl -L https://github.com/bats-core/bats-core/archive/v1.2.1.tar.gz -o ~/Downloads/bats.tar.gz cd ~/Downloads tar xzvf bats.tar.gz sudo mkdir /usr/local/libexec sudo chown $USER /usr/local/libexec cd bats-core-1.2.1 sudo ./install.sh /usr/local cd ../ rm -rf bats-core-1.2.1 bats.tar.gz -
protocbinary, typically found inprotobufpackagebrew install protobuf -
increased
ulimit -nulimit -n 2560 # 10x default