15
Continuous Integration The Architecture of Open Source Application

Continuous integration: the architecture of open source application

  • Upload
    -

  • View
    396

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Continuous integration: the architecture of open source application

Continuous Integration

The Architecture of Open Source

Application

Page 2: Continuous integration: the architecture of open source application

가장 인기 있는 CI 시스템

2

Page 3: Continuous integration: the architecture of open source application

CI는 다음과 같은 일을 합니다

• 우리 조직의 소스를 자동으로 빌드해줘요 : Build Software (1)

• 여러 테스트 도구를 엮어서 함께 자동 테스트 해줘요 : Run tests (2)

• 모든 팀원이 우리 개발 현황을 가시적으로 알 수 있어요 : Report the

results (3)

• (1), (2), (3) script 실행 / 예약되어 작동

• 결과가 파일에 저장(logging) email 전송

3

Page 4: Continuous integration: the architecture of open source application

CI는 다음과 같은 일을 합니다

• Check out & update

– 많은 양 소스 코드를 복사해오고,

– 업데이트합니다

• Abstract build recipes

– OS(Mac OS x, Windows, Unix)에 따라 Configuration/Build/Test 실행 명령어가 다르죠!

– 적절히 추상화(Abstraction)된 build recipe가 필요합니다

• Storing checkout/build/test status

– 업데이트된 파일, 버전, warning, error, code coverage 등 추후 분석을 위해저장합니다

• External resource coordination

– 통합테스트를 하려면 non-local 자원도 빌드를 해야하고 그거기 위해 여러 머신 간 빌드를 조정해야합니다

4

Page 5: Continuous integration: the architecture of open source application

CI는 외부 시스템과 이런 일을 합니다

• Build notification

– Pull (Web, RSS, RPC, etc), push notification(e-mail, Twitter, etc)

• Build information

– 빌드 상세 정보, 빌드 제품을 제공하여 심도있는 분석으로 활용(code

coverage 등)

• Build requests

– 외부에서 빌드 요청 처리

• Remote Control of the CI system

5

Page 6: Continuous integration: the architecture of open source application

CI 기본 기능을 다이어그램으로 표현하면..

6

Page 7: Continuous integration: the architecture of open source application

토론: CI 시스템의 아키텍처 고려사항은 무엇일

까요?

7

Page 8: Continuous integration: the architecture of open source application

Buildbot

8

Page 9: Continuous integration: the architecture of open source application

Buildbot - implemention architecture

9

Page 10: Continuous integration: the architecture of open source application

1. 관리, 제어 용이

2. 중앙 build master가 configuration 하기 때문에 build slave가 master에configuration 되어야만 사용가능.

3. Build slave에 대한 configuration 정보도 build master가 갖고 있기 때문에malicious/accidental misconfiguration에 취약

4. Buildbot의 경우 build product를 중앙 master에게 전달하기 쉽지 않다. 중앙master 서버가 slave에게 데이터를 전송할 수 있는 API를 제공하지 않기 때문.

5. Slave의 상태, system utilization 을 master가 알기 쉽지 않다

6. 4,5은 master/slave model의 문제가 아닌 buildbot의 문제.

10

Page 11: Continuous integration: the architecture of open source application

CDash

11

Page 12: Continuous integration: the architecture of open source application

12

Page 13: Continuous integration: the architecture of open source application

CDash - implemention architecture

13

Page 14: Continuous integration: the architecture of open source application

• CDash: reporting server model

• 중앙 서버가 빌드 정보(build, test failure, code coverage analysis,

memory usage)를 보관

• 모든 build는 remote client가 스스로 자신의 일정에 따라 진행. Build 결과

를 XML 형태로 server에 전달

• 여러 client와 integration이 용이: CMake(Build Configuration system),

CTest(test runner), CPack(packaging system)

• Client-driven process: build client가 빌드를 결정. 결과를 중앙 서버에 전

• 전체적인 리소스 조절이 불가능, 신뢰할 수 없는 client가 존재하는 분산

환경에서 실행되기 어렵다.

• Progress report 없음. 실현하려면 점진적으로 client가 서버에 빌드 상태

를 업데이트하도록 허용해야 함.

14

Page 15: Continuous integration: the architecture of open source application

Jenkins

• Execution on a local system & a coordinator of remote builds

• Hybrid mode: 기본(master-server build), 다양한 remote build 허용

• 전체골격은 central server control

• Robust plugin architecture

• 모든 job은 서버가 통제, “locks” plugin으로 다른 job을 정지

15