Giter Site home page Giter Site logo

beckmanshire-chef's Introduction

beckmanshire-chef

beckmanshire-chef is a complete Chef repository containing the cookbook and configuration files necessary for bootstrapping a macOS development machine. This repository is completely self-contained -- the cook is required to download the various cookbook dependencies via Berkshelf and rsync the repo to the target machine (see "Bootstrap Instructions" section below).

Prerequisites

The following sections describe the necessary prerequisites that should be installed/configured on the target machine before running the chef-client to bootstrap.

macOS VM

  • Install VMWare Tools.
    • NOTE: You may have to completely shutdown (rather than reboot) the VMWare VM after installing VMWare Tools for the screen resolution to adjust out of 1024x768.

macOS VM and Server Installations

  • Disable Messages and FaceTime.

All Installations

From the Controller / Host Machine...

  • Copy SSH public key from controller / host to the target machine.
    • NOTE: It may be preferable to use an SSH key without a passphrase specifically for this purpose.
ssh-copy-id -i ~/.ssh/keys/vm-macos-ssh username@vm-hostname

From the Target Machine...

  • Configure System Preferences / Sharing
    • Enable Remote Login for SSH access.
    • Change Computer Name and Local Hostname.
  • Edit /etc/sudoers to add the following to enable passwordless SSH access.
%admin		ALL = (ALL) NOPASSWD:ALL
  • Install XCode from the AppStore and accept the license agreement.
sudo xcodebuild -license accept
  • Install the OSX Command Line Tools.
xcode-select --install
  • Install ChefDK.
    • NOTE: Due to some gem dependencies that have not been updated for Chef 13 compatibility, the latest version of the ChefDK found to work with beckmanshire-chef is v1.6.11.
  • Generate an SSH key pair for the target machine (required for GitHub access to beckmanshire homesick repo). After creation, add the public key to GitHub.
    • NOTE: This key should be generated without a passphrase so the chef-client can successfully clone a git repository without being prompted for a passphrase.
ssh-keygen -t rsa -b 4096 -C "your_email@your_domain.com"
cat .ssh/id_rsa.pub
  • If your target machine is a VM, create a VM snapshot.

Bootstrap Instructions

From the Controller / Host Machine...

Vendor Berkshelf Dependencies

beckmanshire-chef is dependant on the cookbooks defined in this repository as well as some community cookbooks from supermarket.chef.io. From your host machine, run the following command to gather all necessary dependencies locally. The following command will download all cookbook dependencies to /berks-cookbooks.

berks install && berks vendor --delete

rsync Cookbook Files and Config to Target Machine

From your host machine, run the following command to copy the beckmanshire-chef contents to the target machine.

rsync -r . [username]@[target-machine]:~/.chef_zero

From the Target Machine...

Execute chef-client

To make the setup and execution of the chef-client easier and more efficient on target machines, a shell script is included in this project that contains the necessary command line execution options. The only prerequisite for using this script is to ensure that any node JSON definition included in /nodes is named with the target machines's hostname value. For example: nodes/kbeckman-macbook.local.json

./.chef_zero/chef_client.sh

NOTE: Occasionally the chef-client tends to fail during the execution when it's running homebrew cask installations. If/when that happens, simply rerun the command to continue the process. All of the Chef commands are idempotent and are designed to be executed multiple times.

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.