3) Set parameters in /config/local-build-config.sf file, tuned to local enviorment setting. For example set the correct JAVA_HOME, ECLIPSE_BUILDER etc <br/>

3) Set parameters in /config/local-build-config.sf file, tuned to local enviorment setting. For example set the correct JAVA_HOME, ECLIPSE_BUILDER etc <br/>

+

+

'''Access to Eclipse Server'''

+

+

Only authorized users have access to eclipse server. To make the password-less access to eclipse server, such that server, do not ask for password. The eclipse server, should to trust the local machine. Here are the following steps to make that happen

+

+

1) change directory to .ssh on the local machine (cd /.ssh). In the .ssh directory there are various files such as authorized keys, config id_rsa id_rsa.pub and known_hosts.

+

+

2) Run the command "ssh-keygen" to create the RSA key pair.

+

+

3) On RSA key pair being generated. Run the command "cat id_rsa.pub" and then copy the key.

Revision as of 12:29, 20 December 2007

Contents

Introduction

Build Overview

The COSMOS build is based on Eclipse PDE (Plug-in Development Environment). The Plug-in Development Environment (PDE) provides tools to create, develop, test, debug, build and deploy Eclipse plug-ins, fragments, features, update sites and RCP products. PDE is built atop the Platform and JDT, and ships as part of the Eclipse SDK. The goal of PDE Build is to facilitate the automation of plug-in build processes [3][4][5] . Essentially, PDE Build produces Ant scripts based on development-time information provided by, for example, the plugin.xml and build.properties files. The generated Ant scripts, can fetch the relevant projects from a CVS repository, build jars, Javadoc, source zips, put everything together in a format ready to ship and send it out to a remote location (e.g., a local network or a downloads server It runs in the eclipse server.

An automated nightly build runs everyday, the build can also be manually started. The COSMOS build status (Failed/Completed/Progress), build logs, build downloads, dependencies etc can be accessed through a web based dashboard. The builds dashboard is available at http://build.eclipse.org/technology/cosmos/downloads/builds.php

Build Environment
COSMOS build is performed on the eclipse server. The build initially fetch the build module from CVS to the workspace directory. The fetched build module contains various Bash/Ant scripts to perform the complete build. These Bash/Ant scripts broadly perform following functions:

1. SML validator and SML-IF Editor (Resource Modeling)
This package consists of an SML validator that validates SML and SML-IF files, an editor to create and validate SML-IF documents used to exchange information between systems management applications, and tools for importing and exporting SML data to and from a flat file repository.

3. Data Reporting Web Application
This is a web application. It bundles the COSMOS Report Viewer and the COSMOS UI.

Build Process

Build starts automatically and the manual build has to be initiated by a person. If a build is in progress, another build cannot be started. A ".busy" file is created when the build starts and is removed automatically once it is over. The build output contains the deliverables, log files and reports.

The Release Engineering Team will be responsible for running the builds and tests to completion. In the event of problems with the build & test system, they are expected to be resolved as soon as possible and get the build and test restarted. In the event of problems with the build caused by developer checkins it is followed up with developers to ensure fixes are made quickly, and then the build and test are restarted. Any build failure will be reported through bugzilla to the build component for tracking the actual issue as well as trend analysis, etc. All committers are responsible for clean builds and tests. Anytime a check-in is made, the respective person is responsible for monitoring the builds and tests until they pass.

At the end of a successful build, the build output is published to the eclipse server as development build, as part of the build process.

Once the build progress through the different phases, it evolves into stable or release builds. Build type can be changed by editing the file "www/cosmos/downloads/publish_1.0.0.txt" in eclipse repository "dev.eclipse.org:/cvsroot/org.eclipse". In the publish file "publish_1.0.0.txt", build type is displayed as {development/candidate/stable}|{build id}|{comments}, for example stable|COSMOS-1.0.0-200708171630|i5 stable build (Release 0.5)

1) Build Schedule
1a) Daily Builds
An automated build runs every 24 hours. The state of the head branch of the CVS repository will be labeled with a time stamp.
The time stamp will be encoded with the release number, date, time, and serial build number, eg: COSMOS-RMm-YYMMDDHHMMSS.
A module list will be maintained (in CVS) that lists all the modules that are part of the current build, labeling and extracting will be restricted to those modules.

1b) Manual Builds
Apart from the daily automated builds, a manual build can be started by those who are authorized to do so.
{TODO: How to start the manual build on eclipse server}

2) Build Types
Following are various build types

2a) Development Builds
All successful daily builds are published to the eclipse server as development builds. Development builds are produced from whatever has been released into the HEAD stream of the CVS repository. They are completely untested and may contain major problems. These drops are normally only useful to developers actually working on this project.

2b) Candidate Builds
Selected daily builds are promoted as candidate builds for testing, based on the iteration schedule. They can be promoted to either milestone or release builds.

2c) Stable Builds
Candidate builds which pass all the test phases & bugs fixed are flagged as stable builds. Stable builds are tested drivers delivered at the end of each iteration of the development cycle. The latest stable build is the correct build for people who want to stay up to date with what is going on in the latest development stream, and don't mind putting up with a few problems in order to get the latest greatest features and bug fixes. Stable builds are also known as milestone builds

2d) Release Builds
According to the release schedule the stable builds are released to the community. Releases are the right builds for people who want to be on a stable, tested release.

Note: Tagged vs Untagged Builds
When a build is tagged, the artifacts used in build are tagged in CVS using the build ID. This is for easily reproducing the build if needed. All nightly builds are tagged builds. Manual builds can be run either as tagged or untagged.

Adding a new dependency or modifying an existing one is done by changing the following files:
a) build.properties - in dev.eclipse.org:/cvsroot/technology/org.eclipse.cosmos/releng/org.eclipse.cosmos.releng.builder/runtime
b) customTargets.xml - in dev.eclipse.org:/cvsroot/technology/org.eclipse.cosmos/releng/org.eclipse.cosmos.releng.builder/runtime

2) dev.eclipse.org:/cvsroot/technology - org.eclipse.cosmos (build artifacts & rel engg)
The build scripts, are located here and can be modified to reflect the change in builds. To setup build you should get the latest files from here. The entry point for build is make.sh.

Porting Build

Have completed the process of transfering COSMOS build environment to eclipse server.
The build directory on eclipse server is located at "/shared/technology/cosmos".
At this location, there are following directories.

1) downloads (on build completion, folder named COSMOS-$Buildld is created and drivers, console/CVS change logs are saved here at this folder location)
2) workspace (various plugin/feature are first fetched to this workspace directory, which are then compiled and packaged)
3) bin (contain various shell scripts used in build)
4) config (contain local configuration files, which specify the build parameters local to build)
5) dependencies (contain various dependencies, based on which the build is constructed)
6) logs (contain logs, used for debugging the build)

The build is started by executing the ./startbuild.sh in bin directory. The cronjob, is set on eclipse server to start the nighly builds.

Step to make build portable on another machine

1) Make the directory structure similar to what described above
2) Copy all the required files in directories
3) Set parameters in /config/local-build-config.sf file, tuned to local enviorment setting. For example set the correct JAVA_HOME, ECLIPSE_BUILDER etc

Access to Eclipse Server

Only authorized users have access to eclipse server. To make the password-less access to eclipse server, such that server, do not ask for password. The eclipse server, should to trust the local machine. Here are the following steps to make that happen

1) change directory to .ssh on the local machine (cd /.ssh). In the .ssh directory there are various files such as authorized keys, config id_rsa id_rsa.pub and known_hosts.

2) Run the command "ssh-keygen" to create the RSA key pair.

3) On RSA key pair being generated. Run the command "cat id_rsa.pub" and then copy the key.

Connecting CVS with SSH
The build machine includes an SSH client for accessing the CVS server. Different methods can be used to authenticate, depending on the level of functionality and security. Authentication methods used by the client by default are, in the following order: public-key, Keyboard-Interactive, and password authentication.

Public-key authentication allows the client to connect to a remote CVS server without sending the password. This is a more secure authentication method than password authentication. Public-key authentication uses two keys, a private key that it should be kept in a secure place and protected with a password. And the public key, is placed on the server (CVS), one wish to gain access to.