Dependable software deployment Wouter Swierstra 13 October 2006.
-
Upload
magdalen-haynes -
Category
Documents
-
view
217 -
download
0
Transcript of Dependable software deployment Wouter Swierstra 13 October 2006.
![Page 1: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/1.jpg)
Dependable software deployment
Wouter Swierstra13 October 2006
![Page 2: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/2.jpg)
Software configuration mismanagement
![Page 3: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/3.jpg)
Imperative software deployment
![Page 4: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/4.jpg)
Imperative software deployment
• h-1 g f h ¿=? g f
• No reflection
![Page 5: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/5.jpg)
Functional deployment
![Page 6: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/6.jpg)
Functional deployment
word = component
name = “MS Word”
…
acroread = component
name = “Adobe Acrobat
Reader”
…
AcroRd32.exe
![Page 7: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/7.jpg)
Functional deployment
Install Word version > 10 && only install trusted components
![Page 8: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/8.jpg)
Functional deployment
B
C
D
A
![Page 9: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/9.jpg)
Functional deployment
Configurations are:
• Immutable
• Reproducible
• Analyzable
![Page 10: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/10.jpg)
The deployment problem
Given a set of available components and a set of rules and requirements, construct “the best” configuration.
![Page 11: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/11.jpg)
What is a configuration?
C = configuration notepad = component name = “Notepad” version = 5.0.3 notepad.exe = executable
![Page 12: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/12.jpg)
What is a configuration?
C = configuration winc = component name = “Windows Kernel” version = 5.0.3 msvcrt.dll = library signal = proc
![Page 13: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/13.jpg)
What is a configuration? C = configuration winc = component name = “Windows Kernel” version = 5.0.3 msvcrt.dll = library signal = proc ordinal = 759
![Page 14: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/14.jpg)
ImportsC = configuration readline = component readline.dll …
ghc = component name = “Glasgow Haskell Compiler” version = 6.4.2 requires = readline readline.dll
![Page 15: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/15.jpg)
When do configurations make sense?
![Page 16: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/16.jpg)
When do configurations make sense?
Resolved: Every name can be found:
freeVar(C) = Ø
![Page 17: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/17.jpg)
What’s on disk?
Store
Readline-3.2
environment
GHC-6.4.2
environment
Word-11
environment
![Page 18: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/18.jpg)
What’s on disk?
User environment
Word
ghc
Store
Readline-3.2
environment
GHC-6.4.2
environment
Word-11
environment
![Page 19: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/19.jpg)
What’s on disk?
Store
Readline-3.2
environment
GHC-6.4.2
environment
Word-11
environment
GHC-6.6
environment
• Multiple versions of components
• Minimize interference
• Hidden from user
• Unambiguous bindings
![Page 20: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/20.jpg)
Memory model Programming Languages
Example Software Deployment
Example
Memory Disk
Values 5, “Hello”, …
Components libc, ghc, …
Addresses 0x005aa772 Path names “/usr/local/”
Pointer arithmetic
*(arr + 5) String manipulation
“C:\wouter\” + configDir
![Page 21: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/21.jpg)
What are components?
![Page 22: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/22.jpg)
Towards deploymentHow should a developer know how to refer
to the component called “readline” on your system?
We need to parameterize components:
ghc rl = component name = “Glasgow Haskell Compiler” version = 6.4.2 requires = rl name = “readline”
![Page 23: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/23.jpg)
DeploymentFinding a component with the right name
might not be enough…
ghc rl = component name = “Glasgow Haskell Compiler” version = 6.4.2 requires = rl name = “readline” &&
rl version > 3.0
![Page 24: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/24.jpg)
Predicates - IWe don’t want to fix our predicate
language.
First-order predicate logic.
Versions:
readline version > 3.0
libc version <= 5.0
![Page 25: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/25.jpg)
Predicates – II Disjunctive dependencies:
readline cc = component requires = cc name == “GNU C Compiler”
or cc name “Visual Studio”
![Page 26: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/26.jpg)
Predicates - IIIDefining recursive configurations allows
global constraints:
nvidia config = component requires = forall c in children config . c name == “Monitor driver” => c == nvidia
A good predicate language is really, really important.
![Page 27: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/27.jpg)
Guiding the binding
![Page 28: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/28.jpg)
Policies - IWhat if you have more than one choice?
A policy is a partial order on components.
State of the art:c.name == d.name => c.version > d.version
![Page 29: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/29.jpg)
Policies - II
Many websites publish lists that rate software.
Security, given a rating function:rate(c) >= rate(d)
![Page 30: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/30.jpg)
Policies - III
Parsimony, given a size measure and installed predicate:
if installed(c) then 0 else size(c) <= if installed (d) then 0 else size(d)
![Page 31: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/31.jpg)
Windows InstallerAnalyzed lots of msi files
Declares complete component contents…
…but deploy files in shared directories
…and allow custom actions to affect where files are deployed.
No real predicate language.
![Page 32: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/32.jpg)
Red Hat Package ManagerPackages specify name, version,
dependencies,
Fixed, simple predicate language.
No two versions of same component.
Scripts to build and deploy can execute arbitrary actions.
![Page 33: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/33.jpg)
ConclusionsA good idea of what the problem is.
Still open questions: Plug-insUser settingsGenerating faithful component descriptions…
Draft paper available.
![Page 34: Dependable software deployment Wouter Swierstra 13 October 2006.](https://reader036.fdocuments.net/reader036/viewer/2022081516/56649f155503460f94c2a7ee/html5/thumbnails/34.jpg)
Questions? (not regarding coffee machines)