SaltStack Administration
We use SaltStack to configure our build master and the slaves. The sources are at: https://github.com/servo/saltfs/.
Our main Salt-related docs are in-tree, and include a link to the official Salt documentation as well. This wiki page lists some supplemental information.
See the main docs for Linux and Windows; OS X instructions are listed here until cleaned up.
I use Vinagre to VNC from Ubuntu into freshly paved macs for these setup steps. The initial username is Administrator and the password is noted in the Macstadium support ticket.
-
Ensure the new minion's IP address is present in the S3 bucket policy for the servo-deps bucket.
-
Get password from ticket
-
Install latest or compatible Xcode and commandline tools from the Appstore If the app store version of xcode is incompatible with the OSX version:
- Look up what version of xcode is required for the OSX version
- Download that version from https://developer.apple.com/download/more (use search box)
- When download is complete, double click the .dmg in downloads and follow the drag-and-drop instructions to install
- If there's a gray 🚫 on the xcode icon, OS updates are required to run it. Click applications, click the updates tab, and let it reboot and install updates.
- Run
sudo xcode-select --install
when connected via VNC viewer. The installation command creates pop-ups which must be clicked to successfully install xcode.
-
Verify the license:
sudo xcodebuild -license
- Install brew and git and pip:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew analytics off
brew install git
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
brew install python@2
- Download salt files:
curl https://raw.githubusercontent.com/servo/saltfs/master/.travis/install_salt.sh | sh -s osx
curl -O https://raw.githubusercontent.com/saltstack/salt/develop/pkg/darwin/com.saltstack.salt.minion.plist
- Add the following to the
com.saltstack.salt.minion.plist
file just after the Label section:
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<key>HOME</key>
<string>/Users/administrator</string>
</dict>
sudo cp com.saltstack.salt.minion.plist /Library/LaunchDaemons/
sudo bash -c "echo '52.37.76.55 salt' >> /etc/hosts"
sudo mkdir /etc/salt
sudo mkdir /var/log/salt
sudo salt-run launchd.write_launchd_plist salt-minion
printf 'id: servo-mac10' | sudo tee /etc/salt/minion # replace servo-linux10 with the builder name
sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.minion.plist
-
Set screen resolution to 1280x960 or else reftests will fail randomly
-
Create a standard user named 'Tom Servo', account name servo, give him a password, and log in.
- Set up to autologin on reboot. LEAVE LOGGED IN (else reftests will fail)
-
Do the following to stop coreaudiod from using 100% of a cpu:
sudo launchctl load -w /system/library/launchdaemons/com.apple.blued.plist
- And do this to stop mds/mdworker from using another 100% of a cpu:
sudo launchctl unload -w /system/library/launchdaemons/com.apple.metadata.mds.plist
-
Delete any residual files which might be left in
/Users/administrator/Downloads
, as they're implicated in issues withFileStatsAgent
. -
install java
brew tap caskroom/versions
brew cask install java8