0
Automatic Kamailio
Deployments with Puppet
Giacomo Vacca
Senior Network Applications Developer
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
“He’s seen more SIP transactions than some SBCs in
the market” ...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Truphone
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
labs.truphone.com
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
“You know you’re in trouble when...
you realize you’ve become g...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Deploy and customize in-place
• Extract variables into includ...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Open Source configuration management tool
• Defines the final...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Puppet code is contained in MANIFESTS
• Puppet functionalitie...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Master/Slave vs Standalone
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
# nodes.pp
node ‘k01.domain.com’ {
include ‘kamailio’
}
• As ma...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Simple manifests
• Independent from data
• Extract data into ...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
https://github.com/trulabs/puppet-kamailio
1. Deploy pre-requis...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Kamailio with Puppet
The system around Kamailio
Other areas (se...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Video: http://vimeo.com/giavac/akdp
1. Build VM
2. SSH into VM
...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Summary
Automation is easy
Deployments MUST be automated
Deploy...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Q&A
@giavac
labs@truphone.com *
https://labs.truphone.com/about/
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
ADDITIONAL SLIDES
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Kamailio with Puppet
Kamailio module – repo/apt.pp
class kamail...
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
Kamailio with Puppet
Kamailio module – config.pp
• Manages conf...
Upcoming SlideShare
Loading in...5
×

Automatic Kamailio Deployments With Puppet

479

Published on

Description: Kamailio is a robust, powerful application; virtualization and cloud computing make it extremely easy and quick to setup Kamailio-based solutions. Scaling, geographic distribution and multiple environments (e.g. development, staging/QA, production), though, present some deployment challenges. Puppet provides a solution that dramatically cuts deployment time, reduces occurrences of errors, while at the same time documenting the configuration status. This presentation describes what we did in Truphone Labs to move from a freshly created virtual machine to a running Kamailio instance, automatically and in minutes. Firewall, nagios, syslog, monit, sec, and other related services are also automatically configured.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
479
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Automatic Kamailio Deployments With Puppet"

  1. 1. Automatic Kamailio Deployments with Puppet Giacomo Vacca Senior Network Applications Developer
  2. 2. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 “He’s seen more SIP transactions than some SBCs in the market” (cit.) - Leads Network Dev Team at Truphone Labs - Hacking Kamailio, Asterisk, FreeSWITCH for 10+ ys - Hacking ejabberd, more recently @giavac
  3. 3. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Truphone
  4. 4. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 labs.truphone.com
  5. 5. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 “You know you’re in trouble when... you realize you’ve become good at 3-way diffs” The Problem
  6. 6. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Deploy and customize in-place • Extract variables into included defines file • A debian package with config per host No (automatic) documentation! The Problem – in the past
  7. 7. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Open Source configuration management tool • Defines the final status (‘what’, not ‘how’) • Idempotent (i.e. safely run multiple times) puppetlabs.com The Solution - Puppet
  8. 8. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Puppet code is contained in MANIFESTS • Puppet functionalities are organized in MODULES • “Compiled” manifests are CATALOGUES The Solution - Puppet
  9. 9. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Master/Slave vs Standalone
  10. 10. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 # nodes.pp node ‘k01.domain.com’ { include ‘kamailio’ } • As many environments as you want –Each environment defines a Site •A Site defines a group of Nodes – Every host is a Node Puppet Environments, Sites, Nodes
  11. 11. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 • Simple manifests • Independent from data • Extract data into nodes definition Puppet Separate logic from data
  12. 12. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 https://github.com/trulabs/puppet-kamailio 1. Deploy pre-requisites 2. Install packages (deb, rpm) 3. Set configuration files (kamailio.cfg, tls.cfg) 4. Define ‘service’ (“should be running”) Kamailio with Puppet
  13. 13. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Kamailio with Puppet The system around Kamailio Other areas (see 3rd party modules at PuppetForge): • apt/yum • TCP keepalives • Firewall (iptables) • monit • nagios • fail2ban • logrotate • sec • SSL certificates • Swappiness » What else? Tell me at the Q&A session. Useful tools: Check your modules against Best Practices with ‘puppet-lint’. http://puppet-lint.com/
  14. 14. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Video: http://vimeo.com/giavac/akdp 1. Build VM 2. SSH into VM 3. git clone Puppet repo 4. Run Puppet NOOP mode 5. Run Puppet Build and deploy a new instance
  15. 15. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Summary Automation is easy Deployments MUST be automated Deployments SHOULD be boring Deployments MAY be fun Puppet does the job (Diagram source: http://info.puppetlabs.com/2013-state-of-devops-report.html)
  16. 16. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Q&A @giavac labs@truphone.com * https://labs.truphone.com/about/
  17. 17. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 ADDITIONAL SLIDES
  18. 18. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Kamailio with Puppet Kamailio module – repo/apt.pp class kamailio::repo::apt inherits kamailio::repo { include '::apt' # Note the 40! apt::source { 'kamailio40_wheezy': location => 'http://deb.kamailio.org/kamailio40', release => 'wheezy', repos => 'main', required_packages => 'debian-keyring debian-archive-keyring', key => '07D5C01D', key_server => 'http://deb.kamailio.org/kamailiodebkey.gpg', include_src => true, } Apt::Source['kamailio40_wheezy'] -> Package<|tag == 'kamailio'|> }
  19. 19. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Kamailio with Puppet Kamailio module – config.pp • Manages configuration files • Can install from files or templates Example: templatize a kamailio.cfg define <% if with_tls %>#!define WITH_TLS<% end %>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×