Wikimedia Apps/Team/iOS/CI/ServerSetup

Access Server
This section assumes that the server has been deployed by IT and has a host name of `buildmini.corp.wikimedia.org`.

Before connecting to the server, you need a whitelisted IP address. You can do this by: To connect to the server, use one of the following methods:
 * Connecting to the network while on site, or
 * Connecting to the VPN if offsite. (VPN Instructions)
 * Launch “Screen Sharing.app” and enter `buildmini.corp.wikimedia.org` for the “hostname”
 * Open Terminal and run `ssh @buildmini.corp.wikimedia.org`

When connecting you will be prompted for a user name and password. To obtain a user name and password, contact a member of the Mobile Team. (Contact Method)

Configure Server
Once connected to the server, you need to install various tools to enable continuous integration. Most of the following steps can be performed either through screen sharing or ssh.

Xcode

 * Install Xcode from Appstore (Must be done via screen sharing)
 * Install the Xcode Command Line Tools
 * Either from the Xcode UI by launching the app, or
 * By running “xcode-select —install” in terminal

OS X Server

 * Install OS X Server via the developer portal or via the app store
 * Enable Remote Access
 * Open the Server App and click on the “Settings” tab
 * Make sure SSH, screen sharing, and remote management are checked


 * Enable access to the server over port “8080”
 * Open the Server App and click on the “Access” tab
 * Click the “+” button at the bottom of the screen and select the “Custom…” option
 * Set the “Name” to Jenkins, the “Port” to 8080, and leave the connections on “All Networks”

Note: AFTER installing OS X Server on the build server, you can also install the OS X Server app on your local machine and connect to it remotely over VPN or while on site.

Install Command Line Tools
The following are used to by the build tools, or used to install build tools.
 * Install homebrew (Homebrew Link)
 * Install cocoapods via gem “gem install cocoapods”
 * Install node and npm via homebrew “brew install node“
 * Install grunt via npm “npm install -g grunt-cli”
 * Install xctool via homebrew “brew install xctool”
 * Install nokogiri “gem install nokogiri”
 * Install Fastlane via gem “gem install fastlane”

Install Jenkins

 * Install Jenkins via homebrew “brew install jenkins”
 * Edit the configuration ( Note: If these values don’t exist in the file, add them in the Program Arguments array ` ProgramArguments ` )
 * Open the configuration plist in a text editor `~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist`
 * Modify the http listening address to listen on all ports ` --httpListenAddress=0.0.0.0 `
 * Modify the port (`8080` is recommended) ` --httpPort=8080 `


 * Setup as a launch process by running `ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents`
 * Launch Jenkins by running `launchctl load ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist`
 * Test by opening `http://buildmini.corp.wikimedia.org:8080/` in your browser.

Setup a Project
After you complete the above steps you are ready to configure your project for continuous integration (Link)