Configuration & Build Management

Similar documents
Chapter 11, Testing, Part 2: Integration and System Testing

Chapter 11, Testing, Part 2: Integration and System Testing

Chapter 11, Testing, Part 2: Integration and System Testing

Build Tools. Software Engineering SS 2007

MAVEN MOCK TEST MAVEN MOCK TEST I

Build Tools. Software Engineering SS A tool was needed. Agenda for today. Build tools. Software complexity. Build tools

Maven 2 & Continuum. by Trygve Laugstøl

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Build. System building

Maven in the wild. An introduction to Maven

Continuous Integration (CI) with Jenkins

Outline. Configuration management. Main Phases MOTIVATION

MAVEN INTERVIEW QUESTIONS

Con$nuous Integra$on Development Environment. Kovács Gábor

A Distributed System for Continuous Integration with JINI 1

Continuous Integration using Cruise Control

Construction: version control and system building

Developing Workflow Applications with Red Hat JBoss BPM Suite with exam (JB428)

IceCube s Development Environment.

An Integrated Approach to Managing Windchill Customizations. Todd Baltes Lead PLM Technical Architect SRAM

Directory structure and development environment set up

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

What is Maven? Apache Maven is a software project management and comprehension tool (build, test, packaging, reporting, site, deploy).

Global Administration April 24, :46:42 PM CEST

Oracle Code Day Hands On Labs (HOL) (Install, Repository, Local Deploy, DevCS, OACCS)

Part 2. Contents. Summary. ECF Autobuild System

TM DevOps Use Case TechMinfy All Rights Reserved

What s new in IBM Operational Decision Manager 8.9 Standard Edition

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

Maven POM project modelversion groupid artifactid packaging version name

Web Application Architecture (based J2EE 1.4 Tutorial)

Thomas Pelaia II, Ph.D. XAL Workshop 2012 December 13, 2012 Managed by UT-Battelle for the Department of Energy

Apache Maven MarsJUG. Arnaud Héritier exo platform Software Factory Manager

Construction: version control and system building

Oracle Code Day Hands On Labs HOL

IBM Rational Developer for System z v7.6. Download Full Version :

Eclipse Classic is fine. The other options are specializ e for Java, C++ developers, etc. We just need to plain vanilla version.

VSO. Configuration Management

Oracle Developer Depot Technical Review

SAS Web Infrastructure Kit 1.0. Overview

a brief introduction to creating quality software continuously Copyright 2011 Davisbase, LLC

Topics covered. Introduction to Maven Maven for Dependency Management Maven Lifecycles and Plugins Hands on session. Maven 2

Gradle Leveraging Groovy for Building Java Applications. Hans Dockter Gradle Project Lead

Enabling Application Lifecycle Development in JDeveloper

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

TIBCO StreamBase 10.2 Building and Running Applications in Studio, Studio Projects and Project Structure. November 2017

EMC Documentum Composer

This assignment requires that you complete the following tasks (in no particular order).

Geronimo Server Release Process

I Got My Mojo Workin'

Sonatype CLM Enforcement Points - Nexus. Sonatype CLM Enforcement Points - Nexus

AntBuilder. A simple Builder to interface with Ant. Table of contents

Lab 5 Exercise Build and continuous integration tools

Benefits of the Build

Build Automation Kurt Christensen

CHAPTER 6. Organizing Your Development Project. All right, guys! It s time to clean up this town!

Software Development. COMP220/COMP285 Seb Coope Ant: Structured Build

Project Automation. If it hurts, automate it! Jan Pool NioCAD University of Stellenbosch 19 March 2008

Gradle. The Basics and Beyond

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Laboratory Assignment #3 Eclipse CDT

CONTINUOUS DELIVERY IN THE ORACLE CLOUD

COMP 4905 Honours Project Report

Getting Started Guide

Both Sides Now: DevOps and Agile in Oracle Developer Cloud Service for Fusion Middleware Developers

... SysML version SNAPSHOT Developer Guide.... Eclipse

Build automation. CSE260, Computer Science B: Honors Stony Brook University

Automation Deployment Guide

DevOps examples on NonStop Tools Overview. Cor Geboers, ATC Consultant

Red Hat Developer Studio 12.9

SLI Learning Search Connect For Magento 2

SOA-14: Continuous Integration in SOA Projects Andreas Gies

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

B. Assets are shared-by-copy by default; convert the library into *.jar and configure it as a shared library on the server runtime.

Chapter 2 WEBLOGIC SERVER DOMAINS. SYS-ED/ Computer Education Techniques, Inc.

A ColdFusion Management System Getting Started Documentation Copyright 2009, All Rights Reserved. FusonLink Inc.

DevOps for Oracle Forms Using Developer Cloud Service

Using the vrealize Orchestrator Operations Client. vrealize Orchestrator 7.5

Documentum Composer EMC. Quick Start Guide. Version 6.5 SP3

JBoss DNA. Randall Hauch Principal Software Engineer JBoss Data Services

AutoVue Integration SDK & Sample Integration for Filesys DMS

Users Guide. Table of contents

ewon Flexy JAVA J2SE Toolkit User Guide

Content. Development Tools 2(57)

Developing Rules Applications with Red Hat JBoss BRMS (JB463)

Repository Management and Sonatype Nexus. Repository Management and Sonatype Nexus

Automatic updates for Websense data endpoints

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Release Engineering as More than a Part-time Pastime. Dinah McNutt Google, Inc.

Technology Background Development environment, Skeleton and Libraries

Introduction to Eclipse

Android System Development Training 4-day session

Continuous Integration, Continuous Deployment and Continuous Testing by HP Codar using ALM and Jenkins

Operations Orchestration 10.x Flow Authoring (OO220)

Software MEIC. (Lesson 20)

How To Guide Using and Developing Custom Phases in IKAN ALM

Continuous Integration & Code Quality MINDS-ON NUNO 11 APRIL 2017

Maven. INF5750/ Lecture 2 (Part II)

Installation Guide for the TITAN Designer and TITAN Executor for the Eclipse IDE

Managing Installations and Provisioning of OSGi Applications. Carsten Ziegeler

Transcription:

Object-Oriented Software Engineering Using UML, Patterns, and Java Configuration & Build Management

Outline of the Lecture Purpose of Software Configuration Management (SCM) Some Terminology Software Configuration Management Activities Outline of a Software Configuration Management Plan Build Management Continous Integration

Miscellaneous The Zen and the Art of Motorcycle Maintenance competition Prize: A 2 Gigabyte USB stick We have a winner!

Miscellaneous The Winner is Manuel Then: Congratulations! Page 105 in the German Translation Page 86 in the Paperback edition, Bantam Edition 1975

Requirements for Build Management Large and distributed software projects need to provide a development infrastructure with an integrated build management that supports: Regular builds from the master directory Automated execution of tests E-mail notification Determination of code metrics Automated publishing of the applications and test results (e.g. to a website) Tools for Build Management: Unix s Make Ant Maven

Activities in Build Management The transition from source code to the executable application contains many mechanical (boring) activities: Settings required paths and libraries Compiling source code Copying source files (e.g. images, sound files, start scripts) Setting of file permissions (e.g. to executable) Packaging of the application (e.g. zip, tar, dmg) Executing these steps manually is timeconsuming and the chance of introducing failures is high Automating these steps has its origins in Unix

Example: Build Management in Unix The Unix command make executes compilation of large programs according to a set of dependency rules Dependency rule Tree structure of prerequisites Time stamps of files Example of a dependency rule: main.obj : main.c gcc -c main.c

Example Makefile project.exe : main.obj io.obj tlink main.obj, io.obj, project.exe main.obj : main.c gcc -c main.c io.obj : io.c gcc - c io.c

Make Make is as powerful as the existing commands it executes However, make has its problems: Different shell commands are needed on different platforms Complex shell scripts are hard to maintain and hard to debug

Next Step: Ant, a Platform Independent Build Management Tool Build tool based on Java, http://ant.apache.org Tasks get executed by invoking Java classes, not shell scripts or shell commands Ant allows the execution of tasks such as: compilation execution file system operations (e.g. copy, move) archiving deployment Ant has become a standard in the Java Open Source community Ant build files are platform independent Ant s build file is an XML document

General Structure of Ant Build Files

Examples of Ant Tasks Each Ant Task is a Java application. Custom tasks can be implemented in Java to support custom needs.

Construction of Ant Build Files The default name for a Ant build file is build.xml The xml root element must be the project element The default attribute of the project element is required and specifies the default target to use Targets contain zero or more AntTasks The name attribute is required AntTasks are the smallest units of the build process

Ant Build File Example <project default="hello"> <target name="hello"> <echo message="hello, World"/> </target> </project> Execution of build file: % ant Buildfile: build.xml hello: [echo] Hello, World BUILD SUCCESSFUL Total time: 2 seconds

Maven Overview A Java project management and integration build tool, http://maven.apache.org/ Maven supports the same functionality as Ant Ant is actually integrated into Maven Maven s extended functionality Automatically generates a development website containing Project organization information Project development state reports Based on the concept of a central project object model (POM)

Maven Capabilities Maven is able to Receive developer artifacts from the programmers SCM directory Compile and package the source code Download dependent artifacts from another (external) repository Generate Javadoc websites Generate developer and code metrics Generate websites containing status information to track issues Deploy the compiled source code and the generated website to a webserver

Modeling a Project in Maven Project Object Model (POM) Project name, id, description, version number Website URL Issue tracking URL Mailing list URLs SCM directory URL Developer information License information Dependencies Name, version, location of a Java library from jar file Project directory layout Specifies source code and unit test code directories

Modeling a Project in Maven (UML) Project Object Model Project Descriptor name currentversion organization inceptionyear description url Build Descriptor sourcedirectory resources Developer Descriptor name id organization roles Repository Descriptor connection developerconnection url

Example: Generating ARENA s Development Website ARENA uses a SCM master directory at oose.globalse.org ARENA depends on the Java library servlet.jar available in the Ibiblio repository The ARENA website is located on the server sysiphus.in.tum.de Maven compiles the ARENA sources in the programmer s directory of the developer

Modeling a Project in Maven (UML) Project Object Model Project Descriptor name currentversion organization inceptionyear description url Build Descriptor sourcedirectory resources Developer Descriptor name id organization roles Repository Descriptor connection developerconnection url

Project Descriptor for ARENA (in project.xml) <project> <!-- a unique name for this project --> <id>arena</id> <!-- a short but descriptive name for the project --> <name>arena</name> <currentversion>0.9</currentversion> <!-- details about organization who 'owns' the project --> <organization> <name>bernd Bruegge & Allen H. Dutoit</name> <url>http://wwwbruegge.in.tum.de/</url> <logo>/images/ase_logo.gif</logo> </organization> <inceptionyear>2004</inceptionyear> <logo>/images/arena.gif</logo> <description>arena</description> <!-- the project home page --> <url>http://sysiphus.informatik.tu-muenchen.de/arena</url> <siteaddress>sysiphus.informatik.tu-muenchen.de </siteaddress> <sitedirectory>/www/arena</sitedirectory>

The ARENA Website (Generated by Maven)

Team Members and Roles in project.xml <developers> <developer> <name>allen Dutoit</name> <id>dutoit</id> <organization>technische Universität München </organization> <roles> <role>architect</role> <role>developer</role> </roles> </developer> <developer> <name>michael Nagel</name> <id>nagel</id> <organization>technische Universität München </organization> <roles> <role>developer</role> </roles> </developer> <developer> <name>timo Wolf</name> <id>wolft</id> <organization>technische Universität München </organization> <roles> <role>developer</role> </roles> </developer> </developers>

Generated Website contains a Description of the Team

Software Configuration Management Specification in project.xml The repository tag enables Maven to map the user ids used by the SCM tool to the developer names listed in the Maven team site identify developers activities identify source code changes made by the developers <repository> <connection> scm svn http //oose.globalse.org/svn/trunk/examples/arena </connection> <developerconnection> scm svn http //oose.globalse.org/svn </developerconnection> <url> http://oose.globalse.org/svn/trunk/examples/arena/ </url> </repository>

Generated Website: Developer Activities (last 30 days)

Generated Website: Change Log (last 30 days)

Build Management in the project.xml The Build tag specifies the programmer s directory containing the source code to be used for the build <build> <sourcedirectory>src</sourcedirectory> <resources> <resource> <directory>src</directory> <includes> <include>**/*.properties</include> <include>**/*.gif</include> </includes> </resource> </resources> </build>

Result: Website contains the current source code of ARENA

Outline of the Lecture Purpose of Software Configuration Management (SCM) Some Terminology Software Configuration Management Activities Outline of a Software Configuration Management Plan Build Management Continous Integration

Typical Problems and Risks in Software Projects Lack of project visibility Nobody knows what is going on Late discovery of faults The later a fault is found, the more expensive it is to fix it. Lack of deployable software It worked on my machine Also, horizontal integration testing strategies don t focus on an early running system. It is often created in the last moment Low quality software Managers and developers make last-minute decisions to deliver a system developed with the above problems.

Continuous Integration Motivation Risk #1: The later integration occurs in a project, the bigger is the risk that unexpected faults occur Risk #2: The higher the complexity of the software system, the more difficult it is to integrate its components Continous integration addresses these risks by building as early as possible and frequently Additional Advantages: There is always an executable version of the system Team members have a good overview of the project status

Definition Continuous Integration Continuous Integration: A software development method where members of a team integrate their work frequently, usually each person integrates at least daily, leading to multiple integrations per day. Each integration is verified by an automated build including the execution of tests to detect integration errors as quickly as possible.

Continuous Integration can regularly answers these Questions Do all the software components work together? How much code is covered by automated tests? Where all tests successful after the latest change? What is my code complexity? Is the team adhering to coding standards? Where there any problems with the last deployment?

Modeling a Continuous Integration System Functions: Set up scheduling strategy (poll, event-based) Detect change Execute build script when change has been detected Run unit test cases Generate project status metrics Visualize status of the projects Move successful builds into Software repository Components (Subsystems) Master Directory: Version control (IEEE: Controlled Library). Builder Subsystem: Execute build script when a change has been detected Continuous Integration (CI) Server Management Subsystem: Visualize project status via Webbrowser Notification Subsystem: Publishes results of the build via different channels (E-Mail Client, RSS Feed)

Analysis: Functional Model for Continuous Integration Simple Exercise: Develop the functional model!

Analysis: Functional Model for Continuous Integration

Design: Deployment Diagram of a Continuous Integration System

Design of a Continuous Integration System Development Node Manage Programmer s Directory (IEEE: Dynamic Library) Software Configuration Management client Integrated Development Environment Run build script locally using the Builder Subsystem

Design of a Continuous Integration System (Deployment Diagram) Software Configuration Management Node Contains the Master Directory (IEEE: Controlled Library) Runs the Software Configuration Management Server

Design of a Continuous Integration System (Deployment Diagram) Integration Build Node Creates & maintains the Software Repository (IEEE: static library) SCM Client interacts with SCM Node if (when) a change has occurred Runs build globally using Builder when a change has been detected Notification component publishes results of the build uses different channels such as E-Mail or RSS Feed

Design of a Continuous Integration System (Deployment Diagram) Management Node Visualize build results Visualize project metrics Receive notification about build status

Examples of Available Continous Integration Systems Cockpit CruiseControl and CruiseControl.NET Anthill Continuum Hudson List of continuous integration tools: http://confluence.public.thoughtworks.org/display/ CC/CI+Feature+Matrix

CruiseControl: Subsystem Overview (not in UML!) Source: http://cruisecontrol.sourceforge.net/overview.html

Cruise Control: The Build Loop The daemon process checks for source code changes in the projects If a change has occurred, the subsystem executes the following actions: Obtain all the build artifacts (described in config.xml ) Possibly via the project.xml file (if Maven is used) Execute the Build file Write the results into a log file ( xml logs ) Send notifications to subscribers.

Getting Started with CruiseControl Download CruiseControl binary distribution http://cruisecontrol.sourceforge.net/download.html Unzip downloaded archive Run cruisecontrol.sh (.bat) Watch the example project being built http://localhost:8080/cruisecontrol Modify config.xml to include your own project

Further Reading [Duvall 2007] Paul M. Duvall, Steve Matyas and Andrew Glover: Continuous Integration. Improving Software Quality and Reducing Risk, Addison Wesley, Upper Saddle River, NJ, 2007

Tomorrow s Exercise Goal: Being able to set up and manage continuous integration Team-based organization: The exercise is team-based We recommend a team size of 5 people (4-6) Choose a team leader Equipment: Bring at least 2 laptops per team to the class room Preparations (Mandatory, by midnight) E-Mail the team member names to naughton@in.tum.de Set up Eclipse on at least one of the team laptops Check out and study the Bumpers project using the information available on the exercise portal : https://wwwbruegge.informatik.tu-muenchen.de/twiki/bin/view/ Lehrstuhl/POMSS09Exercises Additional details Will be distributed at the beginning of the exercise session.

Deployment in tomorrows exercise