SlideShare a Scribd company logo
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” (cit.)
- Leads Network Dev Team at Truphone Labs
- Hacking Kamailio, Asterisk, FreeSWITCH for 10+ ys
- Hacking ejabberd, more recently
@giavac
© 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 good at 3-way diffs”
The Problem
© 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
© 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
© 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
© 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 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
© 2013 Truphone Limited. All Rights Reserved.03 April 2014
• Simple manifests
• Independent from data
• Extract data into nodes definition
Puppet
Separate logic from data
© 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
© 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/
© 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
© 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)
© 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 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'|>
}
© 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 %>

More Related Content

PDF
Homer - Workshop at Kamailio World 2017
PDF
Managing Your Cisco Datacenter Network with Ansible
PPTX
CoreOS in a Nutshell
PDF
CoreOS + Kubernetes @ All Things Open 2015
PDF
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
PDF
Kamailio - Secure Communication
PDF
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
PDF
CoreOS: Control Your Fleet
Homer - Workshop at Kamailio World 2017
Managing Your Cisco Datacenter Network with Ansible
CoreOS in a Nutshell
CoreOS + Kubernetes @ All Things Open 2015
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
Kamailio - Secure Communication
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
CoreOS: Control Your Fleet

What's hot (20)

PDF
Cobbler - Fast and reliable multi-OS provisioning
PPTX
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
PDF
PDF
CoreOS @Codetalks Hamburg
PDF
Automating Mendix application deployments with Nix
PDF
NkSIP: The Erlang SIP application server
PDF
IT Automation with Ansible
PDF
How automated cloud infrastructure setups can help with Continuous Delivery
PDF
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
PDF
IPTABLES Introduction
PDF
A Universe From Nothing
PPTX
OVN 設定サンプル | OVN config example 2015/12/27
PPTX
Salting new ground one man ops from scratch
PPT
Python Deployment with Fabric
PDF
Infrastructure as Code with Chef / Puppet
PPTX
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
PPT
Fake IT, until you make IT
PDF
PDF
Refactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
PDF
Webinar: Automate IBM Connections Installations and more
Cobbler - Fast and reliable multi-OS provisioning
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
CoreOS @Codetalks Hamburg
Automating Mendix application deployments with Nix
NkSIP: The Erlang SIP application server
IT Automation with Ansible
How automated cloud infrastructure setups can help with Continuous Delivery
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
IPTABLES Introduction
A Universe From Nothing
OVN 設定サンプル | OVN config example 2015/12/27
Salting new ground one man ops from scratch
Python Deployment with Fabric
Infrastructure as Code with Chef / Puppet
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Fake IT, until you make IT
Refactoring Katello Installer modules - Ewoud Kohl van Wijngaarden
Webinar: Automate IBM Connections Installations and more
Ad

Similar to Automatic Kamailio Deployments With Puppet (20)

PPTX
Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...
PPTX
How to Make a Honeypot Stickier (SSH*)
DOCX
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
DOCX
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
PPTX
How to Make a Honeypot Stickier (SSH*)
PPTX
Deep inside TOMOYO Linux
PDF
Wissbi osdc pdf
PPTX
Dealing with pervasive monitoring - Networkshop44
PPT
Scalable Systems Management with Puppet
PPT
Scalable systems management with puppet
PPTX
How We Protected Our Router
PDF
Technical note Miro automatic ftp uploads - r 30 sep 16
ODP
Intro To Linux
PDF
Nagios 3
PPTX
Cloud init and cloud provisioning [openstack summit vancouver]
PDF
Gluster Cloud Night in Tokyo 2013 -- Tips for getting started
PDF
Hack.lu 09 ip-morph
PDF
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
PDF
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
PDF
Launch and Environment Constraints Overview
Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...
How to Make a Honeypot Stickier (SSH*)
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
How to Make a Honeypot Stickier (SSH*)
Deep inside TOMOYO Linux
Wissbi osdc pdf
Dealing with pervasive monitoring - Networkshop44
Scalable Systems Management with Puppet
Scalable systems management with puppet
How We Protected Our Router
Technical note Miro automatic ftp uploads - r 30 sep 16
Intro To Linux
Nagios 3
Cloud init and cloud provisioning [openstack summit vancouver]
Gluster Cloud Night in Tokyo 2013 -- Tips for getting started
Hack.lu 09 ip-morph
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
Launch and Environment Constraints Overview
Ad

More from Giacomo Vacca (15)

PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Testing WebRTC applications at scale.pdf
PDF
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
PDF
STUN protocol
PDF
Modern VoIP in modern infrastructures
PDF
RIPP Notes
PDF
Modern VoIP in Modern Infrastructures
PDF
An SFU/MCU integration for heterogeneous environments
PDF
Kamailio World 2018 - Workshop: kamailio-tests
PDF
[workshop] The Revolutionary WebRTC
PDF
Continuous Integration and Kamailio
PDF
Docker - From Walking To Running
PDF
Docker From Scratch
PDF
Docker and Puppet for Continuous Integration
PDF
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform
WebRTC in SignalWire - troubleshooting media negotiation
Testing WebRTC applications at scale.pdf
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
STUN protocol
Modern VoIP in modern infrastructures
RIPP Notes
Modern VoIP in Modern Infrastructures
An SFU/MCU integration for heterogeneous environments
Kamailio World 2018 - Workshop: kamailio-tests
[workshop] The Revolutionary WebRTC
Continuous Integration and Kamailio
Docker - From Walking To Running
Docker From Scratch
Docker and Puppet for Continuous Integration
Top 5 Challenges To Add Web Calls to Truphone VoIP Platform

Recently uploaded (20)

PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
innovation process that make everything different.pptx
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
artificial intelligence overview of it and more
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPT
tcp ip networks nd ip layering assotred slides
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPTX
Internet___Basics___Styled_ presentation
PDF
The Internet -By the Numbers, Sri Lanka Edition
DOCX
Unit-3 cyber security network security of internet system
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Design_with_Watersergyerge45hrbgre4top (1).ppt
An introduction to the IFRS (ISSB) Stndards.pdf
innovation process that make everything different.pptx
PptxGenJS_Demo_Chart_20250317130215833.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
E -tech empowerment technologies PowerPoint
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
artificial intelligence overview of it and more
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Paper PDF World Game (s) Great Redesign.pdf
tcp ip networks nd ip layering assotred slides
Introuction about ICD -10 and ICD-11 PPT.pptx
Module 1 - Cyber Law and Ethics 101.pptx
Internet___Basics___Styled_ presentation
The Internet -By the Numbers, Sri Lanka Edition
Unit-3 cyber security network security of internet system

Automatic Kamailio Deployments With Puppet

  • 1. Automatic Kamailio Deployments with Puppet Giacomo Vacca Senior Network Applications Developer
  • 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. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Truphone
  • 4. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 labs.truphone.com
  • 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. © 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. © 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. © 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. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Master/Slave vs Standalone
  • 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. © 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. © 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. © 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. © 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. © 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. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 Q&A @giavac labs@truphone.com * https://labs.truphone.com/about/
  • 17. © 2013 Truphone Limited. All Rights Reserved.03 April 2014 ADDITIONAL SLIDES
  • 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. © 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 %>