Skip to content

Latest commit

 

History

History
222 lines (170 loc) · 6.94 KB

setup-macosx.md

File metadata and controls

222 lines (170 loc) · 6.94 KB

Setting up Mac OS/X Systems

For Mac OS/X development, we use a high power Macintosh system (currently Mac Pro), set up as an infrastructure system, to run a number of different virtual machines (for build, development, or test purposes).

For virtualization, we are using VMware Fusion, native on Mac OS/X.

Note that, with only a few exceptions, Mac OS/X infrastructure hosts and Mac OS/X build/development hosts are set up identically. The instructions below will call out the differences to minimize maintenance to these instructions.



Setup Instructions

Default Account

In general, the default account username is admin (full name: Administrative Account). It is easiest to set this up during Operating System installation, although if you set up some alternate account, you can create the admin account later.

In particular, we do not use the serviceb account on either infrastructure systems nor development systems. Build systems do use serviceb.

User accounts (be it for an end-user, or the serviceb account) should NOT have "Allow user to administer this computer" enabled on the System Preferences/Users & Groups dialog. Instead, they should use the sudo mechanism for sudo access as needed.

System Updates

Install all updates available from the App Store application (available under the Apple menu from the menu bar). Note that Jeff Coffler has created an iTunes account tied to his E-mail ([email protected]). Contact him for the password if needed.

After all updates are installed, navigate to System Preferences/App Store and, for "Free Downloads:", select Save Password. Here is a dialog to set everything properly:

Left

These settings will automatically apply updates, and will not require the iTunes password for each update.

Set Up sudoers File

After the commented out %wheel line, add a new line for %staff as follows:

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
%staff ALL=(ALL) NOPASSWD: ALL

System Preferences

The follow table indicates the settings that must be changed in the System Preferences screens:

Component Setting
Desktop & Screen Saver Select Message screen saver so, if screen saver is activated, it won't eat lots of CPU time to display fancy graphics.

For infrastructure system: In Screen Saver tab, select Start after: Never in pulldown. This avoids screen saver from wasting CPU time for VMs.

For virtual machines, execute the following command:
sudo defaults write /Library/Preferences/com.apple.screensaver loginWindowIdleTime 0
Energy Saver
  • If you have a slider for Computer sleep:, set it to never
  • Check: Prevent computer from sleeping automatically
  • Check: Wake for network access
  • Check: Start up automatically after a power failure
Sharing Name system appropriately (i.e. ostcdev-mac1011-01).

Select:
  • Screen Sharing (with VNC configured in Computer Settings...)
  • Remote Login
Network Configure the active network interface with DHCP.
App Store Check Automatically check for updates for all types of updates.

Do NOT check Automatically download apps purchased on other Macs.

Enable root Account

This step is NOT needed on the infrastructure system.

To enable the root account:

  1. Navigate to System Preferences / Users & Groups / Login Options,
  2. Select "Join..." at bottom right,
  3. Open directory utility,
  4. Unlock directory utility,
  5. From menu bar for Directory Utility, select Edit -> Enable root user

Set Up hostname

To set up the hostname for the system, launch a command terminal and type:

sudo scutil --set HostName <hostname>

where <hostname> is the name of your host. Do not append scx.com to the hostname.

Install updatedns

This step differs between the infrastructure system and virtual machines.

  • Only on virtual machines, install Xcode from the App Store. This is a sizable download and will take a few minutes.

  • Launch a command terminal, and type:

git clone https://github.com/jeffaco/msft-updatedns.git updatedns

If you're on an infrasture system, you'll get a prompt about installing Xcode or installing command line tools. You want to install the command line tools only.

Once msft-updatedns is downloaded, issue the following commands:

cd updatedns
./updatedns.sh --configure -v

At this point, updatedns should run automatically and fix the DNS resolvers to use the SCX domain servers.

Creating a New Virtual Machine

To create a new VM in VMware fusion, you must first download the operating system that you wish to use (i.e. El Capitan) from the App Store. Once downloaded, it is automatically placed in the /Applications/ folder, and you need to move it to make sure it won't get installed on system reboots. Move it into the administrator's desktop folder with a terminal by executing a command like:

mv /Applications/Install\ OS\ X\ El\ Capitan.app ~/Desktop

Once the operating to install is placed at the desktop:

  • Launch VMware Fusion. This can be done via the Applications folder via the finder, or by clicking magnifying glass on menu bar and typing "VMware" in the spotlight window and hitting return. Note that if VMware Fusion is already running (normally the case for virtual machines to be running), select Window / Virtual Machine Library from the menu bar once VMware Fusion is selected,
  • Select Add (+v) from the upper left of the window,
  • Drag Install OS X El Capitan from your desktop to the "Install from disk or image" section of the "Select the installation Method" window,
  • Click "Continue" from the "Create a New Virtual Machine" confirmation window.

At this point, follow the standard instructions to configure the virtual machine from the top of this document.

Suggested hard drive sizes for virtual machines:

Machine Type Size
Build System 24GB
Development System 64GB
Test System 16GB