8000 GitHub - jay-li-0202/workstation-setup: Scripts to automatically set up a machine for development
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jay-li-0202/workstation-setup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workstation Setup

This project automates the process of setting up a new Mac OS X software development machine using simple Bash scripting. It heavily relies on homebrew.

Goals

The primary goal of this project is to give people a simple script they can run to make their Mac OS X machine prepared for the TW Launch Experience.

Preparation

  • Run the latest version of macOS unless you have a specific reason not to
  • These scripts might work on previous versions, but are maintained with only the latest macOS in mind
  • Install the latest version of Xcode

Getting this tool

Open up Terminal.app and run the following command:

mkdir -p ~/workspace &&
  cd ~/workspace &&
  git clone https://github.com/kindlertw/workstation-setup.git &&
  cd workstation-setup

Note: This might prompt you to install the latest Xcode command line development tools. Please do so if prompted.

Using this tool

Within ~/workspace/workstation-setup, run the following:

./setup.sh [list of optional configurations]

Examples:

# This will only install the default items
./setup.sh 

# This will install the latest Java and Docker
./setup.sh java docker

Warning: this tool might overwrite existing configurations.

Items installed by default

We recommend that you look at setup.sh to see what is automatically installed. You'll see it calls other scripts within scripts/common, so feel free to take a look at those, too. Note that you can edit any of those files to add or remove items specific for your needs, but the goal of this project is to have sane defaults for our target audience.

Opt-In Configurations

Please look in scripts/opt-in/ for optional, opt-in configurations. Some of these are languages and associated frameworks, such as java and golang. Some are supporting infrastructure, such as docker and kubernetes. Others might be specific tools for application platforms, such as cloud-foundry.

To install any of these, add them as arguments to $> setup.sh. Examples:

# Common for Spring Boot development
./setup.sh java spring-boot docker

# Lots of languages
./setup.sh java ruby node golang python c

# Love those platforms!
./setup.sh golang docker kubernetes cloud-foundry terraform concourse

Frequently Asked Questions and Troubleshooting

Q: Can I rerun setup.sh?

A: Yes, but with a but. While this script is not entirely idempotent, it does use homebrew's cache to skip reinstalling items, and is pretty lenient about ignoring errors when non-homebrew items get mad that they are already installed. There is no guarantee that some configurations won't be overwritten or duplicated.

Q: Should I run this with sudo?

A: No. setup.sh will ask you for your password take care of that for you.

Q: I'm getting permission errors such as the one below:

Error: Can't create update lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
  sudo chown -R $(whoami) /usr/local/var/homebrew

A: Short answer: run the suggested command or consider the Possible Solution described below.

Longer answer: You might have multiple user profiles on your machine that are using homebrew (such as this tool) resulting in a mix of file and directory ownership under /usr/local/var/homebrew. This should mostly be an issue with installing things, but not using the tools installed by brew. If you switch between profiles and install tools using brew often you might run into this a lot.

Possible Solution: Try this solution from itectec which makes homebrew's directories writable by the staff group, which should be all admin users on your machine.

  1. Note your default umask for later.

     $> umask
     022
  2. Set homebrew's directories to be writable by everyone in the staff group.

    umask 002 # group write permission
    sudo chmod -R g+w /usr/local/* # group writable
    sudo chgrp -R staff /usr/local/* # staff owned
  3. Set your umask back to the default.

     umask 022 # or whatever you noted earlier

Q: How to I get my change into this tool?

A: Submit a PR, especially for things that are outdated or broken. But, we are being vigilant about keeping this tool lean after a history of letting many idiosyncratic changes creep in over the past few years. As stated above, you can edit the files yourself after downloading them and/or fork.

About

Scripts to automatically set up a machine for development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 99.1%
  • Ruby 0.9%
0