https://github.com/hoverinc/engineering
Copy/paste this into Terminal.app
on your Mac
curl https://raw.githubusercontent.com/hoverinc/engineering/main/script/bootstrap --output ~/Downloads/bootstrap
sh ~/Downloads/bootstrap
You'll be asked for your:
- Bash / Z shell preference : If you don't know, just press
return
to use the default. - GitHub account email address : This is used to create SSH keys for working with GitHub.
- macOS password : This is so that the script can use
sudo
to install some things.
- Checks for or creates SSH keys for git/GitHub
- Helps you add an SSH key to your GitHub account
- Uses
strap
to setup up your Mac for development:- Disables Java in Safari (for better security)
- Enables the macOS screensaver password immediately (for better security)
- Enables the macOS application firewall (for better security)
- Adds a Found this computer? message to the login screen (for machine recovery)
- Enables full-disk encryption and saves the FileVault Recovery Key to the Desktop (for better security)
- Installs the Xcode Command Line Tools (for compilers and Unix tools)
- Agree to the Xcode license (for using compilers without prompts)
- Installs Homebrew (for installing command-line software)
- Installs Homebrew Bundle (for bundler-like Brewfile support)
- Installs Homebrew Services (for managing Homebrew-installed services)
- Installs Homebrew Cask (for installing graphical software)
- Installs the latest macOS software updates (for better security)
- Installs dotfiles from a user's https://github.com/username/dotfiles repository and runs script/setup to configure them; also runs script/strap-after-setup after setting up everything else
- Installs software from a user's Brewfile in their https://github.com/username/homebrew-brewfile repository or .Brewfile in their home directory.
- Installs everything from this repo's
Brewfile
- Installs Ruby
- Installs NVM, the latest Node, and the latest NPM
- Installs Postgres
Follow instructions on this page Installing gimme-aws-credentials to set up your aws credentials
We use the npm registry for some packages which require a private token to be able to install. You will need 1password access to be able to get the token. If you do not have 1password access, request access to the 1Password Eng - DevEnv
vault from IT. You should add this token to your environment to prevent errors when running npm
or yarn
.
- Open 1password, and find the
Eng - DevEnv
vault and find the entry for "NPM / HOVER_READ / @hover (read-only)". - Add the following line to your
~/.bash_profile
/~/.zshrc
:
# "@hover" npm packages
export NPM_TOKEN=<PASTE TOKEN HERE>
We use GitHub Package Registry for private repo RubyGems which requires a personal access token.
- Go to Settings › Developer Settings › Personal access tokens
- Click on Generate new token (classic)
- Set the Note field to
HOVER packages
- Set Expiration to
90 days
- Check the repo and read:packages scopes
- Click on Generate token
- Copy the token!
- Save it to your 1Password vault
- On the resulting screen open the Enable SSO drop-down and click the Authorize button
- Add the following line to your
~/.bash_profile
/~/.zshrc
:
# "HOVER packages" github token
export GITHUB_TOKEN=<PASTE YOUR TOKEN HERE>
export BUNDLE_RUBYGEMS__PKG__GITHUB__COM=${GITHUB_TOKEN}
- You should now be able run
bundle install
in a newTerminal.app
tab/window
-
NOTE: If you encounter an error that says the following while running
bundle install
:Bad username or password for https://<TOKEN>@rubygems.pkg.github.com/hoverinc/. Please double-check your credentials and correct them.
-
Run the following command:
bundle config https://rubygems.pkg.github.com/hoverinc <GITHUB-USERNAME>:<TOKEN>
- Important: Add a recurring calendar event to remind you every 3 months to replace your token so you're not left scratching your head when your development environment breaks
Hover Employees should take a look at the engineering-internal repo