aboutsummaryrefslogtreecommitdiff
path: root/README
blob: c598a5a3c7c33aaa24199d44b6dee32df83c53f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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


Quick install:

bzr clone lp:linaro-android-build-tools
cd linaro-android-build-tools/control
./sandbox-create <name of your existing EC2 keypair>

This will create complete Cloud Buildd setup, you just need to fill in EC2
credentials which will be used to create build slave instances.

1. Open URL as output when 'sandbox-create' script finished in the browser,
   append "/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 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".
6. Click "Test Connection" and ensure you get "SUCCESS".
7. Now save your changes and you're done.

In addition to the fully automated sandbox-create script which takes care of
instance creation for a master node, there're following scripts with narrower
scope:

  control/setup-control-node-via-ssh <hostname>
      * 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