Scripts for the Linaro Cloud Buildd Service ============================================ About ----- Linaro Cloud Buildd is a build service which distributes build load to the cloud (EC2). Linaro Cloud Buildd is based on Jenkins Continous Integration server and constitutes of configuration, streamlined web frontend, setup and maintenance scripts, procedures and best practices all interfacing to Jenkins. Cloud Buildd is in particular targetted towards building Android Platform, though may be reused to build other massive software projects. This package hosts scripts which are used by the Linaro Cloud Buildd Service. Scripts are grouped by purpose in subdirectories: control/ * Scripts to set up, control, and maintain Cloud Buildd. node/ * Scripts to initialize and control build slaves. (Run by Jenkins) build-scripts/ * Scripts which implement specific build types. (Run by Jenkins) Setting up Cloud Buildd ----------------------- Cloud Buildd uses cloud instances to do the builds, and its control node is also intended to be installed in the cloud. It may be possible to install it on a standlone host, but set up scripts described below assume full control of the host, and may alter configuration of other software and services. Please make sure that you have working (command-line) EC2 environment and can run ec2-* commands (for example, ec2-describe-instances). See the following link for this initial setup. In particular, have name of your EC2 keypair ready (you can list registered keypairs with ec2-describe-keypairs). https://help.ubuntu.com/community/EC2StartersGuide Installation procedure: bzr clone lp:linaro-android-build-tools cd linaro-android-build-tools/control Now review and edit sandbox-create.conf . You at least should have security groups set up properly before continuing. Once done, run: ./sandbox-create This will create complete Cloud Buildd setup, and output URL to the system frontend. You just need to fill in EC2 credentials which will be used to create build slave instances. 1. Open provided URL in the browser, appending "/jenkins". 2. Login as username: admin, password: admin. 3. Go to "People" -> "Jenkins Admin" -> "Configure". Change password. 4. Go to "Manage Jenkins" -> "Configure System". Search for "Access Key ID", "Secret Access Key" and fill in EC2 credentials. 5. Now you need to create keypair which Jenkins will use to create slave instances. This is supposed to be automated by clicking on "Generate Key", but does not work in latest Jenkins versions, so instead run: ec2-add-keypair jenkins@cloud-buildd >jenkins@cloud-buildd.rsa Paste contents of jenkins@cloud-buildd.rsa into "EC2 RSA Private Key" field. 6. Click "Test Connection" and ensure you get "SUCCESS". 7. Now save your changes and you are done. In addition to the fully automated 'sandbox-create' script which takes care of instance creation for a master node, there are following scripts with narrower scope: control/setup-control-node-via-ssh * This will set up existing instance/physical host as Cloud Buildd master node. control/setup-control-node * This will set up Cloud Buildd control node on the current host, which should be a blank, freshly installed host/instance running Ubuntu Server 10.10 or 11.04. Documentation ------------- User Guide for Cloud Buildd can be found at: https://wiki.linaro.org/Platform/Android/LinaroAndroidBuildService Links and references to general EC2 information is available at: https://help.ubuntu.com/community/EC2StartersGuide More information on configuring Jenkins EC2 plugin: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin General Jenkins information: http://jenkins-ci.org