A Reference Architecture for Distributed Software Deployment



Similar documents
The Nix project. Sander van der Burg. June 24, Delft University of Technology, EEMCS, Department of Software Technology

Using NixOS for declarative deployment and testing

A Reference Architecture for Distributed Software Deployment

How To Write A Distributed Deployment System On Nix (Programming)

Automated Deployment of a Heterogeneous Service-Oriented System

The Nix Build Farm: A Declarative Approach to Continuous Integration

Service Configuration Management

Service Configuration Management

Automating System Tests Using Declarative Virtual Machines

Hydra: A Declarative Approach to Continuous Integration 1

Pull Deployment of Services

Automating System Tests Using Declarative Virtual Machines

HTTP-FUSE PS3 Linux: an internet boot framework with kboot

PLUMgrid Toolbox: Tools to Install, Operate and Monitor Your Virtual Network Infrastructure

How to Backup XenServer VM with VirtualIQ

Docker : devops, shared registries, HPC and emerging use cases. François Moreews & Olivier Sallou

1. What is this? Why would I want it?

Smartphone Pentest Framework v0.1. User Guide

EXPLORING LINUX KERNEL: THE EASY WAY!

Encrypted File Transfer - Customer Testing

Buildroot for Vortex86EX (2016/04/20)

Installation and Control in Linux

TCH Forecaster Installation Instructions

vsphere Upgrade vsphere 6.0 EN

Installation Guide for contineo

The Benefits of Verio Virtual Private Servers (VPS) Verio Virtual Private Server (VPS) CONTENTS

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Planning for an Amanda Disaster Recovery System

Setting Up a CLucene and PostgreSQL Federation

Computer Virtualization in Practice

Designing and Coding Secure Systems

Applications Manager Best Practices document

Embedded Linux development training 4 days session

Veritas Storage Foundation and High Availability Solutions Getting Started Guide

NetIQ Cloud Manager 2.3 Installation Guide

AklaBox. The Ultimate Document Platform for your Cloud Infrastructure. Installation Guideline

Copyright by Parallels Holdings, Ltd. All rights reserved.

Project Artillery Active Honeypotting. Dave Kennedy Founder, Principal Security Consultant

GlusterFS Distributed Replicated Parallel File System

Restoring a Suse Linux Enterprise Server 9 64 Bit on Dissimilar Hardware with CBMR for Linux 1.02

Configuring Informatica Data Vault to Work with Cloudera Hadoop Cluster

This section is intended to provide sample configurations and script examples common to long-term operation of a Jive SBS installation.

24x7 Scheduler Multi-platform Edition 5.2

GroundWork Monitor Community Edition Install Guide VMware Virtual Appliance

Linux Operating System Security

Supported Platforms HPE Vertica Analytic Database. Software Version: 7.2.x

Secure File Transfer Installation. Sender Recipient Attached FIles Pages Date. Development Internal/External None 11 6/23/08

CDH installation & Application Test Report

Oracle VM Server Recovery Guide. Version 8.2

Features. The Samhain HIDS. Overview of available features. Rainer Wichmann

User and Reference Manual

High Availability of the Polarion Server

SafeGuard Easy upgrade guide. Product version: 7

Proposal for Virtual Private Server Provisioning

Deploying Dell OpenManage Server Administrator on VMware ESXi Using Dell Online Depot and VMware Update Manager

Cisco Unified CM Disaster Recovery System

How to Restore a Linux Server Using Bare Metal Restore

FileCruiser Backup & Restoring Guide

How To Set Up A Shared Insight Cache Server On A Pc Or Macbook With A Virtual Environment On A Virtual Computer (For A Virtual) (For Pc Or Ipa) ( For Macbook) (Or Macbook). (For Macbook

VMware vcenter Log Insight Getting Started Guide

Oracle Solaris: Aktueller Stand und Ausblick

VDCF - Virtual Datacenter Control Framework for the Solaris TM Operating System

Developing reliable Multi-Core Embedded-Systems with NI Linux Real-Time

User Manual of the Pre-built Ubuntu Virutal Machine

Revision control systems (RCS) and

vsphere Upgrade Update 1 ESXi 6.0 vcenter Server 6.0 EN

depl Documentation Release depl contributors

vtiger CRM 4.2 Installation Guide for Linux OS

Building Active/Passive Clusters with Oracle Fusion Middleware 11g

Review Quiz 1. What is the stateful firewall that is built into Mac OS X and Mac OS X Server?

Automated deployment of virtualization-based research models of distributed computer systems

Table of Contents Introduction and System Requirements 9 Installing VMware Server 35

Best Practices on monitoring Solaris Global/Local Zones using IBM Tivoli Monitoring

Using Symantec NetBackup with Symantec Security Information Manager 4.5

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

Data Center Automation with YADT

Connection Broker Managing User Connections to Workstations, Blades, VDI, and More. Quick Start with Microsoft Hyper-V

Deployment Guide. How to prepare your environment for an OnApp Cloud deployment.

SafeGuard Enterprise upgrade guide. Product version: 7

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

Generating SSH Keys and SSL Certificates for ROS and ROX Using Windows AN22

Open Source Multi-Cloud, Multi- Tenant Automation in the cloud with SlipStream PaaS

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

Secure Linux Administration Conference Bernd Strößenreuther

How to Setup Bare Metal Adaxa Suite Demonstration Box

GoAnywhere Director to GoAnywhere MFT Upgrade Guide. Version: Publication Date: 07/09/2015

An Oracle White Paper March Oracle s Single Server Solution for VDI

NSi Mobile Installation Guide. Version 6.2

Virtual desktops made easy

RED HAT ENTERPRISE VIRTUALIZATION

Transcription:

A Reference Architecture for Distributed Software Deployment Delft University of Technology, EEMCS, Department of Software Technology August 2, 2013

A Reference Architecture for Distributed Software Deployment

A Reference Architecture for Distributed Software Deployment

Software deployment

Software deployment Software deployment All of the activities that make a software system available for use.

Challenges

Challenges Software deployment Time consuming Error prone Destructive upgrades Downtimes

Some history: Early history

Some history: High-level languages and operating systems

Some history: High-level languages and operating systems Software components Requires compiler or interpreter and a compatible operating system

Some history: Component-based software engineering

Some history: Component-based software engineering Software components Components increase programmer productivity Components increase quality of software

Some history: Component-based software engineering Disadvantages:

Nowadays: Services on the Internet

Nowadays: Services on the internet Challenges:

Nowadays: Services on the Internet Challenges: Software components Software deployment has become increasingly more complicated

Earlier research: Nix and NixOS A GNU/Linux distribution using the Nix package manager

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 ssh s 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

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 ; }

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.

User environments Users can have different sets of installed applications. PATH /nix/.../profiles current 42 /nix/store pp56i0a01si5...-user-env firefox ssh l9w6773m1msy...-openssh-4.6p1 ssh rpdqxnilb0cg...-firefox-3.5.4 firefox

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 firefox ssh l9w6773m1msy...-openssh-4.6p1 ssh rpdqxnilb0cg...-firefox-3.5.4 firefox aqn3wygq9jzk...-openssh-5.2p1 ssh (nix-env -u openssh)

User environments Users can have different sets of installed applications. nix-env operations create new user environments in the store. /nix/store PATH pp56i0a01si5...-user-env firefox /nix/.../profiles ssh current l9w6773m1msy...-openssh-4.6p1 42 ssh rpdqxnilb0cg...-firefox-3.5.4 firefox aqn3wygq9jzk...-openssh-5.2p1 ssh i3d9vh6d8ip1...-user-env ssh firefox (nix-env -u openssh)

User environments Users can have different sets of installed applications. nix-env operations create new user environments in the store. /nix/store PATH pp56i0a01si5...-user-env firefox /nix/.../profiles ssh current l9w6773m1msy...-openssh-4.6p1 42 ssh rpdqxnilb0cg...-firefox-3.5.4 43 firefox aqn3wygq9jzk...-openssh-5.2p1 ssh i3d9vh6d8ip1...-user-env ssh firefox (nix-env -u openssh)

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. /nix/store PATH pp56i0a01si5...-user-env firefox /nix/.../profiles ssh current l9w6773m1msy...-openssh-4.6p1 42 ssh rpdqxnilb0cg...-firefox-3.5.4 43 firefox aqn3wygq9jzk...-openssh-5.2p1 ssh i3d9vh6d8ip1...-user-env ssh firefox (nix-env -u openssh)

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. /nix/store PATH pp56i0a01si5...-user-env firefox /nix/.../profiles ssh current l9w6773m1msy...-openssh-4.6p1 ssh rpdqxnilb0cg...-firefox-3.5.4 43 firefox aqn3wygq9jzk...-openssh-5.2p1 ssh i3d9vh6d8ip1...-user-env ssh firefox (nix-env --remove-generations old)

User environments PATH /nix/store 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. /nix/.../profiles current rpdqxnilb0cg...-firefox-3.5.4 43 firefox aqn3wygq9jzk...-openssh-5.2p1 ssh i3d9vh6d8ip1...-user-env ssh firefox (nix-collect-garbage)

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 / and /etc But NixOS is more then just a distribution managed by Nix

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 ]; }

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

NixOS bootloader

Deploying service-oriented systems Nix and NixOS are not sufficient for deploying service-oriented systems:

Deploying service-oriented systems Nix and NixOS are not sufficient for deploying service-oriented systems:

Deploying service-oriented systems Nix and NixOS are not sufficient for deploying service-oriented systems: 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

Service 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

SDS2: Distribution

Disnix $ disnix-env -s services.nix -i infrastructure.nix -d distribution.nix

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 ]; }; }

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"; };... }

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.

Distribution model {infrastructure}: { mobileeventlogs = [ infrastructure.test1 ]; MELogService = [ infrastructure.test2 ]; SDS2AssetTracker = [ infrastructure.test1 infrastructure.test2 ];... } Maps services to machines

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

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

Other deployment aspects

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"; } ];... };... }

Virtualization nixos-build-vms network.nix;./result//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

Virtualization

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"); ;

Testing nix-build tests.nix -A trac

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 patchelf.cc g++ patchelf.o g++ patchelf install /usr//patchelf

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

A Reference Architecture for Distributed Software Deployment More information:

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)

Questions