Coder Social home page Coder Social logo

suited's Introduction

suited

Set up your Mac OS X development environment as a lone developer, or as part of a team.

Quick example usage and suitfile

From a fresh install of macOS/OS X, create an account that can administer the computer.

Open the Terminal application and setup some environment variables.

export GIT_NAME='Wendy Testaburger'
export GIT_EMAIL='[email protected]'
export GITHUB_USER='wendy'

Create a new GitHub personal access token with at least the repo and write:public_key scopes active. Copy the token into your environment.

export GITHUB_TOKEN='123abc...'

Create a new SSH key and register it with GitHub (or copy an existing one you already have to your computer).

# create key and add to the ssh-agent
ssh-keygen -trsa -b4096 -C "$GIT_EMAIL" -f $HOME/.ssh/id_rsa
ssh-add $HOME/.ssh/id_rsa

# upload new key to GitHub
pubkey=$( cat $HOME/.ssh/id_rsa.pub )
json=$( printf '{"title": "%s", "key": "%s"}' "$GIT_EMAIL" "$pubkey" )
curl -d "$json" https://api.github.com/user/keys?access_token=$GITHUB_TOKEN

Fetch suited.sh and run it, telling it which file(s) to use to setup your computer. They can be relative or absolute path, URLs or special github notation (as explained in the suitfile documentation).

curl -O https://raw.githubusercontent.com/norm/suited/latest/suited.sh
bash suited.sh github:wendy/suit:main.conf

Alternatively, an argument of a hyphen (-) means to use standard input as the suitfile:

echo "github:wendy/suit:Brewfile" | bash suited.sh -

Example suitfile

# setup xcode, homebrew and git
github:norm/suited:setup/install_xcode.sh
github:norm/suited:setup/homebrew.sh
github:norm/suited:setup/git.sh

# personal software
github:wendy/suit:Brewfile

# checkout code
repo wendy/suit
repo wendy/dotfiles

# lastly, ensure software is up to date
github:norm/suited:setup/software_update.sh

More documentation

You should read these before getting starting with suited:

I keep my setup in a separate public repo, to serve as a reference example of how to use suited.

Why yet another macOS/OSX bootstrapper

Why create another bootstrapper for your Mac computer? There are already many other systems, such as:

One reason to create this is to minimise the amount of stuff needed to write in order to setup a new laptop.

Another reason is frustration with the fragility of using software like puppet to only partially manage a machine โ€” GitHub have abandoned using boxen (replacing it with strap) for similar reasons.

Another is that whilst something like strap (which is little more than a bit of shell setup and then using Homebrew) is almost what I wanted, I still missed the ability for multiple users to collaborate on setups, as when using boxen (a great example was the GDS boxen).

So here is suited (taken from the phrase suited and booted, but you can pretend it is a reference to making a computer suitable for use).

suited's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

suited's Issues

Add testing

  • integrate Travis
  • stop master being pushed directly
  • PRs require approval
  • test basic commands
  • test private files without GITHUB_TOKEN set
  • test local and remote directories are traversed correctly

Add a `touch` command

If a file needs to be created (regardless of content), you shouldn't need a shell script just for that.

Release 0.9

0.9 should contain at a minimum:

  • no longer calling suited.sh again
  • output updates
  • suitfiles in directories
  • recently PRd bug fixes

Release checklist:

  • Create a release branch
  • Check the changelog has all changes made on master actually listed;
    if not add them
  • Update the changelog with the new version number
  • PR/merge the release branch
  • Tag the merge commit with the new version
  • Checkout the latest branch, git merge --ff-only master, and push
  • Close this issue as done

Improve the introductory documentation

At least one person using suited has blindly copied the "Wendy Testaburger" parts of the README, not realising that it was illustrative of what to do, not prescriptive. The introduction should be clearer, and further expand on why you might want to use suited.

Release 0.10

  • Create a release branch
  • Check the changelog has all changes made on master actually listed;
    if not add them
  • Update the changelog with the new version number
  • Update suited.sh with the new version number
  • PR/merge the release branch
  • Add a new release https://github.com/norm/suited/releases/new using
    the changelog as the description
  • Checkout the latest branch, git merge --ff-only master, and push
  • Close this issue as done

Add an `install` command

Sometimes new files/directories need to have specific permissions. Mimicking the install command is one way to achieve that.

Integrate with Slack

  • create slack channel
  • push GitHub notifications into the channel
  • document channel for guests?

Feature request: pin repos to specific versions

This is really cool, I like that it might be more lightweight than Puppet/Boxen.

One feature that would help using other people's repos is to be able to pin to a specific version to prevent people from changing things underneath you. For example instead of using:

github:norm/suited:setup/password_after_screensaver.sh 

I would prefer to say:

github:norm/suited@fe24e4335ec1c8f08243b7322e04deebc8c2e3ac:setup/password_after_screensaver.sh 

The commit SHA gives me a decent level of confidence that I know what I'm about to run.

Add a `mkdir` command

Making a directory is a common enough operation, you shouldn't need a shell script just for that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.