Slide 1

Slide 1 text

Automated deployments with robots or how to hubot and be freaking awesome! TakeOff Conference - January 17, 18 - Lille (France)

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

Working @Jimdo “Open Source Rockstar”

Slide 5

Slide 5 text

Introducing hubot for deployments

Slide 6

Slide 6 text

but let’s start at the beginning...

Slide 7

Slide 7 text

Continuous Deployment Continuous Integration + 1 = Continuous Deployment

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

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? Or just trust your co-workers.... LOL!

Slide 17

Slide 17 text

Continuous Delivery Commit (push)

Slide 18

Slide 18 text

Continuous Delivery Commit (push) Test

Slide 19

Slide 19 text

Continuous Delivery Commit (push) Test Deploy

Slide 20

Slide 20 text

Continuous Delivery Commit (push) Test Deploy Test

Slide 21

Slide 21 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 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

Use for fun and profit with 6 build in and about 293 third party scripts

Slide 25

Slide 25 text

fun

Slide 26

Slide 26 text

fun

Slide 27

Slide 27 text

fun

Slide 28

Slide 28 text

fun

Slide 29

Slide 29 text

fun

Slide 30

Slide 30 text

fun

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

profit

Slide 33

Slide 33 text

profit <3

Slide 34

Slide 34 text

profit <3

Slide 35

Slide 35 text

profit <3

Slide 36

Slide 36 text

profit <3

Slide 37

Slide 37 text

profit <3

Slide 38

Slide 38 text

profit <3

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

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

Slide 42

Slide 42 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 43

Slide 43 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 44

Slide 44 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 45

Slide 45 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 46

Slide 46 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 47

Slide 47 text

Y U NO IRC?! aka adapter install

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

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

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

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

Slide 54

Slide 54 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

Slide 55

Slide 55 text

Extending hubot

Slide 56

Slide 56 text

Extending hubot Hubot can react on ...

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

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

Slide 59

Slide 59 text

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

Slide 60

Slide 60 text

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

Slide 61

Slide 61 text

parrot

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

http

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

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

Slide 66

Slide 66 text

Assembling the pieces continuous integration + hubot + X = AWESOMENESS

Slide 67

Slide 67 text

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

Slide 68

Slide 68 text

a true story

Slide 69

Slide 69 text

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

Slide 70

Slide 70 text

We weren’t ready for continuous delivery.

Slide 71

Slide 71 text

So I spent a weekend hacking on hubot- scalarium

Slide 72

Slide 72 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 73

Slide 73 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 74

Slide 74 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 75

Slide 75 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 76

Slide 76 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 77

Slide 77 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 78

Slide 78 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 79

Slide 79 text

What’s behind the scene?

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

What could be next?

Slide 83

Slide 83 text

What could be next? Deploy triggered by github travis jenkins

Slide 84

Slide 84 text

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

Slide 85

Slide 85 text

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

Slide 86

Slide 86 text

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

Slide 87

Slide 87 text

Thank you!

Slide 88

Slide 88 text

Links & stuff hubot.github.com github.com/github/hubot hubot-script-catalog.herokuapp.com github.com/github/hubot-scripts

Slide 89

Slide 89 text

Q & A

Slide 90

Slide 90 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:/ /www.tupilabs.com/assets/jenkins_no_bg.png 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