SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
A Reference Architecture for Distributed Software
Deployment
Sander van der Burg
Delft University of Technology, EEMCS,
Department of Software Technology
August 2, 2013
Sander van der Burg A Reference Architecture for Distributed Software Deployment
A Reference Architecture for Distributed Software
Deployment
Sander van der Burg A Reference Architecture for Distributed Software Deployment
A Reference Architecture for Distributed Software
Deployment
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Software deployment
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Software deployment
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Software deployment
All of the activities that make a software system available
for use.
Challenges
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Challenges
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Software deployment
Time consuming
Error prone
Destructive upgrades
Downtimes
Some history: Early history
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Some history: High-level languages and operating systems
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Some history: High-level languages and operating systems
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Software components
Requires compiler or interpreter and a compatible operating
system
Some history: Component-based software engineering
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Some history: Component-based software engineering
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Software components
Components increase programmer productivity
Components increase quality of software
Some history: Component-based software engineering
Disadvantages:
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Nowadays: Services on the Internet
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Nowadays: Services on the internet
Challenges:
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Nowadays: Services on the Internet
Challenges:
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Software components
Software deployment has become increasingly more compli-
cated
Earlier research: Nix and NixOS
A GNU/Linux distribution using the Nix package manager
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Nix store
Main idea: store all packages
in isolation from each other:
/nix/store/rpdqxnilb0cg...
-firefox-3.5.4
Paths contain a 160-bit
cryptographic hash of all
inputs used to build the
package:
Sources
Libraries
Compilers
Build scripts
. . .
/nix/store
l9w6773m1msy...-openssh-4.6p1
bin
ssh
sbin
sshd
smkabrbibqv7...-openssl-0.9.8e
lib
libssl.so.0.9.8
c6jbqm2mc0a7...-zlib-1.2.3
lib
libz.so.1.2.3
im276akmsrhv...-glibc-2.5
lib
libc.so.6
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Nix expressions
openssh.nix
{ stdenv, fetchurl, openssl, zlib }:
stdenv.mkDerivation {
name = "openssh-4.6p1";
src = fetchurl {
url = http://.../openssh-4.6p1.tar.gz;
sha256 = "0fpjlr3bfind0y94bk442x2p...";
};
buildCommand = ’’
tar xjf $src
./configure --prefix=$out --with-openssl=${openssl}
make; make install
’’;
}
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Nix expressions
all-packages.nix
openssh = import ../tools/networking/openssh {
inherit fetchurl stdenv openssl zlib;
};
openssl = import ../development/libraries/openssl {
inherit fetchurl stdenv perl;
};
stdenv = ...;
openssl = ...;
zlib = ...;
perl = ...;
nix-env -f all-packages.nix -iA openssh
Produces a /nix/store/l9w6773m1msy...-openssh-4.6p1
package in the Nix store.
Sander van der Burg A Reference Architecture for Distributed Software Deployment
User environments
◮ Users can have
different sets of
installed applications.
PATH
/nix/.../profiles
current
42
/nix/store
pp56i0a01si5...-user-env
bin
firefox
ssh
l9w6773m1msy...-openssh-4.6p1
bin
ssh
rpdqxnilb0cg...-firefox-3.5.4
bin
firefox
Sander van der Burg A Reference Architecture for Distributed Software Deployment
User environments
◮ Users can have
different sets of
installed applications.
◮ nix-env operations
create new user
environments in the
store.
PATH
/nix/.../profiles
current
42
/nix/store
pp56i0a01si5...-user-env
bin
firefox
ssh
l9w6773m1msy...-openssh-4.6p1
bin
ssh
rpdqxnilb0cg...-firefox-3.5.4
bin
firefox
aqn3wygq9jzk...-openssh-5.2p1
bin
ssh
(nix-env -u openssh)
Sander van der Burg A Reference Architecture for Distributed Software Deployment
User environments
◮ Users can have
different sets of
installed applications.
◮ nix-env operations
create new user
environments in the
store.
PATH
/nix/.../profiles
current
42
/nix/store
pp56i0a01si5...-user-env
bin
firefox
ssh
l9w6773m1msy...-openssh-4.6p1
bin
ssh
rpdqxnilb0cg...-firefox-3.5.4
bin
firefox
aqn3wygq9jzk...-openssh-5.2p1
bin
ssh
i3d9vh6d8ip1...-user-env
bin
ssh
firefox
(nix-env -u openssh)
Sander van der Burg A Reference Architecture for Distributed Software Deployment
User environments
◮ Users can have
different sets of
installed applications.
◮ nix-env operations
create new user
environments in the
store.
PATH
/nix/.../profiles
current
42
43
/nix/store
pp56i0a01si5...-user-env
bin
firefox
ssh
l9w6773m1msy...-openssh-4.6p1
bin
ssh
rpdqxnilb0cg...-firefox-3.5.4
bin
firefox
aqn3wygq9jzk...-openssh-5.2p1
bin
ssh
i3d9vh6d8ip1...-user-env
bin
ssh
firefox
(nix-env -u openssh)
Sander van der Burg A Reference Architecture for Distributed Software Deployment
User environments
◮ Users can have
different sets of
installed applications.
◮ nix-env operations
create new user
environments in the
store.
◮ We can atomically
switch between them.
PATH
/nix/.../profiles
current
42
43
/nix/store
pp56i0a01si5...-user-env
bin
firefox
ssh
l9w6773m1msy...-openssh-4.6p1
bin
ssh
rpdqxnilb0cg...-firefox-3.5.4
bin
firefox
aqn3wygq9jzk...-openssh-5.2p1
bin
ssh
i3d9vh6d8ip1...-user-env
bin
ssh
firefox
(nix-env -u openssh)
Sander van der Burg A Reference Architecture for Distributed Software Deployment
User environments
◮ Users can have
different sets of
installed applications.
◮ nix-env operations
create new user
environments in the
store.
◮ We can atomically
switch between them.
◮ These are roots of the
garbage collector.
PATH
/nix/.../profiles
current
43
/nix/store
pp56i0a01si5...-user-env
bin
firefox
ssh
l9w6773m1msy...-openssh-4.6p1
bin
ssh
rpdqxnilb0cg...-firefox-3.5.4
bin
firefox
aqn3wygq9jzk...-openssh-5.2p1
bin
ssh
i3d9vh6d8ip1...-user-env
bin
ssh
firefox
(nix-env --remove-generations old)
Sander van der Burg A Reference Architecture for Distributed Software Deployment
User environments
◮ Users can have
different sets of
installed applications.
◮ nix-env operations
create new user
environments in the
store.
◮ We can atomically
switch between them.
◮ These are roots of the
garbage collector.
PATH
/nix/.../profiles
current
43
/nix/store
rpdqxnilb0cg...-firefox-3.5.4
bin
firefox
aqn3wygq9jzk...-openssh-5.2p1
bin
ssh
i3d9vh6d8ip1...-user-env
bin
ssh
firefox
(nix-collect-garbage)
Sander van der Burg A Reference Architecture for Distributed Software Deployment
NixOS
In NixOS, all packages including the Linux kernel and
configuration files are managed by Nix.
NixOS does not have directories such as: /lib and /usr
NixOS has a minimal /bin and /etc
But NixOS is more then just a distribution managed by Nix
Sander van der Burg A Reference Architecture for Distributed Software Deployment
NixOS configuration
/etc/nixos/configuration.nix
{pkgs, ...}:
{
boot.loader.grub.device = "/dev/sda";
fileSystems = [ { mountPoint = "/"; device = "/dev/sda2"; } ];
swapDevices = [ { device = "/dev/sda1"; } ];
services = {
openssh.enable = true;
xserver = {
enable = true;
desktopManager.kde4.enable = true;
};
};
environment.systemPackages = [ pkgs.mc pkgs.firefox ];
}
Sander van der Burg A Reference Architecture for Distributed Software Deployment
NixOS configuration
nixos-rebuild switch
Nix package manager builds a complete system configuration
Includes all packages and generates all configuration files, e.g.
OpenSSH configuration
Upgrades are (almost) atomic
Components are stored safely next to each other, due to hashes
No files are automatically removed or overwritten
Users can switch to older generations of system configurations
not garbage collected yet
Sander van der Burg A Reference Architecture for Distributed Software Deployment
NixOS bootloader
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Deploying service-oriented systems
Nix and NixOS are not sufficient for deploying service-oriented
systems:
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Deploying service-oriented systems
Nix and NixOS are not sufficient for deploying service-oriented
systems:
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Deploying service-oriented systems
Nix and NixOS are not sufficient for deploying service-oriented
systems:
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Non-functional requirements
Is privacy-sensitive data secured?
Do the analysis components perform well?
Is the system resilient to machine crashes?
Are the software licenses governing the off-the-shelf
components properly obeyed?
A Reference Architecture for Distributed Software
Deployment
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Service deployment
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Disnix
Distributed deployment extension for the Nix package
manager
Captures deployment specification in models
Performs complete deployment process from models
Guarantees complete dependencies
Component agnostic
Supports atomic upgrades and rollbacks
Sander van der Burg A Reference Architecture for Distributed Software Deployment
SDS2: Distribution
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Disnix
$ disnix-env -s services.nix -i infrastructure.nix -d distribution.nix
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Disnix expressions
MELogService.nix
{javaenv, config, SDS2Util}:
{mobileeventlogs}:
javaenv.createTomcatWebApplication rec {
name = "MELogService";
contextXML = ’’
<Context>
<Resource auth="Container" type="javax.sql.DataSource"
url="jdbc:mysql://${mobileeventlogs.target.hostname}..." />
</Context>
’’;
webapp = javaenv.buildWebService {
inherit name;
src = ../../../WebServices/MELogService;
wsdlFile = "MELogService.wsdl";
libs = [ config SDS2Util ];
};
}
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Service model
{distribution, system}:
let pkgs = import ../top-level/all-packages.nix {
inherit distribution system;
}; in
{ mobileeventlogs = {
name = "mobileeventlogs";
pkg = pkgs.mobileeventlogs;
type = "mysql-database";
};
MELogService = {
name = "MELogService";
pkg = pkgs.MELogService;
dependsOn = { inherit mobileeventlogs; };
type = "tomcat-webapplication";
};
SDS2AssetTracker = {
name = "SDS2AssetTracker";
pkg = pkgs.SDS2AssetTracker;
dependsOn = { inherit MELogService ...; };
type = "tomcat-webapplication";
};
...
}
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Infrastructure model
{
test1 = {
hostname = "test1.net";
tomcatPort = 8080;
mysqlUser = "user";
mysqlPassword = "secret";
mysqlPort = 3306;
targetEPR = http://test1.net/.../DisnixService;
system = "i686-linux";
};
test2 = {
hostname = "test2.net";
tomcatPort = 8080;
...
targetEPR = http://test2.net/.../DisnixService;
system = "x86_64-linux";
};
}
Captures machines in the network and their relevant properties and
capabilities.
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Distribution model
{infrastructure}:
{
mobileeventlogs = [ infrastructure.test1 ];
MELogService = [ infrastructure.test2 ];
SDS2AssetTracker = [ infrastructure.test1 infrastructure.test2 ];
...
}
Maps services to machines
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Deployment process
Specifications are used to derive deployment process:
Building services from source code
Transferring services to target machines
Deactivating obsolete services and activating new services
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Dynamic Disnix
Various events may occur in a network of machines:
Crashing machines
Adding a new machine
Change of a capability (e.g. increase of RAM)
Dynamic Disnix generates infrastructure and distribution
models and redeploys a system
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Other deployment aspects
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Distributed NixOS configuration
network.nix
{ storage = {pkgs, ...}:
{
services.nfsKernel.server.enable = true; ...
};
postgresql = {pkgs, ...}:
{
services.postgresql.enable = true; ...
};
webserver = {pkgs, ...}:
{
fileSystems = [
{ mountPoint = "/repos"; device = "storage:/repos"; } ];
services.httpd.enable = true;
services.httpd.extraSubservices = [ { serviceType = "trac"; } ]; ...
};
...
}
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Virtualization
nixos-build-vms network.nix; ./result/bin/nixos-run-vms
Builds a network of QEMU-KVM virtual machines closely
resembling the network of NixOS configurations
We don’t create disk images
The VM mounts the Nix store of the host system using
SMB/CIFS
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Virtualization
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Testing
trac.nix
testScript = ’’
$postgresql→waitForJob("postgresql");
$postgresql→mustSucceed("createdb trac");
$webserver→mustSucceed("mkdir -p /repos/trac");
$webserver→mustSucceed("svnadmin create /repos/trac");
$webserver→waitForFile("/var/trac");
$webserver→mustSucceed("mkdir -p /var/trac/projects/test");
$webserver→mustSucceed("trac-admin /var/trac/projects/test initenv ".
"Test postgres://root@postgresql/trac svn /repos/trac");
$client→waitForX;
$client→execute("konqueror http://webserver/projects/test &");
$client→waitForWindow(qr/Test.*Konqueror/);
$client→screenshot("screen");
’’;
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Testing
nix-build tests.nix -A trac
Sander van der Burg A Reference Architecture for Distributed Software Deployment
License analysis
We can also trace all files and processes involved in a build
process
And we can determine the licenses of the original source files
to say something about the result
/usr/bin/patchelfpatchelf.cc g++ patchelf.o g++ patchelf install
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Conclusion
We have shown a reference architecture for distributed
software deployment
Reference architecture is based on Nix, a purely functional
package manager, and NixOS a Linux distribution built
around Nix
We have shown tools to automate the deployment of
distributed systems
They provide fully automatic, reliable, reproducible, and
efficient deployment for the latest generation of systems
Components of the reference architecture can be used to
construct a domain-specific deployment tool
Sander van der Burg A Reference Architecture for Distributed Software Deployment
A Reference Architecture for Distributed Software
Deployment
More information:
Sander van der Burg A Reference Architecture for Distributed Software Deployment
References
NixOS website: http://nixos.org
Nix. A purely functional package manager
Nixpkgs. Nix packages collection
NixOS. Nix based GNU/Linux distribution
Hydra. Nix based continuous build and integration server
Disnix. Nix based distributed service deployment
NixOps. NixOS-based multi-cloud deployment tool
Software available under free and open-source licenses
(LGPL/X11)
Sander van der Burg A Reference Architecture for Distributed Software Deployment
Questions
Sander van der Burg A Reference Architecture for Distributed Software Deployment

Weitere ähnliche Inhalte

Was ist angesagt?

IBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/SimulinkIBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/Simulink
gjuljo
 
Rhapsody Systems Software
Rhapsody Systems SoftwareRhapsody Systems Software
Rhapsody Systems Software
Bill Duncan
 
DoD Architecture Framework Overview
DoD Architecture Framework OverviewDoD Architecture Framework Overview
DoD Architecture Framework Overview
Alessio Mosto
 
Enterprise Architecture supporting the change by Vladimir Calmic Endava
Enterprise Architecture supporting the change by Vladimir Calmic EndavaEnterprise Architecture supporting the change by Vladimir Calmic Endava
Enterprise Architecture supporting the change by Vladimir Calmic Endava
Moldova ICT Summit
 
MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...
MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...
MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...
Alessandra Bagnato
 
Define and Manage Requirements with IBM Rational Requirements Composer
Define and Manage Requirements with IBM Rational Requirements ComposerDefine and Manage Requirements with IBM Rational Requirements Composer
Define and Manage Requirements with IBM Rational Requirements Composer
Alan Kan
 

Was ist angesagt? (20)

Platform - Technical architecture
Platform - Technical architecturePlatform - Technical architecture
Platform - Technical architecture
 
Architecture solution architecture method
Architecture solution architecture methodArchitecture solution architecture method
Architecture solution architecture method
 
A pattern based approach to the development of updm architectures
A pattern based approach to the development of updm architecturesA pattern based approach to the development of updm architectures
A pattern based approach to the development of updm architectures
 
Oracle OpenWorld 2009 AIA Best Practices
Oracle OpenWorld 2009 AIA Best PracticesOracle OpenWorld 2009 AIA Best Practices
Oracle OpenWorld 2009 AIA Best Practices
 
Solution Architecture Framework
Solution Architecture FrameworkSolution Architecture Framework
Solution Architecture Framework
 
Factors to consider when starting a brand-new requirements management project...
Factors to consider when starting a brand-new requirements management project...Factors to consider when starting a brand-new requirements management project...
Factors to consider when starting a brand-new requirements management project...
 
Architecting and Designing Enterprise Applications
Architecting and Designing Enterprise ApplicationsArchitecting and Designing Enterprise Applications
Architecting and Designing Enterprise Applications
 
IBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/SimulinkIBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/Simulink
 
Rhapsody and mechatronics, multi-domain simulation
Rhapsody and mechatronics, multi-domain simulationRhapsody and mechatronics, multi-domain simulation
Rhapsody and mechatronics, multi-domain simulation
 
Rhapsody Systems Software
Rhapsody Systems SoftwareRhapsody Systems Software
Rhapsody Systems Software
 
DoD Architecture Framework Overview
DoD Architecture Framework OverviewDoD Architecture Framework Overview
DoD Architecture Framework Overview
 
Software architecture also needs agile
Software architecture also needs agileSoftware architecture also needs agile
Software architecture also needs agile
 
EA foundations (views + repository)
EA foundations (views + repository)EA foundations (views + repository)
EA foundations (views + repository)
 
Documenting Software Architectures
Documenting Software ArchitecturesDocumenting Software Architectures
Documenting Software Architectures
 
Enterprise Architecture supporting the change by Vladimir Calmic Endava
Enterprise Architecture supporting the change by Vladimir Calmic EndavaEnterprise Architecture supporting the change by Vladimir Calmic Endava
Enterprise Architecture supporting the change by Vladimir Calmic Endava
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git
 
IBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt IntegrationIBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt Integration
 
MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...
MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...
MADES Seminar @ Laboratory of Model-Driven Engineering Applied to Embedded Sy...
 
Requirements management and IBM Rational Jazz solutions
Requirements management and IBM Rational Jazz solutionsRequirements management and IBM Rational Jazz solutions
Requirements management and IBM Rational Jazz solutions
 
Define and Manage Requirements with IBM Rational Requirements Composer
Define and Manage Requirements with IBM Rational Requirements ComposerDefine and Manage Requirements with IBM Rational Requirements Composer
Define and Manage Requirements with IBM Rational Requirements Composer
 

Ähnlich wie A Reference Architecture for Distributed Software Deployment

Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...
Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...
Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...
PranavPatil822557
 

Ähnlich wie A Reference Architecture for Distributed Software Deployment (20)

The NixOS project and deploying systems declaratively
The NixOS project and deploying systems declarativelyThe NixOS project and deploying systems declaratively
The NixOS project and deploying systems declaratively
 
Techniques and lessons for improvement of deployment processes
Techniques and lessons for improvement of deployment processesTechniques and lessons for improvement of deployment processes
Techniques and lessons for improvement of deployment processes
 
Deploying .NET applications with the Nix package manager
Deploying .NET applications with the Nix package managerDeploying .NET applications with the Nix package manager
Deploying .NET applications with the Nix package manager
 
Model-driven Distributed Software Deployment
Model-driven Distributed Software DeploymentModel-driven Distributed Software Deployment
Model-driven Distributed Software Deployment
 
The Nix project
The Nix projectThe Nix project
The Nix project
 
Using NixOS for declarative deployment and testing
Using NixOS for declarative deployment and testingUsing NixOS for declarative deployment and testing
Using NixOS for declarative deployment and testing
 
A Generic Approach for Deploying and Upgrading Mutable Software Components
A Generic Approach for Deploying and Upgrading Mutable Software ComponentsA Generic Approach for Deploying and Upgrading Mutable Software Components
A Generic Approach for Deploying and Upgrading Mutable Software Components
 
Deploying NPM packages with the Nix package manager
Deploying NPM packages with the Nix package managerDeploying NPM packages with the Nix package manager
Deploying NPM packages with the Nix package manager
 
The Nix project
The Nix projectThe Nix project
The Nix project
 
Deploying (micro)services with Disnix
Deploying (micro)services with DisnixDeploying (micro)services with Disnix
Deploying (micro)services with Disnix
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
All in one
All in oneAll in one
All in one
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
Automating Mendix application deployments with Nix
Automating Mendix application deployments with NixAutomating Mendix application deployments with Nix
Automating Mendix application deployments with Nix
 
The world of Docker and Kubernetes
The world of Docker and Kubernetes The world of Docker and Kubernetes
The world of Docker and Kubernetes
 
A Reference Architecture for Distributed Software Deployment
A Reference Architecture for Distributed Software DeploymentA Reference Architecture for Distributed Software Deployment
A Reference Architecture for Distributed Software Deployment
 
Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...
Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...
Machine Learning , Analytics & Cyber Security the Next Level Threat Analytics...
 
nix-processmgmt: An experimental Nix-based process manager-agnostic framework
nix-processmgmt: An experimental Nix-based process manager-agnostic frameworknix-processmgmt: An experimental Nix-based process manager-agnostic framework
nix-processmgmt: An experimental Nix-based process manager-agnostic framework
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
 

Mehr von Sander van der Burg

Mehr von Sander van der Burg (15)

The Monitoring Playground
The Monitoring PlaygroundThe Monitoring Playground
The Monitoring Playground
 
Using Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutionsUsing Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutions
 
Dysnomia: complementing Nix deployments with state deployment
Dysnomia: complementing Nix deployments with state deploymentDysnomia: complementing Nix deployments with state deployment
Dysnomia: complementing Nix deployments with state deployment
 
Hydra: Continuous Integration and Testing for Demanding People: The Details
Hydra: Continuous Integration and Testing for Demanding People: The DetailsHydra: Continuous Integration and Testing for Demanding People: The Details
Hydra: Continuous Integration and Testing for Demanding People: The Details
 
Hydra: Continuous Integration and Testing for Demanding People: The Basics
Hydra: Continuous Integration and Testing for Demanding People: The BasicsHydra: Continuous Integration and Testing for Demanding People: The Basics
Hydra: Continuous Integration and Testing for Demanding People: The Basics
 
Deploying .NET services with Disnix
Deploying .NET services with DisnixDeploying .NET services with Disnix
Deploying .NET services with Disnix
 
A Self-Adaptive Deployment Framework for Service-Oriented Systems
A Self-Adaptive Deployment Framework for Service-Oriented SystemsA Self-Adaptive Deployment Framework for Service-Oriented Systems
A Self-Adaptive Deployment Framework for Service-Oriented Systems
 
Pull Deployment of Services
Pull Deployment of ServicesPull Deployment of Services
Pull Deployment of Services
 
Disnix: A toolset for distributed deployment
Disnix: A toolset for distributed deploymentDisnix: A toolset for distributed deployment
Disnix: A toolset for distributed deployment
 
Automated Deployment of Hetergeneous Service-Oriented System
Automated Deployment of Hetergeneous Service-Oriented SystemAutomated Deployment of Hetergeneous Service-Oriented System
Automated Deployment of Hetergeneous Service-Oriented System
 
Pull Deployment of Services: Introduction, Progress and Challenges
Pull Deployment of Services: Introduction, Progress and ChallengesPull Deployment of Services: Introduction, Progress and Challenges
Pull Deployment of Services: Introduction, Progress and Challenges
 
Software Deployment in a Dynamic Cloud
Software Deployment in a Dynamic CloudSoftware Deployment in a Dynamic Cloud
Software Deployment in a Dynamic Cloud
 
Atomic Upgrading of Distributed Systems
Atomic Upgrading of Distributed SystemsAtomic Upgrading of Distributed Systems
Atomic Upgrading of Distributed Systems
 
Model-driven Distributed Software Deployment
Model-driven Distributed Software DeploymentModel-driven Distributed Software Deployment
Model-driven Distributed Software Deployment
 
Model-driven Distributed Software Deployment laymen's talk
Model-driven Distributed Software Deployment laymen's talkModel-driven Distributed Software Deployment laymen's talk
Model-driven Distributed Software Deployment laymen's talk
 

Kürzlich hochgeladen

Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
PirithiRaju
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
Areesha Ahmad
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
RizalinePalanog2
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
Sérgio Sacani
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
1301aanya
 

Kürzlich hochgeladen (20)

SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit flypumpkin fruit fly, water melon fruit fly, cucumber fruit fly
pumpkin fruit fly, water melon fruit fly, cucumber fruit fly
 
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts ServiceJustdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
Justdial Call Girls In Indirapuram, Ghaziabad, 8800357707 Escorts Service
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptxSCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
SCIENCE-4-QUARTER4-WEEK-4-PPT-1 (1).pptx
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
dkNET Webinar "Texera: A Scalable Cloud Computing Platform for Sharing Data a...
 
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
Dopamine neurotransmitter determination using graphite sheet- graphene nano-s...
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 

A Reference Architecture for Distributed Software Deployment

  • 1. A Reference Architecture for Distributed Software Deployment Sander van der Burg Delft University of Technology, EEMCS, Department of Software Technology August 2, 2013 Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 2. A Reference Architecture for Distributed Software Deployment Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 3. A Reference Architecture for Distributed Software Deployment Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 4. Software deployment Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 5. Software deployment Sander van der Burg A Reference Architecture for Distributed Software Deployment Software deployment All of the activities that make a software system available for use.
  • 6. Challenges Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 7. Challenges Sander van der Burg A Reference Architecture for Distributed Software Deployment Software deployment Time consuming Error prone Destructive upgrades Downtimes
  • 8. Some history: Early history Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 9. Some history: High-level languages and operating systems Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 10. Some history: High-level languages and operating systems Sander van der Burg A Reference Architecture for Distributed Software Deployment Software components Requires compiler or interpreter and a compatible operating system
  • 11. Some history: Component-based software engineering Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 12. Some history: Component-based software engineering Sander van der Burg A Reference Architecture for Distributed Software Deployment Software components Components increase programmer productivity Components increase quality of software
  • 13. Some history: Component-based software engineering Disadvantages: Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 14. Nowadays: Services on the Internet Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 15. Nowadays: Services on the internet Challenges: Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 16. Nowadays: Services on the Internet Challenges: Sander van der Burg A Reference Architecture for Distributed Software Deployment Software components Software deployment has become increasingly more compli- cated
  • 17. Earlier research: Nix and NixOS A GNU/Linux distribution using the Nix package manager Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 18. Nix store Main idea: store all packages in isolation from each other: /nix/store/rpdqxnilb0cg... -firefox-3.5.4 Paths contain a 160-bit cryptographic hash of all inputs used to build the package: Sources Libraries Compilers Build scripts . . . /nix/store l9w6773m1msy...-openssh-4.6p1 bin ssh sbin sshd smkabrbibqv7...-openssl-0.9.8e lib libssl.so.0.9.8 c6jbqm2mc0a7...-zlib-1.2.3 lib libz.so.1.2.3 im276akmsrhv...-glibc-2.5 lib libc.so.6 Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 19. Nix expressions openssh.nix { stdenv, fetchurl, openssl, zlib }: stdenv.mkDerivation { name = "openssh-4.6p1"; src = fetchurl { url = http://.../openssh-4.6p1.tar.gz; sha256 = "0fpjlr3bfind0y94bk442x2p..."; }; buildCommand = ’’ tar xjf $src ./configure --prefix=$out --with-openssl=${openssl} make; make install ’’; } Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 20. Nix expressions all-packages.nix openssh = import ../tools/networking/openssh { inherit fetchurl stdenv openssl zlib; }; openssl = import ../development/libraries/openssl { inherit fetchurl stdenv perl; }; stdenv = ...; openssl = ...; zlib = ...; perl = ...; nix-env -f all-packages.nix -iA openssh Produces a /nix/store/l9w6773m1msy...-openssh-4.6p1 package in the Nix store. Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 21. User environments ◮ Users can have different sets of installed applications. PATH /nix/.../profiles current 42 /nix/store pp56i0a01si5...-user-env bin firefox ssh l9w6773m1msy...-openssh-4.6p1 bin ssh rpdqxnilb0cg...-firefox-3.5.4 bin firefox Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 22. User environments ◮ Users can have different sets of installed applications. ◮ nix-env operations create new user environments in the store. PATH /nix/.../profiles current 42 /nix/store pp56i0a01si5...-user-env bin firefox ssh l9w6773m1msy...-openssh-4.6p1 bin ssh rpdqxnilb0cg...-firefox-3.5.4 bin firefox aqn3wygq9jzk...-openssh-5.2p1 bin ssh (nix-env -u openssh) Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 23. User environments ◮ Users can have different sets of installed applications. ◮ nix-env operations create new user environments in the store. PATH /nix/.../profiles current 42 /nix/store pp56i0a01si5...-user-env bin firefox ssh l9w6773m1msy...-openssh-4.6p1 bin ssh rpdqxnilb0cg...-firefox-3.5.4 bin firefox aqn3wygq9jzk...-openssh-5.2p1 bin ssh i3d9vh6d8ip1...-user-env bin ssh firefox (nix-env -u openssh) Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 24. User environments ◮ Users can have different sets of installed applications. ◮ nix-env operations create new user environments in the store. PATH /nix/.../profiles current 42 43 /nix/store pp56i0a01si5...-user-env bin firefox ssh l9w6773m1msy...-openssh-4.6p1 bin ssh rpdqxnilb0cg...-firefox-3.5.4 bin firefox aqn3wygq9jzk...-openssh-5.2p1 bin ssh i3d9vh6d8ip1...-user-env bin ssh firefox (nix-env -u openssh) Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 25. User environments ◮ Users can have different sets of installed applications. ◮ nix-env operations create new user environments in the store. ◮ We can atomically switch between them. PATH /nix/.../profiles current 42 43 /nix/store pp56i0a01si5...-user-env bin firefox ssh l9w6773m1msy...-openssh-4.6p1 bin ssh rpdqxnilb0cg...-firefox-3.5.4 bin firefox aqn3wygq9jzk...-openssh-5.2p1 bin ssh i3d9vh6d8ip1...-user-env bin ssh firefox (nix-env -u openssh) Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 26. User environments ◮ Users can have different sets of installed applications. ◮ nix-env operations create new user environments in the store. ◮ We can atomically switch between them. ◮ These are roots of the garbage collector. PATH /nix/.../profiles current 43 /nix/store pp56i0a01si5...-user-env bin firefox ssh l9w6773m1msy...-openssh-4.6p1 bin ssh rpdqxnilb0cg...-firefox-3.5.4 bin firefox aqn3wygq9jzk...-openssh-5.2p1 bin ssh i3d9vh6d8ip1...-user-env bin ssh firefox (nix-env --remove-generations old) Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 27. User environments ◮ Users can have different sets of installed applications. ◮ nix-env operations create new user environments in the store. ◮ We can atomically switch between them. ◮ These are roots of the garbage collector. PATH /nix/.../profiles current 43 /nix/store rpdqxnilb0cg...-firefox-3.5.4 bin firefox aqn3wygq9jzk...-openssh-5.2p1 bin ssh i3d9vh6d8ip1...-user-env bin ssh firefox (nix-collect-garbage) Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 28. NixOS In NixOS, all packages including the Linux kernel and configuration files are managed by Nix. NixOS does not have directories such as: /lib and /usr NixOS has a minimal /bin and /etc But NixOS is more then just a distribution managed by Nix Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 29. NixOS configuration /etc/nixos/configuration.nix {pkgs, ...}: { boot.loader.grub.device = "/dev/sda"; fileSystems = [ { mountPoint = "/"; device = "/dev/sda2"; } ]; swapDevices = [ { device = "/dev/sda1"; } ]; services = { openssh.enable = true; xserver = { enable = true; desktopManager.kde4.enable = true; }; }; environment.systemPackages = [ pkgs.mc pkgs.firefox ]; } Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 30. NixOS configuration nixos-rebuild switch Nix package manager builds a complete system configuration Includes all packages and generates all configuration files, e.g. OpenSSH configuration Upgrades are (almost) atomic Components are stored safely next to each other, due to hashes No files are automatically removed or overwritten Users can switch to older generations of system configurations not garbage collected yet Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 31. NixOS bootloader Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 32. Deploying service-oriented systems Nix and NixOS are not sufficient for deploying service-oriented systems: Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 33. Deploying service-oriented systems Nix and NixOS are not sufficient for deploying service-oriented systems: Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 34. Deploying service-oriented systems Nix and NixOS are not sufficient for deploying service-oriented systems: Sander van der Burg A Reference Architecture for Distributed Software Deployment Non-functional requirements Is privacy-sensitive data secured? Do the analysis components perform well? Is the system resilient to machine crashes? Are the software licenses governing the off-the-shelf components properly obeyed?
  • 35. A Reference Architecture for Distributed Software Deployment Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 36. Service deployment Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 37. Disnix Distributed deployment extension for the Nix package manager Captures deployment specification in models Performs complete deployment process from models Guarantees complete dependencies Component agnostic Supports atomic upgrades and rollbacks Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 38. SDS2: Distribution Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 39. Disnix $ disnix-env -s services.nix -i infrastructure.nix -d distribution.nix Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 40. Disnix expressions MELogService.nix {javaenv, config, SDS2Util}: {mobileeventlogs}: javaenv.createTomcatWebApplication rec { name = "MELogService"; contextXML = ’’ <Context> <Resource auth="Container" type="javax.sql.DataSource" url="jdbc:mysql://${mobileeventlogs.target.hostname}..." /> </Context> ’’; webapp = javaenv.buildWebService { inherit name; src = ../../../WebServices/MELogService; wsdlFile = "MELogService.wsdl"; libs = [ config SDS2Util ]; }; } Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 41. Service model {distribution, system}: let pkgs = import ../top-level/all-packages.nix { inherit distribution system; }; in { mobileeventlogs = { name = "mobileeventlogs"; pkg = pkgs.mobileeventlogs; type = "mysql-database"; }; MELogService = { name = "MELogService"; pkg = pkgs.MELogService; dependsOn = { inherit mobileeventlogs; }; type = "tomcat-webapplication"; }; SDS2AssetTracker = { name = "SDS2AssetTracker"; pkg = pkgs.SDS2AssetTracker; dependsOn = { inherit MELogService ...; }; type = "tomcat-webapplication"; }; ... } Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 42. Infrastructure model { test1 = { hostname = "test1.net"; tomcatPort = 8080; mysqlUser = "user"; mysqlPassword = "secret"; mysqlPort = 3306; targetEPR = http://test1.net/.../DisnixService; system = "i686-linux"; }; test2 = { hostname = "test2.net"; tomcatPort = 8080; ... targetEPR = http://test2.net/.../DisnixService; system = "x86_64-linux"; }; } Captures machines in the network and their relevant properties and capabilities. Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 43. Distribution model {infrastructure}: { mobileeventlogs = [ infrastructure.test1 ]; MELogService = [ infrastructure.test2 ]; SDS2AssetTracker = [ infrastructure.test1 infrastructure.test2 ]; ... } Maps services to machines Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 44. Deployment process Specifications are used to derive deployment process: Building services from source code Transferring services to target machines Deactivating obsolete services and activating new services Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 45. Dynamic Disnix Various events may occur in a network of machines: Crashing machines Adding a new machine Change of a capability (e.g. increase of RAM) Dynamic Disnix generates infrastructure and distribution models and redeploys a system Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 46. Other deployment aspects Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 47. Distributed NixOS configuration network.nix { storage = {pkgs, ...}: { services.nfsKernel.server.enable = true; ... }; postgresql = {pkgs, ...}: { services.postgresql.enable = true; ... }; webserver = {pkgs, ...}: { fileSystems = [ { mountPoint = "/repos"; device = "storage:/repos"; } ]; services.httpd.enable = true; services.httpd.extraSubservices = [ { serviceType = "trac"; } ]; ... }; ... } Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 48. Virtualization nixos-build-vms network.nix; ./result/bin/nixos-run-vms Builds a network of QEMU-KVM virtual machines closely resembling the network of NixOS configurations We don’t create disk images The VM mounts the Nix store of the host system using SMB/CIFS Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 49. Virtualization Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 50. Testing trac.nix testScript = ’’ $postgresql→waitForJob("postgresql"); $postgresql→mustSucceed("createdb trac"); $webserver→mustSucceed("mkdir -p /repos/trac"); $webserver→mustSucceed("svnadmin create /repos/trac"); $webserver→waitForFile("/var/trac"); $webserver→mustSucceed("mkdir -p /var/trac/projects/test"); $webserver→mustSucceed("trac-admin /var/trac/projects/test initenv ". "Test postgres://root@postgresql/trac svn /repos/trac"); $client→waitForX; $client→execute("konqueror http://webserver/projects/test &"); $client→waitForWindow(qr/Test.*Konqueror/); $client→screenshot("screen"); ’’; Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 51. Testing nix-build tests.nix -A trac Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 52. License analysis We can also trace all files and processes involved in a build process And we can determine the licenses of the original source files to say something about the result /usr/bin/patchelfpatchelf.cc g++ patchelf.o g++ patchelf install Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 53. Conclusion We have shown a reference architecture for distributed software deployment Reference architecture is based on Nix, a purely functional package manager, and NixOS a Linux distribution built around Nix We have shown tools to automate the deployment of distributed systems They provide fully automatic, reliable, reproducible, and efficient deployment for the latest generation of systems Components of the reference architecture can be used to construct a domain-specific deployment tool Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 54. A Reference Architecture for Distributed Software Deployment More information: Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 55. References NixOS website: http://nixos.org Nix. A purely functional package manager Nixpkgs. Nix packages collection NixOS. Nix based GNU/Linux distribution Hydra. Nix based continuous build and integration server Disnix. Nix based distributed service deployment NixOps. NixOS-based multi-cloud deployment tool Software available under free and open-source licenses (LGPL/X11) Sander van der Burg A Reference Architecture for Distributed Software Deployment
  • 56. Questions Sander van der Burg A Reference Architecture for Distributed Software Deployment