Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automated deployments with robots

Automated deployments with robots

Gave this talk at ScotlandJS on May 9th, 2013
Follow me on Twitter: @CodeStars

Continuous deployment is the high art of devops. So there are several ways to achieve this: many use a one-click deployment tool like ‘Deployinator’, or something self-written. This talk should give some insights about how we at my old employer Digital Pioneers N.V. deploy our apps controlled by an awesome chat robot named hubot (by github). It will also show you how to simply do it the way we did it!

Ole Michaelis

May 09, 2013
Tweet

More Decks by Ole Michaelis

Other Decks in Technology

Transcript

  1. Automated deployments with robots or how to hubot and be

    freaking awesome! ScotlandJS - May 9th - Edinburgh (Scotland)
  2. CI + w00t ?! What’s a must have for CD?

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

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

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

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

    Or just trust your co-workers.... LOL!
  7. 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/
  8. 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>
  9. 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
  10. 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
  11. fun

  12. fun

  13. fun

  14. fun

  15. Extending hubot ... commands directed to him ... any words

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

    spoken ... HTTP requests ... events Hubot can react on ...
  17. scenario Digital Pioneers N.V. Code on Github Apps on Scalarium

    2 Developers plus a few students Jabber developer chat
  18. 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* !
  19. 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* !
  20. 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* !
  21. 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* !
  22. 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* !
  23. 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* !
  24. 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* !
  25. That’s it! Soo... Grab your own! Introduce him to the

    colleagues Play around and have fun Deploy!
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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