jump into squeak - integrate squeak projects with docker & github

69
Jump into Development Self-Sustaining Systems Hubert Hesse, Robert Lehmann Software Architecture Group Hasso Plattner Institute © 2008 by FF-Kostheim, https://www.flickr.com/photos/ffkostheim/2533995614 Throughout this presentation, Amazon Web Services and its logos are trademarks of Amazon.com, Inc. Docker and its logos are trademarks of Docker, Inc. Git and its logos are trademarks of Software Freedom Conservancy

Upload: hubx

Post on 25-Jul-2015

50 views

Category:

Technology


3 download

TRANSCRIPT

Jump into DevelopmentSelf-Sustaining Systems

Hubert Hesse, Robert LehmannSoftware Architecture Group

Hasso Plattner Institute

© 2008 by FF-Kostheim, https://www.flickr.com/photos/ffkostheim/2533995614Throughout this presentation,

Amazon Web Services and its logos are trademarks of Amazon.com, Inc.Docker and its logos are trademarks of Docker, Inc.Git and its logos are trademarks of Software Freedom Conservancy

Wild Squeak repositoryappeared!

© 2007–2014 Cheezburger, Inc.

» ExperimentSignals repository

3

4

Download & install Squeak

5

6

Install dependenciesFileTree, Metacello

Installer ss3 project: 'FileTree'; install: 'ConfigurationOfFileTree'. ((Smalltalk at: #ConfigurationOfFileTree) project version: '1.0') load.

(Smalltalk at: #Gofer) new url: 'http://seaside.gemtalksystems.com/ss/metacello'; package: 'ConfigurationOfMetacello'; load. ((Smalltalk at: #ConfigurationOfMetacello) project version: #'previewBootstrap') load. (Smalltalk at: #Metacello) new configuration: 'MetacelloPreview'; version: #'stable'; repository: 'github://dalehenrich/metacello-work:configuration'; get. (Smalltalk at: #Metacello) new configuration: 'MetacelloPreview'; version: #'stable'; repository: 'github://dalehenrich/metacello-work:configuration'; load.

7

Install repositoryor: repository: ‘github://marceltaeumel/signals’

8

9

» Contributeie., fix a test ☺

10

Fork on Github

11

Use forkRedirect Git to our Github fork

12

Monticello save

13

Fixed a test

Write commit message

14

Fixed a test

15

See changesin filesystem

16

Fixed a test

Git commit…again

17

Publishon Github

18

© 2010 by iragazzidiredbull, https://www.flickr.com/photos/redbullfanclub/4618355162

☛ install Squeak☛ clone repository☛ install repository☛ try out☛ make changes☛ fork repository☛ change upstream☛ commit to Monticello☛ commit to Git☛ push repository

☹ complex installation☹ duplicate input☹ much boilerplate☹ many roundtrips

Jump into Development …very carefully

19

The Docker logo © Docker, Inc.Git Logo © Jason Long

docker + Github

Automated Squeak Deployment

20

© 1978–2008 by Paul Slade, https://www.flickr.com/photos/derable/2928670115 <demo>21

© 2008 by Roberto Ventre, https://www.flickr.com/photos/robie06/4653351388

☛ install Squeak☛ clone repository☛ install repository☛ try out☛ make changes☛ fork repository☛ change upstream☛ commit to Monticello☛ commit to Git☛ push repository☛ fork own repository☛ pull request

setup

commit

setup

commit

22

setup Squeak instances on-demand

☛ install Squeak☛ install Squeak libraries☛ clone repository☛ install repository☛ provide remote access

23

#!/bin/bashwget http://ftp.squeak.org/4.5/Squeak-4.5-All-in-One.zipecho “Installer ss3 install: 'FileTree'.“ > install.st./squeak.sh -headless install.st && vncstart -p $PORT

bare hands approach: Shell script.

☛ install Squeak☛ install Squeak libraries☛ clone repository☛ install repository☛ provide remote access

24

#!/bin/bashwget http://ftp.squeak.org/4.5/Squeak-4.5-All-in-One.zipecho “Installer ss3 install: 'FileTree'.“ > install.st./squeak.sh -headless install.st

bare hands approach: Shell script.

☛ install Squeak☛ install Squeak libraries☛ clone repository☛ install repository☛ provide remote access

poor performancere-run every deployment step time and time again

25

full-on approach: VM image.

Squeak-4.5-All-in-One/install.st

☛ install Squeak☛ install Squeak libraries☛ clone repository☛ install repository☛ provide remote access

26

full-on approach: VM image. (includes OS)

Squeak-4.5-All-in-One/install.st

☛ install Squeak☛ install Squeak libraries☛ clone repository☛ install repository☛ provide remote access

heavy footprintimage needs to include everything

27

Linux

Libraries (Git, VNC, …)

Squeak

Commit supportRepository V

NC

Solution: Linux Containers via Docker.

☛ install Squeak☛ install Squeak libraries☛ clone repository☛ install repository☛ provide remote access

28

☛ install Squeak☛ install Squeak libraries☛ clone repository☛ install repository☛ provide remote access

Linux

Libraries (Git, VNC, …)

Squeak

Commit supportRepository V

NC

Solution: Linux Containers via Docker.

linux containersLXC allows optimizations, eg. kernel samepage merging

union filesystemAUFS stores delta only

containers are configurable versioning, isolation, port mapping

29

© 2008 by Roberto Ventre, https://www.flickr.com/photos/robie06/4653351388

☛ install Squeak☛ clone repository☛ install repository☛ try out☛ make changes☛ fork repository☛ change upstream☛ commit to Monticello☛ commit to Git☛ push repository☛ fork own repository☛ pull request

setup

commit

setup

commit

30

localhostInstall Docker; clone repo;docker build; docker run31

middleware

middleware

32

middleware

middleware

maintenance burdenSingle Point of Failure

limited resourceswho pays the dime?

33

IE © by Pit-tux, http://findicons.com/icon/13282/ie Amazon Web Services is a trademark of Amazon.com, Inc.34

IE © by Pit-tux, http://findicons.com/icon/13282/ie Amazon Web Services is a trademark of Amazon.com, Inc.

requires AWS accountthere is no free lunch

35

IE © by Pit-tux, http://findicons.com/icon/13282/ie Amazon Web Services is a trademark of Amazon.com, Inc.

Same Origin PolicyEC2 not usable in aws-sdk.js

requires AWS accountthere is no free lunch

36

IE © by Pit-tux, http://findicons.com/icon/13282/ie Amazon Web Services is a trademark of Amazon.com, Inc.

CORS proxy

37

IE © by Pit-tux, http://findicons.com/icon/13282/ie Amazon Web Services is a trademark of Amazon.com, Inc.

CORS proxy

AWS credentials in the open

38

© 2008 by Roberto Ventre, https://www.flickr.com/photos/robie06/4653351388 Amazon Web Services is a trademark of Amazon.com, Inc.

☛ install Squeak☛ clone repository☛ install repository☛ try out☛ make changes☛ fork repository☛ change upstream☛ commit to Monticello☛ commit to Git☛ push repository☛ fork own repository☛ pull request

setup

commit

setup

commit

✔deploydeploy

( )

39

?#1 Where is this represented?!

#2 How do we get it into Git?

40

repository .filetree Signals.package

.filetree (omitted from here on for brevity)

monticello.meta package version postscript

SignalTest.class README.md properties.json methodProperties.json instance

test01ConnectDisconnect.st class

new.st …

41

repository .filetree Signals.package

.filetree (omitted from here on for brevity)

monticello.meta package version postscript

SignalTest.class README.md properties.json methodProperties.json instance

test01ConnectDisconnect.st class

new.st …

this file is being writtenby a Monticello save*

actually, MCFileTreeRepository just deletes the top-level repository and writes out everything fresh.42

repository .filetree Signals.package

.filetree (omitted from here on for brevity)

monticello.meta package version postscript

SignalTest.class README.md properties.json methodProperties.json instance

test01ConnectDisconnect.st class

new.st …

this file is being writtenby a Monticello save*

actually, MCFileTreeRepository just deletes the top-level repository and writes out everything fresh.

poll directory for changeseg. inotifywait black-box approach

43

repository .filetree Signals.package

.filetree (omitted from here on for brevity)

monticello.meta package version postscript

SignalTest.class README.md properties.json methodProperties.json instance

test01ConnectDisconnect.st class

new.st …

this file is being writtenby a Monticello save*

actually, MCFileTreeRepository just deletes the top-level repository and writes out everything fresh.

poll directory for changeseg. inotifywait black-box approach

unclear interaction for credentialsfrom console, system dialogs, key store?

extra environmentrace conditions, auxiliary binary, setup per repository

44

45

scripted componentpush

46

new workflowconfusing for experienced developers

scripted componentpush

47

use Monticello

metacello-workhas github:// support

48

use Monticello

metacello-workhas github:// support

zipball downloadread-only, no commit/push

49

git:///signals/

extend Monticello

50

Monticello

MCGithubRepository

git-clone git-push git-commit hub fork

authorized

MCFileTreeRepository

51

Monticello

MCGithubRepository

git-clone git-push git-commit hub fork

authorized

git-credential-store environment

52

© 2008 by Roberto Ventre, https://www.flickr.com/photos/robie06/4653351388

☛ install Squeak☛ clone repository☛ install repository☛ try out☛ make changes☛ fork repository☛ change upstream☛ commit to Monticello☛ commit to Git☛ push repository☛ fork own repository☛ pull request

setup

commit

setup

commit

53

Quickstart☛ Open Monticello☛ Create a Github repository☛ Save package to Github

repository

☛ Add Docker instructions¹☛ Add packaging instructions²☛ Add jump into button3

☛ Commit☛ Optional: Setup Monticello

postscript to load your application

¹ DockerfileFROM lehmannro/squeakADD . /checkoutCMD run.sh

2 .packagesSignals

3 README.md[![Jump into](shields.io/badge/jump-into-green.svg)](http://novnc.com/?autoconn…)

a new Github repository

54

56

remote boxwith Squeak

56

57

Monticello save

58

new Github repository…automatically created

marceltaeumel/signals

59

pull request

marceltaeumel/signals

marceltaeumel:master...master

60

© 2010 by Andy Atmtx, https://www.flickr.com/photos/atmtx/4842894834

Git support in Squeak for free!remote

61

© 2008 by Roberto Ventre, https://www.flickr.com/photos/robie06/4483015383

↪ deploy on AWSfrom user credentials

↪ support multiple versions in Monticello

↪ make bootstrapping easier(install from SS3)

↪ image retrieval from session

Next Steps Limitations

✗ copious Windows deployment1

✗ restricts Git to pure sequential history(no tags, branches)

✗ no git-merge during merge conflicts

✗ Docker SaaS’esstill experimental

✗ Docker Index a SPoF

[1] http://docs.docker.com/installation/windows/

62

© 2008 by Roberto Ventre, https://www.flickr.com/photos/robie06/4653351388

☛ install Squeak☛ clone repository☛ install repository☛ try out☛ make changes☛ fork repository☛ change upstream☛ commit to Monticello☛ commit to Git☛ push repository☛ fork own repository☛ pull request

setup

commit

setup

commit

http://github.com/lehmannro/metacello-githttp://github.com/lehmannro/squeak-docker

63

© 2008 by Therme Loipersdorf, https://www.flickr.com/photos/39721390@N02/3653604110

git:///signals/

extend Monticello

Thierry Goubier’s filetreehttps://github.com/ThierryGoubier/filetree

FileTree on steroids, onlyno push, pull, fork

Tim Felgentreff’s Git O’cellohttps://github.com/timfel/gitocello

new Registry, Package Format, git hooks

emulate MCZ for squeakvm

complex setup

Dale Henrichs’ BuilderCIhttps://github.com/dalehenrich/builderCI

collection of bash scripts to execute tests with travis ci

provides compatibility with GLASS, Pharo and Squeak

complex

Daniel Neumann [email protected]

credentials

memory

442Mvanilla Squeak

566Mdockerized VNCXfb