Slide 1

Slide 1 text

Automated deployments with robots or how to hubot and be freaking awesome! DevCon Ramallah - June 22th - Ramallah (Palestine)

Slide 2

Slide 2 text

Ole Michaelis @CodeStars github.com/nesQuick blog.codestars.eu

Slide 3

Slide 3 text

Working @Jimdo “Open Source Rockstar”

Slide 4

Slide 4 text

Introducing hubot for deployments

Slide 5

Slide 5 text

but let’s start from the beginning...

Slide 6

Slide 6 text

Let’s talk about Deployments in general and specifically and so on and so forth

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Continuous Deployment Continuous Integration + 1 = Continuous Deployment

Slide 9

Slide 9 text

prerequisites You know about ... ... or continuous integration in general. or

Slide 10

Slide 10 text

CI + w00t ?! What’s a must have for CD?

Slide 11

Slide 11 text

CI + w00t ?! What’s a must have for CD? Tests

Slide 12

Slide 12 text

CI + w00t ?! What’s a must have for CD? Tests mooaar Tests!

Slide 13

Slide 13 text

CI + w00t ?! What’s a must have for CD? Tests mooaar Tests! even mooaar Tests!!!

Slide 14

Slide 14 text

CI + w00t ?! What’s a must have for CD? Tests mooaar Tests! even mooaar Tests!!! TESTS!!!!!!111einself

Slide 15

Slide 15 text

CI + w00t ?! What’s a must have for CD? Tests mooaar Tests! even mooaar Tests!!! TESTS!!!!!!111einself Or...

Slide 16

Slide 16 text

CI + w00t ?! What’s a must have for CD? Tests mooaar Tests! even mooaar Tests!!! TESTS!!!!!!111einself Or...

Slide 17

Slide 17 text

CI + w00t ?! What’s a must have for CD? Or just trust your co-workers.... LOL!

Slide 18

Slide 18 text

no, for real

Slide 19

Slide 19 text

no, for real Unit testing

Slide 20

Slide 20 text

no, for real Unit testing Integration testing

Slide 21

Slide 21 text

no, for real Unit testing Integration testing Functional testing

Slide 22

Slide 22 text

no, for real Unit testing Integration testing Functional testing Acceptance testing

Slide 23

Slide 23 text

Continuous Delivery Commit (push)

Slide 24

Slide 24 text

Continuous Delivery Commit (push) Test

Slide 25

Slide 25 text

Continuous Delivery Commit (push) Test Deploy

Slide 26

Slide 26 text

Continuous Delivery Commit (push) Test Deploy Test

Slide 27

Slide 27 text

Hubot the Robot “Hubot is your company's robot. Install him in your company to dramatically improve and reduce employee efficiency.” http:/ /hubot.github.com/

Slide 28

Slide 28 text

what’s hu pics blah

Slide 29

Slide 29 text

what’s hu pics blah Last login: Wed May 8 23:56:35 on ttys00 λ ~

Slide 30

Slide 30 text

what’s hu pics blah Last login: Wed May 8 23:56:35 on ttys00 λ ~ Hubot> bin/hubot

Slide 31

Slide 31 text

what’s hu pics blah Last login: Wed May 8 23:56:35 on ttys00 λ ~ Hubot> bin/hubot Hubot the Rules Hubot> 1. A robot may not injure a human being or, through inaction, allow a human being to come to harm. Hubot>

Slide 32

Slide 32 text

what’s hu pics blah Last login: Wed May 8 23:56:35 on ttys00 λ ~ Hubot> bin/hubot Hubot the Rules Hubot> 1. A robot may not injure a human being or, through inaction, allow a human being to come to harm. Hubot> Hubot image me @janl Hubot> http://goo.gl/nKGpH

Slide 33

Slide 33 text

what’s hu pics blah Last login: Wed May 8 23:56:35 on ttys00 λ ~ Hubot> bin/hubot Hubot the Rules Hubot> 1. A robot may not injure a human being or, through inaction, allow a human being to come to harm. Hubot> Hubot image me @janl Hubot> http://goo.gl/nKGpH

Slide 34

Slide 34 text

Hubot Inventor: GitHub Inc. Chassis: CoffeeScript Engine: node.js Brain: Redis (to go) Interfaces: Extandable

Slide 35

Slide 35 text

Adapters 2 Built-in 15 Third Party IRC / XMPP ....

Slide 36

Slide 36 text

Use for fun and profit with 14 built-in, and about 413 third party scripts

Slide 37

Slide 37 text

github play your company's dj

Slide 38

Slide 38 text

https:/ /github.com/play/play

Slide 39

Slide 39 text

MakeMe 3D printing with robots

Slide 40

Slide 40 text

https:/ /github.com/blog/1368-releasing-make-me

Slide 41

Slide 41 text

fun

Slide 42

Slide 42 text

fun

Slide 43

Slide 43 text

fun

Slide 44

Slide 44 text

fun

Slide 45

Slide 45 text

fun pr0 tip: adinline http:/ /www.adiumxtras.com/index.php?a=xtras&xtra_id=7926

Slide 46

Slide 46 text

profit

Slide 47

Slide 47 text

profit <3

Slide 48

Slide 48 text

Extending hubot

Slide 49

Slide 49 text

Extending hubot Hubot can react on ...

Slide 50

Slide 50 text

Extending hubot ... commands directed to him Hubot can react on ...

Slide 51

Slide 51 text

Extending hubot ... commands directed to him ... any words spoken Hubot can react on ...

Slide 52

Slide 52 text

Extending hubot ... commands directed to him ... any words spoken ... HTTP requests Hubot can react on ...

Slide 53

Slide 53 text

Extending hubot ... commands directed to him ... any words spoken ... HTTP requests ... events Hubot can react on ...

Slide 54

Slide 54 text

parrot

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

http

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Assembling the pieces continuous integration + hubot + X = AWESOMENESS

Slide 59

Slide 59 text

Assembling the pieces continuous integration + hubot + X = AWESOMENESS deployment

Slide 60

Slide 60 text

a true story

Slide 61

Slide 61 text

scenario Digital Pioneers N.V. Code on Github Apps on Scalarium 2 Developers plus a few students Jabber developer chat

Slide 62

Slide 62 text

We weren’t ready for continuous delivery

Slide 63

Slide 63 text

So I spent a weekend hacking on hubot- scalarium

Slide 64

Slide 64 text

Here’s how it worked 2:12:11 PM Ole Michaelis: charly scalarium list apps 2:12:13 PM charly: Stuffle App Dev - 01acdbffe16ab78ae116fd9ae04f8f91 2:12:13 PM charly: Stuffle Web App Dev - 06e4768757f639ea5706d8a1da48b84b 2:12:13 PM charly: Stuffle Api Live - 433561d0e0d953d6c36548036f7e0619 2:12:13 PM charly: stuffle.it - web app live - 354c474d492655805553c75b023a2617 2:12:47 PM Ole Michaelis: charly scalarium deploy 354c474d492655805553c75b023a2617 wording fixes 2:12:49 PM charly: Yes Sir! Deployment triggered with id ff3cc56151619e3042a4afcb8f4dced2. Will drop a note when it's done. 2:13:02 PM Ole Michaelis: Ohh, erster live deploy ) 2:13:13 PM Ole Michaelis: *trommelwirbel* 2:15:05 PM charly: Success! Your deployment "Hubot deploy - wording fixes" with id ff3cc56151619e3042a4afcb8f4dced2 is done. 2:16:19 PM Ole Michaelis: *tusch* !

Slide 65

Slide 65 text

Here’s how it worked 2:12:11 PM Ole Michaelis: charly scalarium list apps 2:12:13 PM charly: Stuffle App Dev - 01acdbffe16ab78ae116fd9ae04f8f91 2:12:13 PM charly: Stuffle Web App Dev - 06e4768757f639ea5706d8a1da48b84b 2:12:13 PM charly: Stuffle Api Live - 433561d0e0d953d6c36548036f7e0619 2:12:13 PM charly: stuffle.it - web app live - 354c474d492655805553c75b023a2617 2:12:47 PM Ole Michaelis: charly scalarium deploy 354c474d492655805553c75b023a2617 wording fixes 2:12:49 PM charly: Yes Sir! Deployment triggered with id ff3cc56151619e3042a4afcb8f4dced2. Will drop a note when it's done. 2:13:02 PM Ole Michaelis: Ohh, erster live deploy ) 2:13:13 PM Ole Michaelis: *trommelwirbel* 2:15:05 PM charly: Success! Your deployment "Hubot deploy - wording fixes" with id ff3cc56151619e3042a4afcb8f4dced2 is done. 2:16:19 PM Ole Michaelis: *tusch* !

Slide 66

Slide 66 text

Here’s how it worked 2:12:11 PM Ole Michaelis: charly scalarium list apps 2:12:13 PM charly: Stuffle App Dev - 01acdbffe16ab78ae116fd9ae04f8f91 2:12:13 PM charly: Stuffle Web App Dev - 06e4768757f639ea5706d8a1da48b84b 2:12:13 PM charly: Stuffle Api Live - 433561d0e0d953d6c36548036f7e0619 2:12:13 PM charly: stuffle.it - web app live - 354c474d492655805553c75b023a2617 2:12:47 PM Ole Michaelis: charly scalarium deploy 354c474d492655805553c75b023a2617 wording fixes 2:12:49 PM charly: Yes Sir! Deployment triggered with id ff3cc56151619e3042a4afcb8f4dced2. Will drop a note when it's done. 2:13:02 PM Ole Michaelis: Ohh, erster live deploy ) 2:13:13 PM Ole Michaelis: *trommelwirbel* 2:15:05 PM charly: Success! Your deployment "Hubot deploy - wording fixes" with id ff3cc56151619e3042a4afcb8f4dced2 is done. 2:16:19 PM Ole Michaelis: *tusch* !

Slide 67

Slide 67 text

Here’s how it worked 2:12:11 PM Ole Michaelis: charly scalarium list apps 2:12:13 PM charly: Stuffle App Dev - 01acdbffe16ab78ae116fd9ae04f8f91 2:12:13 PM charly: Stuffle Web App Dev - 06e4768757f639ea5706d8a1da48b84b 2:12:13 PM charly: Stuffle Api Live - 433561d0e0d953d6c36548036f7e0619 2:12:13 PM charly: stuffle.it - web app live - 354c474d492655805553c75b023a2617 2:12:47 PM Ole Michaelis: charly scalarium deploy 354c474d492655805553c75b023a2617 wording fixes 2:12:49 PM charly: Yes Sir! Deployment triggered with id ff3cc56151619e3042a4afcb8f4dced2. Will drop a note when it's done. 2:13:02 PM Ole Michaelis: Ohh, erster live deploy ) 2:13:13 PM Ole Michaelis: *trommelwirbel* 2:15:05 PM charly: Success! Your deployment "Hubot deploy - wording fixes" with id ff3cc56151619e3042a4afcb8f4dced2 is done. 2:16:19 PM Ole Michaelis: *tusch* !

Slide 68

Slide 68 text

Here’s how it worked 2:12:11 PM Ole Michaelis: charly scalarium list apps 2:12:13 PM charly: Stuffle App Dev - 01acdbffe16ab78ae116fd9ae04f8f91 2:12:13 PM charly: Stuffle Web App Dev - 06e4768757f639ea5706d8a1da48b84b 2:12:13 PM charly: Stuffle Api Live - 433561d0e0d953d6c36548036f7e0619 2:12:13 PM charly: stuffle.it - web app live - 354c474d492655805553c75b023a2617 2:12:47 PM Ole Michaelis: charly scalarium deploy 354c474d492655805553c75b023a2617 wording fixes 2:12:49 PM charly: Yes Sir! Deployment triggered with id ff3cc56151619e3042a4afcb8f4dced2. Will drop a note when it's done. 2:13:02 PM Ole Michaelis: Ohh, erster live deploy ) 2:13:13 PM Ole Michaelis: *trommelwirbel* 2:15:05 PM charly: Success! Your deployment "Hubot deploy - wording fixes" with id ff3cc56151619e3042a4afcb8f4dced2 is done. 2:16:19 PM Ole Michaelis: *tusch* !

Slide 69

Slide 69 text

Here’s how it worked 2:12:11 PM Ole Michaelis: charly scalarium list apps 2:12:13 PM charly: Stuffle App Dev - 01acdbffe16ab78ae116fd9ae04f8f91 2:12:13 PM charly: Stuffle Web App Dev - 06e4768757f639ea5706d8a1da48b84b 2:12:13 PM charly: Stuffle Api Live - 433561d0e0d953d6c36548036f7e0619 2:12:13 PM charly: stuffle.it - web app live - 354c474d492655805553c75b023a2617 2:12:47 PM Ole Michaelis: charly scalarium deploy 354c474d492655805553c75b023a2617 wording fixes 2:12:49 PM charly: Yes Sir! Deployment triggered with id ff3cc56151619e3042a4afcb8f4dced2. Will drop a note when it's done. 2:13:02 PM Ole Michaelis: Ohh, erster live deploy ) 2:13:13 PM Ole Michaelis: *trommelwirbel* 2:15:05 PM charly: Success! Your deployment "Hubot deploy - wording fixes" with id ff3cc56151619e3042a4afcb8f4dced2 is done. 2:16:19 PM Ole Michaelis: *tusch* !

Slide 70

Slide 70 text

Here’s how it worked 2:12:11 PM Ole Michaelis: charly scalarium list apps 2:12:13 PM charly: Stuffle App Dev - 01acdbffe16ab78ae116fd9ae04f8f91 2:12:13 PM charly: Stuffle Web App Dev - 06e4768757f639ea5706d8a1da48b84b 2:12:13 PM charly: Stuffle Api Live - 433561d0e0d953d6c36548036f7e0619 2:12:13 PM charly: stuffle.it - web app live - 354c474d492655805553c75b023a2617 2:12:47 PM Ole Michaelis: charly scalarium deploy 354c474d492655805553c75b023a2617 wording fixes 2:12:49 PM charly: Yes Sir! Deployment triggered with id ff3cc56151619e3042a4afcb8f4dced2. Will drop a note when it's done. 2:13:02 PM Ole Michaelis: Ohh, erster live deploy ) 2:13:13 PM Ole Michaelis: *trommelwirbel* 2:15:05 PM charly: Success! Your deployment "Hubot deploy - wording fixes" with id ff3cc56151619e3042a4afcb8f4dced2 is done. 2:16:19 PM Ole Michaelis: *tusch* !

Slide 71

Slide 71 text

What’s behind the scene?

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

What could be next?

Slide 75

Slide 75 text

What could be next? Deploy triggered by github travis jenkins

Slide 76

Slide 76 text

What could be next? Deploy triggered by github travis jenkins Unattended deploy

Slide 77

Slide 77 text

What could be next? Deploy triggered by github travis jenkins Unattended deploy EVERYTHING!!!

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

normally, but...

Slide 80

Slide 80 text

lesson learned so I’d like to share them with you

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

pull-deploy

Slide 83

Slide 83 text

That’s it! Soo... Grab your own! Introduce him to the colleagues Play around and have fun Deploy!

Slide 84

Slide 84 text

now really, finally

Slide 85

Slide 85 text

Links & stuff hubot.github.com github.com/github/hubot hubot-script-catalog.herokuapp.com github.com/github/hubot-scripts we are writing a pull-deploy post

Slide 86

Slide 86 text

Q & A

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

http:/ /octodex.github.com/original/ http:/ /www.sxc.hu/photo/297788 http:/ /www.sxc.hu/photo/1171276 http:/ /www.sxc.hu/photo/1170032 http:/ /www.sxc.hu/photo/308460 http:/ /www.sxc.hu/photo/1404711 http:/ /www.sxc.hu/photo/1078432/ http:/ /www.sxc.hu/photo/1388426 http:/ /www.sxc.hu/photo/1395978 http:/ /www.sxc.hu/photo/1315366 http:/ /www.sxc.hu/photo/612301 http:/ /hubot.github.com/ http:/ /www.flickr.com/photos/jimdo_com http:/ /jasonschossler.com/jason-schossler-mud-cakes.php http:/ /www.3gb.com.mx/wp-content/uploads/2011/08/Fry-Questions.jpg http:/ /hascore.com/system/companies/logos/000/000/342/medium/travis.png?1337703320 http:/ /1.bp.blogspot.com/-awMnsQ4BA90/UFqN-VA5VaI/AAAAAAAAFXA/cY4yZi5PhEs/s1600/makerbot %2Breplicator%2B2.jpg http:/ /www.tupilabs.com/assets/jenkins_no_bg.png https:/ /github.com/blog/1368-releasing-make-me http:/ /funny-pictures-blog.com/wp-content/uploads/2011/04/fail2.jpg Lot’s of thanks and love to all the people who supported me: Elena <3 Florian Nils Thorben JIMDO Friedel Alina sources

Slide 89

Slide 89 text

Install and operate On a UNIX system You can also run on any cloud provider.

Slide 90

Slide 90 text

6 steps to hubot https:/ /github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX

Slide 91

Slide 91 text

6 steps to hubot compile node.js *meh* https:/ /github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX

Slide 92

Slide 92 text

6 steps to hubot compile node.js *meh* git clone git:/ /github.com/github/hubot.git https:/ /github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX

Slide 93

Slide 93 text

6 steps to hubot compile node.js *meh* git clone git:/ /github.com/github/hubot.git cd hubot && npm install https:/ /github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX

Slide 94

Slide 94 text

6 steps to hubot compile node.js *meh* git clone git:/ /github.com/github/hubot.git cd hubot && npm install bin/hubot --create /opt/hubot https:/ /github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX

Slide 95

Slide 95 text

6 steps to hubot compile node.js *meh* git clone git:/ /github.com/github/hubot.git cd hubot && npm install bin/hubot --create /opt/hubot configure adapter https:/ /github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX

Slide 96

Slide 96 text

6 steps to hubot compile node.js *meh* git clone git:/ /github.com/github/hubot.git cd hubot && npm install bin/hubot --create /opt/hubot configure adapter forever, supervisor, init or upstart for autostart https:/ /github.com/github/hubot/wiki/Deploying-Hubot-onto-UNIX

Slide 97

Slide 97 text

Y U NO IRC?! aka adapter install

Slide 98

Slide 98 text

vim package.json Y U NO IRC?! aka adapter install

Slide 99

Slide 99 text

vim package.json Y U NO IRC?! aka adapter install

Slide 100

Slide 100 text

vim package.json Y U NO IRC?! aka adapter install

Slide 101

Slide 101 text

vim package.json Y U NO IRC?! aka adapter install

Slide 102

Slide 102 text

export HUBOT_IRC_SERVER=irc.freenode.net vim package.json Y U NO IRC?! aka adapter install

Slide 103

Slide 103 text

export HUBOT_IRC_SERVER=irc.freenode.net export HUBOT_IRC_ROOMS=##nyyyan vim package.json Y U NO IRC?! aka adapter install

Slide 104

Slide 104 text

export HUBOT_IRC_SERVER=irc.freenode.net export HUBOT_IRC_ROOMS=##nyyyan bin/hubot -a irc -n nyanbot vim package.json Y U NO IRC?! aka adapter install