Software systems in a scientific context:
Researchers develop software in many different ways:
lock-in | repro | multi | 3rd party | UX | knowledge | |
---|---|---|---|---|---|---|
TFS | ? | - | ? | ? | + | server(?) |
Azure DevOPS | ? | - | ? | -(?) | + | repository |
GitHub + Travis | - | - | - | - | ~ | repository |
Jenkins | ~ | + | ~ | + | ~ | server or project repo |
ROS ecosystem | - | - | + | + | ~ | ? |
YCM | - | ? | ? | ? | ~ | project repo |
Bringing together multiple usually disparate aspects:
to facilitate
of large, heterogeneous, complex research software system
Core domain concepts:
Other important (domain) concepts:
Recipe syntax is based on YAML
1: # Comments! Take that JSON! 2: scalar: | 3: Long text with "" and '' and even \ 4: list: 5: - first 6: - second 7: mapping: 8: key: value
Each recipe kind has a schema which, among other things, organizes the recipe into sections:
catalog: … variables: … include: … versions: …
${NAME|DEFAULT}
@{NAME|DEFAULT}
${next-value|DEFAULT}
Project Recipe rsb-cpp.project
1: templates: # Generalization 2: - github 3: - cmake-cpp 4: 5: variables: 6: recipe.maintainer: # People 7: - Jan Moringen <jmoringe@techfak.uni-bielefeld.de> 8: access: public # Metadata 9: 10: github.user: open-rsx # Repository 11: github.project: rsb-cpp 12: 13: branches: [ master ] # Minimal specification of versions
Distribution Recipe my-distribution.distribution
1: include: 2: - other-distribution # Composition 3: 4: versions: 5: - name: rsb-cpp 6: versions: 7: - version: master 8: - parameters: # Variability 9: cmake.options: 10: - '@{next-value|[]}' 11: - CMAKE_BUILD_TYPE=Debug 12: - rsb-python@master
One aspect of the Cognitive Interaction Toolkit is a shared repository of recipes describing software projects and software systems:
Recipes | 1580 |
├─Project Recipes | 1380 |
└─Distribution Recipes | 200 |
Commits | 9000 |
Contributors | 100 |
Concise recipes are enabled by automatic analysis.
By inspecting a particular revision in the repository associated to a project version, automatically determine the following information (so recipe authors do not have to explicitly declare it):
CMake
1: project(myproject VERSION 1.2 # provides cmake:myproject:1.2 2: LANGUAGES C C++) # metadata 3: 4: find_package(alibrary 1.0 REQUIRED) # requires cmake:alibrary:1.0 5: 6: pkg_search_modules(another_library) # requires pkg-config:another_library
Maven
1: <project> 2: … 3: <licenses>…</licenses> <!-- metadata --> 4: <organization>…</organization> 5: … 6: <groupId>open-rsx</groupId> <!-- provides maven:open-rsx/rsb:0.18 --> 7: <artifactId>rsb</artifactId> 8: <version>0.18</version> 9: … 10: <dependencies> 11: <dependency> <!-- requires maven:junit/junit:1.0 --> 12: <groupId>junit</groupId> 13: <artifactId>junit</artifactId> 14: <version>1.0</version> 15: </dependency> 16: </dependencies> 17: … 18: </project>
Python Setuptools
1: setup(name = 'rsb', # provides setuptools:rsb:0.18 2: version = '0.18', 3: 4: description = "Event-driven …", # metadata 5: author = 'Johannes Wienke', 6: license = 'LGPLv3+', 7: 8: install_requires = [ # requires setuptools:protobuf:2.8 9: 'protobuf>=2.8' 10: ] 11: … 12: )
ROS Package
1: <package> 2: <name>robo_nav</name> <!-- provides ros-package:robo_nav:0.1 --> 3: <version>0.1</version> 4: 5: <description>…</description> <!-- metadata --> 6: <maintainer email="…">…</maintainer> 7: <author email="…">…</author> 8: <license>BSD</license> 9: 10: <build_depend> <!-- requires ros-package:path_planner --> 11: path_planner 12: </build_depend> 13: </package>
Thus: recipe authors can help out:
1: extra-requires: 2: - '@{next-value|[]}' 3: - nature: 4: target: 5: version:
extra-requires
, extra-provides
take part in delegation and
are merged with results of automatic analysis
Declaration
1: variables: 2: platform-requires: 3: ubuntu: 4: packages: 5: - '@{next-value}' 6: - gcc 7: bionic: 8: packages: 9: - '@{next-value}' 10: - clang
Automatic analysis and metadata is also useful for humans:
Analyzing a repository
./build-generator analyze https://github.com/open-rsx/rsb-cpp > results.json xdg-open results.json
Computing platform requirements for a distribution
./build-generator platform-requirements \ -p 'ubuntu xenial' \ PATH-TO-CITK/recipes/distributions/rsb-nightly.distribution
Makefile
, DockerFile
)libssl
being the annoying one)
Now we address and discuss the following more specific aspects:
Scenario:
The requirements are thus:
Install Jenkins
./build-generator install-jenkins \ --profile local-docker \ -u jan -p test -e a@b.c \ install-test # Takes between 60 and 300 seconds cd install-test ./start_jenkins
Clone recipe repository
git clone -b wip-docker https://opensource.cit-ec.de/git/citk
Generate Distribution Jobs
./build-generator generate \ -u jan -p test \ -D 'view.create?=true' -D view.name='Demo 1' \ citk/distributions/build-generator-nightly.distribution
Build generator supports different targets/modes:
Advantages of Docker slaves:
Generate Distribution Jobs
./build-generator generate \ -u jan -p test \ -D 'view.create?=true' -D view.name='Demo 2' \ -m ci-docker \ citk/distributions/cogimon-core-nightly.distribution
Summary
Questions?