Skip to content
sirlantis edited this page Feb 22, 2013 · 24 revisions

powered by CloudBees

TBD: describe general setup and meaning of Build Status on readme.

tl;dr (experimental)

Create a new directory, the slave should work in

mkdir ~/cloudbees && cd ~/cloudbees

and run

bash <(curl -fsSL https://raw.github.com/BeamApp/Transit/master/scripts/cloudbees-slave-go.sh)

To perform the following steps automatically :)

Xcode and Various Command Line Tools

To build and test the various artifacts during the build, each slave needs a set of command line tools. If you don't setup this machine from scratch it is very likely that you already have some of them installed.

  • Install Xcode Command Line Tools and/or full Xcode from MAS.
  • If using full Xcode, you'll need to agree to the license by running: xcodebuild -license
  • Homebrew ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" http://mxcl.github.com/homebrew/
  • Git brew install git http://git-scm.com
  • JavaScript Tools (node+npm and PhantomJS)
  • Node.js brew install node http://nodejs.org (make sure npm exists)
  • PhantomJS brew install phantomjs http://phantomjs.org
  • ios-sim brew install ios-sim https://github.com/phonegap/ios-sim
  • Android (SDK, AVD with android 17, environment variables)
    • SDK brew install android-sdk http://developer.android.com/sdk
    • Android Platform Tools, etc. android update sdk -u --filter platform-tools,android-17,system-image,extra-intel-Hardware_Accelerated_Execution_Manager
      • (if dialog asks for installing Java, please do so and run again)
    • create and AVD android create avd -n default -t android-17 -b x86
    • if not installed via brew make sure ANDROID_SDK_ROOT is set and android and adb are on the path
    • optional: open $ANDROID_SDK_ROOT/r21.1/extras/intel/Hardware_Accelerated_Execution_Manager/haxm-macosx_r02.dmg and install the mpkg to boost your Android Emulator performance by 500%.

Run As CloudBees Slave

CloudBee's custom build slaves need to be authorized via SSH and require you to provide a public SSH key. For security reasons you should not re-use and store your personal SSH keys on a dedicated build server. Instead, create a new pair exclusively for for authenticate the build slave against CloudBees.

  • create a new directory to run the slave in and store the SSH keys, mkdir ~/cloudbees && cd ~/cloudbees
  • authenticate your node
    • create SSH keys pair ssh-keygen -t rsa -f cloudbees-slave -N ""
    • copy cat cloudbees-slave.pub | pbcopy and paste your public key in issue #26, so we can register your node.
  • put jenkins-cli.jar into your ~/cloudbees dir curl -Lo jenkins-cli.jar https://jenkins.ci.cloudbees.com/jnlpJars/jenkins-cli.jar
  • put run-cloudbees-slave.sh into and chmod +x it curl -Lo run-cloudbees-slave.sh https://raw.github.com/BeamApp/Transit/master/scripts/run-cloudbees-slave.sh && chmod +x run-cloudbees-slave.sh
  • run ./run-cloudbees-slave.sh
    • (if dialog asks for installing Java, please do so and run again)

If the script terminates with "Authentication failed. No private key accepted." we haven't received your private SSH key, yet. Please wait until we registered your build slave and make sure you added your public key in issue #26.

Automatically Launch CloudBees Slave on Startup

TBD