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.
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.
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:
These settings will automatically apply updates, and will not require the iTunes password for each update.
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
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 |
|
Sharing | Name system appropriately (i.e. ostcdev-mac1011-01).
Select:
|
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. |
This step is NOT needed on the infrastructure system.
To enable the root account:
- Navigate to System Preferences / Users & Groups / Login Options,
- Select "Join..." at bottom right,
- Open directory utility,
- Unlock directory utility,
- From menu bar for Directory Utility, select Edit -> Enable root user
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.
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.
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 |