МИНИСТЕРСТВО ОБРАЗОВАНИЯ И НАУКИ РОССИЙСКОЙ ФЕДЕРАЦИИ
УНИВЕРСИТЕТ ИТМО
Кафедра информационных систем
КУРСОВАЯ РАБОТА
Тема: Анализ и моделирование программной архитектуры и архитектуры данных программного средства JenkinsCI
Работу выполнил студент: Байбус Михаил Михайлович__ группы М3408___
(фамилия, имя, отчество) (номер группы)
Руководитель Букчина Екатерина Александровна, тьютор кафедры ИС ___
(фамилия,
имя, отчество)
Работа защищена " " 201 г. с оценкой ___
Подписи членов комиссии: _
_
САНКТ-ПЕТЕРБУРГ
2016
Table of contents
The theoretical basis of the course work. 3
Introduction. 4
Analysis and modeling of processes. 6
Jenkins’s usecase overview. 6
Software architecture. 13
System modules. 13
Architecture-Functionality matching table. 16
List of used sources. 17
The theoretical basis of the course work
The concepts and terms, used in this work:
Information system (IS) – A combination of hardware, software, infrastructure and trained personnel organized to facilitate planning, control, coordination, and decision making in an organization.
Operating system (OS) – Master control program that automatically runs first when a computer is switched on, and remains in the background until the computer is turned off. It commonly comes preinstalled and is usually the most complex and largest program to be used by the computer. A computer user is typically more affected by the capabilities and whims of the OS than by those of the hardware. Main services provided by an OS include user-interface, carrying out commands of the user and the application programs, supervising installation and running of other programs and hardware, controlling the input-output functions, allocating system resources such as memory, processor time, disk space, and peripheral devices to regulate the flow of work within the computer, handling file and directory management, and providing file-sharing and networking functions.
Version control – Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. For the examples in this book you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
Continuous
integration (CI) – the
practice, in software engineering, of merging all developer working copies to a
shared mainline several times a day. It was first named and proposed by Grady
Booch in his 1991 method, although Booch did not advocate integrating several
times a day. It was adopted as part of extreme programming (XP), which did
advocate integrating more than once per day, perhaps as many as tens of times
per day.
Introduction
Continuous Integration, also known as CI, is a cornerstone of modern software development. In fact it is a real game changer—when Continuous Integration is introduced into an organization, it radically alters the way teams think about the whole development process. It has the potential to enable and trigger a series of incremental process improvements, going from a simple scheduled automated build right through to continuous delivery into production. A good CI infrastructure can streamline the development process right through to deployment, help detect and fix bugs faster, provide a useful project dashboard for both developers and non-developers, and ultimately, help teams deliver more real business value to the end user. Every professional development team, no matter how small, should be practicing CI.
Continuous Integration, in its simplest form, involves a tool that monitors your version control system for changes. Whenever a change is detected, this tool automatically compiles and tests your application. If something goes wrong, the tool immediately notifies the developers so that they can fix the issue immediately. But Continuous Integration can do much more than this. Continuous Integration can also help you keep tabs on the health of your code base, automatically monitoring code quality and code coverage metrics, and helping keep technical debt down and maintenance costs low. The publicly-visible code quality metrics can also encourage developers to take pride in the quality of their code and strive to improve it. Combined with automated end-to-end acceptance tests, CI can also act as a communication tool, publishing a clear picture of the current state of development efforts. And it can simplify and accelerate delivery by helping you automate the deployment process, letting you deploy the latest version of your application either automatically or as a one-click process.
In essence, Continuous Integration is about reducing risk by providing faster feedback.
Jenkins, originally called Hudson, is an open source Continuous Integration tool written in Java. Boasting a dominant market share, Jenkins is used by teams of all sizes, for projects in a wide variety 3 of languages and technologies, including .NET, Ruby, Groovy, Grails, PHP and more, as well as Java.
Analysis and modeling of processes
Jenkins’s usecase overview.
Information gathering
Information gathering is processed by Jenkins’s subversion plugin. In constant time interval Jenkins triggers a new job, executes subversion plugin. Subversion plugin downloads the latest code from repository to Jenkins’s workspace.
Processing and transmission of information
When information is gathered and latest code is downloaded from repository Jenkins triggers next job, executes Ant plugin. Ant builds an artifact and if build was successful, saves the artifact to Jenkins’s workspace.
After that, test plugin is executed. When all tests were passed, plugin also saves tests reports to Jenkins’s workspace.
If
build is stable (build was successful and all tests were passed), Jenkins
triggers Ant again, this time to deploy the artifact to production or test
environment.
Storage and provision of information
All gathered and processed data is stored in Jenkins’s workspace in file system by default. If any artifact and tests repository is set artifacts and reports are saved there. Provision of any information is executed by Jenkins’s UI.
The View Actionable objects adds UI and information via Actions to Model Object. Describable objects adds configuration UI via Descriptor to Model Object. Jelly is the tag library used to define the UI. Ex: ... Jenkins model objects have multiple "views" that are used to render HTML pages about each object. Hudson uses Jelly as the view technology The UI name space corresponds to the package name of Object
Functional requirements:
· The software must be able to automatically work with the version control system SVN to gain access to the current version of the source code
· The software must be able to run scheduled jobs automatically
· The software must be able to build project and deploy it to remote stand
· The software must give ability to manually run tasks
· The software must be able to generate reports and store them to the workspace
·
The
software must be able to generate error reports and email them to dev. Team
Software architecture
System modules
Jenkins is an extendable Web Application. The basic platform is extended via plugins. Plugins are responsible for most of the functionalities in Jenkins. Basic distribution has only 4 plugins installed by default. So we can represent Jenkins architecture this way.
- Jenkins main module
- CVS
- SVN
- Ant
- SSH
Diagram here
Model objects are building blocks of Hudson Platform. They hold the data and state of a Job/Run. Each Model object is associated with an URL. The root object is called Jenkins and it is associated with the URL /
Model Objects are bound to URLs by using Stapler. The singleton Jenkins instance is bound to the "/" URL, and the rest of the objects are bound according to their reachability from this root object.
svn ->
5. Результаты выполнения второго этапа — «Анализ средств автоматизации
ИТ-процессов».
6. Результаты выполнения третьего этапа — «Синтез определенных уровней
архитектуры ИС».
Таблица соответствия функциональных требований и функциональных возможностей:
Architecture-Functionality matching table
Functionality |
Component |
Working with the version control system |
Subversion plugin |
Running scheduled jobs automatically |
Jenkins sheduler |
Building project and deploying it to remote stand |
Ant plugin |
Ability to manually run tasks |
Jenkins UI component |
Generating reports and storing them to the workspace |
Report manager |
Generating error reports and emailing them to development team |
Mailer plugin |
List of used sources
1. https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins
2. John Ferguson Smart – Jenkins. The Definitive Guide
3. Hudson Architecture Documents
a. Hudson Web/REST Architecture
b. Hudson View Architecture
c. Hudson Execution Architecture
d. Hudson Remote Execution Architecture
e. Hudson Security Architecture
f. Hudson Plugin Architecture
4. http://opensource-uml.org/models/jenkins/jenkins-uml-documentation.html
5. https://www.wikipedia.org/
6. The Hudson Book